The auctionEnd
function in the FjordAuction
contract can be called by anyone once the auction end time has passed. This creates a vulnerability where an attacker can manipulate the final state of the auction by frontrunning the auctionEnd
function with a series of transactions that temporarily inflate the totalBids
, resulting in an artificially low multiplier
for token distribution.
The auctionEnd
function is designed to finalize the auction, calculate the token distribution multiplier, and burn the FjordPoints. This function can be called by anyone once the auction end time has passed. The relevant part of the code is:
The issue arises because the auctionEnd
function can be called by anyone, allowing an attacker to manipulate the final state of the auction through a series of carefully timed transactions. The attacker can place a large bid just before the auction ends, call auctionEnd
to set the multiplier
based on the inflated totalBids
, and then withdraw their bid, restoring their funds but leaving the multiplier
artificially low.
The final token distribution can be unfairly manipulated, causing honest participants to receive fewer tokens than they should. This compromises the integrity and fairness of the auction process, leading to potential financial loss for participants and loss of trust in the auction system.
Auction End Time Approaching:
The auction is about to end, and participants have placed their bids.
Attacker's Actions:
The attacker places a large bid just before the auction end time.
The attacker calls auctionEnd
, setting the multiplier
based on the inflated totalBids
.
The attacker withdraws their bid, restoring their funds.
Result:
The multiplier
is lower than it should be, causing other participants to receive fewer tokens.
The attacker has manipulated the auction to their advantage.
Manual review
To prevent this manipulation, implement a time-delay mechanism for ending the auction and a commit-reveal scheme for final bids. This approach ensures that the auction end process is more secure and less susceptible to manipulation.
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.