QuantAMM

QuantAMM
49,600 OP
View results
Submission Details
Severity: low
Invalid

lack of input sanitization breaks PowerChannelUpdateRule weight calculation

Summary

In the PowerChannelUpdateRule, kappa is used as an indicator of aggressiveness. The scale ranges from [-1, 1], and scenarios may occur where the sum of the values in the kappa vector is 0 while containing a mix of positive and negative values.

Example with 4 kappa values:

  • [-0.5e18, 0.25e18, 0.2e18, 0.05e18]

Even though each individual value is valid, their combined sum of 0 leads to calculation errors.

Impact

The calculation in PowerChannelUpdateRule is disrupted when the kappa vector sums to 0.

Tools Used

Manual review.

Recommendations

Modify the implementation to rely on the absolute values of kappa:

++ absolutekappa[i] = !(kappa[i] > 0) ? -(kappa[i]) : kappa[i];
Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas / Admin is trusted / Pool creation is trusted / User mistake / Suppositions

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.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!