Institutional-grade ERC-3643 Tokenization & Compliance Platform A compliance-by-design platform for tokenizing regulated real-world assets (RWA), where every transfer is gated on-chain by investor identity and configurable compliance rules.
The complete AssetGate protocol is deployed live on BOT Chain Mainnet (Chain ID 677) and production cloud infrastructure.
- Frontend Dashboard: https://asset-gate.vercel.app/
- Architecture & Integration Brief: https://asset-gate.vercel.app/brief.html
- AGT Token on BOT Chain Explorer:
0x130ae863F28E1D990a975F700F536DDFc793dcf2 - Target Network: BOT Chain Mainnet (
Chain ID: 677,RPC: https://rpc.botchain.ai) - Backend API & Indexer: Live on Render
- Database: Neon Serverless PostgreSQL
- Smart Contracts: Deployed and verified on BOT Chain Mainnet (ERC-3643 Core, ONCHAINID, Modular Compliance, Merkle Dividend Distributor)
The full ERC-3643 pipeline in action — broken into 4 focused clips highlighting institutional compliance.
The simulated KYC onboarding flow. The investor submits their country code on the frontend, and the Node.js backend securely signs an ERC-734 identity claim, submits it on-chain to their ONCHAINID, and instantly whitelists the investor on the Identity Registry.
1-identity-gating.mp4
This is the core of the ERC-3643 standard. The smart contract's canTransfer function acts as a pre-flight compliance check. We attempt to transfer tokens from a verified wallet to an unverified dummy address. The UI and the smart contract natively block the transaction, proving that non-compliant trades revert at the blockchain level.
2-two-gate-transfer.mp4
Regulated assets require absolute legal recourse. We use the Issuer Dashboard to execute a corporate freeze on a verified wallet, locking its assets. Then, acting as the issuer, we execute a Forced Transfer to recover the funds from the frozen wallet into the corporate treasury—bypassing standard ERC-20 rules while maintaining full compliance.
3-corporate-controls.mp4
Off-chain calculation with on-chain execution. The issuer creates a snapshot of the current cap table and calculates a Merkle Tree distribution for a USDC dividend. A verified investor then logs into the portal and successfully claims their allocation via a pull-payment Merkle proof.
4-merkle-dividends.mp4
- Public blockchains are permissionless, but securities are not. Standard ERC-20 tokens can be held by anyone, making them fundamentally incompatible with regulated financial assets (equity, real estate, bonds) which require strict KYC/AML checks, investor accreditation, and jurisdictional restrictions.
- Off-chain compliance is fragile. Relying on centralized off-chain databases to manually freeze wallets or revert illegal transfers defeats the purpose of tokenization and introduces severe settlement risks.
- The Two-Gate Transfer Model. AssetGate uses the ERC-3643 (T-REX) standard. Unlike normal tokens, every transfer first asks "is this allowed?" and reverts if not.
- Gate 1: Identity Registry. Validates if the receiver is a verified investor by checking signed claims on their
ONCHAINIDfrom a trusted issuer. - Gate 2: Modular Compliance. Executes pluggable rule modules (e.g., maximum holder count, balance caps, country restrictions). If either gate fails, the transfer reverts natively at the smart contract level.
| Feature | Description |
|---|---|
| 🛂 Identity Gating | Enforces KYC/eligibility natively via ONCHAINID (ERC-734/735) signed claims. Unverified wallets cannot receive tokens. |
| 🧩 Modular Compliance | Custom Solidity rule modules (MaxHolderCountModule, BalanceCapModule, CountryRestrictModule) executed atomically on every transfer. |
| 🛑 Corporate Controls | Built-in issuer controls required by regulators: freeze, partial freeze, pause, burn, and force-transfer recovery. |
| 🛡️ Preflight Shield | Off-chain simulation endpoint (/api/v1/transfer-preflight) executing identity & compliance rules in <15ms to save 100% of failed gas fees before invoking MetaMask. |
| 💰 Merkle Dividends | Automated 3-step snapshot & Merkle tree payout engine for instant, pro-rata USDC distributions. |
| 📡 Live Event Indexer | Viem-powered Node.js indexer that listens to ERC-3643 contract events, maps them to a relational schema, and stores them in PostgreSQL. |
| 📊 Issuer Dashboard | React/Vite dashboard for issuers to manage cap tables, mint tokens, and execute corporate actions. |
| 🏛️ Investor Portal | A dedicated view for verified investors to view their eligible holdings and identity status. |
| 🧪 Exploit-Tested | Contracts rigorously tested via Foundry (unit + fuzz + boundary) to ensure restricted countries or unverified users can never bypass gates. |
| ☁️ Cloud Native | Built for production with Vercel, Render, and Neon PostgreSQL integrations out of the box. |
flowchart TD
Sender[Sender - Verified Investor] -->|Initiates Transfer| Gate1[Gate 1: Identity Registry]
Gate1 -->|Is receiver verified?| Gate2[Gate 2: Modular Compliance]
Gate1 -.->|No: Unverified| Revert[Transaction Reverts]
Gate2 -->|Do rules pass?| Success[Update Token Balances]
Gate2 -.->|No: Rule violated| Revert
Success --> Recipient[Recipient - Target Address]
- Node.js 20+
- Foundry (
forge,anvil) - BOT Chain Mainnet RPC (
https://rpc.botchain.ai) or local Anvil - Neon PostgreSQL database
cd packages/contracts
npm install
forge build
forge test
anvilIn a second terminal:
cp .env.example .env
forge script script/DeployAll.s.sol --rpc-url anvil --broadcast
forge script script/Bootstrap.s.sol --rpc-url anvil --broadcastcd packages/backend
cp .env.example .env
npm install
npx prisma generate
npx prisma db push
npm run devcd packages/frontend
cp .env.example .env
npm install
npm run devAssetGate/
├── packages/
│ ├── contracts/
│ │ ├── src/ # PermissionedToken, DependencyCheck
│ │ │ └── compliance/ # MaxHolderCount, BalanceCap, CountryRestrict
│ │ ├── script/ # DeployAll.s.sol, Bootstrap.s.sol
│ │ ├── test/ # EndToEnd, Fuzz, Boundary tests
│ │ └── deployments/ # Generated address artifacts
│ ├── backend/
│ │ ├── prisma/ # PostgreSQL schema
│ │ ├── src/
│ │ │ ├── api.ts # Fastify REST endpoints
│ │ │ ├── indexer.ts # Viem blockchain event listener
│ │ │ └── db.ts # Prisma client instance
│ │ └── package.json
│ └── frontend/
│ ├── public/
│ │ └── brief.html # Standalone Architecture & Integration Brief
│ ├── src/
│ │ ├── components/ # React: CapTable, IssuerControls, InvestorPortal
│ │ ├── App.tsx # Main dashboard entrypoint
│ │ └── index.css # Core design system & styles
│ └── package.json
├── ARCHITECTURE.md
├── FLOWS.md
├── IDENTITY.md
├── README.md
| Layer | Tools |
|---|---|
| Contracts | Solidity, Foundry, ERC-3643 (T-REX), ONCHAINID |
| Backend | Node.js, Fastify, TypeScript, Viem, Prisma, PostgreSQL |
| Frontend | React, TypeScript, Vite, Wagmi, Custom CSS |
| Infra / CI | Vercel, Render, Neon, GitHub Actions |
Contributions are welcome — please open an issue first to discuss any major change.
AssetGate is a platform built on the ERC-3643 standard for BOT Chain. KYC is simulated (the deployer acts as the trusted claim issuer). It is not audited, not production-ready, and not legal or financial advice. Deploying real securities involves substantial legal and regulatory obligations.
MIT License — see LICENSE.
Built by Jevin Jojo.
AssetGate: because regulated assets require absolute, on-chain compliance.
