The riskWindowStart variable is set lazily with the interaction of the confidence pool during an active attack risk state.
Delayed first interactions to the pool after the agreement entered under attack state, leads to the setting of riskWindowStart being delayed, which results in the clamping of earlier stakers (who staked even before the pool went under attack) to be clamped to the same time as the delayed stakers, leading to consideration of same weighted score for both the earlier and delayed stakers.
But the early stakers should be getting the benefit of the specified T=2 weighted logic used, but due to the delayed updates there share will be reduced because the later interactions got the stakers staking late to benefit from the weighted score being set late.
Likelihood:
This occurs when the first interaction in the active risk state gets delayed, which leads to delayed update of the riskWindowStart.
Impact:
The delayed staker staking in the active risk window gets the benefit of the staker who would stake from the very beginning.
This penalizes the early stakers, as the weighted score of the delayed staker would become same as early staker, which decreases the net bonus the early stakers should actually get.
Make a new file in test/unit, add the below test.
Run it using:
Maintain the state updations timing in AttackerRegistry, by doing this the Confidence Pool will be able to fetch the actual timing when a state was first reached, and use that same under attack / promotion requested state timing from the registry or the first stake time whichever is latest.
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.
The contest is complete and the rewards are being distributed.