In StabilityPool::liquidateBorrower
-> the function calls the LendingPool::finalizeLiquidation
-> which transfers the user being liquidated, NFT's to the stability pool during liquidation finalization.
The issues is that StabilityPool
does not have any logic that can effectively handle and manage the NFT's it receives from the LendingPool
-> effectively leaving the tokens locked in the StabilityPool
.
In LendingPool::finalizeLiquidation
-> the user being liquidated has all of their NFT's transferred to StabilityPool
.
Even though, StabilityPool
has no logic to handle properly, the receiving of ERC721 tokens, the NFT's are sent using transferFrom
instead of safeTransferFrom
-> which will allow the StabilityPool
to receive them anyways and bypass the safety checks.
The StabilityPool
receives the NFT's but can do nothing with them. The proper handling of ERC721 tokens by a contract requires either:
Manual logic via onERC721Received
that enables the contract to handle and manage the NFT's.
Inherit ERC721Holder
contract. The LendingPool
does this, and allows the LendingPool
to effectively handle and manage the NFT's.
The StabilityPool
can receive the tokens and store the tokens in its balance, but loses all access to manage the tokens for any subsequent actions, they are just locked in the contract.
StabilityPool
loses access to the following:
cannot transfer NFT's
cannot approve other addresses to transfer the NFT's
cannot sell NFT in a marketplace
cannot use the NFT as collateral
cannot update NFT properties
cannot sell NFT to new buyers
Manual Review
Inherit the ERC721Holder
contract, just as the LendingPool
does. This will allow the StabilityPool
to effectively handle and manage the NFT's it receives, and not have effectively locked tokens.
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.