https://github.com/Cyfrin/2024-08-fjord/blob/main/src/FjordAuction.sol
The unbid()
function allows users to withdraw part or all of their bids before the auction ends. Like claimTokens()
, it is vulnerable to reentrancy attacks because it transfers FjordPoints to the user before updating the internal state (bids[msg.sender]
and totalBids
). An attacker could exploit this by repeatedly calling unbid()
and withdrawing more FjordPoints than they initially bid.
Financial Loss: An attacker could withdraw more FjordPoints than they deposited, leading to financial losses for the contract.
Auction Disruption: The total bid amount (totalBids
) could be manipulated, impacting the outcome of the auction.
Manual Review
Apply the nonReentrant
modifier to the unbid()
function to prevent reentrancy attacks
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.