FjordPoints are used in FjordAuction to buy auction token. Auction has a bidding time in which users can place a bid. Bids can only be made during bidding time. When the bidding time is over the auction ends and users can claim the auctioned tokens based on the size of their bid.
Checks in FjordAuction allow users to bid after the auction ends. It allows a malicious user to claim tokens that were auctioned by other participants. As a result, people that participated in the auction will lose tokens that were autioned by them.
In bid function there is a check that ensures that block.timestamp is less than or EQUAL to auctionEndTime. If it's true then user can place a bid in an auction.
In auctionEnd function there is a check that ensures that block.timestamp is greater than or EQUAL to auctionEndTime. If it's true then the auction can be ended.
When the block.timestamp is equal to auctionEndTime, malicious user can call auctionEnd function and bid in the same block. It is an issue for the fair participants because the multiplier is calculated inside auctionEnd function.
multiplier is used to calculate "reward per token" for the auction. If the bids are made after the auction end the calculation is no longer accurate and the user that placed the bid after the auction can claim tokens from fair participants. Some of the users will not be able to claim the tokens.
Add this test to auction.t.sol file and run forge test --match-test "testExploit" -vvv.
Users can bid after auction end and claim tokens that were auctioned by other users leading to loss of funds for fair participants.
Do not allow to place a bid after auction end.
Example pseudocode:
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.