The burn function in rUSDY allows the caller to benefit by transferring the burned shares to themselves rather than burning them. #270
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-85
grade-c
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sufficient quality report
This report is of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-09-ondo/blob/47d34d6d4a5303af5f46e907ac2292e6a7745f6c/contracts/usdy/rUSDY.sol#L680
Vulnerability details
Impact
The caller can burn rUSDY from any account and gain the underlying USDY shares for themselves. This could be used maliciously to steal USDY shares.It allows the caller to collect free shares at the expense of other holders, by artificially increasing the rUSDY price.
Proof of Concept
The key part is this line: https://github.com/code-423n4/2023-09-ondo/blob/47d34d6d4a5303af5f46e907ac2292e6a7745f6c/contracts/usdy/rUSDY.sol#L680
This transfers the burnt shares to msg.sender rather than burning them.
This allows the caller of the burn function to get free shares. For example:
This exploits the rebasing mechanic of rUSDY. When shares get burned, the rUSDY price increases for remaining holders because totalSupply decreases but pooled USDY remains the same.
So this vulnerability allows the caller to collect free shares at the expense of other holders, by artificially increasing the rUSDY price.
Tools Used
Manual
Recommended Mitigation Steps
The burn function should actually burn the shares instead of transferring them or the burn() function could be changed to send the shares to an authorized share burner address instead of the caller
Assessed type
Other
The text was updated successfully, but these errors were encountered: