withdrawTokens
uses _mint rather than _safeMint and does not check that the receiver accepts ERC721 token transfers
in withdrawTokens
function if the _withdrawFromEscrow
is not successful as we can see
the function then mint an NFT to ownerL1
it will mint to req.ownerL1
, but mintFromBridge
use _mint function which it not safe to mint an NFT , if the req.ownerL1
is a a contract that does not implement the onERC721Received
method NFT will lost.
NFT will lost.
Manual review
Consider using safeMint.
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.
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.