The BaseGauge contract contains a critical precision inconsistency in its boost parameter initialization. The maxBoost
and minBoost
values use different decimal precisions, leading to unintended behavior where minBoost
is effectively greater than maxBoost
.
The issue is located in the BaseGuage constructor:
The problems are:
maxBoost
uses a precision of 1e4 (25000 represents 2.5x)
minBoost
uses a precision of 1e18 (1e18 represents 1x)
Due to different precisions, minBoost
is effectively much larger than maxBoost
This inconsistency will cause incorrect boost calculations throughout the system.
The following is one instance where these variables are used in calculations:
This vulnerability has several negative consequences:
Boost calculations will produce incorrect results
Users may receive incorrect voting power allocations
Reward distributions will be inaccurate
The protocol's governance mechanism may behave unpredictably
Potential economic losses for users due to incorrect boost calculations
Manual review
Standardize boost precision to 1e18 throughout the system (and in all the calculations involving minBoost and maxBoost):
Add validation checks to ensure minBoost <= maxBoost:
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.