Confidence pools distribute the bonus pool to surviving stakers using a k=2 time-weighted formula. Each staker’s score is based on stake amount and elapsed at-risk time, and after a SURVIVED or EXPIRED resolution, honest stakers should be able to claim their principal plus any bonus share.
The issue is that the implementation builds the k=2 score using absolute timestamps and unchecked upper-bound stake amounts. A sufficiently large standard ERC20 stake can make the intermediate score construction overflow before Math.mulDiv() is reached. This can make every SURVIVED / EXPIRED claim revert, locking honest users’ principal.
Math.mulDiv() only protects the final multiplication/division. It does not protect the earlier T * T * snapshotTotalStaked + snapshotSumStakeTimeSq calculation.
Likelihood:
Low: this requires an allowlisted standard ERC20 with extremely large base-unit supply or mintable balances.
The factory owner controls the token allowlist, but the contract does not enforce any stake cap once a token is allowed.
Impact:
Honest stakers can be unable to claim principal and bonus after SURVIVED or EXPIRED.
sweepUnclaimedBonus() cannot rescue the funds because it reserves outstanding principal and bonus for non-claimers.
Enforce a total stake cap derived from the maximum timestamp used in the k=2 formula.
A stronger fix is to avoid absolute timestamp expansion and compute the k=2 score with bounded elapsed-time values or a complete 512-bit score representation.
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.