The winning auction contract without implementing IERC721Reciever causes the funds to be blocked forever after the auction is over #464
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
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-739
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/AuctionDemo.sol#L112
Vulnerability details
Impact
During the
AuctionDemo.claimAuction
prize claiming call and the issuance of uncollected bids, the prize is sent to the winner viaIERC721.safeTransferFrom
which causes a block when the winner is contract without implementingIERC721Reciever
, accidentally or intentionally as an attack vector.As an example of the attack, the malicious user will make his contract win the auction. And upon completion, he will request additional funds from users to unlock their bids in the auction. Which in turn will pay off the cost of the attack
The consequences are critical because `claimAuction' also returns uncollected bids to users, which increases the amount of funds that will be blocked
Losses
Blocking users' funds and prize (token)
Proof of Concept
Links
Description
The recipient of the prize, if it is a contract, is required to implement the IERC721Reciever interface, which is a point of failure or attack:
Tests
Tools Used
Recommended Mitigation Steps
transferFrom
instead ofsafeTransferFrom
Assessed type
DoS
The text was updated successfully, but these errors were encountered: