The contract overwrites bidders' previous bid amounts, failing to accumulate multiple bids from the same bidder.
When a bidder places multiple bids, the contract only records the last bid amount in bid_values
, overwriting any previous bids.
Loss of Funds for Bidders: Bidders may not retrieve the total amount they've bid upon withdrawal.
Inaccurate Contract State: The contract's records do not reflect the actual amount of tokens received.
Accumulate Bids Correctly: Modify the bid recording logic:
In the `bid` function the bid values are stored using `self.bid_values.entry(sender).write(amount)` directly, but this overwrites any previous bids made by the same bidder. Therefore if a participant makes 2 or more bids, the participant can then withdraw only the last value of the last bid. That is incorrect, the protocol should save all bids and a participant should withdraw the value of the all unsuccessful bids.
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.