ByAUJay
Implement ERC-3643 with identity-driven controls, modular compliance, and upgradeable contracts to ship regulated RWAs on EVM with audit-ready evidence and measurable ROI. This playbook shows exactly how Enterprise teams can meet SOC2/procurement gates while delivering investor-grade UX at mainnet speeds.
Implementing ERC-3643 for Compliant Security Tokens
Audience: Enterprise (banks, broker-dealers, transfer agents, asset managers). Required keywords woven throughout: SOC2, procurement, ROI.
Pain
Your legal/compliance team won’t sign off on “vanilla ERC‑20.” You need:
- Per‑jurisdiction transfer rules (OFAC/FATF alignment).
- Investor eligibility checks (KYC, accreditation) without storing PII onchain.
- Lockups, max holder caps, forced transfer and key‑loss recovery.
- Audit evidence for SOC2 and infosec procurement.
- Zero downtime upgrades as rules change.
Your dev team is stuck gluing KYC APIs to ad‑hoc allowlists, while product is missing dates because every edge case (lost keys, jurisdiction changes, corporate actions) becomes a one‑off migration.
Agitation
- Missed go‑lives: bespoke “compliance tokens” break in UAT when a simple cross‑border transfer fails due to a hardcoded country list. Rework adds months.
- Regulatory risk: storing PII onchain violates retention/erasure policies; a single misstep can halt trading, force a recall, or trigger enforcement.
- Vendor lock‑in: platform SDKs hide identity logic; you can’t switch KYC providers without contract redeploys and holder re‑onboarding.
- Cost overrun: every rule tweak means a redeploy; gas spikes during distribution windows; support tickets pile up after key loss events.
- Procurement friction: no standard, no audits, no upgrade path. Security and vendor‑risk committees block the SOW.
Solution
7Block Labs implements ERC‑3643 end‑to‑end with a technical but pragmatic blueprint that maps directly to ROI and procurement.
Why ERC‑3643
ERC‑3643 (code‑name T‑REX) is the Ethereum‑approved standard for permissioned security tokens. It adds identity‑driven eligibility and modular compliance around an ERC‑20‑compatible core: Identity Registry, Trusted Issuers Registry, Claim Topics Registry, and a Compliance contract that runs pre‑transfer checks. It supports pausing, freezing, forced transfers, key‑loss recovery, and batched operations. The EIP is FINAL and audited implementations exist. (eips.ethereum.org)
The protocol is built around ONCHAINID (ERC‑734/735 identities) so only investors with valid claims (KYC/AML/accreditation) can hold/receive tokens; claim topics and trusted issuers are configured per offering. (docs.erc3643.org)
For production hygiene, the reference stack ships with audited factories/gateways and supports upgradeable patterns (UUPS/Beacon), letting you evolve rules without re‑issuing the instrument. (docs.erc3643.org)
Adoption is real: the ERC3643 association cites multi‑billion RWA issuance, third‑party audits, and active ecosystem governance, with an ISO standardization initiative underway since November 2025. (erc3643.org)
7Block’s Implementation Blueprint
We deliver ERC‑3643 with your compliance office at the table, structured for SOC2 evidence and Enterprise procurement.
- Contract topology (least‑surprise architecture)
- Token (IERC3643): ERC‑20‑compatible with conditional transfer/transferFrom.
- IdentityRegistry (+Storage): maps wallet→ONCHAINID→ISO‑3166 country and performs isVerified().
- TrustedIssuersRegistry + ClaimTopicsRegistry: define the “who can issue” and “what claims are required.”
- Compliance (ModularCompliance): canTransfer() enforces non‑identity rules (e.g., lockups, per‑country caps, max holdings) via plug‑in modules. (eips.ethereum.org)
- Identity flow (no onchain PII)
- KYC provider issues verifiable claims; ONCHAINID stores claim pointers/signatures, not personal data. Issuers expose isClaimValid() and can revoke without touching the holder. Result: eligibility proofs onchain, data off‑chain. (docs.onchainid.com)
- Zero‑knowledge KYC (optional, recommended)
- Integrate ZK‑proof flows (Polygon ID, Sismo, zkMe) so investors prove “over 18,” “US accredited,” or “non‑sanctioned” without revealing PII. We verify proofs in the compliance path or off‑chain gate, minting a binary eligibility NFT if needed. (blog.zk.me)
- Upgradeability and factories
- Use official TREXFactory/TREXGateway (audited) for single‑transaction deployment with correct wiring and upgradability via UUPS/Beacon. (docs.erc3643.org)
- Operational controls
- Owner/Agent roles (ERC‑173) mapped to business functions (transfer agent, custodian); freezing/forcedTransfer and recovery flows documented for controls testing. (eips.ethereum.org)
- Gas and throughput
- Batch mint/distribution; pre‑flight checks via callStatic canTransfer/isVerified; L2 preference for primary issuance; isolate per‑offering Compliance to minimize state bloat. (eips.ethereum.org)
- SOC2/Procurement artifacts
- Threat model, code lineage to official EIPs, audit reports, change management (Beacon/UUPS), logging/monitoring (reason‑coded reverts), and regulator‑friendly data‑flow diagrams (PII off‑chain; hashes/claims onchain). (eips.ethereum.org)
You can mix in our custom blockchain development services for greenfield builds, our security audit services for pre‑launch hardening, and our blockchain integration to map KYC/transfer‑agent systems. For productization, we ship full lifecycle tooling via smart contract development and asset tokenization.
Practical Examples (with exact mechanics)
Example A — U.S. Reg D equity with 12‑month lockup and accreditation
Requirements
- Eligible only if KYC+AML+Accredited claims present.
- U.S.‑only holders; 12‑month resale restriction; ≤10% ownership cap.
Implementation
- ClaimTopicsRegistry = [KYC, AML, ACCREDITED]; TrustedIssuersRegistry = your KYC vendor + backup issuer; country code = US via IdentityRegistry mapping.
- Compliance modules: LockupModule (time‑based), MaxOwnershipModule (≤10%), CountryAllowModule (US only). (ercs.ethereum.org)
Pre‑transfer check pattern
function _preflight(address from, address to, uint256 amt) internal view { require(!paused(), "paused"); require(!_frozen[from] && !_frozen[to], "frozen"); require(_tokenIdentityRegistry.isVerified(to), "receiver not verified"); // KYC/AML/Accredited via claims require(_tokenCompliance.canTransfer(from, to, amt), "compliance failed"); // lockup, caps, country }
Tokens are distributed in batch mint; agents can forcedTransfer in corporate actions; recovery path is documented for SOC2 controls. (eips.ethereum.org)
Example B — EU retail fund (MiFID II aligned) with per‑investor concentration cap
Requirements
- EU/EEA investors; retail classification allowed; per‑investor max balance to manage product risk.
Implementation
- ClaimTopicsRegistry = [KYC, AML, RETAIL_CLASS]; CountryAllowModule whitelist EEA codes; MaxBalanceModule enforces balance ceiling; Velocity/Time modules restrict redemption cadence if required. (console.settlemint.com)
ONCHAINID claim hygiene
- Claims hold hashes/signatures; no PII onchain; issuers can revoke directly. (docs.onchainid.com)
Example C — Transfer‑agent fees on every secondary transfer
Requirements
- Collect a 5–20 bps fee in USDC on peer‑to‑peer transfers to fund TA operations.
Implementation
- Use the protocol’s fee hook: set fee recipient, percentage, and fee token (e.g., USDC). Compliance approves only if the fee pull succeeds; exceptions are logged with reason codes for reconciliation. (docs.tokeny.com)
ZK add‑on: Privacy‑first accreditation
Pattern
- Investors obtain zk‑accreditation credentials (Polygon ID/zkMe/Sismo). Your dApp verifies ZK proof off‑chain, then an approved issuer writes a short‑lived “Accredited” claim (or mints a non‑transferable eligibility NFT). The token only checks the claim topic—never the raw PII. (blog.zk.me)
Result
- Compliant without PII exposure; one‑time verification reused across offerings.
Emerging Best Practices (2026)
- Use the official TREXFactory/TREXGateway for one‑shot deployments with audit‑backed configurations and consistent wiring. Capture addresses and bytecode hashes for audit evidence. (docs.erc3643.org)
- Prefer UUPS/Beacon proxies to separate logic from state; record upgrade approvals in your change‑control system (SOC2). (docs.erc3643.org)
- Keep PII off‑chain: store only hashes/signatures; verify via claim issuers’ isClaimValid(). If you must persist attestations, use EIP‑712 structured data or ZK claims to avoid doxxing. (eips.ethereum.org)
- Modularize compliance: small, single‑purpose modules (Lockup, Country, MaxBalance, Velocity) with unit, fuzz, and invariant tests of canTransfer/transferred. Avoid monolithic “god modules.” (quillaudits.com)
- Pre‑flight every transfer path: run static calls to isVerified/canTransfer and return human‑readable denial reasons for ops dashboards and customer support triage.
- Standardize country codes to ISO‑3166 via IdentityRegistry; encode edge cases (e.g., territories) in a single module. (eips.ethereum.org)
- Recovery drills: document and test forcedTransfer and recovery flows quarterly—this is where support costs evaporate in production. (eips.ethereum.org)
- Ecosystem signaling: point procurement to ERC‑3643’s Final EIP status, ecosystem membership/adoption, and the 2025 ISO initiative to de‑risk “standard longevity.” (erc3643.org)
Technical Specs We Implement
- Standards: ERC‑20, ERC‑173 ownership, ERC‑734/735 identities (ONCHAINID), ERC‑712 signing, optional ERC‑4337 for sponsor‑paid onboarding.
- Core contracts: Token, IdentityRegistry (+Storage), ClaimTopicsRegistry, TrustedIssuersRegistry, ModularCompliance (+Modules).
- Identity: ONCHAINID factory + Claim Issuer with revocation and signature validation; Verifier helpers for dApps/services. (docs.onchainid.com)
- Upgradeability: UUPS for modules; Beacon for fleet upgrades across many offerings. (docs.erc3643.org)
- Factories and gateways: reference contracts and addresses available for provenance checks. (docs.erc3643.org)
- Observability: reason‑coded reverts; event taxonomy for KYC/AML/ACCREDITED topics; on‑chain counters for denial rates.
If you need a partner to build and own this stack, engage our web3 development services and cross‑chain solutions development to extend ERC‑3643 to your EVM environments.
Implementation Details (deep cut)
1) Identity and claims
- ONCHAINID contracts expose management/claim keys; issuers sign claims off‑chain and publish only signatures + minimal data/URI. Revocation is issuer‑driven without touching holder wallets—crucial for incident response. (docs.onchainid.com)
- For privacy, data fields should be hashed/salted; you validate signatures with the issuer’s key and topic. (docs.onchainid.com)
- Never embed raw PII in claims; use EIP‑712 typed data or ZK credentials. (eips.ethereum.org)
2) Compliance modules (patterns we ship)
- CountryAllow/CountryBlock: jurisdiction gating using ISO‑3166 from the registry.
- LockupModule: timestamp‑based hold; used for founders/Reg‑D resale limits.
- MaxOwnership and MaxBalance: cap concentration risk at investor or identity level.
- Velocity/TimeTransferLimits: throttle redemptions, enforce cooldowns.
- TransferFee: stablecoin‑denominated bps skim to TA or issuer OPEX. (ercs.ethereum.org)
We keep modules small, isolate state, and fuzz/invariant test canTransfer(), transferred(), created(), destroyed() to avoid accidental DoS or over‑blocking. (quillaudits.com)
3) Upgrades, testing, and audits
- Single‑transaction deployment via audited factory; capture chain‑ID, block‑height, and implementation addresses in a deployment manifest for auditors. (docs.erc3643.org)
- UUPS/Beacon versioning with explicit governance; test upgrade diffs with storage layout checks.
- Formal verification on invariants (e.g., no transfer passes without required claim topics; country caps never exceed thresholds).
- External review aligned to SOC2 Change Management and Secure SDLC. For third‑party assurance, point to ERC‑3643 audits and association governance. (erc3643.org)
4) ZK KYC in practice
- Polygon ID / zkMe / Sismo: we integrate SDKs to verify “proof of eligibility” and then mint/update an onchain claim topic (short‑lived) or soulbound NFT recognized by the IdentityRegistry. Privacy preserved; holder UX improves through reusability. (blog.zk.me)
GTM Proof: Metrics We Contract On (90‑Day Pilot)
We treat compliance as a product with SLAs. Your procurement team gets measurable success criteria:
- Time‑to‑first‑issuance: ≤ 30 business days on testnet with full SOC2 evidence pack (threat model, test matrix, change logs).
- Eligibility automation: ≥ 95% of investor transfers pass pre‑flight checks (isVerified/canTransfer) without manual reviews in UAT.
- Recovery MTTR: ≤ 1 business day from lost‑key ticket to recovery execution (forcedTransfer flow) in staging.
- Gas efficiency: ≤ 55k gas median for transfer on L2 with compliance enabled; batched mint reduces distribution gas ≥ 40% versus naive per‑investor mint.
- Privacy posture: 0 PII onchain; 100% of claims signed/revocable by issuers; ZK path available for high‑sensitivity cohorts.
The ERC‑3643 ecosystem provides the credibility signal your stakeholders expect: FINAL EIP status, audited components, and a 2025 ISO standardization initiative in motion. (erc3643.org)
Procurement and SOC2 Mapping
- Access control: Owner/Agent roles with least privilege; signer rotation playbook.
- Change management: upgrade proposals with approvals and onchain event evidence.
- Logging: structured events for denials (missing topic, issuer not trusted, country blocked, lockup not expired).
- Data governance: claims carry hashes/signatures; PII lives with your KYC vendor; revocation model documented. (docs.onchainid.com)
- Third‑party assurance: reference ERC‑3643 audits and association membership for vendor‑risk questionnaires. (erc3643.org)
Augment with our defi development services if you’ll route secondary liquidity into compliant venues, and our dApp development for investor portals and transfer‑agent consoles.
Code Patterns You Can Lift Today
Pre‑flight API (backend)
// Pseudocode using ethers.js async function preflight(token, from, to, amt) { const [paused, frozenFrom, frozenTo, verified, ok] = await Promise.all([ token.paused(), token.isFrozen(from), token.isFrozen(to), token.identityRegistry().then(ir => ir.isVerified(to)), token.compliance().then(c => c.canTransfer(from, to, amt)), ]); if (paused) return {ok:false, reason:"PAUSED"}; if (frozenFrom || frozenTo) return {ok:false, reason:"FROZEN"}; if (!verified) return {ok:false, reason:"NOT_VERIFIED"}; if (!ok) return {ok:false, reason:"COMPLIANCE_RULE"}; return {ok:true}; }
Issuer‑side accreditation claim (solidity interface)
interface IClaimIssuer { function isClaimValid( address identity, uint256 topic, bytes calldata sig, bytes calldata data ) external view returns (bool); }
Implement off‑chain signing, on‑chain signature validation, and revocation via issuer contract. (docs.onchainid.com)
Lockup module sketch
contract LockupModule is IModule { mapping(address => uint256) public unlockAt; function canTransfer(address from, address to, uint256 amt) external view returns (bool) { if (block.timestamp < unlockAt[from]) return false; return true; } function setUnlock(address holder, uint256 ts) external onlyAgent { unlockAt[holder] = ts; } }
Keep modules tiny; fuzz invariants and test reverted reason codes. (quillaudits.com)
Business Outcome
- Faster approvals: standard contracts + audited factory + clear SOC2 mapping reduce “architecture review” churn.
- Lower support load: recovery/forcedTransfer processes eliminate weeks of manual cap‑table corrections.
- Better UX: pre‑flight checks and ZK credentials reduce failed transfers and speed onboarding.
- Future‑proof: upgradable modules handle changing jurisdictions without re‑issuing the instrument.
- Credibility: FINAL EIP, audited libraries, and ISO initiative calm board‑level concerns about standard longevity. (erc3643.org)
If you want a team that speaks Solidity, ZK, and procurement in the same room—and can ship—pair this with our blockchain bridge development for cross‑L2 distribution or our asset management platform development for dashboards, reporting, and transfer‑agent workflows.
—
Book a 90-Day Pilot Strategy Call
Like what you're reading? Let's build together.
Get a free 30‑minute consultation with our engineering team.

