December 19, 2024

Tycho Simulation is live!

tldr;

Releasing Tycho Simulation – the easiest way to simulate trades.

  • 🧘 One interface to all DEXs, complying with ERC-7815
  • ⚡️ Fast Revm and Rust native simulations (50-3000 μs for Revm – and 5-50 μs Rust native)
  • Already supporting Curve, Balancer and Uniswap pools, today.

👉 Docs

Under the hood

Tycho Simulation implements DEX pools in one of two ways:

  • VM: Track the protocols entire contract state, and map its interface into ERC-7815, then simulate the contracts plus adapter locally in Revm.
  • Native: Extract the variables to calculate critical functions (e.g. price and swap), and pass them to a rust re-write of the DEX contract, then map it into ERC-7815.

Native implementations are harder, but worth it for protocols with many pools (such as Uniswap v2 and v3), where you expect tens or hundreds of thousands of simulations in one solve.

Why we built Tycho Simulation

Tycho makes it easy to index, simulate and execute over on-chain liquidity.

Last month we released Tycho Indexer, a low-latency, streaming parser and indexer to track DEX contract state.

Now, Tycho Simulation adds a super-fast simulation library. Tycho Simulations uses Tycho Indexer state – to let you simulate prices, swap amounts, token limits and more over any DEX pool, without needing to know any protocol internals (e.g. Curve pool math and quirks).

Accurate and fast simulations are the hardest parts of solving. Tycho Simulation makes it easy.

Solvers struggle to keep up with integrations

Solver teams run a many nodes just to be able to query needed block state.

Just covering the largest DEXs can take a routing team many months – we know experienced it ourselves. You also need to be confident in solidity, rust, running modified nodes, and building data pipelines (load balancing, database and streaming infra).

You either need to reimplement the protocols logic 1-to-1 in rust, approximate the trading curves, or have to resign to slow simulations directly against a node.

DEX integrations are a barrier to innovation

Everyone doing integrations with everyone (n*m integrations) is not sustainable.

If every solver needs to do every integration again, not only is a lot of effort wasted (for both DEXs and Solvers) – but it also becomes harder and harder to be competitive as both a solver and a DEX: 

  • Solvers need to catch up with integrations, and
  • DEXs need to convince enough solvers to get integrated

before either can compete.

This limits innovation: Solvers with better algorithms and DEXs with better designs might never make it – purely because of deadweight integration efforts.

A healthy intent ecosystem can't have this integration bottleneck 

Many protocols expect solvers to go multi-chain, hold inventory, solve cross-chain, and route over lending- and perp-protocols.

But, pretty much no solver team works on any of those applications – they all still focus on atomic routing of swaps. Why? Because even the best teams are still busy doing ... integrations.

Ending the integration nightmare with an open interface

Whether you call a long-tail Curve pool, or Uniswap v2, its always the same interface.

Tycho Simulation exposes a single interface – to every liquidity source.

Under the hood Tycho Simulation supports both native rust implementations and fast simulations over contract bytcode in Revm.

Simulations take 5μs - 3ms. And we have ideas to juice it more!

Find better routes and get more flow

If you are a new DEX and competing for flow:

  • Open a PR and integrate your DEX into Tycho – no need for solvers to wait to integrate you.
  • Check the integration docs, including examples. And reach out to our team on TG for support.

If you solve, search or route for your dapp and want to support more liquidity faster

  • Integrate Tycho Simulation: Quickstart.
  • Reach out to our team on TG for support and access to the hosted version of Tycho.

Keep Reading

Tycho: The open-source liquidity indexer

Integrating and simulating DEXs for solving is hard – Tycho makes it easy.
Read More

Decentralising the trade supply chain

The trade supply chain is centralizing. To fix it, we need to understand what's driving centralization and design coordination tools to fix it.
Read More