The limit of 101 deposits per user can still lead to OOG due to multiple storage reads and writes inside the pool data array.
QuantAMM will use a limit of 101 deposits in UpliftOnlyExample (user can deposit from index 0 to 100).
If we run a POC with the gas limit before and removing liquidity in a case where the array if at max capacity (by making 101 deposits with 1e18 and removing in one TX with 101e18) we can see it will consume ~1.3M gas.
Path: pkg/pool-hooks/test/foundry/UpliftExample.t.sol
Block limit on the ethereum mainnet (as of january 2025) is 30M.
However, specially during times of congestion it will be unlikely to get a TX with 1.7M gas through, specially when using a wallet.
Active traders using the protocol via a wallet can experience failing transactions when trying to withdraw liquidity.
Similar issues can take place on LP token transfers.
Manual review. Forge.
Decrease the deposit limit to 50 transactions, which should leave more room to avoid OOG.
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.