A decentralized perpetual futures DEX on Ethereum L2 (Arbitrum + Base), with an integrated AI agent layer. Trade ETH/BTC perpetuals up to 25x with USDC, or delegate to autonomous agents bounded by scoped ERC-4337 session keys.
- X: x.com/astereumapp
- GitHub: github.com/astereumapp
- Buy $AST: gmgn.ai
- Perpetual trading · ETH-USDC and BTC-USDC markets, up to 25× leverage
- Natural-language co-pilot ·
"long ETH 5x with $500, stop loss at -10%"→ parsed intent → trade preview - Autonomous agents · ERC-4337 smart accounts with scoped session keys (spend cap, max leverage, whitelisted markets, expiry, kill-switch)
- Multi-chain wallet · Ethereum L2 (primary) + Solana (beta) connect flows
- Live prices · CoinGecko public API with graceful fallback, simulated tick every 2s
- Blueprint aesthetic · Gold-on-black, Cormorant Garamond display, JetBrains Mono data
- Fully responsive · Mobile-first layouts, collapsible chat, scrollable positions
- Demo mode by default · All flows functional with mock state, zero blockchain calls
astereum/
├── app/
│ ├── agents/page.tsx Agent fleet view
│ ├── trade/page.tsx Trading view
│ ├── globals.css Design tokens, grids, animations
│ ├── layout.tsx Fonts + metadata + favicon
│ └── page.tsx Home / landing
├── components/
│ ├── AgentsClient.tsx Agent cards, activity log, create modal
│ ├── BlueprintBackground.tsx Animated canvas dots + CSS grid
│ ├── Footer.tsx
│ ├── Header.tsx Logo, nav, X/GH/Buy $AST, Wallet (ETH+Solana)
│ └── TradeClient.tsx Market selector, chart, order form, positions, chat
├── lib/
│ ├── demo-store.ts React hook + sessionStorage persistence
│ ├── intent-parser.ts Regex NL → structured TradeIntent
│ └── prices.ts CoinGecko fetch + fallback + formatters
├── public/
│ ├── favicon.ico + 16/32/48/64/128/192/512 PNGs
│ └── images/ (logo.png, banner.png)
├── types/index.ts
├── preview.jsx Standalone single-file React preview
├── package.json
├── next.config.js
├── tailwind.config.js
└── tsconfig.json
Requires Node.js 18.17+ (Next.js 14 requirement).
npm install
npm run dev
# → http://localhost:3000Commands:
npm run dev— start dev server on :3000npm run build— build for productionnpm start— start production servernpm run lint— lint the codebase
No env vars required for demo mode.
See DEPLOY.md for a step-by-step guide to uploading the code to GitHub (via the web UI — no git CLI required) and deploying to Vercel.
| Button | Destination |
|---|---|
| X (top-right) | https://x.com/astereumapp |
| GitHub | https://github.com/astereumapp |
| Buy $AST | https://gmgn.ai |
| Connect Wallet | In-app dropdown: Ethereum/L2 or Solana (demo addresses) |
- State lives in sessionStorage (
astereum.demo.v1) — clears per tab - Initial balance: $10,000 USDC (virtual)
- A seeded agent
Grid-Scalper v1is pre-populated - All orders are simulated — no gas, no signatures, no real trades
- Prices are fetched once from CoinGecko, then random-walk every 2s
- Go to
/trade, click Long ETH, open a $500 position at 5x - Watch PnL update live in the positions table
- In the chat, type:
long BTC 10x with $200, stop loss at -8% - Go to
/agents, click Deploy Agent, configure scoped policy - Use the Kill button to revoke a session key
When you're ready to move past demo:
- Wallet integration: Replace the mock
connect()incomponents/Header.tsxwithwagmi + RainbowKit(EVM) and@solana/wallet-adapter-react(SVM). - On-chain trades: Implement
openPosition()inlib/demo-store.tsto call the Astereum router contract with a signed transaction. - Real oracle: Swap CoinGecko for Pyth Network WebSocket feed via
@pythnetwork/pyth-evm-js. - LLM assistant: The regex parser in
lib/intent-parser.tsis a first defense layer. Behind it, add an LLM call (Claude/GPT) inapp/api/chat/route.tswith strict Zod schema validation before hitting any contract. - Session keys: Deploy a SessionKeyValidator module (ZeroDev, Biconomy, or Rhinestone) and wire it to
components/AgentsClient.tsx.
- The NL Assistant intent parser is regex-only and runs on the client. Malicious prompts can never exceed UI-level scope.
- Any future LLM call must go through:
- LLM generates JSON matching strict schema (Zod)
- Client previews the exact transaction
- User signs — or session key signs if within policy bounds
- Session-key validators enforce caps on-chain, not in the UI.
Perpetual futures are high-risk. Liquidation can exceed deposited collateral. Not available to US persons. Always trade within your risk tolerance.
MIT. © 2026 Astereum Labs.
