The getBoostMultiplier
function in the BoostController
contract contains a critical mathematical flaw that causes any non-zero boost amount to result in the maximum boost multiplier (2.5x or 25000 basis points).
The issue is the following:
The function attempts to calculate a boost multiplier using the ratio of userBoost.amount
to a baseAmount
baseAmount
is calculated as userBoost.amount * 10000 / MAX_BOOST
(where MAX_BOOST = 25000)
The final calculation userBoost.amount * 10000 / baseAmount
mathematically simplifies to MAX_BOOST
For any non-zero userBoost.amount
value (let's call it x
):
baseAmount = x * 10000 / 25000
Final calculation = x * 10000 / (x * 10000 / 25000)
Simplifying: x * 10000 * 25000 / (x * 10000) = 25000
This means regardless of the input amount, the function will always return MAX_BOOST
(25000) for any non-zero boost.
Function returns the MAX_BOOST regardless of the user's boost amount for the pool.
This can lead to miscalculation of rewards.
Manual Review
Scale the value to get the boost in basis points just once:
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.