Skip to content

Add ERC: Zero-Knowledge Spending Policies - #1929

Open
junbeomlee wants to merge 10 commits into
ethereum:masterfrom
junbeomlee:add-erc-zk-spending-policies
Open

Add ERC: Zero-Knowledge Spending Policies#1929
junbeomlee wants to merge 10 commits into
ethereum:masterfrom
junbeomlee:add-erc-zk-spending-policies

Conversation

@junbeomlee

Copy link
Copy Markdown

New draft ERC: a composable function set for contracts holding a user's funds to release them only against a zero-knowledge proof that the payment satisfies a pre-registered spending policy, verified in ERC-1271 signature validation.

Discussion: https://ethereum-magicians.org/t/erc-zero-knowledge-spending-policies/29281

The file is named erc-9999.md as a placeholder; I will rename it to the assigned number.

@eip-review-bot

eip-review-bot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

File ERCS/erc-8366.md

Requires 1 more review from Editors: @g11tech, @jochem-brouwer, @samwilsn, @xinbenlv

@junbeomlee

Copy link
Copy Markdown
Author

Note on numbering: I initially self-assigned 8357, then noticed it collides with an allocation in the EIPs repo (ethereum/EIPs#12055), and that editors/associates assign numbers sequentially across repos (8362 was assigned to #1925, and 8364 is already claimed). I have moved the file to erc-8365.md as a best guess at the next free number - happy to renumber promptly if an editor or associate assigns a different one.

Comment thread ERCS/erc-8365.md Outdated
@@ -0,0 +1,205 @@
---
eip: 8365

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
eip: 8365
eip: 8366

@junbeomlee
Assigning next sequential EIP/ERC/RIP number.
Numbers are assigned by editors & associates.

Please also update the filename.

@junbeomlee

Copy link
Copy Markdown
Author

Done - renamed to erc-8366.md and updated the preamble. Thank you!

@junbeomlee
junbeomlee requested a review from abcoathup August 5, 2026 06:28
Comment thread ERCS/erc-8365.md Outdated
title: Zero-Knowledge Spending Policies
description: Contracts release held funds only against a zero-knowledge proof that the payment satisfies a registered spending policy
author: JunBeom Lee (@junbeomlee)
discussions-to: https://ethereum-magicians.org/t/erc-zero-knowledge-spending-policies/29281

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
discussions-to: https://ethereum-magicians.org/t/erc-zero-knowledge-spending-policies/29281
discussions-to: https://ethereum-magicians.org/t/erc-8366-zero-knowledge-spending-policies/29281

Updated Eth Magicians title with assigned number

Comment thread ERCS/erc-8366.md Outdated
title: Zero-Knowledge Spending Policies
description: Contracts release held funds only against a zero-knowledge proof that the payment satisfies a registered spending policy
author: JunBeom Lee (@junbeomlee)
discussions-to: https://ethereum-magicians.org/t/erc-zero-knowledge-spending-policies/29281

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
discussions-to: https://ethereum-magicians.org/t/erc-zero-knowledge-spending-policies/29281
discussions-to: https://ethereum-magicians.org/t/erc-8366-zero-knowledge-spending-policies/29281

Updated Eth Magicians title with assigned number

@junbeomlee
junbeomlee requested a review from abcoathup August 5, 2026 06:33
- Split the optional settle/Settled pair into IZKSpendingPolicySettlement
  (OPTIONAL members do not compile in a single Solidity interface)
- Normatively fix the authorization tuple for the ERC-3009 schema and drop
  the redundant from field (digest recomputation pins the payer)
- Scope the 0xffffffff requirement to envelopes that decode
- Define "settled", forbid registering consumed nonces where readable, and
  state that policy records survive settlement (registered != spendable)
- Note that allowedPolicy does not distinguish revoked from never-registered
…dapter

The check the standard exists for now has its own named entry point,
verifyPolicy(authorization, proof), usable as a pre-flight static call by
any party. isValidSignature is no longer declared in IZKSpendingPolicy
(it is ERC-1271's function): conforming contracts on contract-signature
rails MUST implement it as an adapter that performs digest binding and
then agrees with verifyPolicy. Pseudocode and Direct settlement updated
to match. Mirrors the reference implementation (33 tests).
The verifyPolicy restructure moved digest binding out of the numbered
verification steps and into the ERC-1271 adapter paragraph, so the
envelope note's "step 1" pointed at nothing.
verifyPolicy takes authorization and proof as two direct arguments, so
the abi.encode(proof, authorization) envelope is signature-rail wire
format, not core spec: it exists only because ERC-1271 offers a single
bytes slot. The one-way-hash rationale for carrying cleartext fields
also only applies on that path. The core section now defines the two
arguments' encodings on their own.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants