_call1InchSwap uses two paths to determine the swap return amount. When the 1inch call returns data it decodes returnAmount correctly. When no data is returned, it reads the contract's full balance of _asset — which includes any tokens already held before the swap, not just proceeds from this swap.
Likelihood:
Contract accumulates _asset balance from the surplus re-supply pattern (M-2) and prior incomplete unwind operations
Some 1inch router function selectors (e.g. uniswapV3Swap) return no data, triggering the else branch
Impact:
A swap returning zero proceeds passes the minReturnAmount slippage check using pre-existing balance
Flash loan repayment silently consumes pre-existing funds rather than swap proceeds, draining the contract's reserve
Snapshot the _asset balance immediately before the 1inch call and subtract it from the post-call balance. This isolates only the tokens received from this specific swap, preventing any pre-existing balance from inflating the measured return amount.
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.
The contest is complete and the rewards are being distributed.