DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

'function bid' it is susceptible to front-running attacks due to the bid amount is visible in the mempool before the transaction is confirmed.

##Summary

The bid function is susceptible to front-running attacks because the bid amount is visible in the mempool before the transaction is confirmed. A malicious bidder can exploit this by monitoring the mempool and submitting a higher bid with a higher gas fee to outbid others unfairly.

##Vulnerability Details

  1. Place a bid using the bid function.

  2. Monitor the mempool for pending transactions.

  3. Submit a higher bid with a higher gas fee before the initial bid is confirmed.

    Let's look in a scenerio where by a genuine-bidder places a bid of 200 FjordPoints, A malicious bidder can observe this bid and submit a higher bid of 250 FjordPoints with a higher gas fee before A genuine-bidder's bid is confirmed, thereby winning the auction unfairly.

  4. https://github.com/Cyfrin/2024-08-fjord/blob/0312fa9dca29fa7ed9fc432fdcd05545b736575d/src/FjordAuction.sol#L143

##Impact

A Malicious bidder can observe pending bids and submit higher bids with higher gas fees, winning the auction unfairly.

##Tools Used

Manual

##Recommendations

Implement a commit-reveal scheme to hide bid amounts during the bidding phase. Bidders should first commit to a bid via a hash and reveal their bids after the commit phase ends.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.