A validation gap exists in the QuantAMMWeightedPoolFactory's pool creation process around token and weight array alignment. This is particularly serious given the complex weight management requirements of QuantAMM pools, where misaligned token and weight arrays could severely impact the pool's automated market making capabilities and potentially lead to system-wide instability.
In the current implementation, the factory forwards initialization parameters directly to the pool without verifying the fundamental relationship between numTokens and the length of the weights array. This creates risk at multiple levels of the Balancer V3 architecture. Most critically, since QuantAMM pools rely on sophisticated weight interpolation over time, any misalignment between token and weight arrays could lead to catastrophic failures in the pool's core pricing and rebalancing mechanisms. Even if caught by later validations, the lack of early checks allows malicious actors to force deployment failures after significant gas expenditure.
Add explicit length validation before pool creation:
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.