Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article examines ERC7722, a proposal that separates token balances into off-chain data and on-chain hashes to reduce transaction transparency while maintaining integrity.
The following material is translated, summarized, and supplemented with explanations.
I have also covered various EIPs, BIPs, SLIPs, CAIPs, ENSIPs, RFCs, and ACPs.
Overview
ERC7722 is a token specification designed to improve privacy by avoiding the direct recording of token balances on-chain. Conventional token standards allow anyone to inspect the amount of tokens held by an account directly on the blockchain. ERC7722 changes this assumption.
ERC7722 represents balances using baskets. A basket is a mechanism in which actual balance data is managed off-chain and only its hash is retained on-chain.
-
Off-chain Managing data outside the blockchain. Because data need not be shared with every node, this can offer greater confidentiality and flexibility.
-
Hash A short value computed deterministically from the original data. The original data cannot feasibly be recovered directly from a cryptographic hash alone.
-
Basket A data structure containing balance information. Its underlying data resides off-chain, while only the hash representing its contents is stored on-chain.
Baskets are more than references. ERC7722 supports the following operations through on-chain token functions.
- Reorganizing baskets
- Transferring baskets
- Managing baskets, including splitting and merging
In other words, the on-chain record identifies who controls each basket, without directly exposing its underlying balance data. The aim is to maintain token availability and integrity while keeping balances confidential.
Motivation
Smart contract accounts represent more than just addresses. They can serve as identifiable entities to which various claims and attestations can be associated and reused.
- Claim An assertion or attribute, such as a statement that an account has a particular property.
- Attestation Information in which a third party verifies or attests to a claim.
These mechanisms are useful for applications such as decentralized identity, authentication, and credit scoring. However, this same capability can introduce privacy problems.
The issue is particularly relevant when smart contract accounts hold ERC20-compatible tokens.
For more on ERC20, see the following article.
[ERC20] Understanding ERC20 From the Ground Up
With ERC20, account balances are publicly available on-chain in plaintext. This creates the following situations.
| Situation | Problem |
|---|---|
| Accounts associated with identifiable entities | It becomes easier to identify whose account it is. |
| Public on-chain balances | Anyone can inspect the assets held. |
| Reuse of claims and attestations | Financial information can become linked to personal attributes. |
Consequently, greater use of smart contract accounts can increase exposure of sensitive information about asset holdings. The resulting trade-off between convenience and privacy is a significant challenge.
ERC7722 is designed to address this problem. By avoiding direct on-chain recording of balances, it aims to preserve the following advantages of smart contract accounts.
- Reusability of claims and attestations
- Flexible extensibility through smart contracts
- Token integrity and security
It then conceals particularly sensitive balance information. Accounts associated with identifiable entities can therefore hold tokens without unnecessarily publishing their financial positions.
ERC7722 aims to improve privacy in a practical manner without sacrificing the usefulness of smart contract accounts.
Specification
ERC7722 represents token balances as hashes rather than storing numerical balances directly on-chain. This design retains blockchain transparency without directly publishing sensitive balance data.
Representing Balances With Baskets
ERC7722 represents token balances using hashes called baskets. A basket is the hash of the following three combined elements.
keccak256(abi.encode(salt, tokenId, value))The elements have the following meanings.
| Element | Description |
|---|---|
salt |
A random 32-byte value used to protect against brute-force guessing of the hash preimage. |
tokenId |
A unique token ID within the token contract. |
value |
A numerical value representing the actual token amount. |
Only the hash is retained on-chain, so the token amount is not directly visible from the blockchain. The name basket reflects the idea of handling balances like covered baskets whose contents are hidden.
Overview of Token Operations
The ERC7722 token interface supports the following basket-based operations.
- Creating baskets
- Issuing baskets
- Transferring baskets
- Reorganizing baskets by splitting or combining them
- Redeeming baskets
Reorganization must ensure that the total value of the input baskets equals that of the output baskets. An external oracle service performs this verification.
Privacy-Enhancing Mechanisms
ERC7722 includes measures intended not only to conceal balances but also to make token movements harder to trace.
- Splitting and merging baskets obscures relationships between transactions.
- The proposal discusses noise superposition and empty transfers as techniques inspired by differential privacy.
These techniques can make it more difficult to determine actual transaction contents or balance changes from on-chain event logs.
Token Interface
The following interface must be implemented by opaque tokens conforming to ERC7722.
interface OpaqueToken {
//
// TYPES
//
struct SIGNATURE {
uint8 v; bytes32 r; bytes32 s;
}
struct ORACLECONFIG {
uint8 minNumberOfOracles; // min. number of oracle signatures required for reorg
address[] oracles; // valid oracles
}
//
// EVENTS
//
/**
* @dev MUST be emitted when new token is created
* @param initiatedBy address that created and controls the token
* @param tokenId identifier of the token
* @param totalSupplyBasket initial supply basket, containing total supply of tokens
* @param ref custom reference as used by initiator
*/
event CreateToken(address initiatedBy, bytes32 tokenId, bytes32 totalSupplyBasket, bytes32 ref);
/**
* @dev MUST be emitted on issuance
* @param initiatedBy address that initiated issuance
* @param baskets baskets that were issued to the receiver
* @param receiver address that received baskets
* @param ref custom reference as used by initiator
*/
event Issue(address initiatedBy, bytes32[] baskets, address receiver, bytes32 ref);
/**
* @dev MUST be emitted when holder baskets are restructured
* @param initiatedBy address that initiated reorg and owner of all baskets
* @param basketsIn baskets that are restructured and no longer exist
* @param basketsOut baskets that are newly created
* @param ref custom reference as used by initiator
*/
event ReorgHolderBaskets(address initiatedBy, bytes32[] basketsIn, bytes32[] basketsOut, bytes32 ref);
/**
* @dev MUST be emitted when supply baskets are restructured
* @param initiatedBy address that initiated reorg
* @param basketsIn supply baskets that are restructured and no longer exist
* @param basketsOut supply baskets that are newly created
* @param ref custom reference as used by initiator
*/
event ReorgSupplyBaskets(address initiatedBy, bytes32[] basketsIn, bytes32[] basketsOut, bytes32 ref);
/**
* @dev MUST be emitted when baskets are transferred from one address to another
* @param initiatedBy address that initiated the transfer
* @param receiver address that is the new owner of baskets
* @param baskets baskets that were transferred
* @param ref custom reference as used by initiator
*/
event Transfer(address initiatedBy, address receiver, bytes32[] baskets, bytes32 ref);
/**
* @dev MUST be emitted on redeem
* @param initiatedBy address that initiated redeem
* @param baskets baskets that were redeemed
* @param ref custom reference as used by initiator
*/
event Redeem(address initiatedBy, bytes32[] baskets, bytes32 ref);
//
// FUNCTIONS
//
/**
* @dev returns the configuration for this token
*/
function oracleConfig() external view returns (ORACLECONFIG memory);
/**
* @dev returns the address of the basket owner
*/
function owner(bytes32 basket) external view returns (address);
/**
* @dev returns the total supply for a `tokenId``
* All token investors are allowed to fetch this value from the token operator's off-chain storage.
*/
function totalSupply(bytes32 tokenId) external view returns (bytes32);
/**
* @dev returns the operator of this token, who is also responsible for providing the main
* off-chain storage source.
*/
function operator() external view returns (address);
/**
* @dev Allows the token operator to create a new token with the specified `tokenId` and an initial
* `totalSupplyBasket`. The `totalSupplyBasket` can be partitioned using {reorgSupplyBaskets} as needed
* when calling {issue}. The `ref` parameter can be used freely by the caller for any reference purpose.
*/
function createToken(
bytes32 tokenId,
bytes32 totalSupplyBasket,
bytes32 ref
) external;
/**
* @dev Allows the token operator to issue tokens by assigning `supplyBaskets` to a `receiver` which
* becomes the owner of these baskets.
*/
function issue(
bytes32[] calldata supplyBaskets,
address receiver,
bytes32 ref
) external;
/**
* @dev transfers `baskets` to a `receiver` who becomes the new owner of these baskets.
*/
function transfer(
bytes32[] calldata baskets,
address receiver,
bytes32 ref
) external;
/**
* @dev reorganizes a set of holder baskets (`basketsIn`) to a new set (`basketsOut`) having
* the same value, i.e., the sum of all values from input baskets equals the sum of values
* in output baskets. In order to ensure the integrity, external oracle service is required that
* will sign the reorg proposal requested by the basket owner, which is passed as `reorgOracleSignatures`.
* The minimum number of oracle signatures is defined in the oracle configuration.
*/
function reorgHolderBaskets(
SIGNATURE[] calldata reorgOracleSignatures,
bytes32[] calldata basketsIn,
bytes32[] calldata basketsOut,
bytes32 ref
) external;
/**
* @dev same as {reorgHolderBaskets}, but for the available supply baskets.
*/
function reorgSupplyBaskets(
SIGNATURE[] calldata reorgOracleSignatures,
bytes32[] calldata basketsIn,
bytes32[] calldata basketsOut,
bytes32 ref
) external;
/**
* @dev redeems holder's `baskets` and returns them to available supply
*/
function redeem(
bytes32[] calldata baskets,
bytes32 ref
) external;
}Events
CreateToken
event CreateToken(address initiatedBy, bytes32 tokenId, bytes32 totalSupplyBasket, bytes32 ref);An event emitted when a new token is created. It indicates that the token operator has created a new token ID and registered a basket representing its initial supply.
Parameters
initiatedBy- The address that created the token.
tokenId- The identifier of the token created.
totalSupplyBasket- The initial basket representing the token's total supply.
ref- Arbitrary reference information.
Issue
event Issue(address initiatedBy, bytes32[] baskets, address receiver, bytes32 ref);An event emitted when tokens are issued. It indicates that supply baskets have been distributed and the recipient has become their owner.
Parameters
initiatedBy- The address that performed the issuance.
baskets- The issued baskets.
receiver- The address that received the baskets.
ref- Arbitrary reference information.
ReorgHolderBaskets
event ReorgHolderBaskets(address initiatedBy, bytes32[] basketsIn, bytes32[] basketsOut, bytes32 ref);An event emitted when a holder's baskets are reorganized. It indicates that existing baskets have been consumed and new baskets created.
Parameters
-
initiatedBy- The basket owner who performed the reorganization.
-
basketsIn- The baskets before reorganization.
-
basketsOut- The baskets created by the reorganization.
-
ref- Arbitrary reference information.
ReorgSupplyBaskets
event ReorgSupplyBaskets(address initiatedBy, bytes32[] basketsIn, bytes32[] basketsOut, bytes32 ref);An event emitted when supply baskets are reorganized. It indicates that unissued supply baskets have been split or combined.
Parameters
initiatedBy- The address that performed the reorganization.
basketsIn- The supply baskets before reorganization.
basketsOut- The supply baskets after reorganization.
ref- Arbitrary reference information.
Transfer
event Transfer(address initiatedBy, address receiver, bytes32[] baskets, bytes32 ref);An event emitted when baskets are transferred to another address. It indicates that tokens have moved in units of baskets rather than numerical amounts.
Parameters
initiatedBy- The address that performed the transfer.
receiver- The new owner.
baskets- The transferred baskets.
ref- Arbitrary reference information.
Redeem
event Redeem(address initiatedBy, bytes32[] baskets, bytes32 ref);An event emitted when tokens are redeemed. It indicates that a holder's baskets have been returned to the supply side.
Parameters
initiatedBy- The address that performed the redemption.
baskets- The redeemed baskets.
ref- Arbitrary reference information.
Structs
SIGNATURE
struct SIGNATURE {
uint8 v; bytes32 r; bytes32 s;
}A struct representing an oracle signature. It uses Ethereum's standard signature format to attest to the validity of a reorganization.
Parameters
v- The signature recovery ID.
r- A component of the signature data.
s- A component of the signature data.
ORACLECONFIG
struct ORACLECONFIG {
uint8 minNumberOfOracles;
address[] oracles;
}A struct representing the oracle configuration. It manages the number of signatures required to authorize a reorganization and the list of permitted oracles.
Parameters
minNumberOfOracles- The minimum number of required signatures.
oracles- A list of valid oracle addresses.
Functions
oracleConfig
function oracleConfig() external view returns (ORACLECONFIG memory);A function that retrieves the token's oracle configuration. It is used to inspect the oracle requirements for reorganizing baskets.
Return value
ORACLECONFIG- The current oracle configuration.
owner
function owner(bytes32 basket) external view returns (address);A function that retrieves a basket's owner. It returns the address associated with a particular basket.
Arguments
basket- The target basket.
Return value
address- The basket owner.
totalSupply
function totalSupply(bytes32 tokenId) external view returns (bytes32);A function that retrieves the basket representing the token's total supply. The actual numerical value is managed off-chain, and only the hash is returned on-chain.
Arguments
tokenId- The token identifier.
Return value
bytes32- The basket representing the total supply.
operator
function operator() external view returns (address);A function that retrieves the token operator. It identifies the entity responsible for managing off-chain storage.
Return value
address- The token operator's address.
createToken
function createToken(bytes32 tokenId, bytes32 totalSupplyBasket, bytes32 ref) external;A function that creates a new token. It registers the basket representing the initial supply and prepares the token for issuance.
Arguments
tokenId- The token identifier.
totalSupplyBasket- The initial supply basket.
ref- Arbitrary reference information.
issue
function issue(bytes32[] calldata supplyBaskets, address receiver, bytes32 ref) external;A function that issues tokens. It assigns supply baskets to a specified recipient.
Arguments
supplyBaskets- The supply baskets to issue.
receiver- The recipient's address.
ref- Arbitrary reference information.
transfer
function transfer(bytes32[] calldata baskets, address receiver, bytes32 ref) external;A function that transfers baskets. It transfers ownership in units of baskets rather than numerical token amounts.
Arguments
baskets- The baskets to transfer.
receiver- The new owner.
ref- Arbitrary reference information.
reorgHolderBaskets
function reorgHolderBaskets(
SIGNATURE[] calldata reorgOracleSignatures,
bytes32[] calldata basketsIn,
bytes32[] calldata basketsOut,
bytes32 ref
) external;A function that reorganizes holder baskets. Oracle signatures are used to verify that the total input and output values are equal.
Arguments
reorgOracleSignatures- The oracle signatures.
basketsIn- The baskets before reorganization.
basketsOut- The baskets after reorganization.
ref- Arbitrary reference information.
reorgSupplyBaskets
function reorgSupplyBaskets(
SIGNATURE[] calldata reorgOracleSignatures,
bytes32[] calldata basketsIn,
bytes32[] calldata basketsOut,
bytes32 ref
) external;A function that reorganizes supply baskets. It enables controlled splitting or merging of unissued tokens.
Arguments
reorgOracleSignatures- The oracle signatures.
basketsIn- The supply baskets before reorganization.
basketsOut- The supply baskets after reorganization.
ref- Arbitrary reference information.
redeem
function redeem(bytes32[] calldata baskets, bytes32 ref) external;A function that redeems tokens. It returns the holder's baskets to the supply side.
Arguments
baskets- The baskets to redeem.
ref- Arbitrary reference information.
User Roles
Opaque tokens under ERC7722 have two roles. Separating their permissions clarifies the responsibilities of token issuers and holders.
Roles
| Role | Responsibilities | Main basket types | Main operations |
|---|---|---|---|
| Token Operator | Creates and issues tokens and manages the uncirculated supply. | Supply baskets | createToken, reorgSupplyBasket, issue, and forced operations forceTransfer and forceReorg |
| Token User | An address holding tokens in circulation. | Owned baskets | reorgSupplyBaskets, transfer, redeem |
The uncirculated supply consists of tokens that have not yet been distributed to users and are held as supply baskets. Tokens held by users are represented by owned baskets.
The proposal also states that the Token Operator has authority to perform forced operations through forceTransfer and forceReorg.
These allow transfers and reorganizations without the ordinary holder's consent.
The proposal does not explain their intended use in detail, so this article limits itself to noting that forced operations are possible.
Off-chain Data Endpoints
ERC7722 stores only basket hashes on-chain, while actual basket data (salt, tokenId, and value) resides off-chain.
The token operator must therefore provide a REST API for storing and retrieving baskets.
Operator Requirements
ERC7722 specifies the following requirements for the operator.
- The operator must provide off-chain storage implementing GET basket and PUT basket REST endpoints.
- The operator must ensure the availability of basket data.
- The operator must share data only with eligible holders and only to the minimum extent necessary. Eligible addresses are previous holders of the basket or its current holder.
- Both endpoints must implement authentication to ensure data is shared only with eligible parties and written only by authorized parties. The specification does not prescribe an authentication mechanism, leaving the choice to the operator's environment.
- Existing token holders must be able to perform PUT basket requests.
- Current or former basket holders must be able to perform GET basket requests.
- Token holders are advised to copy their basket data into their own off-chain storage in case the operator's service becomes unavailable.
The key point is that ERC7722 privacy depends not only on keeping numerical balances off-chain but also on controlling who can access basket contents.
REST API(PUT baskets / GET baskets)
The specification defines the following endpoints.
PUT baskets
An endpoint for storing baskets. A storage requirement is that the basket hash must equal the hash computed from data (salt/tokenId/value).
In other words, the server verifies the consistency of received data before storing it rather than trusting it as-is.
// Endpoint: PUT baskets
// Description: will store baskets if the `basket` hash is matching `data`.
// PostData:
[
{
basket: keccak256(abi.encode(salt, tokenId, value)),
data: {
salt: <bytes32>,
tokenId: <bytes32>,
value: <uint256>
}
},
...
]The following explains the terminology.
| Term | Description |
|---|---|
| REST | An API design style commonly used over HTTP. PUT, GET, and POST are used here. |
| PUT | An HTTP method generally used to create or replace a resource. |
| Integrity verification | Checking whether basket equals the value computed from data. |
GET baskets
An endpoint for retrieving baskets. Its behavior depends on the presence of a query parameter.
- If
basket-hashis specified, return the basket matching that hash. - If no parameter is specified, return all baskets held by the requester.
// Endpoint: GET baskets?basket-hash=<bytes32>
// Description: will return the list of baskets depending on the query parameters.
// Query Parameters:
// - basket-hash (optional): returns one basket matching the requested hash
// - if no query parameter is set, then the endpoint will return all baskets of the requestor
// Response:
[
{
basket: keccak256(abi.encode(salt, tokenId, value)),
data: {
salt: <bytes32>,
tokenId: <bytes32>,
value: <uint256>
}
},
...
]Because an unfiltered request returns all baskets held by the requester, authentication is important here as well. An unrestricted endpoint could expose basket lists, illustrating why the specification requires authentication.
Reorg Endpoint
ERC7722 requires an oracle service for basket reorganization (reorg) to prevent incorrect issuance or redemption.
An oracle here is an external service that verifies information off-chain and returns a signed result. Rather than supplying data like a price oracle, its role is to attest through a signature that the proposed reorganization is valid.
Oracle Requirements
ERC7722 specifies the following requirements for oracles.
- The oracle must provide a POST reorg REST endpoint.
- The oracle must sign reorg proposals satisfying the following conditions.
First, the total input value grouped by
tokenIdmust equal the total output value grouped bytokenId. Second, eachitem'sbaskethash must matchkeccak256(abi.encode(data.salt, data.tokenId, data.value))computed from its data. - The reorg endpoint must be stateless.
- The oracle must not retain request data for subsequent analysis.
- The reorg endpoint should not require authentication and may be available for unrestricted public use.
The following explains the terminology.
| Term | Description |
|---|---|
| Stateless | A design in which the server does not retain information from previous requests. |
| Signature | The oracle signs a hash with its private key to authenticate the signed data and detect modifications. |
POST Reorg Input and Output
The input consists of two arrays, in and out, each containing basket-data pairs.
// Endpoint: POST reorg
// PostData:
{
in: [
{
basket: keccak256(abi.encode(salt, tokenId, value)),
data: {
salt: <bytes32>,
tokenId: <bytes32>,
value: <uint256>
}
},
...
],
out: [
{
basket: keccak256(abi.encode(salt, tokenId, value)),
data: {
salt: <bytes32>,
tokenId: <bytes32>,
value: <uint256>
}
},
...
]
}The response is a signature over the hash of the ABI-encoded basketsIn and basketsOut arrays, both of type bytes32[].
// Response:
{
// hash is signed with oracles private key
// basketsIn and basketsOut are bytes32[]
signature: sign(keccak256(abi.encode(basketsIn, basketsOut)))
}The signature is passed as an argument to on-chain functions such as reorgHolderBaskets and reorgSupplyBaskets to attest to the integrity of the reorganization.
Example of a Valid Reorg Request
The example omits salts and hashes, representing entries as (…, tokenX, value). The important property is that totals match for each tokenId.
// Example for valid reorg requests (salt and hashes are omitted for better readability):
in : (..., token1, 10), (..., token1, 30), (..., token2, 5), (..., token2, 95)
out: (..., token1, 40), (..., token2, 100)
in : (..., token1, 40), (..., token2, 100)
out: (..., token1, 10), (..., token1, 30), (..., token2, 5), (..., token2, 95)Noise Superposition (Differential Privacy)
ERC7722 notes that concealing balances alone still leaves room for inference based on which parties exchanged baskets and where particular baskets went afterward. The proposal therefore discusses reorg operations and empty transfers (transfers of baskets with a value of zero) as ways to make transaction tracing more difficult.
Here, differential privacy refers to the idea of adding noise to observed data to make individual facts, such as actual value transfers, more difficult to infer. The described mechanism does not by itself establish a formal differential privacy guarantee.
Example (Reorg and Transfers of Zero-Value Baskets)
In the following example, B reorganizes the basket received from A together with B's own baskets instead of directly transferring it to C.
The example also includes transfers of value=0 baskets to other parties, making inference more difficult for observers.
// Example with reorg and null-value basket transfers:
A owns basket-a1{..., value:10}
B owns basket-b1{..., value:5}, basket-b2{..., value:15}, ...
A: transfer basket-a1 to B
B: reorg [basket-a1, basket-b1, basket-b2]
to [basket-b3{..., value:10}, basket-b4{..., value:10}, basket-b5:{..., value:10},
basket-b6:{..., value:0}, basket-b7:{..., value:0}]
where sum of inputs is the sum of outputs
B: transfer basket-b5{value:10} to C
B: transfer basket-b6{value:0} to D
B: transfer basket-b7{value:0} to EThe following table distinguishes what remains observable from what becomes harder to determine.
| Observable on-chain | Intended privacy effect |
|---|---|
| A transferred a basket to B. | It is harder to determine whether the value=10 received by B from A was subsequently transferred to C. |
| B performed a reorg. | Because the reorg creates new baskets, relationships to the original baskets become harder to trace. |
| B transferred baskets to C, D, and E. | The presence of value=0 transfers makes it harder for external observers to identify actual value transfers. |
If B had directly transferred basket-a1 to C, A could infer what C received. Reorganization makes that inference less straightforward.
Observers can still identify which parties interacted, but the presence of noise is intended to make actual value transfers harder to distinguish.
Diagram
sequenceDiagram participant A as A participant B as B participant C as C participant D as D participant E as E participant Oracle as Oracle A->>B: transfer(basket-a1 value=10) B->>Oracle: POST reorg(in:[a1,b1,b2], out:[b3,b4,b5,b6,b7]) Oracle-->>B: signature(sign(hash(basketsIn,basketsOut))) B->>B: reorg(署名付きでオンチェーン実行) B->>C: transfer(basket-b5 value=10) B->>D: transfer(basket-b6 value=0) B->>E: transfer(basket-b7 value=0)
The diagram includes a POST request to the oracle before reorganization, followed by receipt of its signature and execution of the on-chain reorg. This corresponds to the reorg endpoint specification described above.
Additional Details
Why Intentionally Break ERC20 Compatibility?
ERC20 provides high transparency by allowing anyone to inspect balances and transfer histories. Although this is useful in many applications, it can become problematic when combined with reusable on-chain identities.
Mechanisms such as smart contract accounts and DIDs associate various attributes and attestations with the same address. Holding ERC20 tokens under these circumstances creates the following situation.
- It is easier to identify the owner of an address.
- The address's balance is publicly visible.
- Attribute information becomes linked to financial information.
This combination creates significant financial privacy concerns. ERC7722 addresses the problem by prioritizing privacy over ERC20 compatibility.
This decision leads to the following characteristics.
| Item | ERC20 | ERC7722 |
|---|---|---|
| Balance representation | Numerical values stored on-chain | Only hashes stored on-chain |
| Transparency | Very high | Intentionally reduced |
| Compatibility | Broad compatibility with existing DeFi | Incompatible with ERC20 |
| Balance privacy | Low | Higher, subject to the design's trust assumptions |
ERC7722 takes the position that ERC20's transparency can be an obstacle to the privacy-preserving use of reusable identities.
Design Rationale for Reorg Oracles
Basket reorganization (reorg) is a central operation in ERC7722. Reorg operations split or combine baskets, and their most important invariant is that the total value does not change.
The design delegates this verification to oracles rather than relying on the contract alone.
Separation of Responsibilities
The responsibilities in a reorg are divided as follows.
- Basket holder Proposes a combination of input and output baskets.
- Oracle
Verifies that input and output totals match for each
tokenIdand signs a valid proposal.
This design introduces the following checks between the parties.
- The holder cannot execute an invalid reorg without the required oracle signatures.
- An oracle cannot independently initiate an ordinary holder reorg without the holder's proposal.
Neither party can complete an ordinary reorg alone, which is intended to reduce the risk of unilateral misconduct.
Balancing Decentralization and Integrity
Multiple oracles can be configured, together with the required number of signatures (minNumberOfOracles).
This allows operators to balance the following considerations.
- A small number of oracles Simpler operation and lower costs, but relatively weaker trust assumptions.
- A large number of oracles Potentially greater decentralization and resistance to misconduct, at higher operating costs.
If an oracle produces an invalid signature, that signature can still be recorded on-chain. Misconduct can therefore be investigated afterward, providing a degree of accountability described as weak integrity.
Why Not Use ZKPs?
In theory, zero-knowledge proofs (ZKPs) could prove that the totals are equal. ERC7722 instead uses oracles for the following reasons.
- Relatively simple implementation.
- Reduced computation and gas costs.
- Immediate applicability to practical operations.
The design prioritizes practicality and efficiency rather than choosing the strongest possible cryptographic verification mechanism.
Off-chain Data Storage
ERC7722 manages actual basket data off-chain. It assigns primary responsibility for this data to the token operator, often an issuer or registrar.
This decision reflects the practical requirements of operating financial products.
Why the Operator Stores the Data
Financial products commonly have the following requirements.
- Issuers know who holds particular positions.
- Management must comply with KYC and regulatory requirements.
- Token lifecycle management, including issuance, redemption, and restrictions, is necessary.
In such an environment, assigning primary responsibility for off-chain data to the operator is a natural choice. This is not fully decentralized in the broader Ethereum context, but ERC7722 does not target every possible use case.
ERC7722 is particularly suited to the following areas.
- Regulated financial products
- Security tokens
- Tokens with clearly defined relationships between issuers and investors
Under these assumptions, operator-managed off-chain storage is a reasonable design choice.
Compatibility
ERC7722 is incompatible with ERC20. This is an intentional decision rather than an incidental design limitation.
As explained above, the transparency of ERC20 balances conflicts with the privacy objective of ERC7722. Providing backwards compatibility with ERC20 would therefore contradict its design goals.
The following summarizes this distinction.
| Aspect | Conclusion |
|---|---|
| Compatibility with ERC20 | None |
| Reason | Public balances undermine the intended privacy properties. |
| Positioning | A distinct token category rather than an ERC20 replacement. |
ERC7722 is not intended to replace existing DeFi tokens. It is a separate token standard with a design that prioritizes privacy.
Citation
Ivica Aračić (@ivica7), Ante Bešlić (@ethSplit), Mirko Katanić (@mkatanic), SWIAT, "ERC-7722: Opaque Token [DRAFT]," Ethereum Improvement Proposals, no. 7722, June 2024. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-7722.
Conclusion
This article covered ERC7722, a proposal for separating token balances into off-chain data and on-chain hashes to reduce transaction transparency while maintaining integrity. I hope you found it useful.
If you have questions, feel free to contact me by direct message on Twitter.
I also share information on other platforms, so feel free to explore them.



