You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using transferFrom() can lock NFTs in a contract when settling auctions.
Summary
In NounsAuctionHouseV3.sol::_settleAuction(), transferFrom is used to transfer the nouns token to the winner. However, if the winner is a contract that does not handle ERC-721, the nouns token will be locked in the contract forever, and the winner won't be able to cancel his stream in StreamEscrow. This use is discouraged by Openzeppelin and safeTransferFrom() should be used instead. Ref : https://docs.openzeppelin.com/contracts/3.x/api/token/erc721
A contract that cannot handle ERC-721 must win the auction.
External pre-conditions
No response
Attack Path
No response
Impact
This will lead to Nouns token being stuck in contracts, and winner wont be able to cancel the stream.
PoC
No response
Mitigation
Consider using safeTransferFrom() instead of transferFrom().
The text was updated successfully, but these errors were encountered:
sherlock-admin4
changed the title
Sneaky Berry Wolf - Using transferFrom() can lock NFTs in a contract when settling auctions.
wickie - Using transferFrom() can lock NFTs in a contract when settling auctions.
Dec 4, 2024
wickie
Medium
Using transferFrom() can lock NFTs in a contract when settling auctions.
Summary
In NounsAuctionHouseV3.sol::_settleAuction(), transferFrom is used to transfer the nouns token to the winner. However, if the winner is a contract that does not handle ERC-721, the nouns token will be locked in the contract forever, and the winner won't be able to cancel his stream in StreamEscrow. This use is discouraged by Openzeppelin and safeTransferFrom() should be used instead. Ref : https://docs.openzeppelin.com/contracts/3.x/api/token/erc721
Root Cause
Internal pre-conditions
A contract that cannot handle ERC-721 must win the auction.
External pre-conditions
No response
Attack Path
No response
Impact
This will lead to Nouns token being stuck in contracts, and winner wont be able to cancel the stream.
PoC
No response
Mitigation
Consider using safeTransferFrom() instead of transferFrom().
The text was updated successfully, but these errors were encountered: