AI-Powered Cross-Chain Oracle Aggregator & Anomaly Detection — Multi-agent pipeline using Xiaomi MiMo v2.5 Pro
MiMo Oracle is a production-grade cross-chain oracle aggregation platform that uses multiple specialized AI agents to monitor, validate, and optimize price feeds from decentralized oracles. Built on Xiaomi MiMo's reasoning models, it orchestrates a 5-agent analysis pipeline that continuously consumes millions of API tokens to detect anomalies, validate prices, and ensure feed reliability across chains.
┌──────────────────────────────────────────────────────────────┐
│ MiMo Oracle │
├──────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌───────────┐ │
│ │Chainlink │ │ Pyth │ │ Anomaly │ │ Price │ │
│ │ Monitor │ │Aggregator│ │ Detector │ │ Validator │ │
│ │ (Agent 1)│ │ (Agent 2)│ │ (Agent 3)│ │ (Agent 4) │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └─────┬─────┘ │
│ │ │ │ │ │
│ └──────────────┼──────────────┘ │ │
│ │ │ │
│ ┌──────▼──────┐ ┌──────▼─────┐ │
│ │ Feed │ │ Anomaly │ │
│ │ Optimizer │ │ Alert │ │
│ │ (Agent 5) │ │ Engine │ │
│ └─────────────┘ └────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────┐│
│ │ MiMo API (OpenAI-compatible) ││
│ │ Token Tracking & Budget Management ││
│ └──────────────────────────────────────────────────────────┘│
│ │
│ Supported Oracles: Chainlink · Pyth · Band · API3 · Redstone│
└──────────────────────────────────────────────────────────────┘
Each price feed analysis runs 5 specialized agents in sequence:
- Chainlink Monitor: Aggregator contract health, heartbeat checks, deviation thresholds, stale data detection
- Pyth Aggregator: Price confidence intervals, cross-venue comparison, pull-feed freshness, publication lag
- Anomaly Detector: Statistical outlier detection, spike/drop pattern recognition, temporal correlation, flash-crash heuristics
- Price Validator: Multi-oracle consensus checks, TWAP verification, on-chain sanity, arbitrage signal detection
- Feed Optimizer: Optimal feed selection, latency ranking, cost analysis, fallback chain recommendations
Unlike one-shot audits, MiMo Oracle runs 24/7 continuous monitoring across 200+ trading pairs, 10+ chains, and 5 oracle providers, generating fresh anomaly assessments every 5 minutes.
Each agent processes full price history (7-day rolling window), oracle provider metadata, chain-specific gas conditions, and cross-chain correlation data — requiring large context windows and multi-turn reasoning chains.
The system correlates signals across chains — detecting when ETH price on Ethereum Chainlink lags behind Solana Pyth by more than 0.3% triggers cross-chain arbitrage analysis consuming additional tokens.
When an anomaly is detected, the system triggers a secondary investigation pipeline — up to 3 follow-up agents analyzing root cause, historical precedents, and blast radius estimation.
| Scenario | Pairs | Chains | Oracles | Frequency | Tokens/Day |
|---|---|---|---|---|---|
| Single pair monitor | 1 | 1 | 2 | 5min | ~100K |
| Portfolio monitoring | 20 | 3 | 3 | 5min | ~1.5M |
| Full chain coverage | 100+ | 5 | 5 | 5min | ~4M |
| Anomaly investigations | 100+ | 10 | 5 + alerts | continuous | ~6M+ |
cd backend
pip install -r requirements.txt
cp .env.example .env # Add your MiMo API key
uvicorn app.main:app --reload --port 8000cd frontend
python -m http.server 3000
# Or deploy to Netlify/VercelMIMO_API_KEY=your_key_here
MIMO_BASE_URL=https://api.xiaomimimo.com/v1
MIMO_MODEL=mimo-v2.5-pro
CHAINLINK_RPC=https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY
PYTH_ENDPOINT=https://hermes.pyth.network/v2| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health |
Health check |
| GET | /api/feeds |
List all monitored oracle feeds |
| GET | /api/feeds/{pair} |
Get detailed feed for a specific pair |
| GET | /api/anomalies |
List detected anomalies |
| GET | /api/anomalies/{id} |
Get anomaly details |
| POST | /api/validate |
Validate a price across oracles |
| POST | /api/compare |
Compare oracle feeds for a pair |
- AI Model: Xiaomi MiMo v2.5 Pro (1.6B reasoning model)
- Backend: Python, FastAPI, OpenAI SDK
- Frontend: Vanilla JS, CSS3, Dark Theme
- Oracle Sources: Chainlink, Pyth, Band Protocol, API3, Redstone
- Chains: Ethereum, Arbitrum, Optimism, Polygon, Base, Solana, Avalanche, BSC
- API Protocol: OpenAI-compatible
- Token Management: Real-time tracking, budget enforcement, per-agent breakdown
MiMo Oracle is designed to consume 6+ million tokens daily through:
- Continuous feed monitoring — 200+ pairs across 10 chains every 5 minutes
- Multi-agent deep analysis — 5 agents × rolling 7-day price context
- Cross-chain correlation — detecting oracle lag and arbitrage signals
- Anomaly investigation — secondary pipeline for confirmed anomalies
- Feed optimization — cost-benefit analysis of oracle selection
| Oracle | Type | Chains | Latency |
|---|---|---|---|
| Chainlink | Decentralized | 15+ | ~30min heartbeat |
| Pyth | Pull-based | 40+ | Sub-second |
| Band Protocol | Decentralized | 10+ | ~15min |
| API3 | First-party | 10+ | ~5min |
| Redstone | Modular | 30+ | Real-time push |
MIT