You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CDS.withdraw will be DOS when current exchangeRate is fewer than liquidation exchangeRate
Summary
There is calculation for the weeth and rseth amount without yields. But this calculation could revert in some case.
Root Cause
In the CDSLib.sol:672withdrawUser() calculates the weeth and rseth amount without yields.
The weETHAmountInETHValue is the eth amount for weETH based on liquidation exchangeRate. The exchangeRate varies and when current exchangeRate is fewer than liquidation exchangeRate, (weETHAmountInETHValue * 1 ether) / params.weETH_ExchangeRate) will be greater than weETHAmount.
As result, CDSLib.withdrawUswer() will revert and this breaks the invariants of protocol - "New Borrows cannot mint new stablecoin if cds/borrow ratio is below 0.2 and cds users cannot withdraw."
Sleepy Sepia Zebra
Medium
The
CDS.withdraw
will be DOS when currentexchangeRate
is fewer than liquidation exchangeRateSummary
There is calculation for the weeth and rseth amount without yields. But this calculation could revert in some case.
Root Cause
In the CDSLib.sol:672
withdrawUser()
calculates the weeth and rseth amount without yields.The
weETHAmountInETHValue
is the eth amount for weETH based on liquidation exchangeRate. The exchangeRate varies and when currentexchangeRate
is fewer than liquidation exchangeRate,(weETHAmountInETHValue * 1 ether) / params.weETH_ExchangeRate)
will be greater thanweETHAmount
.As result,
CDSLib.withdrawUswer()
will revert and this breaks the invariants of protocol - "New Borrows cannot mint new stablecoin if cds/borrow ratio is below 0.2 and cds users cannot withdraw."Internal pre-conditions
External pre-conditions
Attack Path
Impact
CDS users can't withdraw and this could break the invariants of the protocol
Mitigation
Implement correct handling for cases where current
exchangeRate
is fewer than liquidation exchangeRate.The text was updated successfully, but these errors were encountered: