The _smoothed_price
function approximates price updates using a linear model instead of an ideal exponential formula. It calculates the maximum allowable price change (max_change
) using integer division:
This logic determines whether to adjust the price by max_change
or allow the raw price. Because max_change is already rounded down, the function may reject larger updates that would have been valid if max_change
were properly rounded up. This leads to delayed price adjustments, especially in fast-moving markets.
Since the price update mechanism already relies on a linear approximation
instead of the ideal exponential formula
, rounding max_change
down further compounds approximation errors, potentially causing price updates to lag behind actual changes. This could result in slower price adjustments, reducing responsiveness to market movements and impacting integrations that depend on accurate pricing.
Manual Review
Ensure that the max_change
is rounded up rather than down when used to calculate the price movements.
All values will be scaled to a combined of 36 decimals before division (be it price-related values or totalSupply). Considering the 18 decimals of all values, no realistic values were presented in any duplicates to proof a substantial impact on precision loss.
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.