개요
The target of this audit is the private code repositories of smart-wallet-recovery && groth16-solana of OKX. This project is a smart account recovery system deployed on Solana. It combines ZK-Email zero-knowledge proofs, ECDSA signature verification, and a DKIM registry to provide scalable, low-interaction account recovery. Smart wallet providers can pre-register their DKIM public keys via the DKIM registry, eliminating the need to trust third-party DNS providers. When a user needs to recover an account, they submit proofs to the recovery-manager contract, which consist of an off-chain generated ZK-Email proof demonstrating ownership of a specific email and an off-chain 2FA-verified ECDSA signature. After verification, the smart account’s owner key can be updated, completing the account recovery process.
Please refer to the report for the detailed audit scope.
Our audit methodology employs automated vulnerability scans, manual verification, and business logic analysis to uncover potential security issues coupled with gas and code quality optimization recommendations.
In summary, we did not find any critical issues within the audited codebase. However, we have identified some non-critical issues that should be addressed. Additionally, we have put forth recommendations to further strengthen the code logic, along with notes that should be taken into consideration. It is important to note that the scope of our audit was strictly limited to the specific code versions mentioned in the report. Any updates made subsequent to our review would require a re-evaluation.
주요 발견 사항
스마트 컨트랙트에서 잠재적인 문제 2건을 발견했습니다. 권고 사항 1건과 참고 사항 6건도 함께 정리했습니다.
| ID | Severity | Description | Status |
|---|---|---|---|
| 1 | Low | Lack of binding check for smart_account_program in function recover() |
Fixed |
| 2 | Low | Potential DoS during submitting proofs | Fixed |
| 3 | - | Applying global index in the function pack_bytes_2fields() |
Fixed |
| 4 | - | Execution ordering of concurrent proposals with identical identifiers | - |
| 5 | - | Ensure off-chain negation of proof_a before submission in Groth16 verification |
- |
| 6 | - | Ensure timestamp consistency for multiverifier proofs | - |
| 7 | - | Potential centralization risks | - |
| 8 | - | Ensure consistency between user-provided recovery methods and smart_account configured recovery methods |
- |
| 9 | - | Verifier program initialization consistency are not enforced | - |
자세한 내용은 감사 보고서에서 확인할 수 있습니다.