In FjordAuction.sol the decimals of auction token in not considered in auctionEnd()
and claimTokens()
.
There is no restriction for auction token to be 18 decimals. It can be USDC
and can have 6 decimals. Which is not handled in the contract.
https://github.com/Cyfrin/2024-08-fjord/blob/main/src/FjordAuction.sol#L197
https://github.com/Cyfrin/2024-08-fjord/blob/main/src/FjordAuction.sol#L217
In case of USDC if the totalTokens:totalBids ratio is 1:1e6 or more then the multiplier will be 0. Which will lead to bidder getting 0 and auctionToken amount getting stuck in the contract.
Vs Code
Normalise the auction token decimals to 18 to avoid precision losses and unwanted flows.
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.