Last Trove may be prevented from redeeming #381
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
edited-by-warden
judge review requested
Judge should review this issue
M-09
primary issue
Highest quality submission among a set of duplicates
satisfactory
satisfies C4 submission criteria; eligible for awards
selected for report
This submission will be included/highlighted in the audit report
Lines of code
https://github.com/code-423n4/2023-02-ethos/blob/73687f32b934c9d697b97745356cdf8a1f264955/Ethos-Core/contracts/RedemptionHelper.sol#L128
Vulnerability details
Impact
In
redeemCollateral()
of RedemptionHelper.sol, the LUSDbalanceOf
the redeemer is checked against the specific collateral recorded LUSD debt (both active and defaulted).This makes sense in a single collateral system such as Liquity, but is problematic in a multi-collateral one like Reserve. Since each collateral type tracks its own debt but mints the same LUSD token, LUSD supply (and thus balance) being less than the collateral debt is no longer an invariant. This can can result in:
Proof of Concept
Last trove may be prevented from redeeming
Consider the cases when
A griefer can front-run the last Trove from redeeming by sending the user weth with the amount
entireSystemDebt
+ 1.In a similar case as above, any users that may borrow from multiple Troves types such that their LUSD balance is greater than the total collateral debt will be prevented from redeeming. However, this is not as problematic because they can just send their excess tokens out.
Tools Used
Manual Review
Recommended Mitigation Steps
The text was updated successfully, but these errors were encountered: