stabilityPool is not designed to handle NFTs ,
meaning any NFT transferred to stabilityPool as part of the current liquidation process are unrecoverable.
During the liquidation process,
NFTs (collateral) of the user getting liquidated are transfered to the stabilityPool
The line in finalizeLiquidation uses transferFrom which assumes the receiving address can handle NFTs
raacNFT.transferFrom(address(this), stabilityPool, tokenId);
However StabilityPool is NOT designed to handle NFTs
The StabilityPool contract is designed to manage ERC-20 tokens
(like rToken, deToken, crvUSDToken, and raacToken).
There are no functions to manage ERC-721 NFTs.
This means that any NFT transferred to stabilityPool cannot be retrieved unless,
functionalities are added to facilitate NFT handling.
Also worth mentioning that using safeTransferFrom in finalizeLiquidation
without making the stabilityPool onERC721Received compatible
will cause the transaction to revert, preventing liquidation.
Locked Collateral:
NFTs transferred to stabilityPool become unrecoverable.
Impact : High
(The NFTs representing Real World Assets could be of significant value)
Likelihood : High
(Liquidations are a common occurance in lending protocols)
Manual Analysis
Make StabilityPool an NFT Receiver: Implement IERC721Receiver to accept NFTs.
Allow NFT Withdrawals: a function to withdraw stuck NFTs.
An example implementation below
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.