Framecraft

PQ wallets, unlinkable gasless accounts and a DSL for writing frames, built on EIP-8141 frame txs

Framecraft

Created At

ETHGlobal Mumbai

Winner of

Ethereum Foundation

Ethereum Foundation - Best use of the Frame Transaction Alternative Mempool 2nd place

Project Description

FrameCraft shows three things you can build once a transaction is a list of frames instead of a single call. EIP-8141 frame transactions let contracts verify the sender, contracts pay the gas, and several calls run in one transaction. Each example uses that in a different way, on a live devnet.

  1. Post-quantum wallets. A smart wallet whose only spending key is an ETHFalcon-512 public key, a lattice-based signature scheme that holds up against quantum attacks. The user never handles a seed phrase. The Falcon key is regenerated in the browser from a passkey (WebAuthn PRF) each time it's needed, used once to sign, then wiped. The signature covers every call target, value and calldata, plus the chain, nonce and expiry. The wallet checks it on-chain and runs the batch atomically. With frames this needs no bundler and no ERC-4337 entry point: one frame approves execution, one lets a paymaster approve payment, and one calls the wallet.

  2. Gasless, unlinkable accounts. The usual way to link a new account to its owner is the ETH transfer that funds its gas. Here, a paymaster's VERIFY frame pays the gas, so a brand-new account can claim tokens, swap and transfer while holding zero ETH. The account that submits the outer transaction is a disposable relay key with no power to spend wallet funds, and it can be replaced at any time. The paymaster reads the transaction's maximum cost from inside the frame and refuses anything over its per-transaction ceiling. This hides who funded an account. It doesn't hide amounts or recipients.

  3. A DSL for writing frames. Frames are powerful but awkward to assemble by hand: modes, approval scopes, atomic flags, gas limits per frame. We wired EVMcrispr's EVML, a scripting language for on-chain actions, to frame transactions. In a frame:tx ( … ) block:

  • each exec becomes a frame,
  • batch ( … ) makes its frames all-or-nothing,
  • default ( … ) makes calls come from the protocol's entry point,
  • verify writes a validation frame,
  • --paymaster adds the sponsor's frames automatically.

The block is checked against the shapes the mempool accepts before anything is signed. A web page gives you the editor, with completions and diagnostics, and a Run button. It signs with a throwaway key, sends to the alt mempool, and shows each frame's result.

Around these sits a reference DeFi app. It does sponsored token transfers with on-chain transfer guards, swaps, and recurring buy positions on 1inch Aqua with a custom SwapVM program, all as frame transactions.

How it's Made

We run an ethrex devnet (chain 1337) with the EIP-8141 tracer profile, behind a Skandha sidecar that implements the ERC-8421 alternative mempool, plus the public alt-mempool devnet. Transactions are encoded either with @forshtat/hegota-support, a codec for frame transactions that is driven by a per-network profile, or an extension we wrote for viem, using forshatat library as a dependency.

Contracts (Foundry).

  • A paymaster that approves payment from its VERIFY frame. It uses hegota-support's helper bytecode to call APPROVE by delegatecall (so the paymaster stays the payer) and to read the transaction's max cost (an ethrex extension), enforcing a cost ceiling.
  • The ETHFalcon quantum wallet and its factory. The address commits to the Falcon key, the verifier and the chain's genesis hash, so a wallet can't be replayed on another chain.
  • A legacy P-256 passkey wallet, a transfer guard, and 1inch Aqua with a customized recurring-buy SwapVM program.

Post-quantum signing.

  • ETHFalcon's pinned C source is compiled to WASM with Emscripten, with its test RNG replaced by Web Crypto.
  • The seed comes from WebAuthn PRF with a fixed salt. It's processed in an isolated worker that wipes its WASM memory and exits after signing.
  • Foundry tests use FFI to run the compiled signer itself against the Solidity verifier.
  • Browser tests use Chrome's virtual authenticator to check that the same key comes back after a reload.

The DSL.

  • EVMcrispr's frame module turns the block into a frame action. Our host handler maps it onto SDK frames, filling in default gas where the script sets none, then prepares, signs, submits and follows the receipt.
  • The editor runs on an Astro site as a React island. We vendor EVMcrispr's unreleased next branch at a pinned commit and point Vite and TypeScript straight at its source code; there's no build step on EVMcrispr's side.

Tooling. A Bun + Lerna/Nx monorepo: SDK package, Foundry contracts, the Next.js DeFi app and the Astro site.

Partner tech.

  • 1inch Aqua/SwapVM gave us real settlement for swaps and a programmable recurring-buy position, instead of a mock.
  • ZKNox's ETHFalcon gave us a Falcon verifier that runs on the EVM.
background image mobile

Join the mailing list

Get the latest news and updates

Framecraft | ETHGlobal