Auction winner can lock funds from bids of all other bidders after the auction end #1214
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
partial-50
Incomplete articulation of vulnerability; eligible for partial credit only (50%)
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/main/smart-contracts/AuctionDemo.sol#L112
Vulnerability details
Vulnerability Details
Prerequisites:
onERC721Received
call (malicious or not)block.timestamp > minter.getAuctionEndTime(_tokenid)
)Note:
On
block.timestamp <= minter.getAuctionEndTime(_tokenid)
it's theoretically fixable by rebidding the malicious/broken winner. Afterminter.getAuctionEndTime(_tokenid)
it's not fixable.Impact
claimAuction
fail onIERC721(gencore).safeTransferFrom(ownerOfToken, highestBidder, _tokenid);
No one can withdraw there bids.
No way to fix it.
Proof of Concept
Put the contracts below in hardhat/smart-contracts
Put the test file below to
hardhat/tests/fileName.test.js
and runnpx hardhat test test/fileName.test.js
Tools Used
Manual review
Recommended Mitigation Steps
Rewrite the auction so it uses Pull over Push pattern.
Assessed type
DoS
The text was updated successfully, but these errors were encountered: