Description:Description\
The BBLiquidation::liquidate(...) and SGLBorrow::Liquidate(...) are functions that users call to liqudate positions that are currently greater than or equal to the collateralizationRate which is set in the sysytem as 80%. However these functions are protected by a optionNotPaused(...) modifier with a PauseType.Liquidation argument which ensures the functions cannot be called whenever PauseType.Liquidation= true
however due to market conditions the value of Bobs collateral decreases bringing his position to a collateralizationRate of 81%.
PauseType.Repayis currently set to true.
Alice calls BBLiquidation::liquidate(...) to liquidate BOB but the function reverts due to in the optionNotPaused(...) modifier
Bob's position is currently at a collateralizationRate of 81%,
Market conditions continue to deterioriate and Bobs collateral value keeps going further down plumeting Bobs collateralizationRate.
Bob is not the only user eligible for liquidation and as such this could drive the protocol into insolvency considering that it is now impossible to liquidate other positions that are below the liquidationCollateralizationRate of the protocol.
Attachments
Revised Code File (Optional)
Modify the BBLiquidation::liquidate(...) and SGLBorrow::Liquidate(...)functions to ensure users are able to repay their loans as shown below
Github username: @Audinarey Twitter username: audinarey Submission hash (on-chain): 0x8f197744e0eca8348e4d96f04a891580ddebd01a1f43e3293f9fdafa8f0f2802 Severity: high
Description: Description\ The
BBLiquidation::liquidate(...)
andSGLBorrow::Liquidate(...)
are functions that users call to liqudate positions that are currently greater than or equal to thecollateralizationRate
which is set in the sysytem as 80%. However these functions are protected by aoptionNotPaused(...)
modifier with aPauseType.Liquidation
argument which ensures the functions cannot be called wheneverPauseType.Liquidation
=true
Attack Scenario\
liquidationCollateralizationRate
is 80%collateralizationRate
of 81%.PauseType.Repay
is currently set totrue
.BBLiquidation::liquidate(...)
to liquidate BOB but the function reverts due to in theoptionNotPaused(...)
modifiercollateralizationRate
of 81%,collateralizationRate
.liquidationCollateralizationRate
of the protocol.Attachments
Revised Code File (Optional)
Modify the
BBLiquidation::liquidate(...)
andSGLBorrow::Liquidate(...)
functions to ensure users are able to repay their loans as shown below