EIPs Explained

ERC-7963 · Draft · ERC · 2025-05-13

ERC-7963: Oracle-Permissioned ERC-20 with ZK Proofs

An ERC-20 extension where every transfer must be pre-approved by an external Transfer Oracle, which records one-time approvals backed by zero-knowledge proofs of an off-chain payment instruction.

What problem does it solve?

Institutions tokenising deposits, bonds or other regulated assets want ordinary ERC-20 tokens that DeFi and wallets understand, but they also need legal control over who sends value to whom and why. Each transfer should be traceable to a payment order that a traditional finance system recognises.

Hard-coding compliance rules into each token is brittle. ERC-7963 moves the decision into a separate Transfer Oracle contract and links each approval to an off-chain payment instruction using a zero-knowledge proof, so the chain sees proof that an approval matches a real instruction without seeing the instruction's private details.

How it works

  1. Payment instruction. The issuer prepares a JSON payment order (debtor, creditor, amount in integer milli-units, three-letter currency, execution date). The format is designed to be compatible with ISO 20022 pain.001. It is canonicalised (RFC 8785 JCS, Unicode NFC, RFC 3339 UTC timestamps) and committed to a Merkle tree.
  2. approveTransfer. The issuer submits a TransferApproval (sender, recipient, minAmt, maxAmt, expiry, proofId) together with a ZK proof. The proof shows that the debtor/creditor hashes, amount bounds, currency and expiry all come from the same committed instruction. The oracle checks basic validity (non-zero addresses, minAmt <= maxAmt, not expired) and stores a one-time approval.
  3. canTransfer. On every transfer/transferFrom, the token calls ORACLE.canTransfer(token, from, to, amount) before updating balances. The oracle atomically consumes one matching approval (minAmt <= amount <= maxAmt), returns its proofId, or reverts. Only the token itself may call this.
  4. The token emits TransferValidated(proofId), so on-chain transfers can be reconciled with off-chain payment messages.

Rules worth noting: approvals are single-use (never partially consumed); if several match, the oracle should consume the one with the narrowest range; expired approvals are ignored. Mints and burns may bypass the check. The standard is proof-system agnostic (Groth16, PLONK, STARKs…); the reference implementation uses RISC Zero.

Sample code

Hooking the oracle into an OpenZeppelin ERC-20:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";

interface ITransferOracle {
    function canTransfer(address token, address sender, address recipient, uint256 amount)
        external returns (bytes32 proofId);
}

contract PermissionedERC20 is ERC20 {
    ITransferOracle public immutable ORACLE;
    event TransferValidated(bytes32 indexed proofId);

    constructor(ITransferOracle oracle) ERC20("Permissioned", "PERM") {
        ORACLE = oracle;
    }

    function _update(address from, address to, uint256 amount) internal override {
        if (from != address(0) && to != address(0)) {
            // reverts if no matching one-time approval exists
            bytes32 proofId = ORACLE.canTransfer(address(this), from, to, amount);
            emit TransferValidated(proofId);
        }
        super._update(from, to, amount);
    }
}

Things to know

  • Status: Draft. Interfaces, events and the message format may change.
  • Transfers that lack an approval simply revert, so existing ERC-20 integrations keep working mechanically, but DeFi protocols cannot move these tokens freely unless matching approvals exist. Wallets should surface the oracle's revert reason.
  • The oracle and its verifier are fully trusted by the token. The spec recommends one dedicated oracle per issuer so a compromise is contained. Token and oracle may sit behind ERC-1967 proxies, and the verifier can be swapped when the proof system changes.
  • Amount ranges exist so an approval can be issued before a final FX rate is known.
  • For a different approach to permissioned securities tokens, see ERC-3643.

#token #compliance #zk #permissioned #rwa

Details

Authors
Siyuan Zheng (@andrewcoder666) <[email protected]>, Xiaoyu Liu (@elizabethxiaoyu) <[email protected]>, Wenwei Ma (@madyinglight) <[email protected]>, Jun Meng Tan (@chadxgpt) <[email protected]>, Yuxiang Fu (@tmac4096) <[email protected]>, Kecheng Gao (@thanks-v-me-50) <[email protected]>, Alwin Ng Jun Wei (@alwinngjw) <[email protected]>, Chenxin Wang (@3235773541) <[email protected]>, Xiang Gao (@GaoYiRu) <[email protected]>, yuanshanhshan (@xunayuan) <[email protected]>, Hao Zou (@BruceZH0915) <[email protected]>, Yanyi Liang <[email protected]>, Yuehua Zhang (@astroyhzcc) <[email protected]>
Status
Draft
Type
Standards Track / ERC
Created
2025-05-13
Requires

Machine-readable: Markdown · JSON