DESCRIPTION
The target of this audit is the private code repository of xaue-lending of XAUE Lab. XAUE-lending is a tokenized gold lending vault that allows users to deposit Tether Gold (i.e., XAUT) and receive XAUE-backed lending shares (i.e., xLEND), which can be used as collateral in other protocols. The protocol converts deposited XAUT into XAUE via an external Agent Router, tracks value growth through a Cobo Fund Oracle NAV price feed, and splits any NAV appreciation surplus between users and the protocol. Redemptions are asynchronous: users request redemption, the vault routes XAUE back through the Router, and users later claim XAUT.
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 have found that the codebase contains 1 high-risk issue that require prompt attention. In addition, we have identified other non-critical issues as well as recommendations and notes that should be considered. The xaue-lending team has addressed these issues promptly. It is important to note that our audit covers only the final reported versions of the codebase. Any subsequent updates would require a re-evaluation.
KEY FINDINGS
In total, we find 7 potential issues in the smart contract. We also have 5 recommendations and 3 notes, as follows:
| ID | Severity | Description | Status |
|---|---|---|---|
| 1 | High | Potential DoS due to mismatched function signatures | Fixed |
| 2 | Medium | Incorrect return value in function previewMint() |
Fixed |
| 3 | Medium | Incorrect logic in function claimRejectedRedemption() |
Fixed |
| 4 | Medium | Stale pricing due to immutable oracle | Fixed |
| 5 | Low | Lack of protocolSurplusXaue restoration on rejection |
Fixed |
| 6 | Low | Potential overwrite of the vaultByPartner mapping |
Fixed |
| 7 | Low | Arbitrary receiver of protocol surplus | Fixed |
| 8 | - | Add allowance revocation logic | Fixed |
| 9 | - | Return redemption ID and expose redemption status | Fixed |
| 10 | - | Add zero-address validations in contract LendingShare |
Fixed |
| 11 | - | Add errors for pause status | Fixed |
| 12 | - | Remove redundant code | Fixed |
| 13 | - | Potential centralization risks | - |
| 14 | - | Assumptions on external contracts | - |
| 15 | - | NAV should be monotonically increasing | - |
More details are provided in the audit report.