---
eip: 3643
label: ERC-3643
title: T-REX - Token for Regulated EXchanges
status: Final
type: Standards Track
category: ERC
created: 2021-07-09
requires: 20, 173
official: https://eips.ethereum.org/EIPS/eip-3643
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-3643.md
canonical: https://eips.huatuo.xyz/eip-3643/
lang: en
tldr: "T-REX: an ERC-20-compatible permissioned token standard for securities, where every transfer checks the receiver's on-chain identity claims and the issuer's compliance rules, with agent powers to freeze, recover and force-transfer."
tags: [security-token, rwa, compliance, identity, erc20]
---

# ERC-3643: T-REX - Token for Regulated EXchanges

> An institutional grade security token contract that provides interfaces for the management and compliant transfer of security tokens.

**TL;DR:** T-REX: an ERC-20-compatible permissioned token standard for securities, where every transfer checks the receiver's on-chain identity claims and the issuer's compliance rules, with agent powers to freeze, recover and force-transfer.

## What problem does it solve?

Plain [ERC-20](/eip-20/) tokens are permissionless: anyone can hold them and send them anywhere. Tokenized securities such as shares, bonds or fund units cannot work that way. Securities law requires the issuer to know who holds the asset, restrict it to eligible investors (KYC/AML, accreditation, jurisdiction), enforce limits such as a maximum number of holders, and be able to recover tokens if an investor loses their key.

ERC-3643, known as T-REX (Token for Regulated EXchanges), standardises how to do this on-chain while keeping the familiar ERC-20 interface, so wallets and tools can still read balances and send transfers.

## How it works

The standard is a set of cooperating contracts:

| Contract | Role |
| --- | --- |
| **Token** (`IERC3643`) | ERC-20 plus pause, freeze, mint/burn, forced transfer, recovery and batch functions |
| **Identity Registry** | Maps each wallet to an on-chain Identity contract and an ISO-3166 country code; exposes `isVerified(address)` |
| **Identity Registry Storage** | The whitelist itself, which can be shared by several tokens' registries |
| **Claim Topics Registry** | Which claim types (e.g. KYC) an investor must hold |
| **Trusted Issuers Registry** | Which claim issuers' signatures are accepted |
| **Compliance** | Offering-wide rules via `canTransfer(from, to, amount)`, e.g. holder caps per country or max balance per investor |

A `transfer` succeeds only if the token is not paused, neither wallet is frozen, the sender has enough **free** balance (balance minus frozen tokens), the receiver `isVerified`, and `canTransfer` returns true. Afterwards the token calls `compliance.transferred(...)` so stateful rules can update.

Roles follow [ERC-173](/eip-173/): the **owner** (issuer) configures the system and appoints **agents** via `addAgent`. Agents can mint, burn, freeze wallets or partial amounts, `forcedTransfer`, and `recoveryAddress` (move a lost wallet's tokens to a new wallet of the same identity). `mint` and `forcedTransfer` still require a verified receiver but skip compliance rules; `burn` skips all eligibility checks.

## Sample code

Pre-checking whether a transfer would pass before sending it (ethers v6):

```ts
import { Contract } from "ethers";

const token = new Contract(tokenAddr, [
  "function identityRegistry() view returns (address)",
  "function compliance() view returns (address)",
  "function paused() view returns (bool)",
  "function isFrozen(address) view returns (bool)",
  "function getFrozenTokens(address) view returns (uint256)",
  "function balanceOf(address) view returns (uint256)",
], provider);

const registry = new Contract(await token.identityRegistry(),
  ["function isVerified(address) view returns (bool)"], provider);
const compliance = new Contract(await token.compliance(),
  ["function canTransfer(address,address,uint256) view returns (bool)"], provider);

const free = (await token.balanceOf(from)) - (await token.getFrozenTokens(from));
const ok =
  !(await token.paused()) &&
  !(await token.isFrozen(from)) && !(await token.isFrozen(to)) &&
  free >= amount &&
  (await registry.isVerified(to)) &&
  (await compliance.canTransfer(from, to, amount));
```

## Things to know

- **Status: Final.** The spec points to Tokeny's T-REX repository as the reference implementation.
- Agents hold significant power (freeze, force transfer, recover). That is intentional for regulated assets, but holders must trust the issuer and its agents.
- Generic DeFi contracts that expect free transferability will see transfers revert unless they are themselves registered as verified identities.
- Identities and claims build on the ONCHAINID contracts (ERC-734/735-style key and claim holders) shipped in the EIP's assets folder.
- Earlier security-token efforts include ERC-1400 and [ERC-1462](/eip-1462/).
- Compliance logic is only as good as the rules configured; whether a given setup satisfies a particular jurisdiction's law is a legal question, not something the standard guarantees.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-3643
