Inconsistency of auction time checking in bid
and auctionEnd
functions let bidding when the auction is ended. This can brake claim tokens functionality for a group of users.
Due to the bid
function check the auction is considered ended when block.timestamp > auctionEndTime
:
But it is possible to execute the auctionEnd
function when block.timestamp == auctionEndTime
:
This way a malicious user can invoke the auctionEnd
function, then bid
with sufficient amount of FjordPoints
(up to totalBids
), then claimTokens
. Since this last bid was not included in the multiplier
the token distribution will be incorrect and the claimTokens
will throw insufficient balance error for all or a part of users.
Asset losses, permanent asset locking
Manual Review
Consider fixing the inconsistency in checks:
An auction with 0 bids will get the `totalTokens` stuck inside the contract. Impact: High - Tokens are forever lost Likelihood - Low - Super small chances of happening, but not impossible
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.