18. Compliance & Regulatory Design
18.1 Why RWAs Are Legally Complex
Underlying RWA tokens are often issued under specific legal regimes (securities law, fund law, money-transmitter/KYC regimes, custody requirements) in specific jurisdictions. This is unavoidable for RWA — the value literally depends on a legal/regulatory wrapper. RealKey therefore treats compliance not as a bolt-on but as a system-level design property.
18.2 Design Principles
| Principle | Practice |
|---|---|
| Modular | Compliance is a configurable, replaceable layer — not hardcoded into every vault. |
| Issuer-native | RealKey does not re-approve issuers or alter their compliance; it respects them. |
| Layered permissioning | Some assets are freely transferable; some are permissioned w/ whitelist; some are restricted by jurisdiction/accreditation. The protocol supports all three at the portfolio level. |
| Onchain-observable | Restrictions, whitelists, and gating are transparent onchain where legally permissible. |
| Open but regulated | RealKey is permissionless at the layer level (index tokens) while honoring per-asset restrictions (see §18.3). |
18.3 Permissionless vs Permissioned Assets
| Category | Example | How RealKey treats it |
|---|---|---|
| Permissionless tokenized assets | Tokenized treasuries/gold with no per-holder gating | Can be held/minted/redeemed by any eligible wallet; index token openly composable. |
| Permissioned tokenized assets | Tokenized securities with whitelist/transfer restrictor (e.g., ERC-3643/T-REX, issuer blocklist) | Held inside the Index Vault's approved wallet; the index token is permissionless-facing while underlying compliance is preserved; redemptions honor the issuer's whitelist. |
| Restricted / jurisdiction-limited assets | Assets limited to certain geographies or accredited-to-institutional investors | Index methodology flags jurisdiction; mint/redeem gated by KYC-verified wallets/geofence where the issuer requires it. |
Key design point: RealKey can present a permissionless UX on top of permissioned assets without breaking issuer compliance — because the vault is the compliant holder and members' economic exposure flows through the index token, which is a portfolio claim, not the underlying security itself. Whether a specific topology is lawful in a given jurisdiction is a legal question (see §18.5); RealKey's architecture is designed to make lawful topologies possible, not to guarantee any of them.
18.4 Modular Compliance Architecture
Underlying Asset (possibly permissioned)
│
▼
Compliance Module (per-issuer config)
├─ KYC/AML gate (where required)
├─ Transfer restrictor (whitelist/blocklist; honors issuer)
├─ Jurisdiction gate (geofence)
├─ Accredited/institutional-only flag
└─ Permissioned-token adapter
│
▼
Index Vault (compliant holder)
│
▼
Index Token (permissionless-facing portfolio asset)
18.5 Non-Exhaustive Regulatory Notes
These are directional observations, not legal advice, and are non-exhaustive.
-
Securities laws: tokenized equity, some funds, and some debt may be securities in some jurisdictions. An index token whose economic value depends on such assets may itself be viewed as a security in a given jurisdiction. Whether that is true depends on the specific wrapper, marketing, and legal analysis.
-
Transfer restrictions: securities tokens commonly carry transfer-restrictor logic (whitelist/ blocklist) that RealKey's vault must respect on redemption.
-
KYC/AML/sanctions: on/off-ramps and, where applicable, onchain gates involve identity verification obligations; RealKey plans KYC where the underlying requires it and Sanctions screening where required.
-
Accredited/institutional regimes: some assets are limited to accredited or professional investors; RealKey supports index-level gating for such assets.
-
Custody: RWA custody has its own regulatory regime (qualified custodian / segregated assets / SEC custody rules where applicable).
-
Legal wrappers: tokenized funds may rely on legal innoculation via a wrapper (e.g., a fund vehicle treated as the issuer), which RealKey respects by design.
18.6 Disclaimer: Not Legal Advice
RealKey does not provide legal, tax, or investment advice. Nothing in this document constitutes solicitation, an offer, or legal/tax/investment guidance. RealKey's architecture is designed to permit compliant deployments, but compliance depends on the exact assets, jurisdictions, wrappers, and distribution channels chosen — which require professional legal review per case.
19. Composability
19.1 Index Tokens as Primitives
Because index tokens are standard, earn-yield, portfolio-level assets, they become usable building blocks across DeFi. RealKey is explicitly designed so the index token is the interface, not the internals.
| Integration | Why it fits | Effort to integrate |
|---|---|---|
| Lending markets | Index token has stable, published NAV → usable as collateral (with care: market risk is the point). | Standard ERC-20 listing + oracle feed. |
| DEXs / AMMs | Primary index token pairs + weighted index pools. | Standard LP. |
| Vaults / strategy managers | Manage a diversified RWA core position via one token. | Mint-and-hold. |
| Structured products | Options, tranches, and covered strategies can reference index-token NAV/price. | Oracle interface + custody. |
| Portfolio managers | Weight/Rebalance a basket by moving index tokens rather than many legs. | Mint/burn/transfer. |
| Wallets / payments | A diversified RWA position can be the default "savings" or settlement asset. | Display index NAV in token price. |
| Yield protocols | Treasury/cash-style index tokens can be the low-duration base in structured yield. | ERC-4626-style wrapper where custodial. |
19.2 Worked Examples
These are hypothetical and illustrative; they describe architecture intent, not deployed integrations.
-
Lending use-case. A protocol lists
RWA Index Tokenas collateral. The integration readsgetNAVPerToken()and a volatility/confidence-based collateral factor; loans liquidate via the index token's secondary market. -
Yield/strategy use-case. A vault manager holds
RWA Index Tokenas a diversified cash-equivalent base; the basket's internal yield (e.g., money-market interest accrual) is passed through to the vault's depositors via the index token's continuous NAV growth. -
Structured use-case. A derivatives desk writes an autocallable / capital-protected note whose payoff references the index token's 1-year NAV growth, collateralized by the index token itself.
-
Payments/stability use-case. A wallet offers "hold a diversified RWA basket" as a default savings mode — a user receives index tokens instead of a single stablecoin, with the basket's yield accruing smoothly.
Composability caveat: nothing is composable until it is listed and oracle-fed. RealKey's developer section (§20) documents the exact interfaces an integrator needs.
20. Developer Documentation
Pseudocode disclaimer. The following interfaces are conceptual Solidity-style pseudocode, not production code. They illustrate method signatures and interactions for integrators; final APIs will differ (names, parameters, access control) and must be audited before production use.
20.1 Terminology
| Term | Meaning |
|---|---|
Index |
A basket with a methodology, composition, and cadence. |
IndexVault |
The contract holding the basket and orchestrating mint/redeem/rebalance. |
IndexToken |
The ERC-20-like token that represents a basket. |
OracleManager |
The contract that exposes prices/NAV for an asset or index. |
AssetRegistry |
Onchain allowlist + metadata for supported underlying assets. |
FeeController |
Fee parameters & distribution. |
20.2 Interfaces (Pseudocode)
// AssetRegistry — whom the protocol trusts to hold/trade underlying assets.
interface IAssetRegistry {
function isAssetApproved(address asset) external view returns (bool);
function assetOracle(address asset) external view returns (address);
function assetDecimals(address asset) external view returns (uint8);
function addAsset(address asset, AssetMetadata calldata meta) external; // governance-gated
}
// OracleManager — the pricing interface integrators call.
interface IOracleManager {
function getPrice(address asset) external view returns (uint256 price, uint256 decimals_);
function getNAV(IndexId id) external view returns (uint256 nav, uint256 navPerToken);
function isFresh(address asset) external view returns (bool);
function confidence(address asset) external view returns (uint256 confidenceBps);
}
// IndexVault — mint/redeem + rebalance entry.
interface IIndexVault {
event Minted(address indexed from, uint256 amountIn, uint256 tokensOut);
event Redeemed(address indexed from, uint256 tokensIn, uint256 amountOut);
function mint() external;
function redeem(uint256 indexTokens) external;
function getNAVPerToken() external view returns (uint256 navPerToken);
function tokensToMintFor(uint256 amountIn) external view returns (uint256 tokensOut);
function getRebalanceWindow() external view returns (uint256 start, uint256 end);
function executeRebalance() external; // gated by governance/rebalancer
}
// IndexToken — the standard, composable face of the basket.
interface IIndexToken is IERC20 {
function nav() external view returns (uint256 navPerToken, uint256 totalSupply_);
function constituents() external view returns (address[] memory assets, uint256[] memory weights);
function getWeights() external view returns (uint256[] memory targetWeightsBps);
}
// FeeController
interface IFeeController {
function mintFee() external view returns (uint256 bps);
function redeemFee() external view returns (uint256 bps);
function managementFee() external view returns (uint256 bpsPerYear);
function protocolShare() external view returns (uint256 bps);
}
20.3 Workflows
A. Query index NAV & composition (read-only)
(uint256 nav, uint256 navPerToken) = oracleManager.getNAV(indexId);
address[] memory assets;
uint256[] memory weights;
(assets, weights) = indexToken.constituents();
B. Mint (user provides basket)
// 1. Approve underlying basket to vault
indexToken.nav(); // or vault.getNAVPerToken()
uint256 tokensOut = vault.getMintableTokens(basketAmounts);
// 2a. either atomically via a router that strips the basket...
vault.mint();
// 2b. ...or the vault pulls underlying and mints (design decision)
C. Redeem (user exits at NAV)
uint256 tokensIn = 1000e18;
vault.redeem(tokensIn); // underlying basket / cash returned per design
D. Rebalancing (authorized actor)
// Governance publishes new target weights ahead of the window:
(bytes32 newCompositionRoot, ) = vault.getRebalanceWindow();
// Then within the window:
vault.executeRebalance(); // solver-optimized, batched, MEV-aware
E. Reading raw oracle price for a constituent
(uint256 p, uint256 dec) = oracleManager.getPrice(asset_i);
require(oracleManager.isFresh(asset_i), "stale");
require(oracleManager.confidence(asset_i) >= MIN_CONF, "low-confidence");
20.4 Pseudocode Disclaimer
The code above is illustrative and non-production. Production interfaces will differ, and all visibility/access control must be tightened and audited. Integrators should treat this section as a contract-shape reference, not a binding API.