The current implementation allows users to deposit NFTs
while under liquidation
. Additionally, the liquidation process does not recalculate the user's health factor
before finalizing liquidation, potentially resulting in asset loss.
1.NFT deposit:
Users can deposit NFTs as collateral.
2.Borrowing:
When borrowing, users can use this collateral and receive DebtTokens
, which represent their debt.
3.Liquidation Trigger:
If the value of the collateral (NFTs) decreases, the initiateLiquidation()
function can be called.
This function checks the user's health factor, and if it falls below a certain threshold (healthFactorLiquidationThreshold
), the user is marked for liquidation by setting isUnderLiquidation[userAddress] = true
.
4.Depositing more NFTs:
Currently, there is no check in place to prevent users from depositing additional NFTs
while they are under liquidation
. This means that even if a user is in a precarious financial situation, they can still deposit an NFT
5.Finalizing Liquidation:
When the finalizeLiquidation()
function is called, it transfers all of the user's NFTs (including any that were recently deposited) to the Stability Pool.
The user's NFT array (user.nftTokenIds
) is cleared, all entries in user.depositedNFTs
are set to false
, and his debt tokens burned.
This can lead to a situation where they lose all their NFTs, including those they may have deposited recently, without any opportunity to rectify their financial situation.
Manual Review
Prevent NFT deposits during Liquidation
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.