Closed c4-submissions closed 1 year ago
Insufficient proof. Additionally, wrapping USDY to get rUSDY is simply resorting to a different form of token unit.
raymondfam marked the issue as low quality report
raymondfam marked the issue as primary issue
kirk-baird marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2023-09-ondo/blob/main/contracts/usdy/rUSDY.sol#L449-L456 https://github.com/code-423n4/2023-09-ondo/blob/main/contracts/usdy/rUSDY.sol#L434-L440
Vulnerability details
Impact
rUSDY is the rebasing variant of USDY token, and is heavily based on other rebasing tokens such as stETH. Users are able to acquire rUSDY tokens by calling the wrap(uint256) function on the contract. Where as the price of a single USDY token varies over time, the price of a single rUSDY token is fixed at a price of 1 Dollar.
The description of the competition on the code4rena website says: "Where as the price of a single USDY token varies over time, the price of a single rUSDY token is fixed at a price of 1 Dollar, with yield being accrued in the form of additional rUSDY tokens."
At the same time, there is no time in the contract for which rUSDY tokens are held. If additional income is credited to the user's rUSDY balance, the contract is subject to a flashloan attack.
Proof of Concept
Tools Used
Manual review
Recommended Mitigation Steps
Enter a minimum wrap() time for tokens or accrue additional income based on the holding time
Assessed type
Context