> For the complete documentation index, see [llms.txt](https://whitepaper.zodor.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://whitepaper.zodor.io/system-architecture/smart-contract-structure.md).

# Smart Contract Structure

The Zodor protocol comprises a coordinated suite of smart contracts grouped by domain. All addresses below are live on Maskade L1 (Chain ID 30917).

#### Identity & Claims <a href="#identity--claims" id="identity--claims"></a>

| Contract                | Role                                                | Address       |
| ----------------------- | --------------------------------------------------- | ------------- |
| `MaskadeImplAuthority`  | ONCHAINID implementation authority                  | `0x9463…8249` |
| `MasqueIdFactory`       | EIP-1167 clone factory; one Masque ID per user      | `0xB180…404C` |
| `ZodorClaimIssuer`      | ERC-735 issuer, holds `ZKGATE_ROLE`, 7 claim topics | `0x9596…09f7` |
| `ZodorIdentityRegistry` | user → jurisdiction map, `isVerified()` gate        | `0x9A82…36e6` |

#### Verifiers <a href="#verifiers" id="verifiers"></a>

| Contract        | Role                                            | Address       |
| --------------- | ----------------------------------------------- | ------------- |
| `ZKKYCVerifier` | Groth16 verifier (snarkjs output)               | `0x52a1…10eb` |
| `ZKKYCGate`     | Verifies proof, records nullifier, issues claim | `0xa840…5c13` |

#### Tokens, Compliance, Adapters <a href="#tokens-compliance-adapters" id="tokens-compliance-adapters"></a>

| Contract                            | Role                                                                          |
| ----------------------------------- | ----------------------------------------------------------------------------- |
| `ZodorToken`                        | ERC-3643-flavored security token (parent of ZCET/ZIPT/ZEROC/ZIST)             |
| `ZodorComplianceModule` (per token) | Country caps + holding periods, bound via `bindToken()`                       |
| `ERC7943Adapter`                    | Universal RWA adapter for DeFi composability; needs `AGENT_ROLE` on the token |

**`ZCFT`  Zodor Carbon Futures Token** at `0x6538…f27`, compliance at `0x0Ef9…e1F2`, adapter at `0xfa48…C688`.

#### Wallets, Gas, & Account Abstraction <a href="#wallets-gas--account-abstraction" id="wallets-gas--account-abstraction"></a>

| Contract               | Role                                                            |
| ---------------------- | --------------------------------------------------------------- |
| `EntryPoint` v0.7      | ERC-4337 entry point                                            |
| `ZodorAccountFactory`  | Deploys ERC-4337 smart wallets via clones                       |
| `ZodorSmartWallet`     | ERC-4337 smart-contract wallet (execute, batch, validateUserOp) |
| `ZodorDelegateAccount` | EIP-7702 delegate; runs smart-wallet code in EOA context        |
| `ZodorPaymaster`       | Treasury-sponsored paymaster (legacy / promotional)             |
| `ZodorTokenPaymaster`  | Stablecoin gas paymaster (USDT/USDC)                            |
| `SimplePriceOracle`    | Gas price oracle with 24h staleness + 20% circuit breaker       |

#### Capital Vertical (per-asset deployment) <a href="#capital-vertical-per-asset-deployment" id="capital-vertical-per-asset-deployment"></a>

| Contract                   | Role                                                                                     |
| -------------------------- | ---------------------------------------------------------------------------------------- |
| `CapitalAssetFactory`      | Deploys full token stack per asset (token + compliance + adapter + vault + pool slot)    |
| `CapitalAssetMetadata`     | On-chain asset metadata (valuation, APY, agreement hash, IPFS URI)                       |
| `CapitalChildFactory`      | Helper to deploy individual Capital asset tokens                                         |
| `StablecoinPurchaseRouter` | Shared USDT/USDC → token purchase router (Capital + Energy) at `0xFb36…1F52`             |
| `ZodorProofRegistry`       | Off-chain reserve proof anchoring (IPFS + treasury attestations) at `0xA254…62A1`        |
| `ZodorReserveOracle`       | On-chain oracle attesting supply vs stablecoin inventory; ZCFT instance at `0x759E…fc12` |

#### Energy Vertical <a href="#energy-vertical" id="energy-vertical"></a>

| Contract              | Role                                                                                                        |
| --------------------- | ----------------------------------------------------------------------------------------------------------- |
| `EnergyAssetRegistry` | Registry of solar/wind/carbon assets; enforces ZEROC minting cap per asset (max = totalCarbonTonnes × 1e18) |
| `ConfidentialZEROC`   | FHE-shielded wrapper for ZEROC (encrypted balances; `KYC_GLOBAL + ESG_VERIFIED` required)                   |

#### DeFi Composability <a href="#defi-composability" id="defi-composability"></a>

| Contract                    | Role                                                                        |
| --------------------------- | --------------------------------------------------------------------------- |
| `ZodorSecurityVault`        | ERC-4626 vault with NAV adjustment + non-transferable shares; one per asset |
| `ZodorPermissionedPool`     | KYC-gated constant-product AMM (x·y=k), 0.3% fee, 1000 minimum liquidity    |
| `ConfidentialSecurityToken` | Generic FHE security token (used by ZIST tranches and large ZCET deals)     |

#### Cross-Chain <a href="#cross-chain" id="cross-chain"></a>

| Contract          | Role                                                                        |
| ----------------- | --------------------------------------------------------------------------- |
| `ZodorCCIPBridge` | Chainlink CCIP bridge; lock/release pattern with compliance checks          |
| `ZodorOFTAdapter` | LayerZero v2 OFT adapter; burn-and-mint pattern; \~$0.02–$0.10 per transfer |

#### Stablecoins (Mock Testnet) <a href="#stablecoins-mock--testnet" id="stablecoins-mock--testnet"></a>

| Contract                | Address                                      |
| ----------------------- | -------------------------------------------- |
| `MockUSDT`              | `0x4f12fccf48007e3cac4982a36d64ba01008351d0` |
| `MockUSDC`              | `0xa84115150d44dc7e6d49f157c38ea3df9c07c016` |
| Treasury (1M minted to) | `0xe1C7486F165E5A05A03ab1fAE89F4AAcdeC5639F` |

#### Integration Pattern <a href="#integration-pattern" id="integration-pattern"></a>

All contracts work together to ensure a secure, compliant, and scalable ecosystem for Real World Asset tokenization. A transfer of any Zodor security token follows this strict path:

```
caller → ZodorToken._beforeTokenTransfer
       → ZodorComplianceModule.canTransfer(from, to, amount)
            → ZodorIdentityRegistry.isVerified(to)
                 → MasqueId.getClaim(...)
            → country cap check
            → holding-period check
            → OFAC check
       → (if all pass) state update + Transfer event
```

For privacy-mode tokens, the same path executes but the emitted `Transfer.amount` is zeroed or encrypted observers cannot derive position size.

<figure><img src="/files/8U5GI2LrSm6DiyYDXTuZ" alt=""><figcaption></figcaption></figure>
