Breezy Basil Toad
Medium
The deleverToZeroBalance
function pays down the borrow token to zero by selling off a specified amount of the collateral asset. The function first borrows collateral, then trades the collateral for borrow tokens, and finally repays the debt position. However, if, due to extreme market conditions, the borrow balance exceeds or is equal to the collateral balance, all attempts to withdraw and repay will fail. Currently, there is no function to account for this situation. As a result, whenever the borrow balance exceeds the collateral, the position will be liquidated, as all withdrawals for collateral will be blocked as a result the debt position will be liquidated
No response
borrowposition more than or equal to collateral
No response
The position will be liquidated every time the collateral is equal to or less than the borrow balance.
No response
Consider a design change to handle the case when the collateral drops to the liquidation threshold