Project name
Mocat AI - AI-powered copy trading MINI App secured by Phala TEE on the LINE APP.
Project description.
Mocat AI is a comprehensive social trading platform that combines AI agent validation with seamless LINE Messenger integration for perpetual USDT trading on the Kaia blockchain. The platform bridges expert traders, AI developers, and retail traders through a dual-interface system:
Expert traders use the web dashboard to post trading signals and verify their credentials through Moca Airkit integration. AI agent developers deploy trading validation algorithms to Phala Network's Trusted Execution Environment (TEE) to earn fees from signal validation. Retail traders access the platform through a LINE Mini-dApp, receiving validated trading signals directly in their messenger app with one-tap copy trading functionality.
The core innovation lies in the AI validation network where multiple agents analyze trading signals in real-time using TEE-secured execution, providing transparent and trustworthy signal verification. This creates a three-sided marketplace where expertise meets algorithmic validation meets accessible retail trading.
Key features include Moca credential verification for expert traders, LINE Official Account integration with rich menus and push notifications, real-time AI agent consensus validation, Pyth Network price feeds, and seamless copy trading with risk management controls.
Technologies used
Frontend: Next.js 15, TypeScript, React 19, Tailwind CSS, Radix UI
LINE Integration: LIFF SDK, LINE Bot SDK, Dapp Portal SDK, LINE Pay
Backend: Node.js, Express.js, TypeScript, Supabase, PostgreSQL
Blockchain: Kaia network, Smart contracts (Foundry), Wagmi, Viem
AI Agents: ElizaOS framework, Phala Network TEE deployment
Oracles: Pyth Network for real-time price feeds
Authentication: Moca Airkit credential system
Infrastructure: Docker, PM2, Redis for caching
Basic architecture
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Expert Web │ │ LINE Mini-dApp │ │ Agent Developer │
│ Dashboard │◄──►│ (Retail Users) │◄──►│ Platform │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│ │ │
└───────────────────────┼───────────────────────┘
│
┌─────────────────────┐
│ Coordinator Server │
│ (Express.js + DB) │
└─────────────────────┘
│
┌────────────────────────┼────────────────────────┐
│ │ │
┌───────────────┐ ┌─────────────────┐ ┌──────────────────┐
│ AI Validation │ │ Smart Contracts │ │ Pyth Oracles │
│ Network (TEE) │ │ (Kaia Chain) │ │ (Price Feeds) │
└───────────────┘ └─────────────────┘ └──────────────────┘
Data Flow: Expert traders → Signal posting → AI agent validation → Signal broadcast → Retail copy trading → Smart contract execution
Source code
GitHub Repository: https://github.com/gabrielantonyxaviour/mocat_ai
License: MIT License (open-source)
Multi-component architecture with separate modules for frontend, backend, smart contracts, and AI agents
Deployment
Main App: https://mocat-app.vercel.app/ - Expert trader and agent developer web dashboard
Perps Protocol: https://dxykaia.vercel.app/ - DeFi perpetual trading interface
LINE Mini-dApp: https://miniapp.line.me/2008000120-PpjgOBoe - Retail trader mobile interface
AI Agents Dashboard: https://2d2c1109ce725b4b96af54647e149282a80ebd0d-8090.dstack-prod8.phala.network/ - Public monitoring of 3 DeFi analyst agents
TEE Agent API: https://2d2c1109ce725b4b96af54647e149282a80ebd0d-3000.dstack-prod8.phala.network - Live AI validation network running on Phala Network
The platform demonstrates a fully functional social trading ecosystem with real AI agents validating trading signals in a trusted execution environment, accessible through both web and LINE Messenger interfaces.