Link to Affected Code:
Description:
The updateUserBoost
function incorrectly sets the pool's workingSupply
to a single user's new boost amount, when according to the PoolBoost
struct documentation, workingSupply
should be "the total working supply including boosts". This creates an accounting error where the working supply only reflects the last user's boost instead of the cumulative total supply with all boosts.
The issue is particularly severe because:
The struct explicitly defines workingSupply
as "total working supply including boosts"
totalBoost
is properly cumulative (adds/subtracts differences)
But workingSupply
overwrites the entire value with just one user's boost
Impact:
Pool Accounting Corruption
Working supply only reflects last user's boost
Historical boost contributions are lost
Creates discrepancy between totalBoost
and workingSupply
Protocol Calculation Errors
Any protocol mechanisms using workingSupply
will have incorrect inputs
Pool statistics and metrics become unreliable
Potential impact on boost-based calculations
Proof of Concept:
Recommended Mitigation:
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.