Most update rules incorrectly include lambda in their parameterDescriptions
array, set in constructors. Lambda is not one of the parameters that's passed as _parameters
array to validParameters()
for validation or to _getWeights()
. Instead it is part of QuantAMMPoolParameters
struct that's provided separately. Having lambda in parameterDescriptions
is misleading and can cause integration errors.
In rules like MomentumUpdateRule
, AntimomentumUpdateRule
, PowerChannelUpdateRule
, lambda is listed in parameterDescriptions
:
This gives impression that lambda value(s) should be part of _parameters
array which is passed to validParameters()
and _getWeights()
functions. However lambda is actually passed separately.
In validParameters
function:
In _getWeights
function:
On the other hand, rule ChannelFollowingUpdateRule
correctly omits lambda from its parameterDescriptions
, showing the proper implementation.
Low severity because:
Could lead to integration errors with other contracts, since integrators can expect that lambda should be provided in parameters
Makes code harder to maintain and audit
However, doesn't affect actual functionality since lambda is handled correctly in code
Manual review
Remove lambda from parameterDescriptions in affected rules
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.