The _setInitialWeights() function contains a critical flaw in its weight validation mechanism.
The current implementation attempts to validate against absoluteWeightGuardRail but the type conversion in the comparison allows weights to be set to zero or extremely small values that could break core pool functionality.
Proof of Concept:
Enables manipulation of pool ratios through zero or near-zero weights
Breaks core AMM functionality by allowing invalid weight states
Creates arbitrage opportunities through pool imbalances
Can lead to significant economic losses for liquidity providers
Foundry.
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.