Beginner FriendlyFoundryDeFiOracle
100 EXP
View results
Submission Details
Severity: medium
Invalid

Use OpenZeppelin's 4626 vault standard contract for AssetToken instead of a bespoke implementation

Summary

OpenZeppelin has a vault standard 4626 that can be used for depositors in Thunder Loan, and it would be safer than using your current AssetToken.sol contract. OZ's 4626 accepts an underlying asset (in our case, that would be the underlying tokens that are being flash loaned) and issues depositors shares that represent their deposit plus any additional earnings on the underlying tokens. This is perfect for depositors in ThunderLoan, and, because it is battle-tested, it would be safer than the current AssetToken.sol. For example, the exchange rate is not properly calculated in AssetToken and you could avoid that if you used 4626

Impact

You are using a non-battle-tested vault contract that is more likely to have bugs

Tools Used

Manual review

Recommendations

Change to using OpenZeppelin 4626 for your vault

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: User experience and design improvement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.