The LendingPool.withdrawNFT()
function uses safeTransferFrom
to transfer NFTs to msg.sender
. This requires the recipient to be an EOA or a contract that implements the onERC721Received
interface. If msg.sender
is a contract that does not implement this interface, the withdrawal will fail, locking the NFT in the pool.
contracts/core/pools/LendingPool/LendingPool.sol:316
The safeTransferFrom
function enforces that the recipient (msg.sender
) must handle ERC721 tokens by implementing the onERC721Received
interface. If msg.sender
is a contract that does not implement this interface, the transaction will revert, preventing the NFT from being withdrawn.
Contracts interates with the protocol who attempt to withdraw NFTs to a contract address that does not implement onERC721Received
will be unable to retrieve their NFTs.
vscode
Replace safeTransferFrom
with transferFrom
to allow NFT transfers to any address.
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.