The constructor function initializes boostState.minBoost with a fixed value of 1e18. This value is later used in multiple functions within BoostCalculator, including updateBoostPeriod, calculateBoost, and calculateTimeWeightedBoost. Several validation checks in these functions can cause contract execution failures if minBoost is misconfigured.
The constructor sets:
In BoostCalculator.updateBoostPeriod:
If maxBoost is inadvertently set to a value lower than 1e18, this check will revert the transaction.boostState.minBoost initialization may cause multiple contract failures due to misconfigurations
The function calculateBoost computes:
If votingPowerRatio is unexpectedly large, it may cause unintended behavior in boost calculations, possibly exceeding maxBoost.
This issue can lead to several failures:
Deployment reverts due to InvalidBoostBounds.
Boost miscalculations, leading to improper reward distribution.
Incorrect weight normalization, affecting voting power and governance calculations.
Manual code review
Ensure maxBoost is always greater than or equal to minBoost.
Implement a constructor validation:
Set minBoost to 10000 instead of 1e18 to align with expected calculations.
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.