What ERC3643 defines
ERC3643, also known as T-REX, extends ERC20 with onchain compliance. The token contract consults an identity registry and a set of compliance rules before every transfer. It rests on three capabilities:Eligibility checks
A transfer succeeds only if the recipient is verified in the identity registry,
neither party is frozen, and the compliance rules allow it.
Compliance rules
The contract enforces allowlists, holder limits, and jurisdiction rules.
Issuer control
Agents can freeze addresses, force transfers, and recover tokens.
ERC3643 features on Solana
An ERC3643 token is a custom contract. A Solana permissioned token is a mint under the Token Extensions Program with the right extensions enabled, plus a small program where you need custom rules.| ERC3643 | Solana | How it maps |
|---|---|---|
| Identity registry | Transfer hook or Token ACL | A hook program checks an allowlist on every transfer. Token ACL manages allow and block lists for you. |
| Compliance modules | Transfer hook program | Write limits, holder caps, and jurisdiction rules in the program that the hook calls. |
| New holders blocked by default | Default account state | Create every new token account frozen, and thaw it after verification. |
setAddressFrozen | Freeze authority | The mint’s freeze authority freezes and thaws individual token accounts. A partial freeze of a balance has no direct equivalent. |
forcedTransfer, recovery | Permanent delegate | One authority can transfer or burn tokens from any account of the mint. A frozen account must be thawed first, and the transfer hook still runs. |
pause | Pausable extension | An authority pauses all transfers, mints, and burns for the mint. |
| Agent roles | Mint authorities | Assign the mint, freeze, and delegate authorities to a multisig or to a PDA of your program. |
| Token code audit | Hook program audit | The token logic is the shared, audited program. Only your hook program is custom. |
How a gated transfer runs
The sender submits a normalTransferChecked instruction. The Token Extensions
Program runs the built-in checks and then calls your hook. If the hook returns
an error, the whole transaction fails, the way a non-compliant ERC3643 transfer
reverts.
1
Sender transfers
The transaction includes the extra accounts the hook needs.
2
Built-in checks
The token program rejects frozen accounts and paused mints.
3
Hook runs
The program calls your hook, which checks the sender and the recipient.
4
Balances update
The transfer completes only if every check passes.
Choose an approach
You can combine these. The right mix depends on how much custom logic you need and on the wallet experience you want.Default account state
The simplest gate. New token accounts start frozen, and the issuer thaws each
verified holder.
Transfer hook
The most flexible option. Your program runs on every transfer and can check any
onchain state.
Token ACL
Allow and block lists with permissionless thaw, so eligible holders do not wait
for the issuer.
Attestation-based compliance
Check credentials issued by a verifier instead of maintaining your own list.
Build a KYC-gated token
This outline uses a transfer hook with an allowlist. See the transfer hook tutorial for the complete program and client code.1
Write and deploy the hook program
The program implements the transfer hook interface. The token program calls its
transfer hook instruction with the source account, the mint, the destination
account, the transfer authority, the extra account meta list, and the extra
accounts you registered. All arrive read-only, without the sender’s signer
privilege. The instruction returns an error to block the transfer. Anyone can
also call the instruction directly, so the example first checks the source
account’s
transferring flag with the assert_is_transferring helper from the
tutorial.2
Create the mint with extensions
Point the mint at the hook program, and enable the freeze authority and the
permanent delegate. Most extensions cannot be added after the mint exists, so
enable them now. You can still change their authorities, and the hook program
ID, later.
Terminal
3
Register the hook's extra accounts
Initialize the extra account meta list for the mint once. It tells the token
program which accounts, such as the allowlist, to pass to the hook.
4
Onboard holders
After a holder passes verification, add them to the allowlist. The hook runs
only on transfers, not on mint or burn. The issuer can mint the initial supply,
and must check eligibility itself before minting. Use default account state if
unverified accounts must not receive minted tokens.
5
Transfer
Holders use standard wallets and the standard transfer instruction. A transfer
to or from an address that is not on the allowlist fails.
Do not keep the allowlist in one accountThe example stores addresses in a single list to stay short. For production,
derive one PDA per approved holder and have the hook check that the account
exists. Lookups stay cheap as the holder count grows.
Before you launch
Review these points with your compliance and security teams.- Choose every extension before you create the mint. Most cannot be added later.
- Hold the mint, freeze, and permanent delegate authorities in a multisig or a program-controlled PDA, never in a single hot key.
- Test that the hook rejects an unverified sender, an unverified recipient, and a substituted allowlist account.
- Decide how forced transfers pass the hook. It also runs on transfers signed by the permanent delegate, so let it pass when the authority is the permanent delegate, or recover tokens by burning and minting again.
- Confirm that the wallets, exchanges, and DeFi programs you depend on support Token Extensions mints with your extensions.
- Document who can freeze, force a transfer, or burn. Some wallets and explorers flag a permanent delegate, so tell holders about it yourself.