Monallo Documentation
A comprehensive technical overview of our AI-powered Web3 product suite.
Table of Contents
1. Overview
Monallo is an AI-powered decentralized application suite built on Polkadot, designed to simplify Web3 interactions through natural language interfaces. Our mission is to bridge the gap between traditional web users and decentralized finance by leveraging advanced AI intent recognition.
The system is built with principles from distributed systems research, particularly regarding consensus mechanisms and fault tolerance. We have architected a system that prioritizes reliability, scalability, and user experience.
2. Products
Monallo Pay
LiveAn AI-powered intent recognition and DeFi interface that allows users to execute complex financial operations through natural language.
Monallo Bridge
Coming SoonA cross-chain asset bridge enabling seamless token transfers between different blockchain networks.
Monallo Video
Coming SoonAI-powered video generation platform for creating Web3-related content.
3. Monallo Bridge Technical Specification
This section is for community developers, users, and investors. It describes the architecture, contracts, relayer, and frontend flow of the Monallo native bridge for auditing, integration, and understanding.
3.1 Overview and Scope
Monallo Bridge is Monallo's native cross-chain bridge using a lock-mint model: users lock native assets (ETH or PAS) on the source chain; after relayer verification, the bridge contract on the destination chain either releases native tokens to the recipient or mints wrapped assets (e.g. maoXXX.SourceChain). It is separate from MonalloIntentExecutor's intent recording and uses a dedicated MonalloBridge.sol contract for lock / release (or mint) and events.
Supported chains and tokens: Sepolia (ETH) and Polkadot Hub (PAS), both EVM. The "Polkadot Bridge" option (e.g. Snowbridge / BridgeHub) is a placeholder and not part of this specification.
3.2 Architecture Overview
End-to-end flow: the user confirms "Monallo Bridge" in the frontend; the frontend calls lock(recipient, destinationChainId) on the source chain with native value; the bridge contract locks funds and emits Locked; the relayer listens, verifies, signs, and calls release(...) or mint(...) on the destination chain; the frontend may poll a status API to show the destination tx and full receipt.
Source chain: user calls lock(recipient, destinationChainId) and sends native tokens (ETH or PAS); the contract locks and emits Locked. Destination chain: the relayer, after verifying the source lock, calls mint on the destination chain to mint wrapped assets maoXXX.SourceChain to recipient (or, in a release variant, releases native tokens from the bridge contract).
3.3 Smart Contracts
- Deployment: one
MonalloBridge.solper chain (Sepolia, Polkadot Hub), same interface. - lock:
lock(address recipient, uint256 destinationChainId), payable; increments nonce and emitsLocked(sender, recipient, amount, destinationChainId, nonce). - release / mint: only the trusted relayer triggers it; the contract verifies a signature over
(recipient, amount, sourceChainId, sourceTxHash, nonce)via EIP-712 / ecrecover; then either deducts balance andtransfer(recipient, amount)(release) or mints wrapped tokens to recipient (mint). - Replay protection: the destination contract records processed releases/mints with
usedNonceor(sourceChainId, sourceTxHash, nonce)so the same lock is not released or minted twice.
For a release design, the bridge contract must hold sufficient native tokens on the destination chain; on testnets this can be 1:1 or a fixed ratio (e.g. 1 ETH = 100 PAS for testing). Contract addresses and ABI are maintained in lib/bridge.ts or web3 config.
3.4 Relayer Service
The relayer: listens for Locked events on both chains; after sufficient source-chain confirmations, reads sender, recipient, amount, destinationChainId, nonce, and sourceTxHash; signs this payload with the configured relayer key and calls the destination bridge contract's release(..., signature) or mint(..., signature). Each (sourceChainId, sourceTxHash, nonce) is processed only once (optional bridge_transfers DB table for idempotency and status).
Optional API: GET /api/bridge/status?sourceChainId=...&sourceTxHash=... returns { status: "pending" | "relayed", destinationTxHash?: string } for the frontend to poll and show "Locked, waiting for cross-chain" and "Received on destination chain".
Stack aligned with Next.js (Node.js + ethers.js). Environment variables include both chains' RPC URLs, bridge contract addresses, and relayer private key; production keys should be stored securely (e.g. KMS).
3.5 Frontend and User Flow
In AI Pay's handleConfirmIntent, when pendingIntent.action === "Bridge" and the bridge type is Monallo Bridge (lock-mint): validate receiver, amount, and that source/target are limited to Sepolia and Polkadot Hub and differ; if the current chain is not the source, switch chain first; call the source-chain bridge lock(recipient, destinationChainId) with value = parseEther(amount); on success show "Locked, waiting for cross-chain…" and the source explorer link; optionally poll the status API and when relayed show the destination tx and full bridge receipt (source tx + destination tx + amount + networks + recipient).
Bridge contract addresses are configured via BRIDGE_CONTRACT_BY_CHAIN_ID or environment variables.
3.6 Risks and Considerations
- Liquidity: for a release design, the destination bridge contract must hold enough native tokens; testnets may require periodic or on-demand top-ups.
- Relayer as single point: the current design uses a trusted relayer; for trust minimization, future versions may use source-chain state proofs (e.g. block header + receipt proof); this phase uses signature + event verification.
- Polkadot Bridge: the "Polkadot Bridge" option in the UI remains a placeholder and can show "Coming soon" or be hidden.
3.7 Implementation and Extensions (Developer Reference)
| Area | File / Location | Description |
|---|---|---|
| Contracts | contracts/MonalloBridge.sol | lock / release (or mint), events, signature verification, nonce replay protection |
| Config / lib | lib/bridge.ts, env | Bridge addresses, ABI, lock/release helpers |
| Frontend | app/ai-pay/page.tsx | handleConfirmIntent Bridge + lock-mint: chain switch, lock, receipt and status |
| Backend | app/api/bridge/status/route.ts | Optional: relay status query |
| Relayer | relayer script/service | Listen Locked, sign, call release/mint |
| Data | lib/db | Optional: bridge_transfers table |
4. Architecture Design
4.1 System Overview
Monallo employs a multi-layered architecture inspired by modern distributed systems design patterns.
Client Layer → API Gateway → Intent Processing → Blockchain Adapter → Blockchain Networks
4.2 Security Considerations
- Multi-signature validation for large transactions
- Optimistic verification with fraud proofs for cross-chain operations
- Formal methods applied to critical smart contract interactions
5. Technology Stack
Frontend
- • Next.js 14 (React Framework)
- • TypeScript
- • Tailwind CSS
- • Framer Motion
- • Viem
Backend
- • Node.js Runtime
- • Next.js API Routes
- • Redis
- • PostgreSQL
- • OpenAI API
Blockchain
- • Ethereum (EVM)
- • Polkadot (Substrate)
- • Polygon POS
- • BSC
Infrastructure
- • Vercel
- • Docker
- • GitHub Actions
- • Cloudflare
6. Roadmap
Foundation
- ✓ Monallo Pay MVP
- ✓ Ethereum integration
- ✓ MetaMask support
Expansion
- ◐ Polkadot support
- ◐ Monallo Bridge
- ◐ Mobile app
Growth
- ○ Monallo Video
- ○ NFT Marketplace
- ○ DAO Governance
Ecosystem
- ○ DeFi Aggregator
- ○ Launchpad
- ○ DEX
This documentation is continuously updated. Last revised: February 2026.
