Severity: Low
In ConfidencePool.sol, minStake is validated only as != 0, both at init and per-call:
A sponsor may set minStake = 1 wei, allowing economically insignificant dust stakes. Two minor grief vectors open:
Scope-iteration cost inflation: A motivated attacker can stake 1 wei across many accounts, and _scopeAccounts-driven off-chain indexers (and any future scope-validation loop in a contract upgrade) iterate over a larger set. This is bounded — the in-contract scope list is sponsor-controlled, not staker-controlled — but the per-user accounting maps (eligibleStake, userSumStakeTime, userSumStakeTimeSq, hasClaimed) grow unboundedly, inflating storage costs and any future claim-loop gas.
Amount-weighted fallback tilt: When globalScore == 0 (e.g., flag in the same block as the only stake, or risk window first observed at/after expiry), _bonusShare falls back to amount-weighted split: Math.mulDiv(userEligible, snapshotTotalBonus, snapshotTotalStaked). With one dust account and one large account in the same block, an attacker controlling the dust account can shift the dust portion's share to recoveryAddress via sweepUnclaimedBonus once the dust account is the only remaining staker. Magnitude is bounded by the dust amount.
Contract: ConfidencePool.sol
Functions: initialize(), stake()
Minor grief — no staker principal stolen, only inflated gas/storage cost on the host chain, plus a marginal shift of dust-bonus share. Realistic cost of attack is gas × N accounts, which usually exceeds the griefable value.
Likelihood: Low. Plausible only if the sponsor sets minStake = 1 wei (sponsor's own choice) and a determined attacker is willing to fund N accounts and N stake transactions.
Impose a sensible minimum floor on minStake at init:
Optionally, make the floor factory-configurable per stake-token (to accommodate tokens with non-standard decimals), defaulting to a value that makes the N-account gas attack uneconomical.
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.