ESMASTe: The Settlement Computer
ESMASTe (Extended Sandboxed Merkleized Script Tree Evaluator) is the virtual machine that runs Skyhook lock-scripts. It is a small, deterministic stack machine (on Ethereum, hosted on the EVM): it runs a program against committed inputs and distributes value only through accounted calls, so a swap’s payout can be an arbitrary settlement program rather than a single transfer. ESMASL itself is chain-agnostic: Skyhook as a concept can run on any Turing-complete chain, and ESMASL programs can target the EVM, Solana or CosmWasm. These pages describe the Ethereum implementation. Swap programs are written in ESMASL, a JavaScript-based language; separating the language from the machine means the language can improve without requiring the settlement semantics to be re-audited.
ESMASTe’s execution layer (the VM contract, the SingletonRunner, the factory and the assembler toolchain) has been built and tested. The authoring library and its interface are funded by Milestone 2.
Guarantees
Three guarantees shape the design, and each is enforced mechanically:
- Determinism. Identical inputs always produce identical outputs.
- Boundedness. Every run is capped by a step budget declared in advance.
- Isolation. A program can observe only the inputs it declares.
Hosting and cost
Contracts never call programs directly. For each execution, a factory creates a fresh contract with CREATE2 and funds it with the whole escrow; that contract delegatecalls into a single shared SingletonRunner, which dispatches to the requested function by selector, and it self-destructs when the run ends, sending any remainder to a leftover address, unless the script asks to persist. The details are on Programs: Functions, Dispatch, and Value.
Every instruction has a cost measured by on-chain profiling, and programs declare a step budget before they run. Running out of budget reverts the run, and since Ethereum transactions are atomic, the escrow is left untouched. The pricing is deliberately lopsided: moving value is expensive and computation is cheap, so a settlement program that spends its budget on arithmetic is badly designed, and the cost makes that visible early. See The VM.
Design lineage
ESMASTe descends from minimal settlement VMs rather than from general-purpose smart-contract platforms. Each instruction it includes exists for a specific bridge requirement, and each capability it leaves out eliminates a class of defects; the instruction count is kept small as a matter of policy. As in Bitcoin’s Taproot, a lock-script can commit to a tree of possible programs and reveal only the branch that runs; this Merkleized design is developed further in The Bidirectional MAST Engine.
Verification
The machine’s correctness rests on three properties that make it checkable. Deterministic semantics allow differential testing against independent implementations. Bounded execution allows the step count of each program to be analyzed exhaustively. The lists of excluded capabilities are short enough to review by inspection. Auditors should read those exclusion lists on both pages, since much of the security argument lies in what the machine can’t do.