BOT Chain Ecosystem · Scheme C (Infrastructure & B2B Tooling)
AssetGate Logo

AssetGate — BOT Chain Mainnet Architecture & Integration Brief

Project Name: AssetGate
Standard: ERC-3643 (T-REX Institutional Security Token) + ONCHAINID (ERC-734 / 735)
Target Network: BOT Chain Mainnet (Chain ID 677)
Mainnet RPC: https://rpc.botchain.ai
Live DApp Dashboard: https://asset-gate.vercel.app/ ↗
AGT Token on Explorer: https://scan.botchain.ai/token/0x130ae863F28E1D990a975F700F536DDFc793dcf2 ↗
GitHub Repository: https://github.com/jevinjojo/AssetGate ↗

1. Summary & Value Proposition

Real-World Assets (RWAs)—such as private credit funds, commercial real estate, structured debt, and treasuries—cannot be legally represented by standard ERC-20 tokens. Global regulatory frameworks require strict on-chain guarantees:

AssetGate brings institutional-grade RWA infrastructure to BOT Chain. Built on the battle-tested ERC-3643 (T-REX) standard, it establishes a turnkey B2B platform with on-chain compliance gates, resilient PostgreSQL event indexing, zero-gas preflight simulations, and specialized Issuer/Investor portals.

2. Smart Contract Architecture (The Two-Gate Model)

To meet global security token regulations, standard ERC-20 transfers are strictly forbidden. In AssetGate, every asset movement (transfer, transferFrom, mint) must pass through two independent, sequential on-chain verification gates before balances can update:

       Sender (Verified) ────────── transfer(to, amount) ──────────► Recipient
                                       │
                                       ▼
        ┌─────────────────────────────────────────────────────────────┐
        │  GATE 1: Identity Registry (IdentityRegistry.sol)           │
        │  • Is recipient registered in the Identity Registry?        │
        │  • Does recipient hold a valid ONCHAINID contract?          │
        │  • Does ONCHAINID hold a valid KYC Claim (Topic 1)          │
        │    cryptographically signed by a Trusted Claim Issuer?      │
        └──────────────────────────────┬──────────────────────────────┘
                                       │
                               [Passes Gate 1]
                                       │
                                       ▼
        ┌─────────────────────────────────────────────────────────────┐
        │  GATE 2: Modular Compliance (ModularCompliance.sol)         │
        │  • Country Restriction: Is recipient's country allowed?     │
        │  • Balance Cap: Does amount exceed single-wallet limit?     │
        │  • Holder Threshold: Does transfer exceed max holder cap?   │
        └──────────────────────────────┬──────────────────────────────┘
                                       │
                         ┌─────────────┴─────────────┐
                         ▼                           ▼
                 [Both Gates Pass]            [Either Fails]
                         │                           │
                   Tokens Move                 On-Chain Revert
               Event Emitted & Indexed         Zero Balance Change
  

Core Architectural Guarantees:

3. Core Smart Contracts & Compliance Modules

All smart contracts below have been compiled via Foundry, orchestrated with DeployAll.s.sol, and deployed on BOT Chain Mainnet (Chain ID 677), with core contracts verified on-chain and auxiliary modules pending explorer source verification (see Section 9 for status breakdown):

Contract Architectural Responsibility
Token.sol (AGT) Permissioned ERC-3643 asset token. Overrides transfers to enforce Gate 1 + 2 and holds administrative controls (mint, burn, freeze, pause, recovery).
IdentityRegistry.sol On-chain registry mapping investor wallets to their ONCHAINID contract and country code. Answers isVerified(address).
IdentityRegistryStorage.sol Decoupled storage contract separating identity data from execution logic, allowing future logic upgrades without migrating investor state.
ModularCompliance.sol Compliance rule engine. Binds active modules and dynamically verifies transfers via canTransfer(from, to, amount).
ClaimTopicsRegistry.sol Registry of mandatory verification topics. Configured for Topic 1 = KYC.
TrustedIssuersRegistry.sol Whitelist of authorized identity attestation providers, preventing forged or self-signed claims.
ClaimIssuer.sol Trusted ONCHAINID claim signer contract holding authorized ECDSA public keys for KYC attestations.

Active Compliance Modules:

4. ONCHAINID Privacy & Cryptographic Attestation

We designed the identity layer to guarantee institutional compliance without exposing sensitive investor data on a public ledger:

5. Resilient Indexing Engine & Database Fault-Tolerance

AssetGate maintains a live, zero-latency Cap Table backed by Fastify, Prisma ORM, and Neon PostgreSQL without overloading BOT Chain's RPC nodes:

6. Off-Chain Preflight Simulation Shield

On public blockchains, compliance failures revert on-chain and burn real gas fees. AssetGate eliminates this friction with its Preflight Shield (/api/v1/transfer-preflight):

Before MetaMask is prompted, our backend runs an off-chain compliance simulation in under 15ms. If the recipient is unverified or exceeds a compliance cap, the UI immediately displays ⛔ The recipient is not a verified investor and halts execution, saving 100% of failed gas fees.

7. Complete Live Demo Walkthrough

The production DApp is deployed live at https://asset-gate.vercel.app/ on BOT Chain Mainnet (Chain ID 677). The platform operates seamlessly across two standard user personas:

Network Parameters: BOT Chain Mainnet · Chain ID: 677 · RPC: https://rpc.botchain.ai · Currency: BOT · Standard Transfer Gas: ~0.003 BOT.

Persona A: Investor Portal (Self-Sovereign Identity & Compliant Trading)

1 Connect Wallet & Chain Verification

Action:
Open https://asset-gate.vercel.app/. Click Connect Wallet. Ensure top-right toggle is set to Investor.
Under the Hood:
Wagmi connector detects chain ID. If on another network, prompts MetaMask to switch to BOT Chain (677).
Expected Screen:
Navbar displays your truncated address (e.g. 0x4aE8…8114) and active connection status

2 Unverified Initial State

Action:
Inspect the Verification and Transfer panels before performing KYC.
Expected Screen:
⚠️ "You are not verified yet. Complete simulated KYC to become eligible."
Transfer panel shows: "Complete KYC first to transfer" (Send button disabled)

3 1-Click KYC Onboarding (Decentralized Identity Creation)

Action:
Leave country input as 840 (United States ISO numeric) and click Complete KYC.
Under the Hood:
Backend Fastify service: (1) deploys an ERC-734/735 ONCHAINID contract, (2) signs an ECDSA claim for Topic 1 via ClaimIssuer, and (3) registers the investor in IdentityRegistry.sol.
Expected Screen:
✓ Verified Investor · [ONCHAINID KYC] · Required claim: KYC held & verified · Identity: 0x… ↗
The Transfer panel instantly unlocks and becomes interactive.

4 Portfolio & Regulatory Escrow Inspection

Action:
View the Holdings & Escrow panel.
Expected Screen:
AssetGate Token (AGT) · 🔓 Fully Liquid (or 🔒 Partial Escrow Active)
Displays real-time breakdown of Total Balance vs Liquid (Transferable) tokens. When escrow locks are active, shows: 🔒 X AGT locked in regulatory escrow. Only Y AGT is transferable.

5 Preflight Shield & Compliant Transfer Testing

Test 5A (Negative):
Enter an unverified recipient (e.g. 0x000000000000000000000000000000000000dEaD), amount 5, and click Send.
Expected Result:
⛔ "Recipient is not verified in IdentityRegistry"
Zero Gas Burned: Preflight Shield intercepts the call off-chain in 15ms. MetaMask is never triggered.
Test 5B (Positive):
Enter a verified recipient (e.g. Issuer 0x97C8110ed08cc87207f72d71FaBF8B9E98844658), amount 1, and click Send.
Expected Result:
✓ Confirmed [Receipt: 0x… ↗]
MetaMask confirms the transfer. The confirmation toast provides a clickable link to BOT Chain Explorer.

6 Merkle Dividend Claiming

Action:
Scroll to Claim dividend. Enter Distribution ID 1 (Funded with 50 mUSDC) and click Claim.
Under the Hood:
Queries /api/v1/dividends/merkle-proof. Fastify computes your Merkle tree proof against the on-chain root and executes DividendDistributor.claim().
Expected Screen:
✓ Confirmed [Receipt: 0x860acf…a55f03 ↗]
Exact pro-rata share of MockUSDC is transferred directly to your wallet on BOT Chain.

Persona B: Issuer / Fund Manager Portal (Corporate Governance & Control)

1 Real-Time Cap Table Inspection

Action:
Toggle top-right switch to Issuer. Review the Live Cap Table.
Expected Screen:
Total Supply: 1,000 AGT · Active Holders: 2 · Auto-refreshes every 3s via Neon PostgreSQL indexer

2 Agent Role Delegation (Interactive Permission Manager)

Action:
In Agent roles (Admin), paste an operator or reviewer wallet address and click Grant Agent.
Under the Hood:
Calls Token.addAgent(operatorAddress). Grants administrative permissions to mint, freeze, and manage compliance.
Expected Screen:
✓ Confirmed [Receipt: 0x… ↗] — Authorized operator can now execute all governance controls below.

3 Investor Eligibility & Identity Lookup

Action:
In Check eligibility, enter investor wallet 0x4aE806D2331854Ba4aEc184645d3B8E57F5C8114 and click Look up.
Expected Screen:
Verified: yes · Frozen: no · Country: 840 · ONCHAINID: 0x78E175a0…7803

4 Compliant Asset Minting

Action:
In Mint, enter a verified investor address, amount 50, and click Mint.
Expected Screen:
✓ Confirmed [Receipt: 0x… ↗] — Live Cap Table immediately updates total supply and balances.

5 Partial Escrow Freezing (Regulatory Lockup)

Action:
In Freeze partial tokens, enter the investor wallet, amount 20, and click Freeze partial.
Expected Screen:
✓ Confirmed [Receipt: 0x… ↗] — Locks 20 AGT in escrow; remaining 80 AGT stays fully liquid.

6 Full Wallet Freeze / Unfreeze

Action:
In Freeze / unfreeze address, enter a wallet address and click Freeze.
Expected Screen:
✓ Confirmed [Receipt: 0x… ↗] — Halts all inbound/outbound asset transfers at Gate 2. Click Unfreeze to restore.

7 Forced Recovery Clawback (Legal Asset Recovery)

Action:
In Forced transfer (recovery), enter lost wallet in From, verified wallet in To, and amount. Click Force transfer.
Expected Screen:
✓ Confirmed [Receipt: 0x… ↗] — Reclaims tokens under legal authority without requiring lost key signature.

8 Global Circuit Breaker (Emergency Pause)

Action:
In Pause / unpause, click Pause to halt all network trading. Click Unpause to resume.
Expected Screen:
✓ Confirmed [Receipt: 0x… ↗] — Emits Paused(); all token transfers immediately revert on-chain.

9 3-Step Automated Dividend Distribution

1 · Prepare:
Enter 50 in Total payout (mUSDC). Click 1 · Prepare (snapshot cap table). Shows: Recipients: 2, root: 0xf025…
2 · Approve:
Click 2 · Approve mUSDC. Confirms allowance for the Distributor contract. Displays ✓ Confirmed [Receipt: 0xa818… ↗]
3 · Create:
Click 3 · Create distribution. Submits the root and funds on-chain. Displays ✓ Confirmed [Receipt: 0xe026… ↗]. Unlocks instant claims!

8. Role-Based Access Control & Dashboard Agent Manager

To ensure high institutional security while making corporate administration frictionless, AssetGate combines strict smart contract RBAC with an interactive dashboard permission manager:

9. BOT Chain Mainnet Deployment Matrix & Verification

The entire AssetGate protocol suite is deployed and live on BOT Chain Mainnet (Chain ID 677). All smart contracts are open for public audit and verification on scan.botchain.ai:

Contract Name Mainnet Address (Chain 677) Verification Status
Token (AGT)0x130ae863F28E1D990a975F700F536DDFc793dcf2 ↗✓ Verified
IdentityRegistry0x99C4Aca6Bd389458A27a299Ef5Ccea34905c9d69 ↗✓ Verified
IdentityRegistryStorage0x94d483cF70988b2651beC420Ae1dE27b2627E287 ↗Pending Explorer Source
ModularCompliance0x8725ECe13cFfa069Aaae7A30d3b1e742F830c14E ↗Pending Explorer Source
ClaimTopicsRegistry0x351b9E14C42848E6f41E06b09d755A242a4B8Ed0 ↗Pending Explorer Source
TrustedIssuersRegistry0x64600121a9f8e33Cd0cE21ff57C7Bc8B59515b70 ↗Pending Explorer Source
ClaimIssuer0xa7a76b528e6E740a8AE0B036FCAaE8Be0b233ad1 ↗Pending Explorer Source
CountryRestrictModule0xCa5957CD989088b6F4d51BD8AC5199c2188b9515 ↗Pending Explorer Source
BalanceCapModule0xefc25232Cde06B57C3ee38C15c82554FB2396d0b ↗Pending Explorer Source
MaxHolderCountModule0x7E52c782f510274F76b83DB4d925d94486e6E6bC ↗Pending Explorer Source
MockUSDC (Dividend Payout Token)0x16F7975FEba6F69b52D896858581d75010446E4E ↗Pending Explorer Source
DividendDistributor (Merkle Payouts)0x50D17b36F8d0D28D343fFF298bd4958CFEFEEDC1 ↗Pending Explorer Source

Core Genesis Verification & Live Endpoints

Component / Genesis Proof Verified Endpoint / Transaction Reference
Live DApp Dashboard https://asset-gate.vercel.app/ ↗
AGT Token on Explorer https://scan.botchain.ai/token/0x130ae863F28E1D990a975F700F536DDFc793dcf2 ↗
Live Indexer & Backend Health API https://assetgate.onrender.com/api/v1/health ↗
Live Cap Table REST API https://assetgate.onrender.com/api/v1/captable ↗
Token Genesis Deployment Tx 0xc449747a8a1b34196d303891f494a57792f7ada4b1fda7835d42b8e7e2bf8215 ↗
Genesis Bootstrap Mint (1,000 AGT) 0x89528152678240c9cf2f1d67f8f065c47473cc0f7c15fb26907b7d1f4fa4a1ca ↗
Reference Investor ONCHAINID 0x78E175a0005AA5D386BF9c01c9b91A79472B7803 ↗
Real-Time On-Chain Verifiability: All subsequent protocol activity—including two-gate compliant transfers, full address freezes, partial regulatory escrows, forced recovery clawbacks, Merkle dividend creation, and investor claims—emits standard ERC-3643 events indexed by our Neon PostgreSQL service and is verifiable in real time directly on the AGT Token Explorer Page ↗.