Skip to main content

How it works

Ophis sits on top of CoW Protocol's batch-auction settlement layer and adds a natural-language front door. This page traces a swap from a sentence to an on-chain settlement.

The intent lifecycle

plain English structured order batch auction settlement
┌──────────────┐ parse ┌──────────────────┐ sign ┌──────────────────┐ ┌──────────────┐
│ "swap 100 │ ─────▶ │ sell: USDC │ ───▶ │ solvers compete │ ─▶ │ uniform-price│
│ USDC for │ LLM │ buy: ETH │ wallet│ for best execution│ │ on-chain │
│ ETH on Base"│ │ amount: 100 │ │ (DEX / P2P / xchain)│ │ settlement │
└──────────────┘ │ chain: base │ └──────────────────┘ └──────────────┘
└──────────────────┘

1. Intent parsing

Free-form text is sent to a Cloudflare Pages Function that proxies LibertAI's Qwen 3.6 27B (open-weights, hosted on Aleph Cloud) with a pinned system prompt and temperature: 0 for deterministic extraction. The proxy:

  • holds the LibertAI API key server-side (browsers never see it),
  • validates extracted tokens against an internal allowlist of 236 DEX-traded symbols,
  • validates the chain against the set the network selector can actually route to, and
  • returns a structured ParsedIntent the UI uses to pre-fill the form.

The parser only normalizes language. It never places, signs, or executes a trade, that is always the user's wallet on the frontend.

2. Order signing

Once the form is filled, the user signs an order with their own wallet (EIP-712 for EOAs, ERC-1271 for smart-contract wallets). The signature authorizes a limit, a minimum acceptable output, not a specific execution path. Solvers may only do better than the limit, never worse.

3. Batch auction & solver competition

Signed orders collect into batches. For each batch, solvers search for the best way to settle every order simultaneously, routing through on-chain liquidity, matching orders against each other peer-to-peer (no liquidity pool needed), or bridging cross-chain. Solvers bid, and the one that maximises total surplus wins the right to settle.

On Optimism and Unichain, where Ophis runs its own stack. Ophis currently operates the solver itself, competing across several routing strategies (a baseline on-chain router plus multiple DEX aggregators) that bid against each other per batch, so there is genuine price competition even though the solver is Ophis-operated. The on-chain allowlist (GPv2AllowListAuthentication) controls who may settle, and additional independent solvers can be authorized over time. On the CoW-hosted chains Ophis surfaces, CoW's established solver network competes. Your protection is identical either way: the limit price in your signed order is enforced on-chain, so any solver can only fill it at or better than the price you signed.

4. Uniform-price settlement

The winning solver settles the batch on-chain. Every trade in a batch clears at the same uniform price, which is what eliminates these order-level MEV vectors by construction:

  • No front-running, there's no pending-order mempool race to win.
  • No sandwiching, the protocol does not reorder trades for value.
  • No priority-gas auction, execution order inside a batch is not for sale.

What Ophis runs

ComponentDescription
FrontendA fork of the CoW Swap frontend with the natural-language intent layer added.
Intent-parser proxyA Cloudflare Pages Function in front of LibertAI Qwen 3.6 27B. See Intent API.
Self-hosted orderbook & solverOn Optimism and Unichain, Ophis runs its own CoW Protocol orderbooks (optimism-mainnet.ophis.fi and unichain-mainnet.ophis.fi) and operates the solver. CoW-aligned chains use api.cow.fi and CoW's solver network.
Settlement contractsCoW Protocol's GPv2Settlement (unchanged code), deployed and operated by Ophis on Optimism and Unichain, alongside Ophis-specific allowlist + fee-handling contracts. See Security & audits.
Rebate indexerIndexes volume-tier rebates that accrue to traders. See Fees & rebates.

Cross-chain via NEAR Intents

Solana and Bitcoin are available as output destinations. When a swap targets one of them, NEAR Intents brokers the bridge: the user signs with their EVM wallet and provides a destination address on the target network. No second wallet, no manual bridging step.

Where to go next