Get 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
1const [a, b, c] = await Promise.all([2  quote(in, out, amt, poolA),3  quote(in, out, amt, poolB),4  quote(in, out, amt, poolC),5]);6return swap(in, out, amt, best(a, b, c));
One script quotes three pools and routes through the best — decided at execution, inside the block.Open playground →
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. Same selectors, same gas as hand-written Solidity or Rust.

ERC20.solsolidity · 28 lines
1pragma solidity ^0.8.20;23contract ERC20 {4 mapping(address => uint256) public balanceOf;5 mapping(...) public allowance;67 function transfer(address to, uint256 amt) external returns (bool) {8 require(balanceOf[msg.sender] >= amt);9 balanceOf[msg.sender] -= amt;10 balanceOf[to] += amt;11 emit Transfer(msg.sender, to, amt);12 return true;13 }14 // + approve, transferFrom, allowance, events…15}
ERC20.sauce.tstypescript · 11 lines · same bytecode
1@contract2export class ERC20 {3 balanceOf = new Map<address, uint256>();4 allowance = new Map<[address, address], uint256>();56 transfer(to: address, amt: uint256) {7 require(this.balanceOf.get(msg.sender) >= amt);8 this.balanceOf.sub(msg.sender, amt);9 this.balanceOf.add(to, amt);10 emit Transfer(msg.sender, to, amt);11 }12}

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. Run a template in the browser first, then wire the same flow into your own code.

1

Install the SDK

The compiler and runtime, with typed ABIs. Works in the browser and in Node.

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

Start from a template

Each template is a complete, runnable Sauce script. Open one to read the source, then adapt it to your use case.

3

Compile and run

Compile the script to bytecode and pass it to the Sauce contract's cook() entry point. Try it in a playground against live Base state before you ship.

run.ts
import { compile } from "@eco-incorp/sauce-sdk/compiler";// Your script's TypeScript, compiled to EVM bytecode segments.const { bytecode } = compile(source, { contracts, args });// Pass the segments to the Sauce contract's cook() entry point.const result = await walletClient.writeContract({ address: SAUCE_ADDRESS, abi: SAUCE_COOK_ABI, functionName: "cook", args: [bytecode],});
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
  • Same scripts you can see in the playgrounds above
Read the docs →
EARLY ACCESS | SAUCE IS IN BETA

Available to Eco partners.

Request early access