Skip to Content
Native FeaturesCompliance & KYC

Compliance & KYC System

TOS provides a protocol-level KYC (Know Your Customer) system that enables decentralized identity verification while maintaining user privacy. Inspired by BrightID’s privacy-first approach, TOS stores only minimal verification metadata on-chain while full KYC data is managed off-chain by regional security committees.

Implementation Status

FeatureStatus
Core Data Structures (14)Implemented
Transaction Types (9)Implemented
Verification Logic (9)Implemented
Smart Contract Syscalls (6)Implemented
RPC Interface (10)Implemented
Unit Tests (95+)Implemented
E2E Tests (14)Implemented

Design Philosophy

ON-CHAIN (43 bytes) OFF-CHAIN (Committee DB) ------------------------ --------------------------- level: u16 (2 bytes) <-hash-> region: KycRegion status: u8 (1 byte) country: [u8; 2] (ISO) verified_at: u64 (8 bytes) expires_at: u64 data_hash: Hash (32 bytes) committee_id: Hash approver: PublicKey signature: Signature documents: Vec<DocRef>

Key Principles:

  • Minimal On-Chain Data: Only 43 bytes stored per user
  • Privacy First: No PII or country data on blockchain
  • Committee-Based Verification: Regional security committees manage KYC
  • Smart Contract Integration: Contracts can gate access by KYC level

KYC Level System

TOS uses a cumulative bitmask system where each bit represents a completed verification item. Higher tiers require all previous verifications.

Verification Tiers

TierNameLevelVerificationsDaily Limit
0Anonymous0None$100
1Basic7Email + Phone + Basic Info$1,000
2Identity Verified31+ Government ID + Liveness$10,000
3Address Verified63+ Proof of Address$50,000
4Source of Funds255+ SOF + SOW$200,000
5Enhanced DD2047+ Background + Screening + UBO$1,000,000
6Institutional8191+ Company + DirectorsCustom
7Audit Complete16383+ Compliance AuditNo Limit
8Regulated32767+ Financial LicenseNo Limit

Verification Items (Bitmask)

// Basic Individual Verification (bit 0-4) EMAIL = 1 << 0 // 1 - Email verification PHONE = 1 << 1 // 2 - Phone verification BASIC_INFO = 1 << 2 // 4 - Basic info (name, DOB) GOV_ID = 1 << 3 // 8 - Government ID LIVENESS = 1 << 4 // 16 - Face/liveness check // Enhanced Verification (bit 5-7) ADDRESS = 1 << 5 // 32 - Proof of address SOF = 1 << 6 // 64 - Source of funds SOW = 1 << 7 // 128 - Source of wealth // Due Diligence (bit 8-10) BACKGROUND = 1 << 8 // 256 - Background check SCREENING = 1 << 9 // 512 - PEP/sanctions screening UBO = 1 << 10 // 1024 - Ultimate beneficial owner // Institutional (bit 11-14) COMPANY = 1 << 11 // 2048 - Company registration DIRECTORS = 1 << 12 // 4096 - Directors/shareholders AUDIT = 1 << 13 // 8192 - Compliance audit LICENSE = 1 << 14 // 16384 - Financial license

Security Committee Structure

KYC verification is managed by a hierarchical committee system:

Global Committee | +-----------------+-----------------+ | | | Asia Pacific Europe Americas | | | +----+----+ +----+----+ +----+----+ | | | | | | | | | JP SG AU UK DE FR US CA BR

Committee Roles

RoleCapabilities
ChairFull governance, can initiate all operations
Vice ChairCan initiate most operations except dissolve
MemberCan vote on operations
ObserverView-only, no voting rights

Multi-Signature Approval

KYC operations require M-of-N committee approval:

OperationThreshold
Set/Renew KYCkyc_threshold (2-3 members)
Revoke KYCkyc_threshold
Emergency Suspend2 members
Add/Remove Member>= 2/3 majority
Update Threshold>= 2/3 majority
Dissolve Committee>= 2/3 majority

Transaction Types

TransactionType IDDescription
SetKyc10Set or update KYC level
RevokeKyc11Revoke KYC status
RenewKyc12Renew expired KYC
TransferKyc13Transfer KYC to new committee
BootstrapCommittee14Create Global Committee (one-time)
RegisterCommittee15Register regional committee
UpdateCommittee16Update committee settings
AppealKyc17Appeal KYC decision
EmergencySuspend1824-hour emergency suspension

Smart Contract Integration

Syscalls

SyscallGasDescription
tos_has_kyc500 CUCheck if user has KYC
tos_get_kyc500 CUGet full KYC data
tos_get_kyc_level500 CUGet level bitmask
tos_get_kyc_tier500 CUGet tier (0-8)
tos_is_kyc_valid500 CUCheck validity
tos_meets_kyc_level500 CUCheck level requirement

Example: KYC-Gated DeFi

use tako_sdk::*; #[no_mangle] pub extern "C" fn deposit() { let user = get_tx_sender(); let amount = get_call_value(); // Require Identity Verified (Tier 2) for deposits > $1000 if amount > 1000_00000000 { let meets_req = tos_meets_kyc_level(&user, 31) .expect("KYC check failed"); if !meets_req { panic!("KYC Tier 2 required for large deposits"); } } // Process deposit... }

Example: Tiered Access Control

use tako_sdk::*; fn get_user_limit(user: &Address) -> u64 { let tier = tos_get_kyc_tier(user).unwrap_or(0); match tier { 0 => 100_00000000, // $100 1 => 1_000_00000000, // $1,000 2 => 10_000_00000000, // $10,000 3 => 50_000_00000000, // $50,000 4 => 200_000_00000000, // $200,000 5 => 1_000_000_00000000, // $1,000,000 _ => u64::MAX, // Unlimited } } fn check_transfer_limit(user: &Address, amount: u64) -> bool { let limit = get_user_limit(user); amount <= limit }

RPC Endpoints

EndpointDescription
POST /has_kycCheck if user has KYC
POST /get_kycGet KYC data
POST /get_kyc_tierGet tier (0-8)
POST /is_kyc_validCheck validity
POST /meets_kyc_levelCheck level requirement
POST /get_verifying_committeeGet verifying committee
POST /get_committeeGet committee details
POST /get_global_committeeGet Global Committee
POST /get_kyc_batchBatch query (up to 100)
POST /list_committeesList committees with filtering

Example: Query KYC Status

// Check user's KYC tier const response = await fetch('/get_kyc_tier', { method: 'POST', body: JSON.stringify({ address: userAddress }) }); const { tier } = await response.json(); // Check if user meets requirement const meetsReq = await fetch('/meets_kyc_level', { method: 'POST', body: JSON.stringify({ address: userAddress, required_level: 31 // Tier 2: Identity Verified }) }).then(r => r.json());

Regulatory Compliance

TOS KYC is designed to meet international regulatory standards:

StandardTOS Support
FATF Travel RuleTier 2+ for >= $1,000
EU MiCAFull compliance
US FinCEN$3,000 threshold
Japan FSAAll transactions

FATF Travel Rule Thresholds

RegionThresholdRequired Tier
FATF Standard$1,000Tier 2
United States$3,000Tier 2
European UnionEUR 1,000Tier 2
JapanAll transactionsTier 2
SingaporeSGD 1,500Tier 2

TOS provides the infrastructure for KYC verification. DApps building on TOS are responsible for implementing appropriate compliance measures for their jurisdiction.

Data Structure

/// On-chain KYC data (43 bytes) pub struct KycData { /// KYC level bitmask (u16) pub level: u16, /// Status: Active, Expired, Revoked, Suspended pub status: KycStatus, /// Verification timestamp pub verified_at: u64, /// Hash of off-chain data pub data_hash: Hash, } /// KYC status pub enum KycStatus { Active = 0, Expired = 1, Revoked = 2, Suspended = 3, }

Appeal Process

Users can appeal KYC decisions to the parent committee:

  1. File Appeal: Submit AppealKyc transaction with reason and documents
  2. Committee Review: Parent committee reviews the appeal
  3. Decision: Approved, Rejected, or referred to higher committee
  4. Resolution: KYC status updated based on decision

Appeals require a fee and must be filed within 30 days of the original decision.

See Also

Last updated on