The protocol employs an asymmetric clamping mechanism to ensure fairness when a pool is flagged as UNDER_ATTACK. By design, stakes should be weighted from the riskWindowStart timestamp to prevent users from flooding the pool with capital after an attack has initiated. While the protocol correctly applies this to existing balances via _clampUserSums(msg.sender), it fails to apply the same restriction to new deposits initiated during an active risk window.
As a result, new deposits are valued using the current block.timestamp rather than being clamped to riskWindowStart. This creates an incentive for malicious actors to perform "micro-deposits" after a risk window opens, effectively granting their new capital a higher time-weighting than the capital of honest, long-term stakers.
The vulnerability lies within the stake function where the newEntry variable is calculated for incoming capital:
Likelihood:
Any malicious user can actively monitor the mempool/chain for the protocol shifting into the UNDER_ATTACK state and immediately execute a micro-deposit.
The attack requires no special permissions, flashloans, or complex setup; it only requires standard interaction with the stake() function during a known public state.
Impact:
Attackers can artificially inflate their userSumStakeTime, allowing them to steal a disproportionate share of yield and rewards meant for honest, long-term stakers.
Attackers gain outsized voting weight or dispute resolution power, potentially allowing them to manipulate the outcome of the very attack event that opened the risk window.
The following test demonstrates that an attacker depositing 1 ETH after the risk window opens achieves a higher time-weighted score than an honest user who deposited 100 ETH at the start.
The protocol should force the newEntry timestamp to align with riskWindowStart whenever the pool is in an active risk window (riskWindowStart != 0 and current time is past that start point).
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.