Ondo Finance - m4ttm's results

Institutional-Grade Finance. On-Chain. For Everyone.

General Information

Platform: Code4rena

Start Date: 01/09/2023

Pot Size: $36,500 USDC

Total HM: 4

Participants: 70

Period: 6 days

Judge: kirk-baird

Id: 281

League: ETH

Ondo Finance

Findings Distribution

Researcher Performance

Rank: 41/70

Findings: 1

Award: $18.85

Analysis:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Awards

18.8458 USDC - $18.85

Labels

analysis-advanced
grade-b
sufficient quality report
A-03

External Links

1. Audit Approach

StepTaskDetails
1Run TestsTests run successfully
2Coverage~80% test coverage for contracts in audit scope
3SlitherReviewed Slither results, no vulnerabilities discovered based on output
4SuryaGenerate graphs to understand the overall project structure. Provided an initial insight to the contract inheritance and function call flow
5Solidity MetricsGenerate metrics reports to obtain initial insight on the codebase, noting areas of potential concern
6Code ReviewLine by line code review
7Test ReviewReview of each test and it's purpose

2. Mechanism Summary

USDY is a stablecoin previously introduced by Ondo Finance and can be wrapped into rUSDY, a new rebasing variant. This uses a newly developed oracle, RWADynamicOracle to determine the USDY price. A bridge is also introduced to make the token compatible across multiple chains, using the SourceBridge and DestinationBridge contracts.

3. Centralisation Risks

USDY is a centrally managed, upgradable contract. The admin is able to change the code, preventing the contract from working as intended and in the worst case could steal user's funds.

4. Quality Analysis

4.1 Codebase

The code is well structured and organised into separate contracts, each with a clear purpose. NatSpec comments are well used throughout the codebase. The automated findings show that some conventions which would result in saving gas are are ignored and should be taken into consideration, such as using custom errors instead of reverting with a string and using private for constants.

4.2 Documentation

The code is well commented with NatSpec comments, which are clear and informative. This could be improved by adding supplementary external documentation with diagrams outlining the workings of the core functionality.

4.3 Tests

Tests are clearly structured and cover most of the core functionality but coverage could be better than 80%. Testing could be further improved with the use of fuzz testing, or formal verification to give users the extra assurance that their funds are safe.

5. Architecture Improvements

5.1 Use an off chain deployment script instead of a factory contract

rUSDYFactory is used to deploy rUSDY and setup the proxy. This could be done off chain with a deployment script which keeps unnecessary code off chain, saving gas.

Time spent:

20 hours

#0 - c4-pre-sort

2023-09-08T14:47:30Z

raymondfam marked the issue as sufficient quality report

#1 - c4-judge

2023-09-24T07:05:36Z

kirk-baird marked the issue as grade-b

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter