setting flagOutcome to EXPIRED is not possible
As a result, several issues can happen
On the Readme, it says
3. Moderator (Protocol DAO)
RESPONSIBILITIES:
flags the pool outcome (SURVIVED / CORRUPTED / EXPIRED) via
flagOutcome, <---@may re-flag a correction before the first claim, <---@
names the whitehat attacker for good-faith CORRUPTED.
LIMITATIONS:
set by the factory at clone time and immutable per-pool,
correction window closes on first claim (finality is value-movement), <---@
180-day grace fallback exists as defense against moderator unavailability.
So the moderator can flagOutcome to EXPIRED outcome based on readme, and also can re-flag/correction before the first claim
But on the code implementation, we can see it can not, because if we try to set the newOutcome to EXPIRED, the txn will revert
So it does not follow the doc, which is a point to consider
On the ConfidencePool::claimExpired We can see that it has an auto-set logic to set the outcome to EXPIRED based on IAttackRegistry.ContractState
claimExpired is only callable when the outcome is UNRESOLVED or EXPIRED
One of the jobs of flagOutcome is to re-flag a correction before the first claim
So let's say,
A ConfidencePool::flagOutcome call happened incorrectly, which changed the outcome from UNRESOLVED to a newOutcome
But the correct outcome should be EXPIRED
Now, if the moderator wants to reflag the outcome to EXPIRED before claimsStarted, he simply can not do it
because flagOucome has no logic for it
also ConfidencePool::claimExpired which set auto EXPIRED is also not possible, as the outcome has moved from UNRESOLVED to another outcome
So ultimately, a wrong outcome is set, like if mistakenly an outcome is set to CORRUPTED, then it creates problem
There is another risk, though
We can see that calling the ConfidencePool::claimExpired sets the outcome to EXPIRED automatically based on IAttackRegistry.ContractState
So, as flagOutcome for EXPIRED is not possible, initially calling claimExpired can set the outcome to PRODUCTION or CORRUPTED based on IAttackRegistry.ContractState
So the outcome can be a wrong state, which affects claiming stake, bonus amounts
Because this risk depends on IAttackRegistry.ContractState, so I put it for another risk example
There should be logic for ConfidencePool::flagOutcome to set the outcome to EXPIRED also
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.