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 ERC3643, a standard defining interfaces for managing institutional security tokens and executing compliance-based transfers.
The following material is translated, summarized, and supplemented with explanations.
I have also covered various other ERCs.
Overview
T-REX is a token standard designed to support secure transactions involving digital assets. Designed particularly for financial institutions and large investors, it enables controlled transactions involving security tokens (digital tokens representing assets or rights).
Token
A digital representation of an actual asset or right. For example, real estate and shares can be tokenized. The token contract provides functionality for creating, sending, and trading these tokens.
Identity Registry
A system for managing the identities of investors and users. It checks whether each user is eligible to transact with the token.
Identity Registry Storage
A storage layer for identity registry data. It stores information associated with user identities.
Compliance
A system for checking token transactions against applicable rules and preventing unauthorized transactions. The contract performs various checks before permitting a transaction.
Trusted Issuers Registry
It maintains a list of trusted organizations or individuals authorized to issue claims. This helps ensure that the credentials used by the token system come from approved issuers.
Claim Topics Registry
A system managing the types of claims concerning users' identities and qualifications. It is used to determine the credentials users need in order to transact with the token.
The T-REX token standard provides rules and tools designed to facilitate secure and efficient security token transactions. This enables large investors to participate in digital asset markets while adhering to configured regulatory requirements.
Motivation
Blockchain technology has transformed asset transfers by enabling peer-to-peer transfers of token ownership. This is particularly evident in cryptocurrencies, which can be exchanged quickly without intermediaries. Security tokens, however, introduce additional complexity because they must comply with applicable laws. They must be managed according to specific rules so that only eligible investors can hold them.
Although Ethereum provides extensive functionality, it does not address every issue specific to security tokens. ERC3643 was proposed to address these requirements. The standard aims to provide a framework for managing the security token lifecycle, from issuance to trading, and enforcing compliance at each stage. It also supports pausing and freezing tokens in response to changes in regulations or token holders' circumstances.
The standard works with an on-chain identity system to verify investors' identities and eligibility through claims issued by trusted issuers. This helps security token transactions satisfy legal and regulatory requirements configured in the system.
ERC3643 provides rules and tools designed to enable secure, compliant security token transactions. It aims to extend the benefits of blockchain to securities and support the development of capital markets.
Specification
The proposed ERC3643 standard establishes rules for secure and efficient security token management and transactions. Its principal requirements are described below.
ERC20 Compatibility
The standard is compatible with and builds upon the existing ERC20 token standard, adding features specific to security tokens.
For more on ERC20, see the following article.
On-chain Identity Systems
Integrate with an on-chain identity management system to verify investor identities and support regulatory compliance.
Compliance Rules
Apply rules concerning investor eligibility and the token itself, as established by regulators or token issuers.
Transfer Check Interface
Provide functionality for checking in advance whether a token transfer is permitted.
Recovery System
Provide a recovery mechanism for investors who lose access to their private keys.
Token Freezing
Allow tokens in an investor's wallet to be partially or fully frozen where necessary.
Token Pausing
Allow token transactions to be suspended temporarily.
Token Minting and Burning
Allow new tokens to be created and existing tokens to be destroyed.
Agent and Owner Roles
Allow accounts holding particular roles to perform designated token operations.
Forced Transfers by Agents
Allow agents to force transfers of tokens from other wallets where necessary.
Batch Transactions
Process multiple operations together to improve efficiency and reduce gas costs.
Each ordinary ERC3643 transfer involves compliance checks designed to support secure, rule-compliant transactions. The standard aims to make security token transactions more transparent and efficient and contribute to capital market development.
Agent Role Interface
In the proposed standard, the agent role refers to an address authorized to access specific smart contract functions.
An agent acts like an administrator for the smart contract and can perform designated operations.
interface IAgentRole {
// events
event AgentAdded(address indexed _agent);
event AgentRemoved(address indexed _agent);
// functions
// setters
function addAgent(address _agent) external;
function removeAgent(address _agent) external;
// getters
function isAgent(address _agent) external view returns (bool);
}The IAgentRole interface defines rules and functionality for managing agents. Specifically, it provides the following functions.
addAgent- Add a new agent.
removeAgent- Remove an existing agent.
isAgent- Check whether a particular address is an agent.
Through this interface, the owner (typically the token issuer) can manage agents.
Adding an agent emits an AgentAdded event, and removing one emits an AgentRemoved event.
These events make it easier to track when addresses were added or removed as agents.
Under this standard, contracts associated with security tokens, including token contracts and identity registries, must be compatible with the IAgentRole interface. They must therefore support agent management and permit designated operations by agents.
The agent role is important for managing security tokens appropriately and supporting compliance. Agents are trusted entities authorized to perform important functions within the token system, and their addition and removal are strictly controlled.
Main Functions
Transfer
Transfers using T-REX are subject to several important conditions. These conditions are intended to ensure token security and compliance.
Available Balance
The sender must have a sufficient unfrozen token balance to cover the transfer amount.
Allowlisting and Verification
The recipient must be registered in the identity registry and verified as holding the required claims.
Wallet Freeze Status
Neither the sender's nor the recipient's wallet may be frozen. Transfers to or from frozen wallets are prohibited.
Token Status
Transfers cannot be performed while the token is paused.
Compliance Rules
The transfer must satisfy all rules defined by the compliance smart contract. This is important for adhering to applicable laws and regulations.
The actual transfer function contains code that checks these conditions.
If the conditions are not met, the transfer does not proceed.
For example, a transfer fails if a wallet is frozen or the recipient has not been properly verified.
The transferFrom function works in essentially the same way as transfer but is used to transfer another account's tokens.
By contrast, the mint and forcedTransfer functions can be executed by authorized agents when the recipient is verified, while bypassing the other compliance checks described here. burn bypasses these checks and destroys tokens.
These rules and functions are designed to enable efficient transfers while maintaining the security and compliance controls provided by T-REX.
isVerified
This function is important when transferring tokens.
It checks whether the recipient is eligible to hold the token.
Specifically, it checks whether the recipient's wallet is registered in the token's identity registry and whether the associated identity contract contains the required claims.
If those claims are approved by trusted issuers, the recipient address is considered verified.
If the function returns true, the transfer can proceed to the next check.
canTransfer
This function is also used during transfers, but checks them from a broader perspective.
For example, it checks token-wide compliance rules such as limits on the number of holders in a particular country or the quantity of tokens held by each investor.
Transfers violating these rules are not permitted.
If the transfer satisfies all rules, the function returns true. Otherwise, it returns false and the transfer is rejected.
Other Functions
ERC3643 provides numerous other functions, each managing different aspects of the token. Details are available in the interfaces folder and Tokeny's T-REX repository.
These features are designed to support secure, efficient, and compliant security token transactions. Through these checks, T-REX enforces configured requirements for token transfers and management.
Token Interface
ERC3643 is a standard for security tokens that require stricter regulatory and security controls than ordinary ERC20 tokens. It provides additional functionality for controlling transfers securely.
Conditional Transfers
Transfer functions such as transfer and transferFrom operate conditionally.
Several checks take place before a transfer is executed.
These include checking whether the recipient is a verified investor and whether the transaction satisfies particular regulatory criteria.
Restricted to Verified Recipients
Permissioned tokens can be transferred only to appropriately verified addresses. This prevents unqualified addresses or unauthorized investors' wallets from holding the tokens through ordinary transfers.
Token Recovery
Security tokens can be recovered when an investor loses access to a wallet's private key. Recovery history is maintained on the blockchain for transparency.
Additional Functionality
ERC3643 tokens implement additional features for supply management, transfer rules, lockups, and other security controls. Owners and agents can therefore manage token supply and rules flexibly.
Agents and Owners
The standard relies on ERC173, with the owner responsible for appointing agents.
The token contract must be compatible with the IAgentRole interface.
For more on ERC173, see the following article.
[ERC173] Controlling Contract Ownership
Function Details
Detailed function descriptions are available in the interfaces folder.
https://eips.ethereum.org/assets/eip-3643/interfaces/IERC3643.sol
These descriptions provide a deeper understanding of how ERC3643 supports security token management and transactions.
interface IERC3643 is IERC20 {
// events
event UpdatedTokenInformation(string _newName, string _newSymbol, uint8 _newDecimals, string _newVersion, address _newOnchainID);
event IdentityRegistryAdded(address indexed _identityRegistry);
event ComplianceAdded(address indexed _compliance);
event RecoverySuccess(address _lostWallet, address _newWallet, address _investorOnchainID);
event AddressFrozen(address indexed _userAddress, bool indexed _isFrozen, address indexed _owner);
event TokensFrozen(address indexed _userAddress, uint256 _amount);
event TokensUnfrozen(address indexed _userAddress, uint256 _amount);
event Paused(address _userAddress);
event Unpaused(address _userAddress);
// functions
// getters
function onchainID() external view returns (address);
function version() external view returns (string memory);
function identityRegistry() external view returns (IIdentityRegistry);
function compliance() external view returns (ICompliance);
function paused() external view returns (bool);
function isFrozen(address _userAddress) external view returns (bool);
function getFrozenTokens(address _userAddress) external view returns (uint256);
// setters
function setName(string calldata _name) external;
function setSymbol(string calldata _symbol) external;
function setOnchainID(address _onchainID) external;
function pause() external;
function unpause() external;
function setAddressFrozen(address _userAddress, bool _freeze) external;
function freezePartialTokens(address _userAddress, uint256 _amount) external;
function unfreezePartialTokens(address _userAddress, uint256 _amount) external;
function setIdentityRegistry(address _identityRegistry) external;
function setCompliance(address _compliance) external;
// transfer actions
function forcedTransfer(address _from, address _to, uint256 _amount) external returns (bool);
function mint(address _to, uint256 _amount) external;
function burn(address _userAddress, uint256 _amount) external;
function recoveryAddress(address _lostWallet, address _newWallet, address _investorOnchainID) external returns (bool);
// batch functions
function batchTransfer(address[] calldata _toList, uint256[] calldata _amounts) external;
function batchForcedTransfer(address[] calldata _fromList, address[] calldata _toList, uint256[] calldata _amounts) external;
function batchMint(address[] calldata _toList, uint256[] calldata _amounts) external;
function batchBurn(address[] calldata _userAddresses, uint256[] calldata _amounts) external;
function batchSetAddressFrozen(address[] calldata _userAddresses, bool[] calldata _freeze) external;
function batchFreezePartialTokens(address[] calldata _userAddresses, uint256[] calldata _amounts) external;
function batchUnfreezePartialTokens(address[] calldata _userAddresses, uint256[] calldata _amounts) external;
}Identity Registry Interface
The Identity Registry is a system for managing investor identities. It associates specific wallet addresses with investors' identity smart contracts. It also associates a country code corresponding to each investor's country of residence, based on ISO-3166.
ISO-3166
ISO-3166 is an International Organization for Standardization (ISO) standard defining codes for countries and territories. It is widely used to identify countries and territories uniquely and is useful for data exchange and information processing.
ISO-3166 consists primarily of three parts.
ISO-3166-1
It defines codes for countries and territories using three formats.
- Alpha-2
- Two-letter country codes, such as JP for Japan and US for the United States.
- Alpha-3
- Three-letter country codes, such as JPN for Japan and USA for the United States.
- Numeric codes
- Three-digit numeric country codes.
ISO-3166-2
It defines codes for administrative subdivisions within countries, such as states and prefectures. This part identifies major subdivisions and is often used together with country codes. For example, JP-13 denotes Tokyo, Japan.
ISO-3166-3
It records country codes that were previously used but are no longer in use. These are maintained primarily for historical documents and data.
ISO-3166 codes are widely used in international contexts, including website localization, international postal services, global database management, and international trade. They also play important roles in international travel, communications, and geographic analysis.
The isVerified() function checks whether the claims recorded in a user's identity contract satisfy the security token's requirements.
If it returns true, the address is considered eligible.
To operate an identity registry under ERC3643, it must be compatible with the IAgentRole interface.
This allows the owner to appoint agents.
Agents are authorized to add and remove identities from the registry.
The owner may also designate themselves as an agent where necessary.
The system additionally requires the IClaimIssuer and IIdentity interfaces.
These play important roles in checking identity eligibility.
Details of identity registry functionality and operation are available in the interfaces folder.
https://eips.ethereum.org/assets/eip-3643/interfaces/IIdentityRegistry.sol
This information explains how identity management and regulatory compliance are handled for security token transactions.
interface IIdentityRegistry {
// events
event ClaimTopicsRegistrySet(address indexed claimTopicsRegistry);
event IdentityStorageSet(address indexed identityStorage);
event TrustedIssuersRegistrySet(address indexed trustedIssuersRegistry);
event IdentityRegistered(address indexed investorAddress, IIdentity indexed identity);
event IdentityRemoved(address indexed investorAddress, IIdentity indexed identity);
event IdentityUpdated(IIdentity indexed oldIdentity, IIdentity indexed newIdentity);
event CountryUpdated(address indexed investorAddress, uint16 indexed country);
// functions
// identity registry getters
function identityStorage() external view returns (IIdentityRegistryStorage);
function issuersRegistry() external view returns (ITrustedIssuersRegistry);
function topicsRegistry() external view returns (IClaimTopicsRegistry);
//identity registry setters
function setIdentityRegistryStorage(address _identityRegistryStorage) external;
function setClaimTopicsRegistry(address _claimTopicsRegistry) external;
function setTrustedIssuersRegistry(address _trustedIssuersRegistry) external;
// registry actions
function registerIdentity(address _userAddress, IIdentity _identity, uint16 _country) external;
function deleteIdentity(address _userAddress) external;
function updateCountry(address _userAddress, uint16 _country) external;
function updateIdentity(address _userAddress, IIdentity _identity) external;
function batchRegisterIdentity(address[] calldata _userAddresses, IIdentity[] calldata _identities, uint16[] calldata _countries) external;
// registry consultation
function contains(address _userAddress) external view returns (bool);
function isVerified(address _userAddress) external view returns (bool);
function identity(address _userAddress) external view returns (IIdentity);
function investorCountry(address _userAddress) external view returns (uint16);
}Identity Registry Storage Interface
Identity registry storage holds information about approved investors associated with a particular security token. The system operates as follows.
Identity Storage
Investor identities are registered in this storage after passing KYC (know your customer) and eligibility checks. The records include investor wallet addresses and associated country codes.
Separation of Logic and Storage
Identity registry storage separates identity verification and management functionality from the storage holding the associated information. This allows identity data to be shared across security token systems, improving efficiency.
Agent Responsibilities
Identity registry storage is managed by agents. Agents are appointed by the owner and authorized to add or remove investor identities. The owner may also designate themselves as an agent and manage the storage directly.
The isVerified() Function
This function is used during transfers to check whether the recipient is an eligible investor.
It returns true when the recipient is registered and the required claims are valid.
Details of identity registry storage functionality and operation are available in the interfaces folder.
https://eips.ethereum.org/assets/eip-3643/interfaces/IIdentityRegistryStorage.sol
Identity registry storage is thus an important system for supporting transfers between eligible investors and allowing token issuers to manage investor information efficiently.
interface IIdentityRegistryStorage {
//events
event IdentityStored(address indexed investorAddress, IIdentity indexed identity);
event IdentityUnstored(address indexed investorAddress, IIdentity indexed identity);
event IdentityModified(IIdentity indexed oldIdentity, IIdentity indexed newIdentity);
event CountryModified(address indexed investorAddress, uint16 indexed country);
event IdentityRegistryBound(address indexed identityRegistry);
event IdentityRegistryUnbound(address indexed identityRegistry);
//functions
// storage related functions
function storedIdentity(address _userAddress) external view returns (IIdentity);
function storedInvestorCountry(address _userAddress) external view returns (uint16);
function addIdentityToStorage(address _userAddress, IIdentity _identity, uint16 _country) external;
function removeIdentityFromStorage(address _userAddress) external;
function modifyStoredInvestorCountry(address _userAddress, uint16 _country) external;
function modifyStoredIdentity(address _userAddress, IIdentity _identity) external;
// role setter
function bindIdentityRegistry(address _identityRegistry) external;
function unbindIdentityRegistry(address _identityRegistry) external;
// getter for bound IdentityRegistry role
function linkedIdentityRegistries() external view returns (address[] memory);
}Compliance Interface
The compliance contract is used to ensure that security token transactions follow configured legal requirements and rules. It provides the following functionality.
Rule Configuration
Define token distribution rules, such as maximum investor counts per country and maximum token holdings per investor, based on investor country information.
Customizability
A compliance contract can be built for a specific use case or deployed in a general-purpose form and customized by adding or removing external compliance modules as needed.
Transaction Checks
It is invoked for token transactions to check whether they comply with defined rules.
It returns true when the rules are satisfied and false otherwise, controlling transaction execution.
Ownership and Agent Roles
Ownership of the contract is defined under ERC173, and the owner is responsible for configuring compliance and binding it to the token contract. The owner can also designate agents within the contract to manage compliance-related operations.
The compliance contract is thus an important tool for managing token distribution and transactions according to applicable rules. Detailed descriptions of individual functions are available in the interfaces folder.
https://eips.ethereum.org/assets/eip-3643/interfaces/ICompliance.sol
interface ICompliance {
// events
event TokenBound(address _token);
event TokenUnbound(address _token);
// functions
// initialization of the compliance contract
function bindToken(address _token) external;
function unbindToken(address _token) external;
// check the parameters of the compliance contract
function isTokenBound(address _token) external view returns (bool);
function getTokenBound() external view returns (address);
// compliance check and state update
function canTransfer(address _from, address _to, uint256 _amount) external view returns (bool);
function transferred(address _from, address _to, uint256 _amount) external;
function created(address _to, uint256 _amount) external;
function destroyed(address _from, uint256 _amount) external;
}Trusted Issuers Registry Interface
The trusted issuers registry supports secure management of security tokens. It stores the addresses of trusted claim issuers associated with a particular security token. Claim issuers are organizations that issue attestations of investors' identities or qualifications.
To hold the token, an investor's identity contract (IIdentity) must contain signed claims from trusted issuers registered in this registry. In other words, the investor's eligibility to hold the token must be verified.
The contract owner is responsible for managing this system. Under ERC173, the owner can manage the list of trusted issuers by adding, removing, and updating entries. This flexibility allows the registry to be adjusted in response to changes in the token's legal requirements or policies.
Details of trusted issuers registry functionality and operations are provided in the interfaces folder.
https://eips.ethereum.org/assets/eip-3643/interfaces/ITrustedIssuersRegistry.sol
This information explains how the mechanisms for verifying security token eligibility and securing transactions are structured.
Claim Topics Registry Interface
The claim topics registry is a contract managing particular types of claims, such as attestations or attributes, for a security token. It organizes and stores categories of important information associated with token holders. A token holder's identity contract (IIdentity) must contain the appropriate claims based on the claim topics recorded in the registry. This helps verify eligibility to hold tokens and compliance of transactions.
The owner holds ownership of this registry under ERC173 and can add or remove claim topics as necessary. The owner is therefore authorized to customize the registry according to the token's legal requirements and policies.
Details of specific operations and functionality are available in the documentation in the interfaces folder.
https://eips.ethereum.org/assets/eip-3643/interfaces/IClaimTopicsRegistry.sol
This information explains how security tokens manage appropriate claim information and maintain transparency and compliance in transactions.
https://eips.ethereum.org/assets/eip-3643/interfaces/IClaimTopicsRegistry.sol
interface IClaimTopicsRegistry {
// events
event ClaimTopicAdded(uint256 indexed claimTopic);
event ClaimTopicRemoved(uint256 indexed claimTopic);
// functions
// setters
function addClaimTopic(uint256 _claimTopic) external;
function removeClaimTopic(uint256 _claimTopic) external;
// getter
function getClaimTopics() external view returns (uint256[] memory);
}Additional Details
Transfer Restrictions
Unlike ordinary utility tokens, security token transfers must satisfy numerous conditions.
These may concern investors' wallet status, the identities or eligibility of senders and recipients (such as completed KYC or accredited investor status), or token-specific rules (such as limits on the number of investors or the proportion held by any one investor).
For ERC20 tokens, balanceOf and allowance can be used to check transfer prerequisites in advance. For security tokens, the T-REX standard introduces canTransfer and isVerified to check broader compliance rules and investor identity eligibility.
Transfers fail if these checks are not passed.
Transfers are also blocked when sender or recipient addresses are frozen, the sender's available balance is insufficient, or the token is paused.
Identity Management
On-chain identity management strengthens security and compliance for security token transfers.
Identity Contract
Provides a unique identifier for each investor.
Claims
Attest to investor identities and qualifications.
Identity Storage and Registry
Store identity references and wallet associations for checking investor eligibility during transfers.
These systems help ensure that token transactions are conducted securely and according to configured rules.
Token Lifecycle Management
T-REX provides a comprehensive approach to managing security tokens. It supports the entire token lifecycle, from issuance to transfers between eligible investors, with compliance rules enforced at each stage. Pausing and freezing functionality also allows flexible responses to regulatory requirements and changes in token or holder circumstances.
Additional Compliance Rules
T-REX provides flexibility to implement additional rules through modular compliance. These can impose limits on investor counts, restrict the proportion of tokens held by particular investors, or restrict transfers between particular investor categories. Issuers can therefore customize compliance according to their requirements and regulatory environment.
Agent-Related Functionality
Incorporating agent-scoped functionality into a standard interface enables more secure and adaptable token management. Automated systems or smart contracts can hold agent roles and programmatically execute operations such as minting, burning, and freezing. This allows token management to be automated for various scenarios and enables timely responses to regulatory triggers.
These features are standardized so that different systems interacting with ERC3643 tokens can use common interfaces. This enables standardized tooling throughout the ecosystem and allows ERC3643 to support flexible and diverse operating models.
Backwards Compatibility
T-REX tokens are designed to integrate with existing ERC20 and ERC173 systems and contracts. As a result, they can be handled by many existing wallets and exchanges, subject to their transfer restrictions. T-REX tokens can also communicate with claim holder contracts to verify claims associated with identity contracts containing information about investor identities and qualifications. This enables T-REX to verify investor identities and check transactions against appropriate compliance requirements.
Security
The original specification reports that the implementation was reviewed by Kaspersky and Hacken, and no critical security issues were identified in those reviews. The audits focused mainly on Tokeny's T-REX implementation, while also examining the standard's underlying principles. The audit findings support the soundness of those principles, although an audit does not guarantee that every implementation is free of vulnerabilities.
Citation
Joachim Lebrun (@Joachim-Lebrun), Tony Malghem (@TonyMalghem), Kevin Thizy (@Nakasar), Luc Falempin (@lfalempin), Adam Boudjemaa (@Aboudjem), "ERC-3643: T-REX - Token for Regulated EXchanges," Ethereum Improvement Proposals, no. 3643, July 2021. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-3643.
Conclusion
This article covered ERC3643, a standard defining interfaces for institutional security token management and compliance-based transfers. 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.


