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 explores ERC6960, a proposal for Dual Layer Tokens that organize tokens into broad categories and finer-grained attributes, making it easier to manage diverse digital and real-world assets.
This article translates, summarizes, and expands on the proposal below.
I also cover various EIPs, BIPs, SLIPs, CAIPs, ENSIPs, RFCs, and ACPs.
Overview
Dual Layer Tokens (DLTs) bring together concepts from existing token standards: ERC20, for fungible tokens whose units are interchangeable; ERC721, for individually unique tokens (NFTs); and ERC1155, for managing multiple token types within a single contract. DLTs also introduce an additional classification layer.
For more on ERC20, see the following article.
[ERC20] An introduction to ERC20
For more on ERC721, see the following article.
[ERC721] An introduction to ERC721
For more on ERC1155, see the following article.
[ERC1155] An introduction to ERC1155
In this classification scheme, mainId identifies the broader asset category, while subId identifies a particular attribute or variant within that asset.
For example, mainId might identify a real estate property, while subId identifies a particular floor or class of ownership interest within that property.
By introducing this two-level classification, Dual Layer Tokens aim to make tokens easier to organize and manage within a contract. Making it easier to track which category and variant a token belongs to also simplifies token inventory and asset-specific management.
The standard is particularly aimed at tokenizing real-world assets (RWAs) and representing fractional ownership. Here, fractional ownership means dividing an asset into smaller ownership units that can be held by multiple parties. For example, a property might be divided into 1,000 units represented by tokens.
Examples of assets whose ownership interests could be represented using the DLT standard include:
| Example asset |
|---|
| Invoices |
| Company stocks |
| Digital collectibles |
| Real estate |
These assets can be treated as a single asset or divided into smaller ownership interests allocated to multiple holders. Dual Layer Tokens aim to make tokenization and management of these ownership interests flexible and efficient.
Motivation
ERC1155 is widely used in the Ethereum ecosystem. One of its main features is support for multiple token types, both fungible and non-fungible, within one contract.
However, ERC1155 alone does not provide a native way to organize tokens across multiple classification levels. This limitation becomes particularly relevant in cases such as:
- Handling real-world assets (RWAs)
- Dividing assets into smaller ownership interests and managing them (fractionalization)
For example, when classifying real estate by property type, room, floor, and ownership share, simply assigning different token IDs makes the classification difficult to interpret. Similarly, when managing a variety of real-world assets such as invoices and company stocks in one contract, it can be useful to separate the asset category from its individual attributes.
Dual Layer Tokens address these challenges by using two-level classification (mainId / subId) as a fundamental part of the standard. The aim is to build on the strength of ERC1155, namely handling multiple token types within one contract, while enabling more structured classification of those types.
This is particularly useful when token categories need to be divided into subcategories. For instance, a broad category such as real estate (mainId) could contain individual properties, floors, room numbers, or ownership interests as subcategories (subId).
Drawing on the roles of ERC20, ERC721, and ERC1155, Dual Layer Tokens aim to support complex classification and fractional ownership management in a single framework.
Specification
IDLT Interface
// SPDX-License-Identifier: CC0-1.0
pragma solidity 0.8.17;
/**
* @title DLT token standard interface
* @dev Interface for any contract that wants to implement the DLT standard
*/
interface IDLT {
/**
* @dev MUST emit when `subId` token is transferred from `sender` to `recipient`
* @param sender is the address of the previous holder whose balance is decreased
* @param recipient is the address of the new holder whose balance is increased
* @param mainId is the main token type ID to be transferred
* @param subId is the token subtype ID to be transferred
* @param amount is the amount to be transferred of the token subtype
*/
event Transfer(
address indexed sender,
address indexed recipient,
uint256 indexed mainId,
uint256 subId,
uint256 amount
);
/**
* @dev MUST emit when `subIds` token array is transferred from `sender` to `recipient`
* @param sender is the address of the previous holder whose balance is decreased
* @param recipient is the address of the new holder whose balance is increased
* @param mainIds is the main token type ID array to be transferred
* @param subIds is the token subtype ID array to be transferred
* @param amounts is the amount array to be transferred of the token subtype
*/
event TransferBatch(
address indexed sender,
address indexed recipient,
uint256[] mainIds,
uint256[] subIds,
uint256[] amounts
);
/**
* @dev MUST emit when `owner` enables `operator` to manage the `subId` token
* @param owner is the address of the token owner
* @param operator is the authorized address to manage the allocated amount for an owner address
* @param mainId is the main token type ID to be approved
* @param subId is the token subtype ID to be approved
* @param amount is the amount to be approved of the token subtype
*/
event Approval(
address indexed owner,
address indexed operator,
uint256 mainId,
uint256 subId,
uint256 amount
);
/**
* @dev MUST emit when `owner` enables or disables (`approved`) `operator` to manage all of its assets
* @param owner is the address of the token owner
* @param operator is the authorized address to manage all tokens for an owner address
* @param approved true if the operator is approved, false to revoke approval
*/
event ApprovalForAll(
address indexed owner,
address indexed operator,
bool approved
);
/**
* @dev MUST emit when the URI is updated for a main token type ID.
* URIs are defined in RFC 3986.
* The URI MUST point to a JSON file that conforms to the "DLT Metadata URI JSON Schema".
* @param oldValue is the old URI value
* @param newValue is the new URI value
* @param mainId is the main token type ID
*/
event URI(string oldValue, string newValue, uint256 indexed mainId);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any subId owned by the caller.
* The `operator` MUST NOT be the caller.
* MUST emit an {ApprovalForAll} event.
* @param operator is the authorized address to manage all tokens for an owner address
* @param approved true if the operator is approved, false to revoke approval
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
* MUST revert if `sender` or `recipient` is the zero address.
* MUST revert if balance of holder for token `subId` is lower than the `amount` sent.
* MUST emit a {Transfer} event.
* @param sender is the address of the previous holder whose balance is decreased
* @param recipient is the address of the new holder whose balance is increased
* @param mainId is the main token type ID to be transferred
* @param subId is the token subtype ID to be transferred
* @param amount is the amount to be transferred of the token subtype
* @param data is additional data with no specified format
* @return True if the operation succeeded, false if operation failed
*/
function safeTransferFrom(
address sender,
address recipient,
uint256 mainId,
uint256 subId,
uint256 amount,
bytes calldata data
) external returns (bool);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
* The `operator` MUST NOT be the caller.
* MUST revert if `operator` is the zero address.
* MUST emit an {Approval} event.
* @param operator is the authorized address to manage tokens for an owner address
* @param mainId is the main token type ID to be approved
* @param subId is the token subtype ID to be approved
* @param amount is the amount to be approved of the token subtype
* @return True if the operation succeeded, false if operation failed
*/
function approve(
address operator,
uint256 mainId,
uint256 subId,
uint256 amount
) external returns (bool);
/**
* @notice Get the token with a particular subId balance of an `account`
* @param account is the address of the token holder
* @param mainId is the main token type ID
* @param subId is the token subtype ID
* @return The amount of tokens owned by `account` in subId
*/
function subBalanceOf(
address account,
uint256 mainId,
uint256 subId
) external view returns (uint256);
/**
* @notice Get the tokens with a particular subIds balance of an `accounts` array
* @param accounts is the address array of the token holder
* @param mainIds is the main token type ID array
* @param subIds is the token subtype ID array
* @return The amount of tokens owned by `accounts` in subIds
*/
function balanceOfBatch(
address[] calldata accounts,
uint256[] calldata mainIds,
uint256[] calldata subIds
) external view returns (uint256[] calldata);
/**
* @notice Get the allowance allocated to an `operator`
* @dev This value changes when {approve} or {transferFrom} are called
* @param owner is the address of the token owner
* @param operator is the authorized address to manage assets for an owner address
* @param mainId is the main token type ID
* @param subId is the token subtype ID
* @return The remaining number of tokens that `operator` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*/
function allowance(
address owner,
address operator,
uint256 mainId,
uint256 subId
) external view returns (uint256);
/**
* @notice Get the approval status of an `operator` to manage assets
* @param owner is the address of the token owner
* @param operator is the authorized address to manage assets for an owner address
* @return True if the `operator` is allowed to manage all of the assets of `owner`, false if approval is revoked
* See {setApprovalForAll}
*/
function isApprovedForAll(
address owner,
address operator
) external view returns (bool);
}Events
Transfer
event Transfer(
address indexed sender,
address indexed recipient,
uint256 indexed mainId,
uint256 subId,
uint256 amount
);Emitted when tokens of a given subId move from a sender to a recipient.
The event records the transfer of a specific token subtype from sender to recipient.
mainId identifies the main token category and subId identifies a particular attribute within it.
It records changes in balances, allowing external systems to track token transfer histories.
Parameters
sender- The address whose token balance decreases.
recipient- The address receiving the tokens.
mainId- The identifier of the main token category.
subId- The identifier of the token subcategory.
amount- The number of units of the token subtype being transferred.
TransferBatch
event TransferBatch(
address indexed sender,
address indexed recipient,
uint256[] mainIds,
uint256[] subIds,
uint256[] amounts
);Emitted when tokens of multiple subId values are transferred in a batch from a sender to a recipient.
The event records multiple token transfers carried out together.
The mainIds, subIds, and amounts arrays correspond positionally.
Recording multiple token transfers in a single event can reduce gas costs and simplify state tracking.
Parameters
sender- The address whose token balance decreases.
recipient- The address receiving the tokens.
mainIds- An array of main token category identifiers.
subIds- An array of token subcategory identifiers.
amounts- An array of transfer amounts for the corresponding tokens.
Approval
event Approval(
address indexed owner,
address indexed operator,
uint256 mainId,
uint256 subId,
uint256 amount
);Emitted when an owner authorizes an operator to manage a specified token subtype.
It records the amount of a particular token subtype held by the owner that the operator is permitted to use.
Approval is granted per token subtype, allowing operations such as transferFrom within the approved amount.
Parameters
owner- The address that owns the tokens.
operator- The address receiving permission to operate on the tokens.
mainId- The identifier of the main token category.
subId- The identifier of the token subcategory.
amount- The amount approved for use.
ApprovalForAll
event ApprovalForAll(
address indexed owner,
address indexed operator,
bool approved
);Emitted when the owner grants or revokes the operator's permission to manage all of the owner's assets.
Rather than being limited to an individual subId, this approval covers all tokens owned by the owner.
If approved is true, the operator receives this authority; if it is false, the authority is revoked.
Parameters
owner- The address granting permission.
operator- The address that will manage the assets.
approved- A boolean indicating whether permission has been granted.
URI
event URI(string oldValue, string newValue, uint256 indexed mainId);Emitted when the URI associated with a particular mainId is updated.
The URI points to token metadata in a JSON file conforming to the DLT metadata schema.
The change from oldValue to newValue is recorded so that external services can detect metadata updates.
Parameters
oldValue- The previous URI.
newValue- The new URI.
mainId- The main token category whose URI was updated.
Functions
setApprovalForAll
function setApprovalForAll(address operator, bool approved) external;Grants or revokes a specified address's permission to manage all of the caller's assets.
Sets the operator's authority to manage all tokens owned by msg.sender in a single operation.
The caller cannot designate itself as the operator.
The function must emit an ApprovalForAll event.
Arguments
operator- The address to which management authority is granted.
approved- A value indicating approval (
true) or revocation (false).
- A value indicating approval (
safeTransferFrom
function safeTransferFrom(
address sender,
address recipient,
uint256 mainId,
uint256 subId,
uint256 amount,
bytes calldata data
) external returns (bool);Transfers a specific token subtype within the authorized allowance.
Transfers the specified amount of the token subtype from sender to recipient.
It must revert if the balance is insufficient or either address is address(0).
A Transfer event must be emitted after the transfer.
Arguments
sender- The address sending the tokens.
recipient- The address receiving the tokens.
mainId- The main token category.
subId- The token subcategory.
amount- The amount to transfer.
data- Arbitrary additional data.
Return value
True- The transfer succeeded.
False- The operation failed without reverting.
approve
function approve(
address operator,
uint256 mainId,
uint256 subId,
uint256 amount
) external returns (bool);Sets an operator's allowance for a specific token subtype.
Allows the operator to use the specified amount of a particular token subtype owned by msg.sender.
The operator must not be the caller, and the operation must revert if the operator is the zero address.
An Approval event must be emitted.
Arguments
operator- The address receiving permission to operate on the tokens.
mainId- The identifier of the main token category.
subId- The identifier of the token subcategory.
amount- The amount approved for use.
Return value
True- The approval succeeded.
False- The approval failed without reverting.
subBalanceOf
function subBalanceOf(
address account,
uint256 mainId,
uint256 subId
) external view returns (uint256);Returns the balance of a specified token subtype for a particular address.
Returns the number of units of the token subtype held by account.
Specifying both the main category and the subcategory enables fine-grained balance queries.
Arguments
account- The address whose balance is being queried.
mainId- The identifier of the main token category.
subId- The identifier of the token subcategory.
Return value
uint256- The balance of the specified token subtype.
balanceOfBatch
function balanceOfBatch(
address[] calldata accounts,
uint256[] calldata mainIds,
uint256[] calldata subIds
) external view returns (uint256[] calldata);Retrieves balances for multiple addresses and token types in a single call. Batch retrieval of multiple balances makes token management more efficient. The arrays correspond positionally, and the results are returned in the same order.
Arguments
accounts- An array of addresses whose balances are being queried.
mainIds- An array of main category IDs.
subIds- An array of subcategory IDs.
Return value
uint256[]- The list of retrieved balances.
allowance
function allowance(
address owner,
address operator,
uint256 mainId,
uint256 subId
) external view returns (uint256);Returns the allowance assigned to an operator for a particular token subtype.
This allows callers to check how much of the amount established by approve remains available.
The allowance can decrease through transferFrom, so its value changes as operations occur.
Arguments
owner- The address that owns the tokens.
operator- The address authorized to operate on them.
mainId- The main token category.
subId- The token subcategory.
Return value
uint256- The remaining amount that the
operatoris allowed to use.
- The remaining amount that the
isApprovedForAll
function isApprovedForAll(
address owner,
address operator
) external view returns (bool);Checks whether a particular operator can manage all assets of the specified owner.
Checks whether the approval established by setApprovalForAll is active.
This checks global operator approval rather than approval for an individual token subtype.
Arguments
owner- The token owner's address.
operator- The address whose operator approval is being checked.
Return value
bool- True if the operator is approved; otherwise false.
IDLTReceiver Interface
Functions
onDLTReceived
function onDLTReceived(
address operator,
address from,
uint256 mainId,
uint256 subId,
uint256 amount,
bytes calldata data
) external returns (bytes4);A callback invoked when a single DLT token transfer is received.
It is called to confirm receipt when a DLT token is transferred to this contract through safeTransferFrom.
Returning the correct selector accepts the transfer; returning an incorrect value causes the transfer to revert.
Arguments
operator- The address that initiated the token transfer.
from- The address that previously held the tokens.
mainId- The main category ID.
subId- The subcategory ID.
amount- The amount received.
data- Arbitrary additional data.
Return value
bytes4- Must return
onDLTReceived.selector.
- Must return
onDLTBatchReceived
function onDLTBatchReceived(
address operator,
address from,
uint256[] calldata mainIds,
uint256[] calldata subIds,
uint256[] calldata amounts,
bytes calldata data
) external returns (bytes4);A callback invoked when multiple DLT token transfers are received.
It runs when multiple tokens are transferred as a batch.
As with onDLTReceived, returning the correct selector confirms receipt.
Arguments
operator- The address that initiated the token transfer.
from- The address that previously held the tokens.
mainIds- An array of main category IDs.
subIds- An array of subcategory IDs.
amounts- An array of amounts received.
data- Arbitrary additional data.
Return value
bytes4- Must return
onDLTBatchReceived.selector.
- Must return
Additional considerations
Why two levels of classification are useful
The two-level classification used by DLT (mainId and subId) provides a way to organize tokens at a finer level of detail.
Many applications need to represent more specific attributes or variants of a single asset.
In real estate, for example, the property itself might correspond to mainId, while ownership interests, floors, and rooms correspond to subId.
The ability to represent subcategories directly is a major benefit.
ERC1155 can also handle multiple token types, but it distinguishes them by token ID without defining a hierarchical classification scheme, which can complicate complex asset management. The two-level structure of DLT supports more organized token management.
Managing mainBalance and subBalance also allows the aggregate amount of a broad asset category to be tracked separately from its constituent sub-assets.
How to use mainId and subId
There are two possible design approaches to using subId as a subcategory identifier.
Approach to subId |
Description |
|---|---|
| Shared SubIds | All mainId values share the same subId values. For example, a model in which ownership interests 1 through 100 apply to every asset. |
| Mixed SubIds | Each mainId has its own subId values. For example, property A has subId values 1 through 20, while property B has subId values 1 through 50, allowing each asset to have independent subcategories. |
Both approaches can be supported, allowing implementations to accommodate different asset structures.
This flexibility in representing complex assets, compared with the classification structures of ERC20, ERC721, and ERC1155, allows DLT implementations to manage both fungible and non-fungible assets in the same contract.
Why the name Dual Layer Token was chosen
The name DLT was chosen to reflect the two levels of token classification.
mainId is the first layer (Layer 1), and subId is the second layer (Layer 2). Together they describe the hierarchical classification of tokens.
Why classification is limited to two layers
A multilevel structure in which sub-assets have further descendants was also considered, but adding more layers introduces the following problems.
- Managing total supply for each
subIdbecomes more complicated. - Deeper hierarchies greatly increase the number of mappings and functions required to track balances.
- Contract design and usage become unnecessarily complex.
Because DLT aims to provide a practical and manageable standard while retaining flexibility, a two-layer structure was considered the best fit.
Why ERC1155 was not extended
Extending ERC1155 directly was also considered, but several challenges arose.
ERC1155 is well suited to handling multiple tokens within one contract, but it does not assume a hierarchical classification structure. Adding hierarchical classification would therefore require substantial changes to the specification and could break compatibility with existing implementations.
Because DLT targets projects that require hierarchical classification, ERC1155 alone was deemed insufficient, and DLT was designed as an independent standard.
Citation
Adam Boudjemaa (@aboudjem), Mohamad Hammoud (@mohamadhammoud), Nawar Hisso (@nawar-hisso), Khawla Hassan (@khawlahssn), Mohammad Zakeri Rad (@zakrad), Ashish Sood soodgen@gmail.com, "ERC-6960: Dual Layer Token [DRAFT]," Ethereum Improvement Proposals, no. 6960, April 2023. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-6960.
Conclusion
This article explored ERC6960, which proposes Dual Layer Tokens that organize tokens into broad categories and finer attributes to make diverse digital and real-world assets easier and more flexible to manage. I hope this explanation was useful.
If you have questions, feel free to send me a DM on Twitter.
I also share information on other platforms; feel free to explore them.



