AntFleet

Disagreement · 2ee1c98c-openai-1

Swap path does not guard against zero amountIn, leading to revert on exactInputSingle

solo GPT-5
repo 53606958·PR #5·reviewed 1 week ago

GPT-5 finding

Swap path does not guard against zero amountIn, leading to revert on exactInputSingle

mediumbughigh
  • scripts/reposition.ts:355-367
  • scripts/reposition.ts:373-389
If post-collect balance is very small, dividing by 2n can yield 0n. Uniswap V3 exactInputSingle with amountIn=0 will revert, aborting the whole reposition flow.

Recommendation

Before approving and calling exactInputSingle, add a guard: if (swapAmountIn === 0n) skip the swap step and proceed to mint with current balances. Optionally log a message.

Other reviewer

The other reviewer flagged nothing in this file/line range.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →