Skip to content

feat!: escrowed transfers with off-chain envelopes, on emit-protocol - #2

Merged
tonyvelichko merged 2 commits into
mainfrom
feat/escrow-envelope
Oct 1, 2026
Merged

tonyvelichko merged 2 commits into
mainfrom
feat/escrow-envelope

Conversation

@tonyvelichko

Copy link
Copy Markdown
Contributor

Escrowed transfers

  • Escrow: output 0 (the recipient's note) is escrowed with its refund note.
  • Resolve: the receiver screens the sender's MRZ, then accepts or rejects with a member_resolve proof. After the window, anyone may refund the sender.
  • Off-chain envelope: the sealed DG1 and the lattice ciphertext stay off-chain, in the devnet's mailbox; the chain sees only env_commit. No personal data, even encrypted, is written on-chain.
  • Wallet: new commands zkpool escrows, resolve, refund and deploy. The devnet no longer needs forge.

The protocol moved to emit-protocol

The circuits, the pool contract and the protocol's types now live in emit-protocol, and this repository uses its crates (emit-protocol, emit-protocol-abi, emit-circuits 0.1.0) from crates.io. That's about 2,900 lines removed here. Dependencies: noir-zk 0.3.3, zk-encryption 0.1.5 and eid-circuits 0.8.3.

Checks

  • cargo test: 9 passed.
  • --ignored holder (release build): 2 passed.
  • The proving devnet end to end passes in 36 s.
  • scripts/demo.sh: demo ok, and the pool holds 69.94 ETH.

Breaking: new deployment and pipeline roots, and transact no longer takes the ciphertext.

Transfers escrow their recipient's note: the receiver screens the sender's
MRZ, then accepts or rejects it with a member_resolve proof, or the sender is
refunded after the window. The sealed DG1 and the lattice ciphertext travel
off-chain (the devnet's mailbox); the chain sees only env_commit.

The circuits, the pool contract and the protocol's types moved to
emit-protocol (crates emit-protocol, emit-protocol-abi, emit-circuits 0.1.0
from crates.io): this repository keeps the node, the wallet (with `zkpool
deploy`, escrows, resolve and refund), the scripts and the demo.

BREAKING CHANGE: new deployment and pipeline roots; transact no longer takes
the ciphertext; the pool is deployed by `zkpool deploy`.
@tonyvelichko
tonyvelichko merged commit f9c5565 into main Oct 1, 2026
3 checks passed
@tonyvelichko
tonyvelichko deleted the feat/escrow-envelope branch October 1, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant