The bid function does not follow the Check-effects-interactions pattern correctly allowing a malicious user to add his bids amount without transferring amount.
Step 1 - A malicious user calls the `bid` function with a malicious contract which will allow them to create many bids without transferring any amount. Thus increasing the number of bids and amount in the bids mapping.
https://github.com/Cyfrin/2024-08-fjord/blob/main/src/FjordAuction.sol#L143-L153
Step 2 - The malicious user will call the unbid function to transfer the fjordPoints in the auction.
https://github.com/Cyfrin/2024-08-fjord/blob/main/src/FjordAuction.sol#L159-L176
Amount bid by other users in an auction will be lost
Manual Review
The simplest reentrancy prevention mechanism is to use a ReentrancyGuard, which allows you to add a modifier, e.g. nonReentrant, to functions that may otherwise be vulnerable or follow the check-effects-interactions pattern as shown below.
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.