In the normal contract flow, pot should reflect the total amount distributed when a winner is declared.
However, in the declareWinner() function, the pot is reset to 0 before the ThroneClaimed event is emitted.
As a result, the emitted event logs an incorrect pot value (0 instead of the actual reward), leading to misleading or inaccurate data on-chain.
Likelihood:
This occurs every time a new winner is declared — that is, when declareWinner() is called.
Any observer (e.g., frontend dApp, indexer, analytics tool) relying on ThroneClaimed event logs for determining actual reward values will log incorrect data.
Impact:
Breaks transparency and trust in emitted on-chain data.
Off-chain systems could record inaccurate payout histories.
Users and developers might misinterpret the event logs, leading to disputes or bugs in integrations.
This will always emit a pot value of 0, regardless of the actual reward distributed.
Instead of relying on pot during the emit, assign it to a local variable beforehand.
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.