The delegateBoost function allows users to extend their delegation indefinitely by repeatedly calling it without any restrictions. This could be used to lock boosts forever, preventing natural expiry and potentially abusing rewards, governance, or other delegation benefits.
User delegates 100 tokens → Expires in 30 days.
After 30 days, the boost naturally expires.
User must wait before re-delegating or meet a reset condition.
User delegates 100 tokens (expires in 30 days).
Before expiration (e.g., on Day 29), user calls delegateBoost() again with the same parameters.
The expiry resets for another 30 days.
The user repeats this indefinitely, never allowing the boost to expire.
A user (msg.sender) calls delegateBoost() to delegate a boost (amount) to another address (to).
The function stores this delegation in userBoosts[msg.sender][to], setting:
amount = delegated boost value
expiry = block.timestamp + duration (boost expiration time)
durationThe expected behavior is that once block.timestamp reaches expiry, the boost should expire naturally.
After expiration, the user should need to wait or meet specific conditions before re-delegating.
The contract does not prevent a user from calling delegateBoost() again just before the previous delegation expires.
Since the function overwrites the existing delegation entry (userBoosts[msg.sender][to]), it resets the expiry time.
The user can continuously call delegateBoost() before expiry, ensuring the delegation never expires.
No check ensures that delegation must expire before re-delegation is allowed.
No cooldown period between consecutive delegations.
No maximum lifetime cap on delegation extensions.
Perpetual Boosting: The user never loses the boost effect, potentially exploiting governance, rewards, or voting systems.
Unfair Advantage: If the boost provides yield farming or governance power, the user retains benefits indefinitely, bypassing natural delegation limits.
Storage Bloat & Inefficiency: Constant overwriting of delegation wastes gas and clogs contract execution unnecessarily.
Manual Review
Prevent Delegation Extension Before Expiry
if (delegation.amount > 0 && block.timestamp < delegation.expiry) revert BoostAlreadyDelegated();
Introduce a Cooldown Period After Expiry Indefinite Extension of Delegation
if (block.timestamp < delegation.expiry + COOLDOWN_PERIOD) revert CooldownNotElapsed();
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.