The NewHighestBid
event is emitted with the old highest bid amount instead of the new one.
https://github.com/Cyfrin/2024-10-starknet-auction/blob/main/src/starknet_auction.cairo#L109
The NewHighestBid
event is emitted before the highest_bid
state is updated. This occurs in the following order:
As a result, the event data contains the old highest bid amount instead of the new one.
Off chain system can be affected due to wrong data emission.
Manual Review
Update the contract to emit the NewHighestBid
event after updating the highest_bid
state variable.
The `bid` function emits `NewHighestBid` event with wrong parameter. The `amount` parameter is `self.highest_bid.read()` that is called before the update of the `highest_bid` variable.
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.