System Design
Core Modules
1
API Gateway
REST/WS entry point for users, and AI agents
2
RPC Proxy
REST/WS RPC relay to the HL fullnode, using official RPC as backup
3
User Identifier
Verifies user identity and links to the corresponding agent wallet if configured
4
Signature Verifier & Risk Controller
Verifies EIP-712 intents and checks leverage/balance
5
MCP
Provides unified MCP APIs for AI Agents to fetch real-time market information and send trade requests
Pre-Liquidation Clearing
The pre-liquidation process:- Aggregator monitors HL margin health
- When near liquidation threshold, Aggregator uses reduce-only IOC/limit via Agent Wallet to unwind at better price
- User preserves equity and saves memory