FLASHARB

Flasharb executes atomic arbitrage between Uniswap v4 and 1inch Aqua using flash accounting

FLASHARB

Created At

ETHGlobal Mumbai

Project Description

FLASHARB executes atomic arbitrage between Uniswap v4 and 1inch Aqua, without traditional flash loans or upfront trading capital.

Uniswap v4: Uses flash accounting to execute the first swap without immediately transferring tokens.

1inch Aqua + SwapVM: Completes the second swap using liquidity from Aqua strategies.

Atomic settlement: Both trades settle in a single transaction. If the arbitrage fails, everything reverts.

Smart searcher: Automatically discovers price gaps, calculates optimal trade sizes, simulates execution, and estimates profit after gas.

Live dashboard: Monitor opportunities, execute trades through MetaMask, and manage profits stored as ERC-6909 claims.

How it's Made

FLASHARB is built using Solidity, Foundry, Uniswap v4, 1inch Aqua, SwapVM, TypeScript, viem, React, and Vite.

Uniswap v4: Uses PoolManager.unlock() and flash accounting to trade without conventional flash loans.

  • 1inch Aqua + SwapVM: Provides shared liquidity and executes the second swap.
  • Searcher bot: Detects price gaps, optimizes trade sizes, simulates transactions, and calculates profit after gas.
  • Dashboard React-based interface for live opportunities, MetaMask trading, and ERC-6909 profit tracking.
  • Testing:Foundry, Anvil, automated bot tests, and Unichain fork tests.

The clever part: Aqua sends tokens directly into Uniswap v4's PoolManager, while SwapVM's preTransferInCallback handles payment. Both swaps settle atomically with fewer token transfers.

We also use ERC-6909 claims to store profits efficiently and are developing a Huff executor for further gas optimization.

background image mobile

Join the mailing list

Get the latest news and updates

FLASHARB | ETHGlobal