In the BoostController
contract the delegateBoost
function is meant to allow a user (delegator) to delegate their veRAAC balance to another user (delegatee), and the boost is supposed to be calculated later using _calculateBoost
. However, due to the behavior of updateUserBoost
, the delegated boost is not applied correctly.
After user1 (the delegator) delegates their veRAAC balance to user2 (the delegatee), user2 is expected to gain a boost based on the delegated amount. However, when updateUserBoost
is called for user2, it resets their boost to the minimum. This happens because:
Boost Calculation is Based on veRAAC Balance
The _calculateBoost
function, which is called inside updateUserBoost
, calculates the new boost purely based on the user's current veRAAC balance.
Since user2 has no veRAAC of their own (only delegated veRAAC), their calculated boost does not reflect the delegation and _calculateBoost
will end up returning amount
which is the MIN_BOOST=10000
.
Delegation Data is Not Considered
While delegateBoost
correctly records the delegation in userBoosts[msg.sender][to]
, this data is not used when updating the delegatee’s actual boost.
The system only looks at veRAAC balance, meaning the delegation does not translate into a working boost for the recipient.
Users expecting to receive a boost from delegation will not actually benefit from it.
The pool boost calculations become incorrect, affecting reward distributions.
Manual Review
Modify _calculateBoost
to consider delegated veRAAC balance when computing user boost.
Ensure updateUserBoost
accounts for delegation, either by reading from userBoosts
or by separately tracking delegated boosts in pool calculations.
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.