TRACE

Turn a Uniswap V3 wallet's on-chain history into an evidence-backed, backtested LP strategy.

TRACE

Created At

ETHGlobal Mumbai

Project Description

TRACE is on-chain strategy intelligence for Uniswap V3 liquidity providers. Blockchains show what happened, but not the strategy behind it: an LP's history is just separate mints, liquidity changes and fee collections.

Paste any public wallet. TRACE reads its history from Ethereum Sepolia, rebuilds every V3 position (ranges, deposits, withdrawals, fees split from principal), and names the likely strategy as a hypothesis with a confidence score. Every rule links to the transactions behind it. TRACE then backtests the strategy on the pool's real swaps (observed replay vs simulated rules vs passive LP vs buy and hold) and checks, rule by rule, what 1inch Aqua can run.

To execute, the user signs an EIP-712 authorization bound to the exact plan, approves exact token amounts and ships the strategy order to Aqua. Every step is confirmed from its Sepolia receipt. Nothing runs without the user's own wallet.

Demo: wallet 0x4797...eb4c: 1 position and 12 events rebuilt; passive concentrated liquidity at 75% confidence; 793 real swaps replayed; Aqua ship confirmed on Sepolia.

Honest status: no demo data anywhere. 0G inference and 0G Storage are integrated but currently blocked (no provider for our key's trust tier; storage uploader unfunded), so the app shows the evidence-only analysis and says so. Aqua taker swaps need 1inch's KycNFT and are not part of the flow.

How it's Made

Frontend: Next.js 14, React 18, TypeScript, Tailwind, wagmi + viem (Sepolia-only), TanStack Query, and a React Three Fiber 3D liquidity landscape drawn from real position events. Deployed on Vercel.

Backend: Express API + BullMQ worker on Render, Postgres (Supabase), Redis (Upstash). Nine TypeScript packages:

  • chain-config: single source of truth for Sepolia and every verified contract address (re-probed with eth_getCode at startup).
  • chain-data: viem client with chunked eth_getLogs (Infura's 10k-block cap), a shared credit-based rate limiter and retries.
  • uniswap-v3: order-independent position reconstruction with real token decimals; each Collect is split into owed principal vs fees, so fees are never double-counted.
  • strategy-inference: deterministic "Strategy DNA" (range width, re-set frequency, time in range, fee cadence) plus a gated hypothesis step using the 0G router; only rules citing real transactions survive, confidence capped by the evidence.
  • strategy-ir: immutable, content-addressed strategy versions.
  • backtester: replays the pool's real Swap events with a look-ahead guard enforced in code and in the database; fees from real swap flow x fee tier x liquidity share.
  • aqua-adapter: 1inch aqua-sdk and swap-vm-sdk; Uniswap TickMath ported to exact BigInt; compiles an AquaXYCAmmStrategy concentrate order from the position's real ticks, simulates approve/ship, verifies the Shipped event and virtual balances.
  • authorization: server-verified EIP-712 with single-use challenges, expiry and replay protection.
  • zero-g-storage: 0G Galileo uploads with Merkle read-back (references shown only after a real upload).

Testing: 108 unit/API tests, a fork test of approve -> ship -> dock against the real Aqua contracts on an Anvil Sepolia fork, and live checks on Sepolia.

Hacky bits: 1inch's production Aqua router is not on Sepolia, so we use 1inch's documented Sepolia test pair; Supabase's direct host is IPv6-only, so we use the session pooler; a rate-limited RPC returns a clean 503 with back-off instead of failing the page.

AI tools: Claude Code was used as a coding assistant for implementation, tests, UI work and documentation. Every integration result shown in the app was verified live on Sepolia.

background image mobile

Join the mailing list

Get the latest news and updates

TRACE | ETHGlobal