User will lose their bids if they have bid after claimAuction #988
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-175
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/71d055b623b0d027886f1799739b7f785b5bc7cd/smart-contracts/AuctionDemo.sol#L57
Vulnerability details
Impact
Detailed description of the impact of this finding.
User will lose their bid if they have bid after
claimAuction
Proof of Concept
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
Functions
participateToAuction
can be called successfully afterclaimAuction
can be called at the same time. That time isminter.getAuctionEndTime(_tokenid)
andparticipateToAuction
transaction is afterclaimAuction
in a block.AuctionDemo.sol#L104
This means that all bids that users did after claimAuction, will not be able to refund through
cancelBid
,cancelAllBids
since timeblock.timestamp <= minter.getAuctionEndTime(_tokenid)
will be false, and refund thourghclaimAuction
due to the fact that it already been called.Tools Used
Recommended Mitigation Steps
Add strict for the time execution or not allow bids if claim happened with
auctionClaim[_tokenid] == false
Assessed type
Invalid Validation
The text was updated successfully, but these errors were encountered: