Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Guides

How to Implement a Tiered KYC/AML Verification System

A developer-focused tutorial on designing and coding a risk-based verification system with multiple user tiers, identity provider integration, and programmable transaction limits.
Chainscore © 2026
introduction
DEVELOPER GUIDE

How to Implement a Tiered KYC/AML Verification System

A practical guide for Web3 developers to build a risk-based, multi-level identity verification system that balances user privacy with regulatory compliance.

A tiered KYC/AML system structures user verification into multiple levels, each with escalating requirements and permissions. This approach, also known as risk-based verification, is fundamental for DeFi protocols, exchanges, and NFT platforms to comply with regulations like the Travel Rule and MiCA without imposing a one-size-fits-all burden. The core principle is simple: higher-risk activities or larger transaction volumes require stronger proof of identity. A common structure includes Tier 0 (unverified, limited access), Tier 1 (email/phone, basic limits), Tier 2 (government ID, higher limits), and Tier 3 (proof of address, source of funds, institutional access).

Implementing the system starts with defining clear risk parameters and tier thresholds. You must decide the transaction limits, functionality access (e.g., withdrawals, trading pairs), and staking caps for each tier. For example, a DEX might allow Tier 0 users to swap up to $1,000 daily, while Tier 2 verification is required for limit orders or accessing leveraged products. These rules should be encoded into your application's logic, often within access control modifiers in your smart contracts or middleware. It's critical to document these thresholds transparently for users.

The technical architecture typically involves off-chain verification providers and on-chain status tracking. Use a specialized KYC provider API (e.g., Sumsub, Onfido, Veriff) to handle the actual document collection, liveness checks, and AML screening. Upon successful verification, the provider sends a cryptographically signed claim to your backend. Your system then issues a verifiable credential or mints a non-transferable Soulbound Token (SBT) to the user's wallet address, acting as a persistent, privacy-preserving proof of their tier. The smart contract checks for this token's existence and tier level before executing restricted functions.

Here is a simplified conceptual example of an access control modifier in a Solidity smart contract that checks for a user's tier:

solidity
// Pseudocode for a tiered access modifier
modifier requireTier(address _user, uint _minTier) {
    // Interface to the SBT or verification registry contract
    IVerificationRegistry registry = IVerificationRegistry(registryAddress);
    uint userTier = registry.getTier(_user);
    require(userTier >= _minTier, "Insufficient verification tier");
    _;
}

// Function usage example
function executeHighValueTrade(uint _amount) external requireTier(msg.sender, 2) {
    // Tier 2 or higher required to call this function
    // ... trade logic
}

This pattern decouples the complex verification process from the on-chain contract logic, keeping gas costs low and compliance logic upgradeable.

Key implementation considerations include data privacy and user experience. Never store raw PII on-chain. The SBT or credential should only contain a minimal, hashed identifier. Design a clear dashboard for users to see their current tier, limits, and the steps to upgrade. Implement periodic re-verification (KYC refresh) for higher tiers, as regulatory status can change. Furthermore, integrate with AML screening services and sanctions list oracles like Chainalysis or TRM Labs to screen wallet addresses continuously, triggering tier downgrades or transaction freezes if a risk is detected post-verification.

Finally, treat your tiered system as a dynamic risk engine. Use analytics and monitoring to adjust thresholds based on real-world usage and regulatory updates. Audit your smart contract access controls and off-chain signing mechanisms regularly. By implementing a thoughtful tiered KYC/AML system, you build a more inclusive, compliant, and secure platform that can scale responsibly. For further reading, consult the FATF Guidance on Virtual Assets and the technical documentation for frameworks like Veramo for decentralized identity management.

prerequisites
PREREQUISITES AND SYSTEM DESIGN

How to Implement a Tiered KYC/AML Verification System

A tiered verification system balances user onboarding friction with regulatory compliance, allowing platforms to scale access based on risk and transaction volume.

A tiered KYC/AML system segments users into verification levels, each unlocking specific capabilities. This design is fundamental for DeFi protocols, NFT marketplaces, and centralized exchanges that must comply with regulations like the Travel Rule or MiCA while serving a global user base. Common tiers include: Tier 0 for anonymous, low-limit access; Tier 1 for basic identity verification (e.g., email, phone); Tier 2 for government ID and proof-of-address; and Tier 3 for enhanced due diligence, often required for institutional clients or high-value transactions. The system's logic must be enforced via smart contracts or backend services that check a user's verified tier before permitting actions like withdrawals or trades.

Before development, define the compliance requirements for your jurisdiction and product. A DEX aggregator may only need Tier 1 for full access, while a fiat on-ramp will require Tier 2 for bank withdrawals. Next, select your verification providers. Options range from automated services like Sumsub or Veriff for Tiers 1-2, to manual review teams or specialized providers like Chainalysis KYT for transaction monitoring in Tier 3. Your system's architecture must securely store verification status—often a hashed reference on-chain with detailed data off-chain—and map tiers to specific transaction limits (e.g., $1,000/day for Tier 1, $50,000/day for Tier 2).

The core technical design involves three components: a user-facing frontend for submitting documents, a backend verification service that interfaces with providers and manages user state, and on-chain access control. A typical flow: a user submits a passport via your app; your backend sends it to Sumsub via API, receives a verified status and risk score, and updates the user's record in your database. For on-chain enforcement, you can use a registry contract that maps user addresses to their tier. A modifier in a withdrawal contract would then check this registry: require(userTier[msg.sender] >= requiredTier, "Insufficient verification");. This ensures compliance is baked into the protocol logic.

Implementing risk-based tier promotion and demotion is crucial. Your system should automatically flag users for Tier 3 review based on triggers like a sudden 10x increase in transaction volume or transactions linked to sanctioned addresses via on-chain analysis tools. Conversely, accounts with long, compliant histories at Tier 2 might be granted higher limits without additional paperwork. All verification data must be handled with strict data privacy measures (e.g., encryption at rest, GDPR-compliant retention policies) and audit trails for regulatory examinations. Log every tier change, the reason, and the responsible admin or automated rule.

Finally, integrate continuous transaction monitoring for AML. Even a Tier 0 user interacting with your smart contract should have their public address screened against real-time risk databases. Services like TRM Labs or Elliptic offer APIs to screen addresses for links to mixers, stolen funds, or sanctioned entities. This monitoring can feed back into your tiering system, automatically downgrading a user's tier if their address is associated with a hack. The system is never static; it's a feedback loop where on-chain behavior and off-chain identity data continuously inform a user's access level and risk profile.

defining-tiers
FOUNDATION

Step 1: Defining Verification Tiers and Criteria

The first step in building a tiered KYC/AML system is to establish clear, risk-based access levels. This framework determines what users can do and what information they must provide.

A tiered verification system segments users based on their submitted credentials and assessed risk. Common models use three to five tiers. Tier 0 (Unverified) allows minimal access, like viewing a dApp. Tier 1 (Basic) typically requires an email and phone number, enabling small deposits or NFT minting. Tier 2 (Verified) mandates government ID and liveness checks, unlocking higher transaction limits. Tier 3 (Enhanced) adds proof of address or source-of-funds documentation for institutional-level access. The specific limits and requirements are defined by your compliance policy and jurisdictional regulations.

Each tier must have explicit, programmatic criteria. For a smart contract, this is a set of boolean checks. For example, a function granting access to a private sale might require isTier2Verified(user) && totalDeposits[user] < 10 ETH. Criteria can include: - KYC provider attestation (e.g., a verifiable credential from Veriff or Persona) - On-chain transaction history - Staked token balances - Whitelist status from a governance vote. The logic should be deterministic and auditable.

When defining limits, align them with real-world risk. A common framework for DeFi is the Financial Action Task Force (FATF) Travel Rule threshold, often set at $/€1000 or 1000 USD-equivalent in crypto. Transactions below this may only need Tier 1, while those above trigger Tier 2. For NFT platforms, you might set mint limits per wallet per tier. Document these rules clearly in your user agreement and ensure your frontend and smart contracts enforce them consistently to prevent regulatory arbitrage.

Implementation starts with mapping user journeys. Use a table to specify the action (e.g., 'Swap >$10k', 'Join Private Discord'), the minimum tier required, and the data needed. This becomes your product requirements. Technically, you'll need an on-chain or off-chain registry to store a user's verified tier. Many projects use Ethereum Attestation Service (EAS) or a similar registry to issue verifiable, revocable attestations that smart contracts can query. Off-chain, a simple database with user IDs and tier levels works, but requires trusted off-chain checks.

Finally, design for flexibility and compliance updates. Regulatory requirements change, so your tier definitions shouldn't be hardcoded in immutable contracts. Use an upgradeable proxy contract for the access manager or store criteria in a contract controlled by a multisig or DAO. This allows you to adjust deposit limits or add new document requirements without a full migration. Always conduct a legal review of your tier structure to ensure it meets Anti-Money Laundering (AML) and Counter-Terrorist Financing (CTF) obligations in your target markets.

IMPLEMENTATION BLUEPRINT

Example Tier Specification and Limits

A practical framework for structuring user verification tiers with specific transaction and feature limits.

Feature / LimitTier 0 (Unverified)Tier 1 (Basic KYC)Tier 2 (Enhanced KYC)Tier 3 (Full KYC)

Verification Method

None

Email + Phone (SMS OTP)

ID Document Scan + Liveness Check

Address Verification + Source of Funds

Daily Deposit Limit

$100

$1,000

$10,000

Unlimited

Withdrawal Limit (24h)

$50

$500

$5,000

$50,000

Max NFT Minting Value

$10

$250

$2,500

Unlimited

Access to DeFi Pools

TVL < $10k

Cross-Chain Bridge Usage

Max $100/tx

Max $1,000/tx

Gas Fee Subsidy

Up to $5/month

Up to $50/month

Custom Plan

Support Priority

Community

Standard

Priority

Dedicated Manager

integrating-providers
IMPLEMENTATION

Step 2: Integrating Identity Verification Providers

This guide details the technical process of integrating third-party KYC/AML providers to build a tiered verification system, moving from conceptual design to functional implementation.

A tiered KYC/AML system requires integrating specialized external providers to handle the identity verification and compliance checks. You will not build these complex checks from scratch. Instead, you select providers based on the verification levels defined in your design (e.g., Tier 1: Email/SMS, Tier 2: ID Document + Liveness, Tier 3: Source of Funds). Popular providers include Jumio for document verification, Sumsub for a full suite of KYC tools, Onfido for AI-powered checks, and Trulioo for global identity data. Your first technical task is to evaluate these providers based on their API coverage, supported document types, geographic reach, compliance certifications (like ISO 27001), and pricing model.

Integration begins by creating developer accounts with your chosen providers and obtaining API keys. You will then implement server-side API calls from your backend application to their services. A critical architectural decision is whether to use a direct integration with a single provider or an aggregator service like Persona or Veriff, which provide a unified API to multiple verification sources. Aggregators simplify switching providers and can enhance global coverage but may add cost and complexity. Your backend must securely store API keys using environment variables or a secrets manager and implement robust error handling for network timeouts and provider-side failures.

The core integration involves three key API interactions: 1) Creating a verification session, where you request a unique URL or token to redirect your user to the provider's verification flow. 2) Handling the webhook callback, where the provider sends a POST request to your specified endpoint with the verification result and extracted user data (e.g., name, date of birth, document number). 3) Querying verification status via a separate API call if needed. Your system must validate the authenticity of incoming webhooks using HMAC signatures or API keys to prevent spoofing. Below is a simplified Node.js example for handling a Sumsub webhook:

javascript
app.post('/webhook/sumsub', async (req, res) => {
  const signature = req.headers['x-payload-digest'];
  const isValid = verifySignature(signature, req.body, YOUR_SECRET);
  if (!isValid) return res.status(401).send('Invalid signature');

  const { applicantId, reviewStatus } = req.body;
  // Update user's KYC tier in your database based on 'reviewStatus' (e.g., 'completed', 'pending')
  await User.updateOne(
    { sumsubApplicantId: applicantId },
    { kycStatus: reviewStatus, kycTier: 2 }
  );
  res.status(200).send('Webhook processed');
});

After receiving a successful verification result, your application logic must map the provider's response to your internal user model and update the user's KYC tier. For example, a successful ID and liveness check from Jumio would elevate a user from Tier 0 to Tier 2. You should store the verification timestamp, provider's unique applicant ID, and the evidence (like a link to the verified document image, stored securely with the provider) in your database for audit trails. It is essential to implement idempotency in your webhook handler to avoid processing the same verification event multiple times, which could incorrectly update a user's tier.

Finally, consider the user experience flow. For higher tiers (Tier 2+), you will typically redirect users to the provider's hosted verification page via a secure link. Ensure your frontend can gracefully handle the callback redirect back to your application, displaying the updated verification status. You should also build an admin dashboard to manually review edge cases flagged by the provider (e.g., "review.pending" status) and to override or escalate verifications as needed, maintaining human oversight for the automated system.

verification-providers
IMPLEMENTATION GUIDE

KYC Provider Comparison and Tools

A technical overview of tools and methodologies for building a risk-based, multi-tiered identity verification system on-chain.

01

Risk-Based Tiering Frameworks

A tiered KYC system segments users based on risk and transaction volume. Common tiers include:

  • Tier 0 (Anonymous): Read-only access, no verification required.
  • Tier 1 (Basic): Email/SMS verification for low-value deposits/withdrawals.
  • Tier 2 (Intermediate): Government ID verification (e.g., passport, driver's license) and proof-of-address for higher limits.
  • Tier 3 (Enhanced): Video verification, source-of-funds checks, and biometrics for institutional-level access. Implement logic in your smart contracts or backend to check a user's verified tier before authorizing actions.
02

On-Chain vs. Off-Chain Verification

Decide where to store verification status and proofs.

  • Off-Chain (Centralized): Verification data is held by your provider (e.g., Sumsub, Jumio). Your backend issues a signed attestation or JWT. Store only a minimal proof, like a cryptographic hash of the user's verified ID, on-chain for auditability.
  • On-Chain (Decentralized): Use verifiable credentials (VCs) or zero-knowledge proofs (ZKPs). Protocols like World ID or Sismo allow users to prove aspects of their identity (e.g., uniqueness, citizenship) without revealing the underlying data. This is ideal for privacy-preserving compliance.
06

Implementation Checklist

Steps to build your tiered system:

  1. Define Tiers & Limits: Map transaction types (deposit, trade, withdraw) to required verification tiers.
  2. Choose Providers: Select a mix of traditional (Sumsub/Jumio) and decentralized (World ID) tools based on your compliance needs.
  3. Architect Data Flow: Design how verification results are stored (off-chain DB, on-chain attestation hash) and accessed by your smart contracts.
  4. Implement Access Control: Use OpenZeppelin's AccessControl or custom modifiers to restrict functions based on user tier.
  5. Audit & Comply: Ensure your logic adheres to relevant regulations (e.g., Travel Rule for transfers > $3k) and undergoes a smart contract security audit.
data-privacy-architecture
DATA PRIVACY AND SECURITY

How to Implement a Tiered KYC/AML Verification System

A tiered KYC/AML system balances user privacy with regulatory compliance by applying verification requirements proportionate to risk and transaction size.

A tiered KYC/AML verification system applies different levels of scrutiny based on a user's activity, such as deposit size, withdrawal frequency, or transaction volume. This risk-based approach is a core principle of modern compliance frameworks like the Financial Action Task Force (FATF) recommendations. The typical tiers are: Tier 0 (anonymous/low-limit), Tier 1 (basic identity), Tier 2 (address verification), and Tier 3 (enhanced due diligence). This structure allows platforms to serve a broad user base while focusing intensive resources on high-risk actors, improving both user experience and operational efficiency.

Designing the system starts with defining clear risk parameters and tier thresholds. For a DeFi protocol or exchange, this involves setting transaction limits for each tier. For example, Tier 0 may allow deposits up to $1,000 with only an email, Tier 1 requires a government ID for withdrawals over $10,000, and Tier 3 triggers for transactions over $100,000 or from high-risk jurisdictions. These rules should be codified in smart contracts or backend logic to automate enforcement. Use oracles like Chainlink to fetch real-world data for sanctions list checks or to verify proof-of-address documents.

User data must be handled with maximum security and minimal retention. Never store raw Personally Identifiable Information (PII) like ID scans on-chain. Instead, use a privacy-preserving architecture: collect and encrypt PII in a secure, off-chain database, then store only cryptographic proofs (e.g., zero-knowledge proofs) or hashes of verification status on-chain. Services like zkPass or Sismo enable users to generate ZK proofs of their KYC status without revealing the underlying data. For traditional verification, partner with specialized providers like Sumsub or Veriff via their APIs, ensuring they are GDPR/CCPA compliant.

The backend logic must manage state transitions between tiers. Implement a user entity with attributes like verificationTier, cumulativeVolume, and lastVerifiedDate. Smart contracts for core functions (e.g., a vault for withdrawals) should include modifiers that check verificationTier against the requested amount. For example:

solidity
require(userTier[msg.sender] >= requiredTierForAmount, "Insufficient KYC tier");

Automate tier escalation by tracking transaction volumes via event listeners and updating user state. Always include manual override functions for compliance officers, protected by multi-signature wallets.

For regulatory reporting, maintain secure, auditable logs of verification actions and tier changes. Implement differential privacy techniques when aggregating data for analytics to prevent re-identification. Clearly communicate the data lifecycle to users—what is collected, why, how long it's kept, and when it's deleted. A tiered system must be dynamic; regularly review and adjust thresholds based on regulatory changes and risk assessments. Finally, conduct periodic security audits on both smart contracts and the off-chain data infrastructure to prevent breaches of sensitive user information.

enforcing-limits
IMPLEMENTATION

Step 4: Enforcing Tier-Based Limits in Code

This guide details the on-chain logic for enforcing transaction limits based on user verification tiers within a smart contract.

The core of a tiered KYC/AML system is the on-chain contract that validates every transaction against a user's verified status. This requires a mapping from user address to a VerificationTier enum (e.g., Unverified, Tier1, Tier2) and a data structure defining the limits for each tier. A common pattern is to store this configuration in a struct, making it upgradeable by a contract owner. For example, TierLimits could contain fields for maxDailyVolume, maxTransactionAmount, and allowedDestinations. This separation of user state and system configuration is a key design principle for maintainable compliance logic.

For each transfer function, you must implement a modifier or internal function that performs the tier check. The logic typically follows these steps: 1) Fetch the user's currentTier from storage. 2) If the tier is Unverified, revert the transaction. 3) Retrieve the TierLimits for the user's tier. 4) Validate that the transaction amount does not exceed limits.maxTransactionAmount. 5) Check cumulative daily volume using a tracking mechanism (like a mapping of user => day => volume) against limits.maxDailyVolume. 6) Optionally, verify the recipient address is not on a blocked list or is within allowedDestinations. A failed check at any point should revert with a clear error message.

Implementing daily volume tracking requires a reliable time source. While block.timestamp is commonly used, it can be manipulated by miners within a small range. For high-value systems, consider using a decentralized oracle like Chainlink for more robust timekeeping. The tracking logic involves calculating a unique key for the user and the current day (e.g., keccak256(abi.encodePacked(user, block.timestamp / 1 days))), then incrementing a stored volume counter for that key before the transfer. You must ensure this counter is updated in the same transaction to prevent reentrancy attacks that could bypass the limit.

Here is a simplified Solidity code snippet illustrating the core check within a modifier:

