Tycho
  • Quickstart
  • Overview
  • Motivation
  • Concepts
  • How to Contribute
    • Bounties
  • For Solvers
    • Indexer
      • Tycho RPC
      • Tycho Client
        • Binary / CLI
        • Rust Client
        • Python Client
    • Simulation
    • Execution
      • Encoding
      • Executing
      • Contract Addresses
      • Execution Venues
    • Hosted Endpoints
    • Supported Protocols
  • For DEXs
    • Protocol Integration
      • Indexing
        • 1. Setup
        • 2. Implementation
        • 3. Testing
          • How to Run
        • Common Problems & Patterns
          • Tracking Components
          • Tracking Contract Storage
          • Normalizing relative ERC20 Balances
          • Tracking Contract Balances
          • Custom protobuf models
        • Best Practices
        • Reserved Attributes
      • Simulation
        • Ethereum: Solidity
      • Execution
        • Code Architecture
      • Contributing guidelines
Powered by GitBook
On this page
  • Cow Protocol
  • Other competition venues
Export as PDF
  1. For Solvers
  2. Execution

Execution Venues

How to integrate Tycho in different execution venues.

PreviousContract AddressesNextHosted Endpoints

Last updated 9 days ago

Cow Protocol

To solve orders on , you'll need to prepare your solution following specific formatting requirements.

First, initialize the encoder:

let encoder = TychoRouterEncoderBuilder::new()
    .chain(Chain::Ethereum)
    .build()
    .expect("Failed to build encoder");

Since you are not passing the swapper_pk, the TychoRouter will use a transferFrom to transfer the token in as opposed to using permit2.

When solving for CoW Protocol, you need to return a that contains a list of interactions to be executed in sequence.

To solve with the Tycho Router you only need one custom interaction where:

  1. callData is the full encoded method calldata using the encoded solution returned from encoder.encode_solutions(...)

  2. allowances is a list with one entry where the allowance for the token in and amount in is set for spender to be the Tycho Router. This is necessary for the transferFrom to work.

Other competition venues

For other venues, like UniswapX or 1inch Fusion, please contact us.

CoW Protocol
Solution object