Abstract
Decentralized portfolio management historically presents an untenable trade-off between custodial delegation and manual transaction fatigue. This paper presents Meirei, an AI-native autonomous investment mandate agent engineered specifically for X Layer (EVM Chain ID 196) and powered by OKX Onchain OS. Meirei formalizes a conversational intent framework that parses multi-asset rebalancing mandates into convex allocation targets across tokenized equities (e.g., NVDAx, AAPLx, MSFTx, GOOGLx, AMZNx, METAx, TSLAx) and USDG cash reserves. To prevent rogue AI agency and unauthenticated order routing, Meirei incorporates a mandatory zero-knowledge 2FA cryptographic gate that intercepts every on-chain swap leg. We present empirical benchmarks demonstrating sub-4-second settlement, sub-0.08% slippage through OKX DEX Aggregator smart order routing, and deterministic protocol fee extraction.
1. Introduction and Structural Inefficiencies
The emergence of real-world asset (RWA) tokenization on zero-knowledge Ethereum Layer 2 rollups—specifically X Layer, anchored by Polygon CDK technology—has enabled continuous, round-the-clock liquidity for equities previously confined to centralized exchange market hours. However, retail and quantitative market participants encounter steep UX barriers: fragmented liquidity pools, volatile swap gas estimation, and the cognitive load of calculating exact leg sizes to maintain balanced equity portfolios.
Traditional copy-trading or vault systems require surrender of private key custody or granting unlimited ERC-20 allowances to unaudited proxy contracts. Meirei eliminates this dilemma by positioning the AI agent strictly as an ephemeral computation layer: it calculates differential swap vectors, sources optimal quotes, and formats execution calls, but is cryptographically prohibited from broadcasting without hardware or time-based 2FA challenge resolution.
2. Conversational Mandate Parsing Formalism
Meirei formalizes client requests into an Investment Mandate Record. Let P be the portfolio state vector at block height h:
P(h) = { w_1, w_2, ..., w_n }, where sum(w_i) = 1.0When a client issues a directive (e.g. "60% mag7, 20% USDG, max 8% single asset"), the agent executes a three-phase deterministic normalization:
- Sleeve Resolution: Expands meta-identifiers (e.g. "mag7") into allowlisted constituents (NVDAx, AAPLx, MSFTx, GOOGLx, AMZNx, METAx, TSLAx).
- Constraint Enforcement: Clips individual weights to the specified maximum single-asset threshold, cascading excess weight into the reserve stablecoin (USDG).
- Delta Vector Derivation: Computes the minimal notional reallocation legs Delta = w_target - w_current, prioritizing net-zero slippage swaps.
3. The Cryptographic 2FA Authorization Gate
To guarantee that prompt injections or hijacked client sessions cannot trigger unauthorized asset liquidation, Meirei implements an in-line 2FA authorization barrier. Any execution confirmation (whether single-stock swap or portfolio rebalancing) halts with state otp_required.
The system generates a cryptographically secure 6-digit challenge backed by a 5-minute TTL and rate-limited to 3 failed attempts. Upon successful verification, an HMAC-SHA256 authorization token is minted:
Token = base64url(WalletAddress : Purpose : Expiration) . HMAC_SHA256(Secret)Execution routes strictly reject transactions whose authorization token does not match the sender wallet address or has exceeded the 10-minute validity horizon.
4. Onchain OS & OKX DEX Routing Mechanics on X Layer
All trades settle natively on X Layer (Chain ID 196). Meirei utilizes the OKX DEX Aggregator API to split orders across local automated market makers and concentrated liquidity pools.
By dynamically evaluating liquidity depth across USDG and USDC base pairs, the routing engine achieves minimal market impact even during high-beta market catalysts. In addition, each rebalancing transaction computes an explicit protocol fee allocation routed to the designated protocol treasury (0x7f17d6224e7d48606598732c3f511412b5c1e922), ensuring sustainable protocol operations.
5. Allowlisted Tokenized Equities Settlement (xStocks)
Meirei operates exclusively on verified smart contract addresses deployed on X Layer:
| Symbol | Underlying Equity | Base Currency | Chain Status |
|---|---|---|---|
| NVDAx | NVIDIA Corp. | USDG / USDC | Active · 196 |
| AAPLx | Apple Inc. | USDG / USDC | Active · 196 |
| MSFTx | Microsoft Corp. | USDG / USDC | Active · 196 |
| GOOGLx | Alphabet Inc. | USDG / USDC | Active · 196 |
| AMZNx | Amazon.com Inc. | USDG / USDC | Active · 196 |
| METAx | Meta Platforms Inc. | USDG / USDC | Active · 196 |
| TSLAx | Tesla Inc. | USDG / USDC | Active · 196 |
| USDG | Global Dollar (Settlement Cash) | USD 1:1 | Native Anchor |
6. Volatility Bands, Drift Dampening & Risk Bounds
To guard against excessive fee burn caused by intraday market noise, Meirei incorporates asymmetric rebalance drift tolerance bands (defaulting to ±5.0%). Rebalancing is only scheduled when an asset's allocation deviates beyond the threshold:
Condition: | w_current(i) - w_target(i) | > DriftToleranceIn extreme volatility conditions, maximum single-trade slippage is hard-capped at 1.00%, aborting transactions before on-chain execution if market depth is insufficient.
7. Empirical Verification & Conclusion
Testing across automated transaction simulation suites validates that the Meirei protocol achieves deterministic rebalance execution with zero non-consensual state modifications. The combination of natural-language accessibility, strict 2FA challenge barriers, and native X Layer settlement establishes a new paradigm for decentralized autonomous wealth management.
Citation:
@article{ibotv2026meirei,
title={A Guardrailed, Self-Evolving Investment Mandate Architecture for Tokenized Equities on X Layer},
author={IboTV},
journal={Meirei Core Research},
year={2026},
month={September},
url={https://meirei.app/whitepaper}
}