Home
Writing
Notes from the contract layer: crosschain settlement, onchain matching, gas architecture, and the trust assumptions underneath.
- · 10 min readThe trust assumptions under crosschain settlement nobody examinesTrustless crosschain settlement isn't trustless. The trust lives in block time distributions, miner incentives, unpriced optionality, and preimage correlation, and every fix the literature proposes adds a new assumption to the stack.
- · 10 min readThe attack surfaces of onchain orderbooks that auditors missOnchain orderbooks fail at the seams between correct components, a layer standard audits never reach. Five attack surfaces I found hardening a production matching engine through adversarial testnet stress testing.
- · 11 min readFrom 142K to 28K gas per trade: the architecture behind an 80% reductionStruct packing, a red black tree, and transient storage took an onchain matching engine from 142K to 28K gas per trade. Each layer traded something, and one of them nearly broke the system.
- · 11 min readERC-6909 in production: what the spec doesn't tell youERC-6909 is the right standard for multitoken accounting, and almost everything that bites in production is missing from the spec. Lessons from shipping it as the accounting layer of a 15 contract mainnet settlement protocol: silent accounting failures, divergent permission semantics across libraries, and a tooling void.