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
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);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.
The route is decided in block N against stale state, and lands in block N+1 or later. The chain has moved.
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.
Runtime branching and loops, on-chain. if/else, while, recursion — every decision evaluated against live state at inclusion.
TypeScript in, VM bytecode out.
All-or-nothing execution. The whole script is one transaction — if any step reverts, everything reverts. No partial fills, no orphaned approvals.
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.
The SauceScript compiler, as WebAssembly. Runs in the browser and in Node, and compiles for both engines.
Define your transaction logic in TypeScript. Follow the docs to build a Sauce script for your use case.
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.
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], }),});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.
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.