Monallo Documentation
Product overview, Quick Start for Monallo Store, and technical reference.
Overview
Monallo is an AI-powered Web3 suite built on Polkadot, connecting the crypto world with AI services. As the AI API market grows, crypto holders and developers need a way to pay for LLM usage without leaving the crypto stack. Monallo lets you pay with cryptocurrency (e.g. PAS, wrapped ETH) and access multiple AI models through a single, unified API.
The platform includes Monallo Pay (intent-based DeFi), Monallo Bridge (cross-chain lock-mint), and Monallo Store (LLM token credits and OpenAI-compatible API). Reliability, scalability, and a clear developer experience are core priorities.
Problem
- • Crypto holders cannot easily use their assets to pay for AI API services.
- • Developers need to manage multiple AI provider accounts and payment methods.
- • Cross-border and crypto-native payment infrastructure for AI is lacking.
Solution
- • Crypto-native payment — Deposit PAS/ETH, get credits; pay for AI with one balance.
- • Unified API — One endpoint and one API key for multiple LLM models (GPT, MiniMax, Gemini, etc.).
- • On-chain credits — Credit Ledger on Polkadot Hub; usage and balances are transparent and verifiable.
Products
Monallo Pay
LiveAI-powered intent recognition and DeFi: execute operations via natural language.
Monallo Bridge
LiveCross-chain bridge (Sepolia ↔ Polkadot Hub) with lock-mint and wrapped assets.
Monallo Store
LiveLLM Token Store: buy token packs or recharge MON with PAS/maoETH, get an API key, and call OpenAI-compatible chat completions.
Monallo Store
Monallo Store is an AI API aggregation layer with crypto payment. You deposit cryptocurrency (PAS or wrapped ETH on Polkadot Hub Testnet), receive on-chain credits (token packs or MON balance), and call a single OpenAI-compatible API to use multiple LLM models.
Core value
- • One balance, many models — Pay once in crypto; use GPT, MiniMax, Gemini, etc. via one API key.
- • Token packs & MON — Buy fixed token packs per model (with volume discount) or recharge MON (1 USD = 1 MON) for flexible spend.
- • Chain-settled credits — Credits are minted and tracked on-chain (Credit Ledger); usage is transparent.
Flow
Wallet (PAS/maoETH) → Store payment → Credit Ledger (mint) → API Key → POST /chat/completions- Network: Polkadot Hub Testnet (EVM, MetaMask)
- Payment: PAS, maoETH (if configured)
- Models: GPT-5.2, MiniMax M2.5, Gemini 3.1 Pro, and more
- API base:
https://your-domain/api/monallo/v1— headerAuthorization: Bearer <API Key>
Quick Start — Monallo Store
- Open Store: Go to /store.
- Connect wallet: Click “Connect Wallet” and connect MetaMask; switch to Polkadot Hub Testnet when prompted.
- Get credits: Buy a token pack (choose model and size, e.g. 1M–100M) or Recharge MON. Confirm the transaction in your wallet.
- API Key: Click “API Key” in the header, generate or copy your key and the Base URL (it matches this site’s domain).
- Call the API: Use
POST /chat/completionswithAuthorization: Bearer YOUR_API_KEY. Examples:
curl https://your-domain/api/monallo/v1/chat/completions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"model": "gpt-5.2",
"messages": [{"role": "user", "content": "Hello!"}],
"temperature": 0.7
}'Roadmap
Foundation
Expansion
Growth
Ecosystem
Appendix
Architecture diagrams, Bridge specification, and code references for developers.
Architecture
Monallo follows a layered design: user-facing clients talk to an API gateway and backend services; Store credits and Bridge flows are settled on-chain. Security uses signature verification (bridge), API-key-to-wallet binding (Store), and replay protection.
System layers (overview)
Store: wallet pays → backend confirms tx → Credit Ledger mints; API key ties usage to that wallet. Bridge: user locks on source chain → relayer signs → destination mints/releases.
Security
- Signature verification for bridge release/mint
- API key binding to wallet for Store usage
- Replay protection via nonce / source tx in bridge
Monallo Bridge — Technical Specification
Lock-mint bridge: user locks native assets on source chain; relayer verifies and calls mint (or release) on destination. Supported: Sepolia (ETH) and Polkadot Hub (PAS), both EVM.
Flow
Frontend calls lock(recipient, destinationChainId) with value; contract emits Locked. Relayer listens, signs, and calls mint(...) or release(...) on destination. Optional: GET /api/bridge/status?sourceChainId=...&sourceTxHash=... for status.
Contracts
One MonalloBridge.sol per chain. Lock is payable and emits Locked(sender, recipient, amount, destinationChainId, nonce). Release/mint is relayer-only with EIP-712 signature; replay protection via (sourceChainId, sourceTxHash, nonce).
Risks
Relayer is trusted in this phase; destination must hold sufficient liquidity for release. Future versions may use state proofs.
Code Reference
| Area | Path | Description |
|---|---|---|
| Bridge contract | contracts/MonalloBridge.sol | lock, release/mint, events, replay protection |
| Bridge config | lib/bridge.ts, env | Addresses, ABI, helpers |
| Store API | app/api/monallo/v1/chat/completions/ | OpenAI-compatible chat completions |
| Store backend | app/api/store/ | balance, register-key, confirm-payment, purchases |
| Bridge status | app/api/bridge/status/ | Relay status for frontend |
| Relayer | scripts/relayer-bridge.mjs | Listen Locked, sign, call release/mint |
Technology Stack
Frontend
Next.js 14, TypeScript, Tailwind, Framer Motion, ethers/viem
Backend
Next.js API Routes, Node.js, SQLite (better-sqlite3), Monallo API upstream
Blockchain
Ethereum (Sepolia), Polkadot Hub Testnet (EVM), MetaMask
Infra
AWS, Alibaba Cloud, AI compute servers
Glossary
| Term | Definition |
|---|---|
| Monallo | AI-powered Web3 suite: Pay, Bridge, Store. |
| Monallo Store | LLM token credits and OpenAI-compatible API; pay with PAS/ETH, one API key for multiple models. |
| Credit Ledger | On-chain contract that mints and tracks user credits (MON, token packs) after Store payment. |
| MON | Store recharge balance unit; 1 USD = 1 MON for flexible API spend. |
| Token pack | Prepaid token quota per model (e.g. 1M–100M tokens) with volume discount. |
| PAS / maoETH | Payment tokens on Polkadot Hub Testnet (native PAS; wrapped ETH when configured). |
| Lock-mint | Bridge pattern: lock assets on source chain; mint wrapped assets (e.g. maoXXX) on destination. |
| Relayer | Backend that watches bridge Locked events and calls release/mint on destination chain. |
| API key | Secret bound to wallet; used in Authorization header to call Store chat completions. |
