The _executeOpenOperation function enforces a strict equality check to ensure all borrowed tokens are used in the 1inch swap.
However, DEX swaps frequently leave small amounts of "dust" (e.g., 1-2 wei) due to decimal rounding, causing this strict check to revert valid transactions.
Likelihood:
High: Many 1inch aggregation routes involving Curve, Uniswap, or complex paths result in varying precision that leaves dust.
The check requires 100.000000% efficiency, which is practically impossible for all pairs 100% of the time.
Impact:
DoS: Users will be unable to open leveraged positions for many assets/routes that leave dust.
Protocol Unreliability: The protocol becomes unusable for specific tokens that have rounding issues in their pools.
This PoC concept shows how a tiny dust remainder causes a revert.
Relax the strict equality to allow a negligible amount of dust, or transfer the remaining dust to the contract owner/treasury instead of reverting.
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.