Bids can be made after the auction is closed and funds are wasted. #1489
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-175
partial-50
Incomplete articulation of vulnerability; eligible for partial credit only (50%)
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/AuctionDemo.sol#L58
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/AuctionDemo.sol#L105
Vulnerability details
Impact
Funds tendered by the user are locked into the contract and cannot be retrieved.
Proof of Concept
Looking at the conditional statements for
participateToAuction
andclaimAuction
, whenblock.timestamp == minter.getAuctionEndTime(_tokenid)
, both conditions are passed.In other words, it would be possible to launch
participateToAuction
afterclaimAuction
.claimAuction
can only be launched once, so the money bid after it is over cannot be retrieved and will be wasted.Tools Used
Manual
Recommended Mitigation Steps
Set
claimAuction
condition asblock.timestamp > minter.getAuctionEndTime(_tokenid)
Assessed type
Timing
The text was updated successfully, but these errors were encountered: