Token ACL (Access Control List) is a Solana program that enables compliant,
permissioned tokens without sacrificing user experience. It implements
sRFC37, allowing
issuers to create tokens with allow/block list functionality while
keeping the user experience that users expect.
The Problem
Issuers need compliant tokens that can:- Enforce KYC/AML requirements
- Block sanctioned addresses
- Restrict token transfers to approved parties
DefaultAccountState extension to
create accounts in a frozen state, requiring manual intervention to thaw
each account:
The Solution
Token ACL enables permissionless thaw - users can automatically thaw their own accounts if they meet the criteria defined by a Gate Program:Educational Reference ImplementationThis guide includes a complete working implementation you can run locally. The
source code
provides reference implementations for exploration and educational purposes.The code of the ACL programs is available in the
token-acl repository and the
ABL Gate Program is available in the
token-acl-gate repository.Important: The ABL (Allow Block List) Gate Program used in this guide is a
reference implementation. Issuers are free to create
custom Gate Programs that better fit their specific compliance needs. You are only bound by the Token ACL specification (sRFC37),
not this particular Gate Program design.Do NOT use this code directly in production without:
- Comprehensive security audits
- Proper key management systems
- Regulatory compliance review
- Legal consultation
Why Token ACL?
| Aspect | Traditional Frozen | Token ACL |
|---|---|---|
| Account Activation | Manual (minutes/days) | Instant (self-service) |
| User Experience | Poor | Self-service |
| Compliance Control | Full | Full |
| Sanctions Blocking | Manual | Automatic via Gate Program |
| Integration Effort | High | Low (SDK available) |
| Composability | Limited | Full (works with DeFi) |
Token ACL vs Transfer Hooks
Both Token ACL and Transfer Hooks are Token-2022 solutions for adding custom logic to tokens, but they serve different purposes and have different trade-offs:| Aspect | Token ACL | Transfer Hooks |
|---|---|---|
| When Logic Runs | Only on freeze/thaw operations | On every transfer |
| Transfer Overhead | None - transfers are standard | Extra CUs + accounts on each transfer |
| Account Dependencies | Only during account activation | Required on every transfer transaction |
| DeFi Composability | Full - protocols work normally | Limited - many protocols blacklist |
| Best For | KYC/AML, sanctions, allow/block lists | Royalties, custom transfer validation |
| Complexity for Users | Low - one-time thaw operation | Higher - every transfer needs extra data |
When to Use Token ACL
Choose Token ACL when you need to control who can hold your token:- KYC/AML compliance - verify holders before they can receive tokens
- Sanctions screening - block specific addresses
- Accredited investor restrictions - limit token holders to verified parties
- Smart contract restrictions - block specific program-owned (PDA) accounts from holding tokens
When to Use Transfer Hooks
Choose Transfer Hooks when you need to control how tokens move:- NFT royalties - charge fees on every transfer
- Transfer restrictions - limit transfer amounts or frequency
- Custom transfer logic - execute code on every movement
- Onchain analytics - track all token movements
Complementary SolutionsToken ACL and Transfer Hooks can be used together. For example, you could use
Token ACL to control who can hold your token (compliance) while using Transfer
Hooks for royalty enforcement on each transfer.
Architecture Overview
Token ACL consists of three main components:- Token ACL Program: The core program that manages freeze authority delegation and permissionless operations
- Gate Program: Custom logic that determines who can thaw/freeze (e.g., ABL Gate Program for allow/block lists)
- MintConfig: Per-mint configuration that stores settings and delegates freeze authority
Key Concepts
- Freeze Authority Delegation: When you create a Token ACL config, the mint’s freeze authority is transferred to the MintConfig PDA. This allows Token ACL to manage freeze/thaw operations.
- Gate Programs: External programs that implement the allow/block logic. The ABL (Allow Block List) Gate Program is a reference implementation - issuers can build custom Gate Programs with different logic (e.g., onchain KYC verification, oracle-based sanctions checks, or integration with identity protocols).
- Permissionless Operations: Users can thaw their own accounts without issuer intervention, as long as the Gate Program approves.
-
TokenMetadata Integration: Adding a
token_aclfield to your mint’s metadata enables automatic detection by wallets and SDKs like@solana/token-helpers.
Auto-Detection with TokenMetadataWhen you add a
token_acl field to your mint’s TokenMetadata extension pointing
to the Gate Program address, SDKs like @solana/token-helpers can automatically
detect Token ACL mints and include thaw instructions when creating token
accounts.ABL Gate Program Modes
ABL is a Reference ImplementationThe ABL Gate Program shown here is a reference implementation that covers
common allow/block list use cases. However, you are not locked into this
design. The Token ACL specification (sRFC37) defines only the interface
between Token ACL and Gate Programs - you can create custom Gate Programs with:
- Integration with onchain identity/KYC protocols
- Oracle-based real-time sanctions screening
- Multi-sig approval workflows
- Time-based or conditional access rules
- Any other custom compliance logic
| Mode | Description | Use Case |
|---|---|---|
Allow | Only wallets on the allow list can thaw | KYC-required tokens |
Block | All wallets EXCEPT those on block list can thaw | Sanctions compliance |
| Composite | Combine allow + block lists | Full compliance setup |
Block List PrecedenceWhen using composite lists, the block list always takes precedence. A wallet
on both the allow list AND block list will NOT be able to thaw.
Program Addresses
The programs are deployed on devnet and mainnet. You can use the following addresses.| Program | Address |
|---|---|
| Token ACL | TACLkU6CiCdkQN2MjoyDkVg2yAH9zkxiHDsiztQ52TP |
| ABL Gate Program | GATEzzqxhJnsWF6vHRsgtixxSB8PaQdcqGEVTEHWiULz |
Prerequisites
To run the examples locally make sure to clone the programs into your local validator:-
Solana CLI. The metadata steps below were tested with Solana CLI 4.1.2,
on Surfpool and on
solana-test-validator. - Node.js 20.18+ and npm
-
Local validator with required programs. The simplest option is
Surfpool, which forks devnet and lazily fetches the
Token ACL and gate programs on first use:
Alternatively, clone the programs into a
solana-test-validator:
Complete Implementation
Step 1: Install Dependencies
Step 2: Create a Token with Token ACL
Here’s a complete example that creates a compliant token with Token ACL. The steps below are parts of one file: the imports,rpc, sendAndConfirm,
sendInstructions, and payer declared here are shared by every later step.
Pointing loadKeypair at a funded keypair file is all you need to configure.
Step 3: Create Token ACL Config
After creating the mint, create the Token ACL configuration:Step 4: Setup ABL Gate Program
Create an ABL list and setup extra metas. Use one tab for your mint:The gate program supports two list modes:
Allow and Block. The payer
account funds the new list, wallet entry, and extra metas accounts and must sign.
setupExtraMetas takes the list addresses as addresses, and findWalletEntryPda
takes { listConfig, wallet }.Step 5: Enable Permissionless Thaw
Enable users to thaw their own accounts:Step 6: User Thaws Their Account
Users can now thaw their own accounts using the SDK:Step 7: Run the Whole Flow
Put the steps together. A new user’s token account starts frozen, the gate program rejects the thaw while the wallet is not on the allow list, and the same thaw succeeds after the wallet is added:Using @solana/token-helpers for Auto-Thaw
The@solana/token-helpers SDK can automatically detect Token ACL mints and
include thaw instructions. Install it alongside the packages above:
TokenMetadata RequirementFor
@solana/token-helpers auto-detection to work, your mint must have:- The
TokenMetadataextension initialized - An
additionalMetadatafield with keytoken_acland value set to the Gate Program address
Composite Allow + Block Lists
For maximum compliance control, combine allow and block lists:Composite List Behavior
Use Cases
1. Security Tokens (KYC Required)
Use an Allow list to ensure only KYC-verified investors can hold tokens:2. Sanctions Compliance
Use a Block list to prevent sanctioned addresses from receiving tokens:3. Full Compliance Configuration
Combine Allow list + Block list for complete control:- Allow list: KYC-verified investors
- Block list: Sanctioned addresses, terminated employees, etc.
Production Considerations
Before deploying to production:- Security Audits: Get professional security audits of your implementation and any custom Gate Programs
- Key Management: Use proper custody solutions for authority keys. Consider multi-sig for sensitive operations
- Regulatory Compliance: Consult legal experts on securities regulations, KYC/AML requirements, and sanctions compliance
-
List Management: Build reliable systems for managing allow/block lists,
including:
- Automated sanctions screening integration
- KYC provider integration
- Audit logging
-
Monitoring: Implement monitoring for:
- Failed thaw attempts (potential compliance issues)
- List modifications
- Authority key usage
- Disaster Recovery: Plan for key rotation, list recovery, and emergency freeze procedures
Command-Line Interface (CLI)
Both Token ACL and the ABL Gate Program provide CLIs for managing configs and lists without writing code. This is useful for operations teams.Token ACL CLI
The Token ACL CLI manages mint configurations and freeze/thaw operations.Installation
Token ACL Commands
| Command | Description |
|---|---|
create-config | Creates a new mint config (transfers freeze authority) |
delete-config | Deletes a mint config |
set-authority | Sets the authority of a mint config |
set-gating-program | Sets the gating program for a mint config |
set-instructions | Enable/disable permissionless thaw/freeze |
thaw | Thaws a token account (authority required) |
freeze | Freezes a token account (authority required) |
thaw-permissionless | Thaws a token account permissionlessly |
freeze-permissionless | Freezes a token account permissionlessly |
create-ata-and-thaw-permissionless | Creates ATA and thaws in one command |
Create a Token ACL Config
Enable Permissionless Thaw
Thaw/Freeze Operations
Create ATA and Thaw in One Command
ABL Gate CLI (token-acl-gate-cli)
The ABL Gate CLI manages allow/block lists and wallet entries.
Installation
ABL Gate Commands
| Command | Description |
|---|---|
create-list | Creates a new allow/block list |
delete-list | Deletes a list |
add-wallet | Adds a wallet to a list |
remove-wallet | Removes a wallet from a list |
apply-lists-to-mint | Configures which lists apply to a mint |
Create a List
list_config PDA address, the seed, and the transaction
signature - save the first two.
Manage Wallets on Lists
Apply Lists to a Mint
CLI Global Options
Both CLIs support these options:| Option | Description |
|---|---|
-u, --url <URL> | RPC URL (default: from Solana config) |
-k, --payer <KEYPAIR> | Payer keypair file or hardware wallet |
-C, --config <PATH> | Solana config file path |
-v, --verbose | Show additional information |
Complete CLI Workflow Example
Here’s a complete workflow using all CLIs to set up a compliant token from scratch:Token Metadata for Auto-DetectionAdding the
token_acl metadata field is crucial for wallet integration. When
wallets like Phantom or SDKs like @solana/token-helpers see this field, they
automatically include thaw instructions when creating token accounts.Conclusion
Token ACL (sRFC37) gives issuers permissioned tokens whose approved holders can thaw their own accounts. Key points:- Instant Activation: Users can self-service thaw their accounts
- Full Compliance Control: Allow lists, block lists, or custom logic
- Flexible Gate Programs: Use the reference ABL implementation or build custom Gate Programs that integrate with your compliance infrastructure
- Simple integration: SDKs handle the extra accounts automatically
- Composable: Works with existing DeFi protocols
- Audited: Accretion audited Token ACL and the ABL Gate Program; the reports are in each repository. Both programs are deployed on devnet and mainnet
Related
- Gate the holders: Token ACL end to end in a tutorial, with the Mosaic SDK, Kit, Web3.js v3, or Rust
- Attestation-based compliance: evidence a holder check without publishing personal data
- Token ACL demo: workshop examples; the implementation is in the Token ACL and ABL Gate Program repositories
- sRFC37: the complete technical specification, with the sRFC37 discussion