transferFrom()
is used for ERC721 instead of safeTransferFrom()
, which can cause user's NFT to be frozen
#228
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate
This issue or pull request already exists
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/src/Cally.sol#L258-L297
Vulnerability details
https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/src/Cally.sol#L258-L297
https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/src/Cally.sol#L318-L346
In
withdraw()
andexercise()
,_to
is fixed tomsg.sender
However, if
_to
is a contract address does not support ERC721, the NFT can be frozen in the contract.As per the documentation of EIP-721:
Ref: https://eips.ethereum.org/EIPS/eip-721
Recommendation
recipient
parameter;safeTransferFrom()
for ERC721Consider changing to:
The text was updated successfully, but these errors were encountered: