How to configure compliance modules for token compliance rules
Every token transfer in ATK passes through compliance modules that enforce regulatory requirements automatically. This guide walks you through selecting the right modules for your jurisdiction, configuring them with your compliance rules, testing them thoroughly, and monitoring ongoing compliance through observability dashboards.
Before diving into module configuration, it's helpful to understand where
compliance fits in the broader asset lifecycle. Every DALP operation—whether
it's a DvP settlement, a yield distribution, a redemption, or a simple
transfer—triggers compliance validation before execution. The platform evaluates
your configured modules in sequence, checking identity claims, geographic
restrictions, holding limits, and time locks. Only when all modules approve does
the transaction proceed to settlement.
This means your compliance configuration directly impacts operational workflows.
A properly configured compliance layer enables smooth DvP settlements for
qualified investors while automatically blocking transfers to non-compliant
recipients. During yield distributions, compliance modules ensure dividends only
flow to eligible holders. At redemption, time lock modules verify that holding
periods have been satisfied before releasing principal.
Your compliance rules become the guardrails for every lifecycle event, making
configuration accuracy critical to both regulatory adherence and operational
efficiency.
Rendering chart...
The compliance dashboard captures every module evaluation, giving you real-time
visibility into rule effectiveness and violation patterns. You'll use these
metrics to tune your configuration and provide audit evidence.
ATK provides over 10 pre-built compliance modules covering common regulatory
scenarios. Each module addresses specific regulatory requirements and integrates
with the identity registry to validate claims against token holders. Think of
modules as building blocks—you'll combine several to create a complete
compliance framework for your asset.
Geographic restrictions satisfy regulations that limit offerings to specific
jurisdictions or block sanctioned countries. The country modules check the
COUNTRY claim in each investor's OnchainID before allowing transfers.
Country allow list — Restricts token ownership to investors from approved
countries. Use this for offerings limited to specific jurisdictions (e.g.,
US-only private placements, EU-only MiCA tokens). The module rejects transfers
if the recipient's country claim doesn't match your approved list.
Country block list — Blocks investors from prohibited jurisdictions to
satisfy sanctions compliance (OFAC, EU sanctions lists). This module prevents
transfers to any address holding a country claim from your blocked list,
ensuring you never inadvertently serve sanctioned jurisdictions.
Identity verification
Identity modules enforce KYC/AML requirements by validating claims issued by
trusted claim issuers. These modules prevent transfers to or from addresses
without proper verification.
SMART identity verification — Evaluates complex logical expressions
combining multiple identity claims. Use this when regulations require
combinations like "accredited investor AND US resident" or "institutional
investor OR HNWI with AML clearance." The module accepts postfix notation
expressions with AND, OR, and NOT operators.
Identity allow list — Restricts transfers to explicitly approved OnchainID
contracts. This is common for private placements where only a pre-vetted
investor list may participate. Every potential recipient must be on the
approved list.
Identity block list — Blocks specific OnchainID contracts from receiving
or transferring tokens. Use this for compliance violations, fraud prevention,
or regulatory enforcement actions. Blocked identities cannot transact even if
they hold other valid claims.
Address block list — Blocks specific wallet addresses regardless of
OnchainID status. This provides an additional enforcement layer for sanctioned
addresses, compromised wallets, or addresses flagged by transaction monitoring
systems.
Transfer and supply limits
Limit modules enforce caps on issuance, investor counts, and ownership
concentration. These satisfy regulatory caps and help manage operational risk.
Token supply limit — Enforces maximum issuance caps required by
regulations like MiCA (EUR 8M for e-money tokens) or Reg CF (USD 5M annual
limit). The module tracks total supply and rejects minting operations that
would exceed your configured cap.
Investor count — Restricts the number of unique token holders, either
globally or per country. Private placements often limit investor counts (e.g.,
99 non-accredited investors under Reg D 506b). The module increments a counter
on each new holder's first receipt and rejects transfers once limits are
reached.
Transfer approval — Requires pre-approval for each transfer before
execution. This satisfies Japanese FSA requirements for security token
transfers and enables manual compliance review workflows. Each transfer must
be explicitly approved by a compliance officer before settlement.
Time-based restrictions
Time lock modules enforce holding periods required by regulations or contractual
terms.
Time lock — Enforces minimum holding periods before tokens can be
transferred. Use this for Reg D lock-ups (6-12 months), vesting schedules, or
contractual transfer restrictions. The module records acquisition timestamps
and rejects transfers before the holding period expires. You can configure
exemptions for specific identity types (e.g., market makers).
Choosing the right combination of modules requires mapping your regulatory
requirements to module capabilities. Start with your jurisdiction's core
requirements—most frameworks mandate identity verification and geographic
restrictions at minimum. Then layer on limit modules for caps and count
restrictions. Finally, add time locks for any holding period requirements.
Rendering chart...
Work through this decision tree with your legal and compliance teams to identify
the minimal set of modules that satisfy your requirements. Resist the temptation
to add unnecessary modules—each module adds gas cost and complexity to every
transfer. Focus on what regulations actually require.
Let's walk through configuration for several real-world regulatory scenarios.
Each scenario demonstrates how to combine modules to create a complete
compliance framework.
US Regulation D Rule 506(c) allows unlimited capital raises from accredited
investors only, with mandatory verification and a 12-month holding period. This
scenario requires identity verification, investor limits, and time locks.
Regulatory requirements:
Only US investors (geographic restriction)
Must be accredited investors (identity verification)
Maximum 100 investors (investor cap, though 506(c) has no limit—this is an
issuer choice)
6-month holding period (securities law requirement)
Module configuration workflow:
Navigate to Asset Management > Tokens > select your token >
Compliance tab to configure modules.
Add country allow list:
The country allow list restricts ownership to US investors by checking the
COUNTRY claim (topic ID 100) against allowed ISO country codes.
Click Add Module
Select Country Allow List
Enter configuration:
{ "allowedCountries": [840]}
(840 is the ISO 3166-1 numeric code for United States)
Click Save
Add identity verification:
The SMART identity verification module ensures recipients hold the
ACCREDITED_INVESTOR claim (topic ID 42) issued by your trusted claim issuer.
(15,552,000 seconds = 180 days; no exemptions for this offering)
Click Save
Once configured, your token now enforces a complete Reg D 506(c) compliance
framework. Every transfer triggers all four modules in sequence—country check,
accreditation verification, investor count validation, and time lock
enforcement. Only transfers that pass all checks proceed to settlement.
The EU Markets in Crypto-Assets Regulation (MiCA) requires e-money tokens under
EUR 8M to implement KYC/AML verification and sanctions screening. This scenario
demonstrates combining identity verification with supply caps and geographic
blocks.
Regulatory requirements:
Maximum EUR 8M issuance (MiCA Article 48 exemption threshold)
KYC and AML verified investors (Anti-Money Laundering Directive requirements)
No sanctioned countries (EU sanctions compliance)
Module configuration workflow:
Add country block list:
Block jurisdictions under EU sanctions (Russia, North Korea, Syria, Iran, etc.).
{ "blockedCountries": [643, 408, 760, 364]}
(Russia=643, North Korea=408, Syria=760, Iran=364 per ISO 3166-1)
Add identity verification:
Require both KYC (topic 1) AND AML (topic 2) claims using a SMART expression.
This configuration creates a MiCA-compliant e-money token that rejects
transactions from sanctioned countries, requires KYC+AML verification, and
enforces the EUR 8M issuance cap. Once you approach the supply limit, the
observability dashboard will show minting operations being rejected.
Some offerings implement investor caps per jurisdiction to manage regulatory
complexity or market exposure. This scenario demonstrates per-country investor
limits.
Regulatory requirements:
Allow US, UK, and Germany only
Maximum 50 investors per country (issuer risk management choice)
No individual holding > 10% of supply (requires custom implementation)
Module configuration workflow:
Add country allow list:
Restrict ownership to three approved jurisdictions.
{ "allowedCountries": [840, 826, 276]}
(US=840, UK=826, Germany=276)
Add investor count with per-country limits:
Track investor counts separately per country and enforce country-specific caps.
(Setting maxInvestors to 0 disables the global limit; countryLimits array maps
to countryCodes array)
This configuration allows exactly 50 US investors, 50 UK investors, and 50
German investors. Once any country reaches its cap, transfers to new investors
from that country are rejected. The compliance dashboard shows per-country
investor counts in real time, helping you monitor market distribution.
Some offerings require complex combinations of identity claims to accommodate
different investor types while maintaining compliance. This scenario
demonstrates advanced SMART expression logic.
Regulatory requirements:
Allow institutional investors (smart contracts) OR individual investors with
KYC and AML
Block politically exposed persons (PEPs) regardless of other qualifications
Module configuration workflow:
Use SMART identity verification with a complex logical expression:
CONTRACT OR ((KYC AND AML) AND NOT PEP)
Translate to postfix notation:
The expression evaluates left-to-right using a stack. Breaking down the logic:
This sophisticated expression allows institutional smart contracts to
participate without individual KYC (since contracts represent funds or SPVs with
their own compliance frameworks) while requiring individual investors to have
both KYC and AML clearance. The PEP block applies universally—even qualified
investors are rejected if they hold a PEP claim.
Testing complex expressions is critical. Use the compliance simulator (covered
in Step 3) to validate that your logic behaves as intended across different
claim combinations.
Configuration mistakes can have serious consequences—blocking legitimate
investors, allowing non-compliant transfers, or creating audit failures. Always
test your compliance configuration in a dedicated test environment before
deploying to production tokens.
Comprehensive testing requires creating test investor profiles representing
different compliance scenarios, then simulating transfers to verify that your
modules approve and reject transactions correctly.
For each test profile combination, simulate transfers and verify expected
outcomes.
Navigate to Test Tools > Compliance Simulator
Select your test token from the dropdown
Select From investor profile (sender)
Select To investor profile (recipient)
Enter transfer amount (use a realistic amount, e.g., 1000 tokens)
Click Simulate Transfer
Review pre-flight validation results showing each module's evaluation
If pre-flight check passes, click Execute On-Chain to run the actual
transaction
Verify blockchain result matches pre-flight prediction
Check compliance dashboard for logged evaluation metrics
The simulator shows module-by-module evaluation results, indicating which
modules approved or rejected and why. This granular feedback helps you debug
configuration issues.
While running tests, monitor the compliance metrics panel in your observability
dashboard. This gives you real-time visibility into module performance and helps
validate configuration.
Key metrics to watch:
Compliance evaluation rate — Total evaluations per second (should match
your test transaction rate)
Rejection rate by module — Which modules are rejecting most frequently
(helps identify configuration issues)
Average evaluation time — How long compliance checks take (should be
<100ms)
Gas cost per evaluation — On-chain gas consumption for compliance (helps
estimate operational costs)
Navigate to Observability > Compliance Dashboard to access these
panels. Set the time window to "Last 15 minutes" to see real-time test results.
If you see unexpected rejections, the dashboard's "Violation Details" panel
shows the specific module and rejection reason for each failed transfer. Use
this to debug configuration errors—for example, if the country module rejects
all transfers, verify that your allowed country codes are correct and that test
investors actually have COUNTRY claims.
Symptom: Transfers approved when they should reject, or vice versa.
Diagnosis: Module logic error or execution order issue.
Solution:
Review module execution order—modules execute sequentially in the order added
Check for module configuration conflicts (e.g., country allow list and block
list both active)
Verify SMART expression logic using postfix notation validator
Test modules individually by temporarily disabling others
Inconsistent pre-flight vs. on-chain results:
Symptom: Pre-flight check approves but on-chain transaction reverts, or vice
versa.
Diagnosis: State changed between pre-flight and execution.
Solution:
Check data freshness—API cache may be stale; wait 30 seconds and retry
Verify claim state hasn't changed (claims may have expired between checks)
Review timestamp-dependent modules (time lock calculations depend on block
timestamp)
Confirm API validation logic exactly matches on-chain module implementation
If you encounter persistent failures, check the observability dashboard for
stack traces and module execution logs. The transaction details panel shows the
complete evaluation sequence for each transfer, helping you pinpoint exactly
where validation fails.
Compliance modules depend on the identity registry to look up investor claims.
Before deploying modules to production, verify that your identity registry is
properly configured and populated.
Check that your token's compliance contract references the correct identity
registry and that trusted issuers are registered.
Navigate to Platform Settings > Compliance
Verify Identity Registry address matches your deployed registry contract
Check Trusted Issuers list includes your claim issuer's address
Ensure Claim Topics registry includes all topics used by your modules
Review Agent Roles to confirm claim issuers have proper permissions
Each token can reference its own identity registry or share a common registry
across multiple tokens. Shared registries simplify investor onboarding—once
verified, investors can participate in multiple offerings without
re-verification.
Claim topics must be registered in the platform before modules can validate
them. The identity registry maintains a canonical mapping of topic IDs to topic
names and descriptions.
Navigate to Platform Settings > Compliance > Claim Topics to
review registered topics. Standard topics include:
Topic name
Topic ID
Purpose
Required by
KYC_VERIFIED
1
Basic identity verification
Most modules
AML_VERIFIED
2
Anti-money laundering check
Most modules
ACCREDITED_INVESTOR
42
US accredited investor status
Reg D offerings
QUALIFIED_PURCHASER
43
US qualified purchaser status
3(c)(7) funds
COUNTRY
100
Country of residence
Geographic modules
INVESTOR_TYPE
101
Individual/institutional
Type-based rules
PEP_STATUS
10
Politically exposed person flag
AML screening
CONTRACT_ENTITY
50
Smart contract entity
Institutional flows
If your modules reference topics not in this list, add them before deploying.
Click Add Topic, enter the topic ID, name, and description, then save. Claim
issuers can then begin issuing claims for the new topic.
The compliance dashboard includes a "Claim Status" panel showing claim issuance
rates, expiration rates, and current active claims by topic. This helps you
monitor identity registry health and identify potential compliance issues before
they block transactions.
Watch for:
Claim expiration spikes — Large numbers of claims expiring simultaneously
may indicate an issuance batch that will expire together, potentially blocking
many investors
Low issuance rates — If claim issuance drops, new investors may be stuck
in onboarding
Unbalanced topic coverage — If KYC claim count significantly exceeds AML
claim count, some investors may have incomplete verification
Set up alerts in the observability dashboard to notify you when claim expiration
affects more than 10% of your investor base, giving you time to coordinate
re-verification before compliance issues arise.
After successful testing, you're ready to deploy your compliance configuration
to the production token. This is a critical operation that immediately affects
all token transfers, so follow the deployment checklist carefully.
Once checklist items are complete, deploy modules to your production token.
Navigate to production token: Asset Management > Tokens >
[Production Token]
Go to Compliance tab
Click Import Configuration
Select your test token configuration from the dropdown
Review each module and its parameters carefully—this is your last chance to
catch errors
Click Deploy to Production
Sign the transaction with your admin wallet
Wait for blockchain confirmation (30-45 seconds depending on network)
Verify modules appear in Active Modules list with correct parameters
The deployment transaction adds each module to your token's compliance contract
in sequence. Once confirmed, all subsequent transfers immediately enforce the
new rules.
Immediately after deployment, run verification tests to confirm modules are
active and functioning correctly.
Blockchain verification: Check module configuration using a blockchain
explorer
Navigate to your token's compliance contract
Call getModules() to verify all expected modules are present
For each module, call its configuration getters to verify parameters
Positive test: Execute a test transfer with a known compliant investor
Transfer should succeed
Check transaction logs for compliance evaluation events
Verify observability dashboard captured the evaluation
Negative test: Attempt a test transfer with a known non-compliant
investor
Transfer should revert with appropriate error message
Check that error message clearly indicates which module rejected
Verify observability dashboard logged the violation
Observability verification: Review compliance metrics in real-time
Navigate to Observability > Compliance Dashboard
Confirm evaluation metrics are incrementing with each transfer
Check that rejection reasons are being categorized correctly
Verify alert rules are active and thresholds are appropriate
User experience verification: Test investor-facing error messages
Attempt a blocked transfer from the dApp interface
Confirm error message is clear and actionable
Verify message explains which requirement is not satisfied
If any verification step fails, immediately investigate using the observability
dashboard and compliance logs. In rare cases where configuration is critically
wrong, you can disable individual modules or deploy an updated configuration to
fix issues.
Rejection rate by module — Which modules reject most frequently (helps
tune configuration)
Rejection rate by reason — Specific failure reasons (e.g., "Country
blocked", "Claim expired")
Navigate to Observability > Compliance > Metrics to access
this panel.
Violation tracking panel
The violation tracking panel logs every rejected transfer with full context:
Timestamp and transaction hash
From and to addresses
Module that rejected the transfer
Specific rejection reason
Investor OnchainID and claim status at evaluation time
Use this panel to investigate compliance issues reported by investors. Search by
address or transaction hash to see exactly why a transfer was blocked.
Navigate to Observability > Compliance > Violations to access
this panel.
Claim status dashboard
The claim status dashboard monitors identity registry health:
Active claims by topic and issuer
Claim expiration timeline (shows claims expiring in next 7/30/90 days)
Claim issuance rate trends
Issuer performance metrics
Watch this dashboard to anticipate compliance issues before they block
transfers. Set up alerts for claim expiration affecting more than 10% of
holders.
Navigate to Observability > Identity > Claims to access this
panel.
Start minimal and add modules only as regulations require. Each additional
module increases gas costs and complexity for every transfer. Work closely with
legal counsel to identify mandatory requirements versus nice-to-have
restrictions.
Layer modules gradually, testing each addition independently before combining.
This makes debugging easier and helps you understand interactions between
modules. For example, deploy country restrictions first, validate they work
correctly, then add identity verification as a second layer.
Document the regulatory rationale for each module in your compliance
documentation. This creates an audit trail showing that your configuration
directly implements regulatory requirements. Record which regulation, article,
or section each module satisfies.
Review your configuration quarterly as regulations evolve. Set calendar
reminders to reassess module selection and parameters. New regulations may
require additional modules, while others may become unnecessary as laws change.
Store module configurations in version control alongside your smart contracts.
Create a compliance-config.json file for each token documenting current module
parameters, deployment date, and change history. This provides an audit trail
and enables rapid rollback if needed.
Log all configuration changes with justification in your compliance management
system. Record who made the change, why it was necessary, what regulation
required it, and evidence of testing before deployment.
Maintain a rollback plan for emergency configuration changes. Document the
procedure for disabling problematic modules and have wallet access prepared for
rapid response. Test your rollback procedure during initial deployment to verify
it works under pressure.
Keep a test environment that mirrors production configuration. Before deploying
any configuration change to production, deploy and test in your mirror
environment first. This catches errors before they affect live tokens.
Achieve comprehensive test coverage by systematically working through all module
combinations. If you have N modules, create test cases for each module
individually, then test pairwise interactions, then test the full combination.
This identifies conflicts between modules.
Test boundary conditions explicitly. For investor count limits, test at exactly
the limit (N-1, N, N+1 transfers). For time locks, test transfers at exactly the
expiration timestamp. For supply caps, test minting exactly to the cap. Edge
cases reveal configuration errors.
Verify appropriate error messages for each rejection reason. Error messages
should clearly state which requirement failed and what action the investor
should take. Test from the investor perspective—can they understand and resolve
the error?
Measure gas costs during testing to estimate operational expenses. Track gas
consumption for compliant transfers (all modules approve) and rejected transfers
(early module rejects). This helps you estimate transaction costs and optimize
module ordering.
Define an emergency response process for urgent compliance changes. Document who
has authority to deploy emergency configuration changes, under what
circumstances emergency changes are permitted, and required post-deployment
reviews. Practice this procedure during initial deployment.
Set up monitoring alerts for compliance violation patterns. Alert when rejection
rates exceed normal baselines (e.g., rejection rate > 10%), when specific
modules start rejecting frequently, or when claim expiration affects multiple
investors simultaneously.
Provide clear investor guidance on claim requirements. Publish eligibility
criteria, claim acquisition procedures, and common error resolution steps.
Proactively communicating requirements reduces support burden and improves
investor experience.
Conduct monthly audits reviewing compliance effectiveness. Analyze rejection
patterns to identify configuration issues or investor confusion. Review claim
issuance and expiration trends. Assess whether modules are achieving regulatory
objectives without unnecessary friction.
Subscribe to regulatory news for your jurisdictions. Regulations evolve
constantly—MiCA, Reg D, and other frameworks receive amendments and interpretive
guidance. Set up alerts from regulatory agencies and industry associations to
catch changes early.
Symptom: You deployed a module but transfers aren't being evaluated by it.
Diagnosis steps:
Check transaction status—verify the configuration transaction confirmed
on-chain
Verify module binding—call getModules() on compliance contract to ensure
module is in the list
Review module order—earlier modules can short-circuit evaluation before later
modules execute
Clear cache—some dApp views cache module configuration for 5 minutes; wait
and refresh
Solution: Most commonly, the module wasn't properly added to the compliance
contract's module array. Redeploy the configuration, carefully watching for
transaction confirmation. Check the observability dashboard's transaction log to
see if the ModuleAdded event was emitted.
Symptom: Transfers are rejected even though investors appear to have all
required claims.
Diagnosis steps:
Verify claim presence—use the identity explorer to inspect investor's
OnchainID and confirm required claims are present
Check claim expiration—expired claims are treated as non-existent; verify
claim expiration timestamps
Confirm issuer trust—verify the claim issuer is registered as a trusted
issuer for this token
Review expression logic—complex SMART expressions may have unintended logical
outcomes
Test in simulator—use the compliance simulator to get detailed
module-by-module evaluation
Solution: Most commonly, claims have expired or the claim issuer isn't
trusted for the token. Check the compliance dashboard's "Claim Status" panel to
see claim expiration dates. If claims are expired, coordinate with the claim
issuer to issue updated claims. If the issuer isn't trusted, add them to the
trusted issuer list in identity registry settings.
Symptom: Transfers consume excessive gas (e.g., >500,000 gas), making the
token expensive to use.
Diagnosis steps:
Count active modules—each module adds gas cost; more modules = higher cost
Identify state-writing modules—modules that track counts or timestamps cost
more than read-only modules
Analyze expression complexity—SMART expressions with many operators consume
more gas
Review module order—placing cheap modules first can save gas on rejected
transfers
Solution: Optimize by consolidating modules where possible (e.g., combining
multiple SMART expressions into one complex expression), simplifying complex
expressions, reordering modules to put low-cost, high-rejection modules first
(to fail fast), or implementing pre-flight checks to avoid submitting
transactions that will fail.
Symptom: Pre-flight validation approves a transfer but on-chain execution
reverts, or vice versa.
Diagnosis steps:
Check data freshness—API cache may be stale compared to current on-chain
state
Verify timestamp consistency—time lock modules depend on block timestamp,
which changes between pre-flight and execution
Review claim state changes—claims may have expired or been revoked between
pre-flight and execution
Confirm module version alignment—ensure API validation uses same module
implementation as on-chain
Solution: Most commonly, state changed between pre-flight check and
execution. Reduce the time window between pre-flight and execution. Consider
implementing claim status polling immediately before transaction submission. For
time-sensitive modules, display countdown timers to users showing when time
locks will expire.
For additional help, see
Compliance troubleshooting for
detailed debugging procedures and common error codes.