Normally, _firstGoodFaithCorruptedAt is set once on the first good-faith flag, anchoring the 180-day attacker bounty window.
When the moderator flags bad-faith first, _firstGoodFaithCorruptedAt stays 0. Re-flagging to good-faith later (months or years after) creates a fresh 180-day window from the re-flag time.
The moderator may flag bad-faith first as a standard investigation procedure.
Re-flag to good-faith can occur at any point before the first claim.
Impact:
Staker funds locked for up to 180 additional days beyond the intended window.
Attacker gets a full 180-day window from the re-flag, not from the breach.
The Foundry test below demonstrates that when the moderator first flags bad-faith CORRUPTED, _firstGoodFaithCorruptedAt stays 0. After 179 days, re-flagging to good-faith creates a fresh 180-day window from the re-flag timestamp:
forge test --match-path "test/PoC_BattleChain_Medium.t.sol" -vv --match-test test_M03_DeadlineReset
All 4 tests PASS (gas: 586,473)
Set _firstGoodFaithCorruptedAt unconditionally on the first CORRUPTED flag regardless of goodFaith value.
Mitigation:
Set _firstGoodFaithCorruptedAt unconditionally on the first CORRUPTED flag regardless of goodFaith:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
View preliminary resultsAppeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.