Skip to content

Sealed orders on testnet, 6 November 2026

Two runs: v2, the current contract (an agent of the swap role places the order, the members read its terms), then v1, the first one.

The first sealed order, end to end, on the judge-e2e-1903 company (DAO judge-e2e-1903.sputnikv2.testnet, vault judge-e2e-1903.nomos.euthyna.testnet, Base Sepolia wallet 0xC63Ac0Bc10dc950B97893818CE553528C1c55ce4). What it shows: the order is one hash on chain; a zero-knowledge proof of its hidden terms is verified on NEAR; the vault, through the same role checks as any agent, has NEAR MPC sign a Uniswap swap that is mined on Base and settled back on the vault from an MPC attestation of the Base receipt.

euthyna-sealed-orders.testnet: contracts/sealed-orders, wasm built by the contracts CI in the pinned image (sha256 2204248bae5c2fd83c23da15e422ac4357a972bd0051c864aa8db4b3af650f08, on-chain code hash 3HnXV7bbRP5DRNC64kwAYddoYg2dvq1L8ciU4eSsAfWw). Deployed, initialised and its only key deleted in one transaction: view_access_key_list returns no key, and the contract has no owner method.

Step NEAR transaction
Proposal #5, the sealed-orders role: swap USDC for WETH on Uniswap v3, 10 USDC a day, approval up to 20, member euthyna-sealed-orders.testnet AsMJDgvP…, approved 8gWx2SD8…
The three rule changes, after the veto window 3r3yWdT3…, 4XfNs5bn…, 3JFoES5C…
Proposal #6, configure: this vault, this role, 0.5% slippage (the contract checks the vault’s owner and reads its wallet) 27dhsTDm…, approved AhR5itmB…
Proposal #7, the wallet approves the router for 20 USDC (a DAO transaction) HxxXUX7c…, approved CQ3ymvKC…; on Base 0x9e7d9075…, settled on the vault (state Confirmed)
Step Transaction
Proposal #8 seals 0x193d6691…a721: buy WETH with USDC at 2 000 USDC per WETH or better, 5 USDC in all, 2 days. Only the hash is on chain DmcdSsf7…, approved 3p1tDLch…
The watcher (pnpm --filter @euthyna/api sealed watch, on the member’s machine) quoted 1 771 USDC per WETH, proved the fill (2 USDC, rate 564568447386072000000000000) and sent it. The contract verified the proof and the vault prepared and had MPC sign the swap: 101.7 Tgas in all DDxMCteiUFCtykQj8xRdozt7CSMZWePCBTmWWsXzHqM9 (operation 0x7d40bbab…3cbb)
The swap on Base Sepolia: 2 USDC in, 0.001129 WETH out to the company wallet, above the minimum the proven rate sets 0xea08a63f…, settled on the vault once the Base block was final (state Confirmed)

After the fill, order(dao, 0) reads filled: 2000000, fills: 1; the limit, the 5 USDC total and the deadline appear nowhere on chain.

Each fill’s amount, the pair, the rate it demanded (here 1 771 USDC per WETH, so the hidden limit is at or above it) and the company wallet: the swap is a Base transaction. The order’s running total. Who holds the order file (the members who sealed it, and whoever runs the watcher).

The vault settles a Base operation only on a finalized block, about 20 minutes on Base Sepolia: the watcher now waits up to 40 minutes (--settle-minutes) and says so when it stops earlier.

v2: an agent of the swap role places the order

Section titled “v2: an agent of the swap role places the order”

Same company and wallet. The contract euthyna-sealed-orders-v2.testnet is the CI build of contracts/sealed-orders (sha256 8be6477b36c86b95c96dba8c5e77255eeefa9580a91e7ceb74d69d370c0a273c, on-chain code hash AR7L9TpCk5wtceqhJp28rGNVrsZAaWkBprYAczktRfQX), deployed, initialised and keyless in one transaction 7njJg5XV…: view_access_key_list returns no key. No configure any more: the role decides.

