feat: Auditable Shielded Pools - #3
Conversation
1d71e2c to
3ff64fe
Compare
3ff64fe to
618ed0c
Compare
1bcf247 to
a70149e
Compare
a70149e to
dbd7ef2
Compare
musitdev
left a comment
There was a problem hiding this comment.
Mostly we have to see if we can make auditor permissionless.
|
|
||
| ## Summary | ||
|
|
||
| This MIP specifies **Shielded Zones**, a design for private token transfers on Movement, together with the cryptographic primitive stack it requires. Value is held in **a single on-chain shielded pool** that supports any number of fungible assets — all sharing one commitment tree, so the anonymity set spans every asset. Every private transfer has an *audit scope*: one or more approved auditors, chosen per transfer, that can decrypt it. That per-transfer audit scope is what a **Shielded Zone** is — not a place funds live. |
There was a problem hiding this comment.
In the initial concept, auditor is defined by the node operator and is permissionless. We force having at least one auditor per transfer. For one asset several operators can define different auditors. It's the operator responsibility to respect the law. This point has to be validated with the layer, but it works like that in Tempo zone.
The user decide which operator he use for his transfer.
To summary:
- User : KYC
- Auditor: permissionless
- The user chooses his auditor to do the transfer.
There was a problem hiding this comment.
Good ideas, implemented all of the above.
|
|
||
| The relayer performs one additional, mandatory task: it attaches **auditor data** — an encryption of the transfer's `(receiver, amount)` to at least one auditor — and proves on-chain that the auditor's ciphertext faithfully encrypts the same values the transfer moves. The operator and the relayer are the same party: the auditing institution operates (or facilitates) the relayer, so it is necessarily the entity that names the auditors and constructs their data. | ||
|
|
||
| As in a Tempo Zone, that institution can observe all transaction information. Unlike a Tempo Zone, funds are not confined to a zone: a sender may pay any receiver, and a **Shielded Zone** here is only the **audit scope** (which auditors participate), chosen per transfer by the relayer. |
There was a problem hiding this comment.
I think we should remove all reference to tempo. Here it's a little different. The institution can observe all Tx that goes through his relayer. Tx relayed by other relayer won't be auditable by the institution. We can speak about auditable zone.
There was a problem hiding this comment.
Removed Tempo references, changed concept to auditor zones.
| ### Out of scope | ||
|
|
||
| - **Off-chain operator ledgers / rollups.** This design executes and verifies transfers **on-chain**. A separate off-chain "zone ledger" model is explicitly not proposed here. | ||
| - **Legal accreditation of auditors.** The on-chain approved-auditor set and its admin control are specified here; how an auditor is vetted as a legitimate legal entity off-chain, before its key is approved, is a policy matter outside this MIP. |
There was a problem hiding this comment.
Depend on if we open the auditor part.
There was a problem hiding this comment.
Resolved by going permissionless; off-chain auditor vetting is now a policy matter, not protocol-enforced.
|
|
||
| - **Off-chain operator ledgers / rollups.** This design executes and verifies transfers **on-chain**. A separate off-chain "zone ledger" model is explicitly not proposed here. | ||
| - **Legal accreditation of auditors.** The on-chain approved-auditor set and its admin control are specified here; how an auditor is vetted as a legitimate legal entity off-chain, before its key is approved, is a policy matter outside this MIP. | ||
| - **Relayer economics.** Fees, incentives, and gas-paymaster accounting are out of scope; only the cryptographic property that lets a relayer submit on a sender's behalf (proof + nullifier authorize, not the submitter's identity) is specified. |
There was a problem hiding this comment.
I think we should define some fee possibilities and the relayer decide the fee. It can be done in a v2.
There was a problem hiding this comment.
Added as planned v2 work for now.
|
|
||
| Every transfer therefore carries, for at least one auditor, a ciphertext of the transfer detail under the auditor's key, and the relayer proves on-chain that this ciphertext encrypts exactly the `(receiver, amount)` committed in the transfer. The relayer attaches this data because it is operated by the auditing institution itself: it selects the auditors and is trusted to observe the transaction in cleartext. | ||
|
|
||
| The approved auditor(s) attached to a transfer are that transfer's **Shielded Zone** — its audit scope, and the only sense in which a "zone" exists here: not an environment funds enter, but the set of auditors under which the transfer is auditable. This is what the diagram's `Shielded Zone` box marks. |
There was a problem hiding this comment.
I would say auditor zone instead of Shielded zone .
| public entry fun revoke_auditor(admin: &signer, auditor_pubkey: vector<u8>) | ||
| ``` | ||
|
|
||
| There is no zone object, no `zone_id`, and no per-institution registration. Revoking an auditor removes its key from the set; there is no separate enable/disable flag. The set is asset-agnostic: it applies to a transfer of any supported asset. |
There was a problem hiding this comment.
We need to validate first if we really need to declare the auditor.
There was a problem hiding this comment.
Confirmed we don't. Removed the on-chain auditor declaration; the auditor key just travels in the transfer's binding.
There was a problem hiding this comment.
One other point we should present it to the BD and legal so that they can validate our choices.
…hielded Pools - Auditor selection permissionless: remove ApprovedAuditors set, admin, approve/revoke; chain enforces only the faithful P9 binding, not an auditor allowlist - Remove Tempo references; describe the audit scope self-contained - Rename concept 'Shielded Zone' -> 'auditor zone'; retitle MIP and file to Auditable Shielded Pools - Defer relayer-set fees to v2 (scope note + Future Potential) - Drop the resolved auditor-approval-authority open question
musitdev
left a comment
There was a problem hiding this comment.
I've added one constrain on the user request so that the relayer must add the user selected auditor to the transfer.
| **On-chain state.** There is no zone object, no `zone_id`, no per-institution registration, and no approved-auditor set. The auditor for a transfer appears only as the `auditor_pubkey` carried in that transfer's P9 binding, and the rule is asset-agnostic: it applies to a transfer of any supported asset. | ||
|
|
||
| **Binding a transfer to its audit scope.** For each transfer the operator selects one or more auditors and attaches, per auditor, a P9 ciphertext and binding proof. The pool requires at least one and verifies that the binding proof ties the ciphertext to the transfer's recipient output commitment. A transfer with zero valid bindings is rejected. | ||
|
|
There was a problem hiding this comment.
One point we should add. It's the user that choose his auditor and select a relayer of the chosen auditor. Nothing guaranty that the relayer put the right auditor, so in request the user should add a sign of his chosen auditor key so that the contract can validate that the relayer have added at least the chosen auditor.
There was a problem hiding this comment.
Good point, pushed an update. The sender now endorses its chosen auditor key(s) inside its own transfer proof (auditor_endorsement = Poseidon(sorted auditor_pubkeys)), and the pool requires every endorsed auditor to be present among the bindings ("at least the chosen auditor,"); the relayer may add its own mandated auditors but can't drop or substitute the sender's. I went with I used a proof-carried endorsement rather than a literal signature — a signature as a public input risks deanonymizing the sender, whereas the endorsement gives the same on-chain guarantee and is authorized by the spend, so the relayer can't forge it.
Sender pins its chosen auditor(s) via an endorsement carried in the transfer proof; the pool requires every endorsed auditor to appear among the bindings, so a relayer cannot drop or substitute the user's choice. Operators define the auditors they serve and own their legitimacy; the sender selects among that offering.
Not to be merged until we have input from legal and leadership. BD is speaking with them.