A user can intiate 0 amount or dust transaction calling bid::fjordAuction and unBid::fjordAuction functions causing delaying of transactions for other users.
https://github.com/Cyfrin/2024-08-fjord/blob/0312fa9dca29fa7ed9fc432fdcd05545b736575d/src/FjordAuction.sol#L143
https://github.com/Cyfrin/2024-08-fjord/blob/0312fa9dca29fa7ed9fc432fdcd05545b736575d/src/FjordAuction.sol#L159C1-L159C46
The vulnerability arises from the ability of users to submit transactions with zero amounts or minimal amounts (dust transactions) to the bid and unBid functions in the FjordAuction contract. These transactions, while having no substantive impact on the auction's state, can cause significant delays and disruptions in the transaction processing for other users.espically when the auction _biddingTime is about to end
Attack Scenario (2 min and auction will end) :
TotalTokens = 1000
PRECISION_18 = 1e18
Malicous Bidder bid (100 point )
Malicous Bidder Intiate alot Spam 0 amount bidding transactions
Another Bidder trying to bid (100 point)
But he fails since the auctionEnded while processing the spam transactions
The Malicous bidder get more auction Tokens
AuctionTokens With 200 Point Bids ( Normal ) 100 + 100
TotalBids = 200
`multiplier`=TotalTokens*PRECISION_18/TotalBids => 1000 x 1e18 / 200 = 5e18
claimaplePoints=userBids x`multiplier` / PRECISION_18 => 100 x 1e18 / 1e18 = 500 token
userBidsAuctionTokens with 100 Point Bids ( Malicous ) 100 only
`multiplier`=TotalTokens*PRECISION_18/TotalBids => 1000 x 1e18 / 100 = 10e18
claimaplePoints=userBids x `multiplier` / PRECISION_18 => 100 x 10e18 / 1e18 = 1000 token
**A malicous Unbider can do the same thing in 'unstake::fjordPoints' function preventing a user from unstaking his points before auction ends **
Use this PoC in auction.t.sol
Prevent A user from particpate in a an active auction => Lead to bigger amount of auction tokens for the malicous bidder
Prevent A user from Unstake His Points before Auction ends => user fjordPoints is burnt
Manual Analysis (vsCode)
Enforcing a minimum transaction amount As following can prevent attackers from clogging the network with zero amount or dust transactions.
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.