The Mixing Lambda () parameter in the MinimumVarianceUpdateRule contract is designed to control weight smoothing in a QuantAMM pool. However, the current implementation of the validParameters function does not adequately restrict values, allowing it to be equal to 0 or 1. This can lead to unintended and potentially harmful behaviors in the weight update mechanism.
The validation logic for in the validParameters function is as follows:
This condition permits to take values of exactly 0 or 1. These edge cases have the following implications;
Case 1 Mixing Lambda = 0
When Λ = 0, the formula for weight updates
simplifies to
This ignores the previous weights (w(t-1)) entirely, and the new weights depend only on the inverse variance matrix (Σ^{-1}(t)).
Case 2 Mixing Lambda = 1
When Λ = 1, the formula simplifies to:
This freezes the weights and prevents any updates based on the new data (Σ^{-1}(t)).
With , sudden and unpredictable weight shifts can occur, destabilizing the pool.
With , the pool becomes static and fails to adapt to new market conditions.
Either scenario could result in suboptimal pricing, reducing the utility and attractiveness of the pool to users.
Manual Review
Update the validation logic for to explicitly exclude values of 0 and 1
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.