An attacker can finish an auction and still make bids afterward. This vulnerability leads to a lack of liquidity for honest bidders.
In the FjordAuction
contract, it's possible to finish an auction and still make a bid due to incorrect timestamp validation when block.timestamp == auctionEndTime
. This flaw could leave other bidders with insufficient liquidity to claim their tokens.
An attacker could exploit this vulnerability through the following steps:
Identify auctions with favorable prices
When block.timestamp == auctionEndTime
, execute the following sequence:
Call auctionEnd()
Place a bid using bid()
Claim tokens via claimTokens()
As a result, other bidders attempting to claim their tokens will fail due to lack of contract liquidity
Add this code to auction.t.sol
Honest bidders might not be able to claim their tokens, potentially leaving them stuck in the contract.
Manual review
Consider either adding a validation if the auction is ended before bid
and unbid
or fixing the block.timestamp
validation to:
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.