The FjordAuction contract contains a vulnerability that allows user to place bids after auctionEnd() called. This issue arises due to improper handling of the auction's end time condition, allowing bids with a timestamp equal to auctionEndTime to be processed.
In FjordAuction contractbid(), unBid() and auctionEnd()functions check if timestamp is bigger or smaller than auctionEndTime. But these checks doesn't handle the condition timestamp==auctionEndTime correctly. And timestamp can easily be manipulated by the nodes. The node creates a block containing transactions. They can alter the value of timestamp put on the block they add.
A malicious user can exploit this vulnerability to their advantage by calling auctionEnd() and then placing a bid exactly at timestamp == auctionEndTime. Since the condition block.timestamp > auctionEndTime does not account for block.timestamp == auctionEndTime, the bid is processed after the auction has technically ended. This bid does not affect the multiplier calculation, as it was placed after the auction period. Consequently, the user's bid does not increase the auction price, potentially leaving insufficient rewards for other users to claim their tokens.
Test:
Users can place bids after the auction's intended end time without increasing the auction price.
As a result of post-auction bids not being accounted for in the multiplier calculation, there may not be enough rewards left for some legitimate users to claim their fair share of tokens.
manual
Update the condition for auctionEnd
The protocol doesn't properly treat the `block.timestamp == auctionEndTime` case. Impact: High - There are at least two possible impacts here: 1. By chance, user bids could land in a block after the `auctionEnd()` is called, not including them in the multiplier calculation, leading to a situation where there are insufficient funds to pay everyone's claim; 2. By malice, where someone can use a script to call `auctionEnd()` + `bid(totalBids)` + `claimTokens()`, effectively depriving all good faith bidders from tokens. Likelihood: Low – The chances of getting a `block.timestamp == auctionEndTime` are pretty slim, but it’s definitely possible.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.