The maxTradeSizeRatio check in QuantAMMWeightedPool::onSwap() incorrectly applies the ratio limit to individual token balances rather than the total pool value, causing valid small trades to fail unnecessarily, especially in pools with multiple tokens.
Current implementation:
In an 8-token pool with equal weights:
Current: Trade limited to 30% of single token balance (3/10 * 1/8 = 3.75% of pool)
Intended: Trade should not exceed 30% of the pool
Result: Small trades that should be valid are blocked
Valid trades unnecessarily revert
Reduced pool liquidity utilization
Manual Review
Modify check to compare the trade as a fraction of the total pool balances or value
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.