Closed github-actions[bot] closed 1 year ago
this is implemented as intented, otherwise the taker will pay fees for settling an auction but without getting anything in change. if someone repays debt or pledge more collateral they will be removed from the auction, if LUP moves then the borrower won't be removed from auctions. Will update the whitepaper to remove or the LUP moving up above the loan’s TP
part
Considering this issue as a low, as the Sponsor the code is working as intended and whitepaper will be updated as per implementation.
Jeiwan
high
Loan can be "taken" after it became collateralized as a result of a recovered LUP
Summary
A loan can be liquidated ("taken") if it's collateralized as per the current LUP. This happens because LUP may recover after the loan was kicked, but there's no check in
take
function for whether the loan is collateralized again.Vulnerability Detail
As per the whitepaper:
Thus, it's expected that, after LUP has moved above the loan's TP, the liquidation of the loan should be cancelled, the collateral should be returned to its owner, and the 90-day interest penalty to be subtracted from borrower's total debt. However, this doesn't happen.
The liquidation process is implemented in two stages:
The gap between "kicking" and "taking" may take up to 3 days, during which the LUP may increase and bring the position being liquidated above the liquidation threshold.
Impact
Borrower's collateral may be falsely liquidated while its value being above borrower's debt, causing loss of funds to borrowers. The damage may be higher in ERC721 pools where collateral has a high price.
Code Snippet
Auctions.sol#L538
Tool used
Manual Review
Recommendation
Consider disallowing liquidations of collateralized positions and allowing borrowers to cancel liquidations and return their collateral.