Architecture
The system divides operations between two distinct layers. Execution happens off-chain in the VM. Settlement lives on Bitcoin, where you anchor definitions and every call's commitment so anyone can replay your contract's history.
The contract gets compiled once, with its commitment hash anchored to Bitcoin in a single transaction. Every subsequent call is itself committed on Bitcoin as a protocol stamp. Validators process state changes off-chain in Bitcoin block order, using those commitments and Bitcoin context as reference points, combining performance with verifiability.
Execution Layer
Off-chain processing occurs within the SCL VM. Node operators run the VM, load contract bytecode, enforce rules, and maintain local state. The VM is deterministic: if another node replays the same payload, it gets the same result.
Execution is bounded: 100k instructions per call (shared across nested cross-contract calls), 1024 stack depth, 64 call depth, and a 64 KB storage quota per contract. Every frame of every call runs under the same ceilings.
Settlement Layer
Upon deployment, the compiled bytecode receives a hash representing the contract's commitment. This hash is embedded in a Bitcoin transaction. Each contract call is then anchored the same way: a compact protocol stamp in an OP_RETURN output carries the hash of the signed call envelope and the contract it targets.
The envelope is bound to its anchoring transaction: the transaction must spend the exact outpoint the envelope names. Confirmation in a Bitcoin block is what orders and finalizes calls; nodes process them block by block and publish a state root at each height.
Validator Network
Validator nodes perform identical operations: watch Bitcoin for protocol stamps, validate each stamp's anchor binding, derive context, and replay the VM execution. If a payload doesn't match, it just fails, deterministically, on every honest node. There's no voting step, just honest replay.
Nodes gossip pending payloads to each other ahead of confirmation and sync state via Merkle diffing, so the network converges on the same history without any coordination beyond Bitcoin itself.