Trade ideas, not tokens.
TAGO Leap is a narrative-first trading terminal for Hyperliquid. Instead of picking individual tokens, users bet on themes and narratives - AI dominance, ETH killers, meme seasons - and the platform handles position construction, hedging, and risk management automatically.
Built for HLH 2025 (Hyperliquid Hackathon).
- Describe your thesis - "AI tokens will outperform ETH over the next month"
- AI suggests a trade - Claude generates a hedged pair: long TAO/RENDER, short ETH
- One-click execution - Pear Protocol executes both legs atomically on Hyperliquid
- Automated management - Salt-powered robo managers enforce risk limits and run exit strategies
| Feature | Status |
|---|---|
| AI-powered trade generation from user thesis | ✅ |
| Long/short pair execution via Pear OpenPosition API | ✅ |
| Basket trades (multiple assets per side) | ✅ |
| EIP-712 auth + JWT token management | ✅ |
| Position management (fetch, close) | ✅ |
| Historical backtesting before execution | ✅ |
Key implementation: Claude Sonnet generates NarrativeSuggestion objects with validated assets, then Pear's API executes atomic pair trades on Hyperliquid L1.
- Bridge from any chain to Hyperliquid
- Real-time USD value display for all tokens
- Route details with ETA and expected amounts
- Progress tracking (Idle → Quoted → In-Progress → Completed)
- Policy-controlled trading accounts
- Automated strategy execution
- Risk constraints (max leverage, daily limits, allowed pairs...)
- Non-custodial - user funds stay in their account
- Historical backtesting before trading
- Long-only, short-only, and pair trade charts
- Max drawdown and return metrics
- CoinGecko integration with caching and rate limiting
┌─────────────────────────────────────────────────────────────────┐
│ TAGO Leap Frontend │
│ (Next.js 14 + TailwindCSS) │
└─────────────────────────────────────────────────────────────────┘
│
┌─────────────────────┼─────────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ Pear Service │ │ LIFI Service │ │ Salt Service │
│ (Fastify) │ │ (Fastify) │ │ (Fastify) │
└───────┬───────┘ └───────┬───────┘ └───────┬───────┘
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ Pear Protocol │ │ LI.FI │ │ Supabase │
│ (Hyperliquid)│ │ (Bridging) │ │ (Policies) │
└───────────────┘ └───────────────┘ └───────────────┘
| Layer | Technology |
|---|---|
| Frontend | Next.js 14, React 18, TailwindCSS, Framer Motion |
| Wallet | wagmi, RainbowKit, viem |
| Database | Supabase (PostgreSQL) |
| Charts | Recharts |
| Services | Fastify (TypeScript) |
| AI | Anthropic Claude Sonnet |
| Monorepo | Turborepo, pnpm |
# Clone
git clone https://github.com/RealKevinApetrei/tago-leap.git
cd tago-leap
# Install
pnpm install
# Configure
cp .env.example .env
# Edit .env with your API keysCreate a .env file in the root directory:
# Supabase
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
# Service Ports
PEAR_SERVICE_PORT=3001
LIFI_SERVICE_PORT=3002
SALT_SERVICE_PORT=3003
# Pear Protocol
PEAR_API_BASE_URL=https://hl-v2.pearprotocol.io
# LI.FI
LIFI_API_BASE_URL=https://li.quest/v1
LIFI_INTEGRATOR=tago-leap
LIFI_API_KEY=your-lifi-api-key
# Anthropic (AI suggestions)
ANTHROPIC_API_KEY=your-anthropic-api-key
# Hyperliquid
HYPERLIQUID_API_BASE_URL=https://api.hyperliquid.xyz
HYPEREVM_CHAIN_ID=999
# Salt Service
PEAR_SERVICE_URL=http://localhost:3001
# Frontend (public)
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
NEXT_PUBLIC_PEAR_SERVICE_URL=http://localhost:3001
NEXT_PUBLIC_LIFI_SERVICE_URL=http://localhost:3002
NEXT_PUBLIC_SALT_SERVICE_URL=http://localhost:3003
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your-walletconnect-project-id# Start frontend (port 3000)
pnpm devRequirements: Node.js >= 20, pnpm >= 9
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Connect │────▶│ Onboard │────▶│ Trade │────▶│ Robo │
│ Wallet │ │ (Bridge) │ │ (Narratives)│ │ (Automate) │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
│ │ │ │
│ LI.FI API Pear API Salt Policies
│ (any chain → HL) (pair execution) (risk limits)
│ │ │ │
└───────────────────┴───────────────────┴───────────────────┘
│
Hyperliquid L1
(perpetual trading)
- Connect - RainbowKit wallet connection (any EVM chain)
- Onboard - LI.FI bridges assets to Hyperliquid in one click
- Trade - Describe a narrative, AI suggests a pair trade, execute via Pear
- Robo - Enable automated strategies with policy guardrails
| Endpoint | Description |
|---|---|
POST /api/pear/narratives/suggest |
AI generates pair trade from thesis |
POST /api/pear/bets/execute |
Execute pair trade via Pear |
GET /api/pear/narratives/custom/performance |
Historical backtest data |
GET /api/lifi/onboard/options |
Get bridge route options |
POST /api/salt/accounts/[id]/pair-trade |
Execute with policy enforcement |
GET /api/salt/strategies |
List automated strategies |
| Component | Files | Description |
|---|---|---|
| Pear Auth | usePearAuth.ts, pearClient.ts |
EIP-712 signing, JWT tokens, agent wallet setup |
| Trade Execution | betBuilder.ts, execute/route.ts |
Order construction, dry-run validation, atomic execution |
| AI Narratives | claudeClient.ts, narrativeService.ts |
Claude Sonnet generates validated trade suggestions |
| Backtesting | coingeckoClient.ts, hyperliquidClient.ts |
180-day historical data, pair performance, max drawdown |
| Bridging | lifiClient.ts, onboard/ routes |
Multi-chain quotes, route optimization, progress tracking |
| Policy Engine | policyEnforcer.ts |
Leverage, daily notional, allowed pairs validation |
| Strategies | takeProfit.ts, trailingStop.ts, vwapExit.ts, adxMomentum.ts |
Automated exit strategies with 60s loop |
Built for Hyperliquid Hackathon 2026
- Pear Protocol - Pair trade execution
- LI.FI - Cross-chain bridging
- Salt - Policy-controlled accounts
- Hyperliquid - Perpetual DEX
- Anthropic - Claude AI