Single-asset pools in the QuantAMM system are vulnerable to a DoS when updating weights due to improper array access in _calculateQuantAMMVariance
.
When CalculateNewWeights
is called with n=1
asset, the following sequence triggers an array out-of-bounds error:
Single-asset pools are completely blocked from functioning as they cannot update weights, effectively making them unusable with no possible workaround or alternative implementation available within the protocol.
Add the testSingleAssetPoolDoS
test in pkg/pool-quantamm/test/foundry/rules/UpdateRule.t.sol
and run it ;)
Add special handling for single-asset pools:
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.
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.