DESCRIPTION
The target of this audit is the private code repository of SyncVault Contracts of R25. The SyncVault contracts form an upgradeable tokenized asset vault system within R25. Following a synchronous redemption model, SyncVault issues time-locked shares upon deposit and processes redemptions either immediately within configured limits or through a queued flow for deferred fulfillment. Throughout this module, deposited assets are forwarded to a custodian address, withdrawals are funded by a dedicated payer account, and vault instances are deployed and tracked by a factory contract. Specifically, for code in Version 1, the audit only focuses on the smart contracts in the following directories/files: src/r25-pc For code in Version 2, the audit only focuses on the smart contracts in the following directories/files: src/r25-pc/SyncVault Other files are not within the scope of the audit. Additionally, all dependencies of the Target are considered reliable in terms of both functionality and security, and are therefore not included in the audit scope.
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 and 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.
KEY FINDINGS
In total, we find 8 potential issues in the smart contract. We also have 12 recommendations and 8 notes, as follows:
| ID | Severity | Description | Status |
|---|---|---|---|
| 1 | Low | Incorrect rounding direction | Fixed |
| 2 | Low | Circumvention of instant redemption limit | Confirmed |
| 3 | Low | Potential gas griefing attacks | Confirmed |
| 4 | Low | Lack of overrides for ERC4626 view functions | Fixed |
| 5 | Low | Lack of zero-value validation in deposit and withdrawal operations | Fixed |
| 6 | Low | Incorrect conversion when totalManagedAssets is zero |
Fixed |
| 7 | Low | Incorrect implementation of ERC-4626 maximum limit functions | Partially Fixed |
| 8 | Low | Lack of handling for invalid requests | Confirmed |
| 9 | - | Add an upper-bound check in setMaxFluctuationBps() |
Confirmed |
| 10 | - | Use caller as the parameter for function _processWithdrawal() |
Confirmed |
| 11 | - | Correct the field name in the event CreateVault |
Fixed |
| 12 | - | Fix storage gap size | Confirmed |
| 13 | - | Remove redundant code | Fixed |
| 14 | - | Align comments with implementation | Fixed |
| 15 | - | Add underlying consistency checks in VaultMintable |
Fixed |
| 16 | - | Use EIP-7201 for slot derivation | Fixed |
| 17 | - | Add input validation in function createVault() |
Confirmed |
| 18 | - | Optimize the sequence of checks | Fixed |
| 19 | - | Revise the incorrect parameters | Confirmed |
| 20 | - | Revise incorrect annotations | Confirmed |
| 21 | - | Token assumption | - |
| 22 | - | Different effect time of personal quota | - |
| 23 | - | Inconsistency among vault logic due to implementation updates | - |
| 24 | - | Deviations from the EIP-4626 standard | - |
| 25 | - | Centralized withdrawal mechanism | - |
| 26 | - | Ensure the correctness and timeliness of Oracle reports | - |
| 27 | - | Share token transfer restriction | - |
| 28 | - | Potential centralization risks | - |
More details are provided in the audit report.