The UpdateRule.sol
contract fails to properly convert input parameters to 18 decimal point precision before calculations, despite the codebase's documentation and other components explicitly requiring 18dp precision. This inconsistency can lead to significant calculation errors in weight updates and pool behavior.
The QuantAMM protocol documentation states that "The int256s used are converted to 18dp using the PRBMath lib". However, in UpdateRule.sol
, particularly in the CalculateNewWeights
function, several parameters are used without proper 18dp conversion.
Other contracts in the codebase properly handle 18dp precision:
// In QuantammMathGuard.sol
// Current implementation
// Should be
Weight calculations may be off by several orders of magnitude
Manual review
Add proper 18dp conversion in CalculateNewWeights
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.