Context: BoostController.sol#212-L235
The delegateBoost
function in BoostController
allows users to delegate their boost to another address. However, while the function prevents a user from delegating to the same recipient multiple times, it does not check if the user has already delegated their boost to any other recipient.
This allows a single user to repeatedly delegate their boost to multiple recipients without revoking or reducing their original boost. This breaks the intended Curve-style boost mechanics, which assume a user’s boost can only be used or delegated once at any given time.
The delegateBoost
function only checks whether the sender has already delegated to the same recipient but does not check if the sender has delegated to other recipients. As a result, a single user can delegate their boost to multiple recipients, bypassing the intended boost allocation logic.
Alice has 1000
veToken and calls delegateBoost(Bob, 1000, 30 days)
.
Alice then calls delegateBoost(Carol, 1000, 30 days)
, and again for David
, Eve
, etc.
As a result, multiple recipients benefit from the same 1000
boost amount, creating an unfair advantage.
Boost Inflation: A user can repeatedly delegate the same boost amount to multiple recipients, leading to an artificial increase in the total effective boost.
Reward Manipulation: Attackers can exploit this issue to unfairly claim additional rewards that they are not entitled to.
Governance Abuse: If boost delegation influences voting power, this vulnerability could allow users to manipulate governance decisions.
Protocol Integrity Risk: The protocol assumes that a user’s boost is either used by themselves or delegated to one recipient at a time. This flaw breaks that assumption, potentially leading to unforeseen economic imbalances.
Manual code review
To fix this issue, introduce a mapping variable userTotalDelegated
to ensure a user cannot delegate more than their available veToken balance.
Update Total Delegated Amount When delegating boost:
Update Total Delegated Amount When delegating boost:
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.