MERKI

Build

Architecture

How the MERKI pieces fit: the browser signer, the journal, the submitting wallet, the EntryPoint v0.7 and the keyhold contracts on Robinhood Chain.

browser                      connected wallet          Robinhood Chain
───────                      ────────────────          ───────────────
phrase → key #n, #n+1
build op, sign with #n  ──▶  handleOps([op]) tx  ──▶  EntryPoint v0.7
journal: #n pending                                     │ validateUserOp
                                                        ▼
                                                     keyhold: check #n,
                                                     store #n+1, run calls
journal: #n confirmed  ◀──── receipt ◀──────────────────┘

On chain

  • MerkiHashChains — library. Walks every chain from the revealed value to the end in assembly and hashes the ends. About 106k gas.
  • MerkiKeyhold — the ERC-4337 account. Keeps the current main and rescue key hashes with their counters, validates, rotates and runs one call or a batch. It answers to the EntryPoint and to itself, nobody else. No owner, no upgrade, no ERC-1271.
  • MerkiKeyholdForge — deploys keyholds as EIP-1167 proxies at CREATE2 addresses from the first key hashes and a salt. No owner, no settings. Its constructor creates the keyhold implementation and locks it.

In the browser

  • Signer (src/lib/wots.ts) — key derivation, signing and the same verification as the contract.
  • Operation builder (src/lib/userop.ts) — packs the v0.7 user operation, computes the address and the userOpHash locally and checks it against the EntryPoint's own answer before signing.
  • Journal — a local record of every key that signed, written before the signature leaves the page, so a page reload cannot make the wallet sign twice with one key.
  • Vault — the phrase, encrypted with WebCrypto. Locks after five minutes without input.

Submitting: self relay

There is no bundler in between. Your connected wallet calls handleOps on the EntryPoint directly and pays the gas itself, so the operation carries zero fees and the keyhold pays nothing. Any ERC-4337 bundler can also carry a keyhold operation; then the keyhold prepays the bundler from its own ETH as the standard defines.

Notes for Robinhood Chain

Robinhood Chain runs on Arbitrum Orbit, with fast blocks and ETH for gas. Its gas estimate includes the cost of posting calldata to the parent chain, and a one-time signature does not compress, so the wallet asks the node for an estimate of the full transaction instead of guessing.