Step Transaction
Proposal #9, the treasury-desk role: swap USDC for WETH on Uniswap v3, 10 USDC a day, approval up to 20, “Allow sealed orders” on; members the agent eut-e2e1903-desk-agent.testnet and the contract FyQgxeGT…, approved CMTUPRvP… and ErccKDAW…
The four rule changes after the veto window (allowance, role, then the two members) aM66V9ws…, 2qwJWu7x…, 6o94zbt5…, Gb4XErct…
Two council members register a reading key (an X25519 key derived from their NEP-413 signature; the contract checks the DAO policy) 52kijbax…, 5rN8KTnN…
The agent (sealed place --approve 20) has the vault approve the router for 20 USDC, inside the role: 34.7 Tgas D2NDr2vn…; on Base 0xbd666317…, settled (Confirmed)
The agent seals order #0, 0x0102b5f3…5bca: 2 000 USDC per WETH or better, 5 USDC in all, 2 days, with the terms encrypted for the two readers: 16.2 Tgas 7dF2DRQS…
The watcher (sealed watch --chunk 2) quoted 1 772 USDC per WETH, proved a 2 USDC fill and sent it: 101.8 Tgas CSHcLrYd… (operation 0xc7f52363…0bd8, min_out 0.001123 WETH)
The swap on Base Sepolia: 2 USDC in, 0.0011289 WETH out to the company wallet 0x04d7421a…, settled on the vault once final (Confirmed, 23 minutes later)

Then order(vault, 0) reads filled: 2000000, fills: 1. The two registered members decrypt the terms from the chain (cap 5 USDC, the limit, the deadline); eut-e2e1903-newseat.testnet, a member who registered no key, cannot. The router allowance reads 18 USDC (20 approved, 2 swapped).

Seen on the way, fixed in the same branch: sealed place printed near-api-js receipt logs into the order file (stdout now carries only the file); the agent’s router approval was signed but not broadcast (place now broadcasts it and keeps it pending in the order file until settled); the watcher no longer sends a fill the router allowance cannot cover (needs-approval).

v3: an agent hired from the console seals with its own limited key

Section titled “v3: an agent hired from the console seals with its own limited key”

A NEAR function-call key has one receiver and cannot attach a deposit. v2 needed the agent to call the sealed-orders contract (a second receiver) with 0.02 NEAR of storage, so only an agent holding a full-access key could seal. v3 removes both obstacles:

  • A second key per agent. When the console hires an agent with a key file, it derives a second ed25519 key from the agent’s private key (packages/sdk/src/agent-keys.ts, sealedKeyOf) and sends only its public key. The server creates the account with two function-call keys: the vault (the agent methods, as before) and euthyna-sealed-orders-v3.testnet (seal, approve, fill, cancel). The server and the browser both check that the account holds exactly these two keys. The MCP server derives the same key from the key file.
  • Storage paid from the vault’s credit. add_credit(vault) (anyone) prepays storage; a seal with no deposit draws 0.02 NEAR from it, and a refused seal gives it back to the credit. The relayer adds 0.1 NEAR (5 orders) when it hires an agent with that key (NEAR_SEALED_CREDIT_YOCTO); members add more from the Sealed orders card.

contracts/sealed-orders built with cargo near build non-reproducible-wasm (sha256 ba1865e9ea9bf6903e11ecbecb8d32fc3be16c393b1453bf67f3c1cbe8b69107, on-chain code hash DXSQkrR1dTFxkSZfRU2yjonMnc183WYn6xpiY1LyPexE), deployed, initialised and keyless in one transaction B4RQz933…: view_access_key_list returns no key. The sandbox test an_agent_with_a_function_call_key_seals_from_the_vault_credit seals with a function-call key limited to the contract, checks the refund to the credit, and that the key cannot call another method.

A company that turned sealed orders on with v2 turns them on again in its swap role (the role’s member becomes v3) and registers its reading keys again. Agents paired with euthyna-signer keep one key for now.