solidity
modifier checkTierLimit(address user, uint256 amount) {
    VerificationTier tier = userTier[user];
    require(tier != VerificationTier.Unverified, "User not verified");
    
    TierLimits storage limits = tierLimits[tier];
    require(amount <= limits.maxTxAmount, "Amount exceeds tier limit");
    
    uint256 today = block.timestamp / 1 days;
    bytes32 dailyKey = keccak256(abi.encodePacked(user, today));
    require(
        dailyVolume[dailyKey] + amount <= limits.maxDailyVolume,
        "Daily volume limit exceeded"
    );
    
    _; // Execute the function
    
    dailyVolume[dailyKey] += amount; // Update storage after execution
}

Note the use of the Checks-Effects-Interactions pattern, updating storage after the main function logic (_) to prevent reentrancy.

Finally, the system needs administrative functions to manage user tiers and update limit configurations. These functions (e.g., setUserTier, updateTierLimits) must be protected by access control, typically using OpenZeppelin's Ownable or AccessControl contracts. Emitting events for tier changes and limit updates is crucial for off-chain monitoring and audit trails. For production systems, consider implementing a time-delay or multi-signature requirement for critical configuration changes to add an extra layer of security against administrative key compromise.

TIERED KYC/AML SYSTEMS

Implementation FAQ and Troubleshooting

Common technical questions and solutions for developers implementing tiered verification systems on-chain.

A tiered KYC/AML system is a modular framework that segments user verification into distinct levels, each granting escalating access to protocol features. It works on-chain by linking a user's wallet address to a verified identity credential, which is then checked against a smart contract's permission rules.

Core components include:

  • Verification Oracles: Off-chain services (e.g., Persona, Veriff) that attest to a user's identity and issue a verifiable credential (VC) or signed attestation.
  • Registry Contracts: On-chain smart contracts (like EAS or a custom registry) that store or verify the attestation linked to a user's address.
  • Gating Logic: Access control modifiers (e.g., OpenZeppelin's AccessControl) in your dApp's contracts that check the registry for a user's verification tier before allowing specific functions (e.g., higher withdrawal limits, minting).

This structure separates the sensitive identity verification process from the public blockchain, storing only the proof of verification on-chain.

compliance-resources
TIERED KYC/AML SYSTEMS

Compliance Frameworks and Resources

A modular approach to user verification that balances security, user experience, and regulatory requirements. These resources help you implement risk-based onboarding.

conclusion-next-steps
IMPLEMENTATION SUMMARY

Conclusion and Next Steps

You have now explored the architecture and implementation of a tiered KYC/AML verification system for Web3 applications. This guide covered the core components, from smart contract logic to frontend integration.

A well-designed tiered KYC system balances compliance requirements with user experience. By implementing distinct verification levels—such as BASIC, INTERMEDIATE, and FULL—you can gate access to specific protocol functions, like higher withdrawal limits or governance voting, based on verified user identity. This modular approach allows projects to comply with regulations like the EU's MiCA or FATF Travel Rule without creating unnecessary friction for all users. The key is to make the verification process transparent and the data handling secure, using on-chain attestations or zero-knowledge proofs where possible.

For production deployment, consider these critical next steps. First, audit your smart contracts with a reputable firm like OpenZeppelin or Trail of Bits to ensure the access control logic and data handling are secure. Second, integrate with a specialized KYC provider such as Sumsub, Veriff, or Onfido via their APIs to handle the actual identity document verification and liveness checks; avoid building this complex component in-house. Third, implement a robust off-chain database or use a decentralized storage solution like Ceramic Network or Tableland to manage sensitive user data, linking it to on-chain user addresses via secure hashes.

Finally, continuously monitor and update your system. Regulatory landscapes evolve, and so do attack vectors. Establish a process for managing verification status updates and revocations. Consider implementing a time-based re-verification requirement for higher tiers. For further learning, review the compliance guides from the DeFi Compliance Forum and explore identity primitives like Worldcoin's World ID, Polygon ID, or Ethereum Attestation Service (EAS) for more decentralized approaches to credential management.

How to Build a Tiered KYC/AML System for Crypto | ChainScore Guides