Sauce v1 · live on BaseGet early access
Sauce · Eco runtime for the EVM & SVM

Transactions that think.

Sauce turns onchain transactions into programs, with encoded logic that executes at runtime. Advanced routing with zero-block latency, for superior execution.

Live in beta

best-pool-swap.sauce.ts
function main(  tokenIn: Address, tokenOut: Address, amountIn: Uint256, caller: Address,  pool1Addr: Address, pool2Addr: Address,): Uint256 {  const router: Address = 0x2626664c2603336E57B271c5C0b26F421741e481;  const quoter: Address = 0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a;  // Pull the input tokens in and let the router spend them.  const token = IERC20.at(tokenIn);  token.transferFrom(caller, ctx.self(), amountIn);  token.approve(router, amountIn);
One script quotes two pools and routes through the best — decided at execution, inside the block.
What is Sauce

Sauce is a Turing-complete runtime for the EVM and SVM. Write transaction logic in TypeScript, compile it to bytecode, and execute it atomically against live state — all within a single block.

We built Sauce as a protocol for automating and optimizing Eco's routing and liquidity strategies. Now available as an SDK to select partners.

How it works

Decide first, then sign. Or decide at inclusion. Once.

Off-chain orchestration

Quote, sign, submit. Across two blocks. One block latent.

BLOCK NquotesignWAIT ANOTHER BLOCKBLOCK N+1submitDECIDE BEFORE THE BLOCK THAT EXECUTES

The route is decided in block N against stale state, and lands in block N+1 or later. The chain has moved.

Sauce

Quote, decide, execute. Inside one block. Zero latency.

BLOCK NquotedecideexecuteDECIDE INSIDE THE BLOCK THAT EXECUTES

Quote, decide, execute — inside the same inclusion the user signed. Zero blocks between observation and execution.

Every block of latency is worse pricing and missed routes — Sauce removes the block.

Why Sauce

What you get.

Programmability

Runtime branching and loops, on-chain. if/else, while, recursion — every decision evaluated against live state at inclusion.

Accessibility

TypeScript in, VM bytecode out.

Atomicity

All-or-nothing execution. The whole script is one transaction — if any step reverts, everything reverts. No partial fills, no orphaned approvals.

Quickstart

From install to a live transaction.

Compilation runs locally and execution is a normal onchain call — no backend to provision. Follow the docs to write, compile, and integrate your first SauceScript.

1

Install the compiler

The SauceScript compiler, as WebAssembly. Runs in the browser and in Node, and compiles for both engines.

$npm i @eco-incorp/sauce-compiler
2

Write your script

Define your transaction logic in TypeScript. Follow the docs to build a Sauce script for your use case.

3

Compile and run

Compile your script, then call cook on your wallet-owned Pot with the engine address, program and inputs. Include the Kitchen’s current execution fee.

run.ts
import { ready } from "@eco-incorp/sauce-compiler/ready";import { bytesToHex, concat, numberToHex, encodeFunctionData, parseAbi } from "viem";const { compile } = await ready(); // browser and Nodeconst { bytecode } = compile({ entry: "main.ts", target: "evm", resolve: (path) => sources[path],});const program = concat([bytesToHex(bytecode), numberToHex(amount, { size: 32 })]);// First deploy your wallet-owned Pot through Kitchen.deployPot(owner, salt).// Read the current fee from the Kitchen proxy before each cook.const fee = await publicClient.readContract({ address: KITCHEN, abi: parseAbi(["function executionFee() view returns (uint256)"]), functionName: "executionFee",});const hash = await walletClient.sendTransaction({ to: MY_POT, value: fee, data: encodeFunctionData({ abi: parseAbi(["function cook(address engine, bytes program) payable returns (bytes)"]), functionName: "cook", args: [SAUCE_ENGINE, program], }),});
Integrate

Two ways to embed Sauce.

Mode A · SDK

Write your own scripts

Compose Sauce TypeScript directly. Full programmability, your own scripts in your own repo — compiled by the Sauce toolchain, executable on Solana or any EVM chain where Sauce is deployed.

  • Typed TypeScript SDK
  • Compiles to EVM bytecode you can audit
  • Scripts are owned by you, no trusted backend
Mode B · Hosted API

Call Eco's endpoints

Eco hosts the Studio templates and a growing library as routing API endpoints. Call them like any payment or trading API — we compile and execute on inclusion against live state.

  • Drop-in REST/RPC routes for swap, deposit, payment, settlement
  • Pricing and execution guarantees built in
  • Powered by the same Sauce scripts
EARLY ACCESS | SAUCE IS IN BETA

Available to Eco partners.

Request early access