Deposits are executed with transferFrom
instead of safeTransferFRom
.
Deposits are executed with transferFrom
instead of safeTransferFRom
. The difference between transferFrom and safeTransferFrom in ERC721 is the callback that safeTransferFrom performs to ensure that the receiver is a safe recipient. While transferFrom and safeTransferFrom are both used to transfer a token from one account to another, safeTransferFrom checks if the recipient is a contract and if so, it calls a callback function on the recipient, onERC721Received, and reverts if the recipient does not return the magic value. The protocol should consider using safeTransferFRom to transfer the ERC721 tokens.
As seen below, transferFrom
is used instead of safeTransferFRom
to execute deposits.
https://github.com/Cyfrin/2024-07-ark-project/blob/273b7b94986d3914d5ee737c99a59ec8728b1517/apps/blockchain/ethereum/src/Escrow.sol#L39
References:
Deposits are executed with transferFrom
instead of safeTransferFRom
.
Manual Review
The protocol should use safeTransferFrom to execute deposits.
Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.
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.