Autonomous AI Trading Agent on X Layer
Autonomous Β· Millisecond Β· Agentic
Talk to your wallet. Trade in 200ms. Watch the economy loop earn.
π₯ Watch the Demo Video β youtu.be/BX2x0ddn5-Q
- What is PulseTrader+?
- Key Numbers
- Architecture
- Hackathon Track: X Layer Arena
- Tech Stack
- Quick Start
- Project Structure
- Features Deep Dive
- API Reference
- Smart Contracts
- Agent Wallet & Builder Code
- Docker Deployment
- Testing
- Team
- License
PulseTrader+ is a fully autonomous AI trading agent that lives on X Layer Testnet. Users chat with it in natural language, and it:
- π§ Parses intent β Understands "swap 100 PUSDC to PWETH" using LLM function calling (18 tools)
- βοΈ Executes onchain β Signs & broadcasts real transactions from its agentic wallet
- β‘ Confirms in 200ms β Uses Flashblocks preconfirmations for sub-second feedback
- π° Earns revenue β Takes a 0.1% micro-fee on every swap β sweeps to treasury β reinvests via DCA
- π Sells premium data β 6 x402 micropayment-gated analytics endpoints (paid in PUSDC)
- π Composes via MCP β Exposes 14 tools + 3 resources + 3 prompts as a Model Context Protocol server
- π€ Acts autonomously β Rebalancer, fee sweep, and DCA reinvest run WITHOUT human prompting
- π Queries 12 OnchainOS skills β Real-time prices, DEX quotes, Uniswap pools, portfolio data
| Metric | Count |
|---|---|
| Agent Tool Definitions | 18 (LLM function-calling) |
| OnchainOS Skills Integrated | 12 (via MCP bridge) |
| MCP Server Tools | 14 |
| MCP Resources | 3 (portfolio, economy-loop, config) |
| MCP Prompts | 3 (trade_strategy, portfolio_review, economy_deep_dive) |
| x402 Gated Endpoints | 6 (with real onchain payment receipts) |
| REST API Endpoints | 24 |
| Autonomous Loops | 4 (rebalancer, fee sweep, DCA reinvest, Flashblocks listener) |
| Onchain Transactions | 129+ (Builder Codeβtagged on X Layer Testnet) |
| Unit Tests | 17/17 passing |
| Lines of Code | ~9,000 (hand-written TypeScript + Solidity) |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (Next.js 16 Β· Turbopack) β
β β
β βββββββββββββββ ββββββββββββββ βββββββββββββ βββββββββββββ β
β β ChatPanel β β Sidebar β β Docs β β PulseRing β β
β β Rich Swap β β Economy β β /docs β β Logo β β
β β Cards, Think β β Loop, Live β β route β β β β
β β Timeline β β TX Feed β β β β β β
β ββββββββββββββββ ββββββββββββββ βββββββββββββ βββββββββββββ β
βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β HTTP + WebSocket
βββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ
β Backend (Express + ws Β· Port 3001) β
β β
β ββββββββββββββ ββββββββββββββ ββββββββββββ ββββββββββββββββ β
β β AI Agent β β Onchain β β x402 β β Analytics β β
β β 18 tools β β Engine β β 6 gates β β 5 reports β β
β β Groq β β burn+mint β β onchain β β + AI signal β β
β β Scout β β β swap β β receipts β β β β
β β Cerebras ββ β β β β β β β
β β Groq 70B ββ β β β β β β β
β β Gemini β β β β β β β β
β βββββββ¬βββββββ βββββββ¬βββββββ ββββββ¬ββββββ ββββββββββββββββ β
β β β β β
β βββββββΌββββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββ β
β β OnchainOS MCP Bridge (12 skills) β β
β β market_price Β· market_prices Β· swap_quote Β· swap_chains β β
β β swap_liquidity Β· token_search Β· portfolio_all_balances β β
β β portfolio_total_value Β· gateway_gas Β· defi_search β β
β β token_liquidity Β· defi_detail β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Autonomous Loops (no human prompting) β β
β β π Rebalancer (60s) β πΈ Fee Sweep β π DCA Reinvest β β
β β β‘ Flashblocks WS β π·οΈ Builder Code on every TX β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β MCP Server (stdio Β· 14T / 3R / 3P) β β
β β Composable by Claude Desktop, other AI agents, any MCP host β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ
β viem 2.x + Flashblocks RPC
βββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββ
β X Layer Testnet (Chain ID 1952) β
β β
β ββββββββββββ ββββββββββββ ββββββββββββββββββββββββββββββββββββ β
β β PUSDC β β PWETH β β Agent Wallet β β
β β 6 dec β β 18 dec β β 0x5433B389d9C64f84aa01Dfc448β¦ β β
β β 0x9ebβ¦ β β 0x3717β¦ β β 129+ txs Β· Builder Code tagged β β
β ββββββββββββ ββββββββββββ ββββββββββββββββββββββββββββββββββββ β
β β
β Flashblocks RPC: https://testrpc.xlayer.tech/flashblocks β
β WSS: wss://xlayertestws.okx.com β
β Explorer: https://www.oklink.com/xlayer-test β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Requirement | Implementation | Evidence |
|---|---|---|
| Deploy on X Layer | PUSDC + PWETH contracts deployed to X Layer Testnet | PUSDC Β· PWETH |
| Flashblocks | 200ms preconfirmation polling on every swap via /flashblocks RPC |
flashblocks.ts β WebSocket to wss://xlayertestws.okx.com |
| Builder Code (ERC-8021) | PULSETRDRV1XLYR0 appended to every tx via ox/erc8021 dataSuffix |
chain.ts line 60+ β check any tx's input data |
| OnchainOS Skills | 12 skills via MCP bridge to onchainos mcp child process |
onchainos-mcp.ts β JSON-RPC over stdio |
| x402 Payment Protocol | 6 premium endpoints gated by PUSDC micropayments + onchain receipts | x402.ts β real token transfers on every payment |
| MCP Server | 14 tools + 3 resources + 3 prompts via @modelcontextprotocol/sdk |
mcp-server.ts β stdio transport, .mcp.json config |
| Onchain Activity | 129+ swap transactions with Builder Code attribution | Agent Wallet on OKLink |
| Autonomous Agent | 4 background loops: rebalancer, fee sweep, DCA reinvest, Flashblocks | rebalancer.ts, analytics.ts, flashblocks.ts |
| Layer | Technology |
|---|---|
| Chain | X Layer Testnet (Chain ID 1952, OP Stack L2) |
| Smart Contracts | Solidity 0.8.20, Hardhat 2, OpenZeppelin |
| Backend | TypeScript, Express, ws, viem 2.47 |
| AI / LLM | 4-provider failover: Groq-Scout β Cerebras β Groq-70B β Gemini (all free, all via OpenAI SDK) |
| Models | Llama 4 Scout 17B (Groq), Qwen 3 235B (Cerebras), Llama 3.3 70B (Groq), Gemini 2.0 Flash (Google) |
| Onchain Skills | OnchainOS CLI v2.2.9 β MCP bridge (JSON-RPC over stdio, 12 skills) |
| MCP | @modelcontextprotocol/sdk 1.29.0 β stdio transport |
| Frontend | Next.js 16.2, React 19, Tailwind v4, Framer Motion |
| Protocols | ERC-8021 (Builder Code via ox/erc8021), x402 (HTTP 402 Payment Required) |
| Confirmations | Flashblocks RPC (200ms preconfirmations) + WSS (newHeads) |
| Testing | Vitest β 17 unit tests |
| Deployment | Vercel (frontend) Β· Railway (backend) Β· Docker Compose (self-hosted) |
- Node.js 20+
- onchainos CLI installed at
~/.local/bin/onchainos - A Groq API key (free tier β or set Cerebras/Gemini as fallback)
- OKB testnet tokens from the X Layer Faucet
git clone https://github.com/midasbal/PulseTrader.git
cd PulseTrader
npm installcp .env.example backend/.envEdit backend/.env with your keys:
GROQ_API_KEY=gsk_... # Primary LLM (free 100K tokens/day)
CEREBRAS_API_KEY=csk-... # Fallback LLM (optional)
GEMINI_API_KEY=AIza... # Second fallback (free, https://aistudio.google.com/apikey)
AGENT_PRIVATE_KEY=0x... # Throwaway testnet wallet keycd contracts
npx hardhat run scripts/deploy.ts --network xlayer-testnetnpm run dev # Starts backend (3001) + frontend (3000) concurrently| Service | URL |
|---|---|
| Frontend | http://localhost:3000 |
| Docs | http://localhost:3000/docs |
| Backend API | http://localhost:3001 |
| WebSocket | ws://localhost:3001/ws |
| Health Check | http://localhost:3001/api/health |
npx tsx scripts/boost-activity.tsGenerates 60+ real swap transactions on X Layer Testnet, all tagged with Builder Code PULSETRDRV1XLYR0.
The .mcp.json file is pre-configured:
{
"mcpServers": {
"pulsetrader-plus": {
"command": "npx",
"args": ["tsx", "backend/src/mcp-server.ts"],
"cwd": "/path/to/PulseTrader"
}
}
}docker compose up --buildPulseTrader/
βββ README.md # This file
βββ .env.example # Environment template (all vars documented)
βββ .mcp.json # MCP server config for Claude Desktop
βββ .gitignore # Proper exclusions (.env, node_modules, .next, artifacts)
βββ docker-compose.yml # Production deployment (backend + frontend)
βββ package.json # Monorepo root (concurrently dev script)
β
βββ backend/ # Express + WS server
β βββ .env # Secrets (git-ignored)
β βββ .env.example # Full env template
β βββ Dockerfile # Standalone backend container
β βββ package.json # Dependencies: viem, openai, express, ws, zod, mcp sdk
β βββ tsconfig.json
β βββ vitest.config.ts
β βββ src/
β βββ server.ts # HTTP + WS server (24 endpoints)
β βββ agent.ts # AI agent core β multi-provider LLM + 18 tool definitions
β βββ chain.ts # X Layer chain config, viem clients, ERC-8021 dataSuffix
β βββ onchain.ts # Swap execution engine (burn + mint), live prices
β βββ onchainos-mcp.ts # OnchainOS MCP bridge (12 skills via JSON-RPC stdio)
β βββ flashblocks.ts # Flashblocks WebSocket listener (200ms newHeads)
β βββ analytics.ts # Trade history, fee revenue, economy loop, AI signal
β βββ rebalancer.ts # Autonomous portfolio rebalancer (55%/60% thresholds)
β βββ x402.ts # x402 payment gate (6 tiers, onchain receipts)
β βββ mcp-server.ts # MCP server (14 tools, 3 resources, 3 prompts)
β βββ abi/
β β βββ erc20.ts # ERC-20 ABI (mint, burn, transfer, approve, balanceOf)
β βββ __tests__/
β βββ onchain.test.ts # 17 unit tests (vitest)
β
βββ contracts/ # Hardhat project
β βββ hardhat.config.ts # X Layer Testnet network config
β βββ contracts/
β β βββ MockUSDC.sol # PulseUSDC (PUSDC) β 6 decimals, mint() + faucet()
β β βββ MockWETH.sol # PulseWETH (PWETH) β 18 decimals, mint() + faucet()
β βββ scripts/
β βββ deploy.ts # Deployment script
β βββ mint-to-agent.ts # Mint tokens to agent wallet
β
βββ frontend/ # Next.js 16 (App Router, Turbopack)
β βββ Dockerfile # Standalone frontend container
β βββ package.json
β βββ src/
β βββ app/
β β βββ globals.css # Electric Cyan design system + glass morphism
β β βββ layout.tsx # Dark theme, OG meta, Geist fonts
β β βββ page.tsx # Main app shell (sidebar + chat)
β β βββ docs/
β β βββ page.tsx # Full architecture documentation page
β βββ components/
β β βββ ChatPanel.tsx # Chat UI: rich swap cards, thinking timeline, tool traces
β β βββ Sidebar.tsx # 3-zone sidebar: identity, economy loop, live TX feed
β β βββ PulseRingLogo.tsx # Animated SVG logo
β βββ lib/
β βββ api.ts # Typed API client + WebSocket (auto-reconnect)
β
βββ scripts/
β βββ boost-activity.ts # Generate 60+ Builder Codeβtagged swap transactions
β βββ normalize-balances.ts # Normalize portfolio balances to target allocation
β
βββ mcp-server/ # MCP server standalone (symlink)
The agent uses multi-provider LLM failover with 18 tool definitions (OpenAI-compatible function calling):
| Tool | Description | Data Source |
|---|---|---|
get_balances |
Wallet token balances | Onchain (viem) |
get_swap_quote |
Price quote for a swap | Internal pricing |
execute_swap |
Execute a token swap | Onchain (burn+mint) |
create_dca |
Create DCA schedule | Internal scheduler |
manage_dca |
Pause/resume/cancel DCA | Internal scheduler |
get_agent_info |
Agent wallet + capabilities | Local state |
get_market_price |
Real-time token price | OnchainOS market_price |
get_batch_prices |
Batch token prices | OnchainOS market_prices |
get_dex_quote |
DEX aggregator quote (500+ sources) | OnchainOS swap_quote |
search_token |
Search tokens across 20+ chains | OnchainOS token_search |
get_portfolio |
Portfolio balances on any chain | OnchainOS portfolio_all_balances |
get_gas_price |
Gas prices for X Layer | OnchainOS gateway_gas |
get_premium_analytics |
x402-gated market/pool analytics + AI signal | x402 + OnchainOS |
get_x402_pricing |
x402 pricing tiers | Local state |
get_uniswap_pools |
Uniswap V3 pool search | OnchainOS defi_search |
get_token_liquidity |
Top liquidity pools for a token | OnchainOS token_liquidity |
get_defi_detail |
Pool details (APY, TVL, fee rate) | OnchainOS defi_detail |
get_rebalancer_status |
Autonomous rebalancer status | Local state |
Example conversations:
- "Swap 100 PUSDC to PWETH" β Executes burn+mint swap, confirms in 200ms
- "Set up a DCA: buy 10 PUSDC worth of PWETH every 60s, 5 times" β Creates automated schedule
- "Show me Uniswap pools for ETH on Ethereum" β Queries OnchainOS
defi_search - "What's the AI trading signal?" β Calls x402-gated AI analytics endpoint
The agent automatically fails over between 4 LLM providers when rate limits are hit:
Groq-Scout (primary β Llama 4 Scout 17B, 326ms avg response)
β 429/rate-limit
Cerebras (fallback 1 β Qwen 3 235B, free, ultra-fast inference)
β 429/rate-limit
Groq-70B (fallback 2 β Llama 3.3 70B Versatile, highest quality)
β 429/rate-limit
Gemini (final fallback β Gemini 2.0 Flash, free 15 RPM)
All four providers are 100% free β no credit card needed. Successful providers are auto-promoted to primary position for subsequent calls. All providers use the OpenAI-compatible SDK for consistent tool calling behavior.
Every swap is confirmed via Flashblocks RPC polling β transactions appear in ~200ms instead of the standard 2s block time.
- RPC:
https://testrpc.xlayer.tech/flashblocks - WSS:
wss://xlayertestws.okx.com(newHeads subscription) - Confirmation time is displayed in the chat UI swap cards
Every transaction includes PULSETRDRV1XLYR0 as a data suffix via ox/erc8021:
// chain.ts
import { dataSuffix } from "ox/erc8021";
const builderCode = dataSuffix({ builderCode: "PULSETRDRV1XLYR0" });
// Appended to every transaction automatically via viem's dataSuffix optionVerify: Check any agent transaction's input data on OKLink Explorer β the last bytes contain the encoded builder code.
PulseTrader+ bridges to OnchainOS via a child process MCP client (JSON-RPC over stdio):
Agent Tool β onchainos-mcp.ts β spawn("onchainos mcp") β JSON-RPC stdio β OnchainOS API
| # | OnchainOS Skill | Agent Tool | Category |
|---|---|---|---|
| 1 | market_price |
get_market_price |
DEX Market |
| 2 | market_prices |
get_batch_prices |
DEX Market |
| 3 | swap_quote |
get_dex_quote |
DEX Swap |
| 4 | swap_chains |
(internal) | DEX Swap |
| 5 | swap_liquidity |
(internal) | DEX Swap |
| 6 | token_search |
search_token |
DEX Token |
| 7 | portfolio_all_balances |
get_portfolio |
Wallet |
| 8 | portfolio_total_value |
(internal) | Wallet |
| 9 | gateway_gas |
get_gas_price |
Gateway |
| 10 | defi_search |
get_uniswap_pools |
DeFi / Uniswap |
| 11 | token_liquidity |
get_token_liquidity |
DeFi / Uniswap |
| 12 | defi_detail |
get_defi_detail |
DeFi / Uniswap |
Health check: GET /api/onchainos/status β makes a live market_price call to verify the bridge is operational.
Premium analytics are gated by the x402 micropayment standard (HTTP 402 Payment Required):
| Endpoint | Price | Description |
|---|---|---|
/api/analytics/market-overview |
0.50 PUSDC | Token prices + gas data from OnchainOS |
/api/analytics/pool-stats |
1.00 PUSDC | Uniswap pool TVL, volume, APY |
/api/analytics/trade-history |
0.25 PUSDC | Recent agent trades with P&L |
/api/analytics/economy-loop |
0.50 PUSDC | Revenue dashboard: fees, sweeps, reinvestments |
/api/analytics/ai-signal |
2.00 PUSDC | AI-generated trading signal (LLM reasoning) |
/api/analytics/full-analytics |
2.50 PUSDC | All 5 analytics in one response |
Payment modes:
demo: Creates a real onchain PUSDC self-transfer as a payment receipt β generates a verifiable X Layer transactiononchain: Verifies a user-providedtxHashfor PUSDC transfer to the agent wallet
Every payment generates a session token valid for 1 hour.
PulseTrader+ exposes itself as a fully-compliant MCP server for agent-to-agent composability:
Tools (14):
| Tool | Description |
|---|---|
pulsetrader_swap |
Execute token swap on X Layer |
pulsetrader_quote |
Get swap price quote |
pulsetrader_balance |
Check wallet balances |
pulsetrader_dca_create |
Create DCA schedule |
pulsetrader_dca_status |
Manage DCA schedules |
pulsetrader_market_price |
Real-time token price (OnchainOS) |
pulsetrader_search_token |
Search tokens across chains |
pulsetrader_agent_info |
Agent info + capabilities |
pulsetrader_uniswap_pools |
Search Uniswap V3 pools (OnchainOS) |
pulsetrader_token_liquidity |
Token liquidity pools (OnchainOS) |
pulsetrader_defi_detail |
Pool details: APY, TVL, fee rate (OnchainOS) |
pulsetrader_x402_analytics |
Premium analytics (auto-pay x402) |
pulsetrader_x402_pricing |
x402 pricing tiers |
pulsetrader_ai_signal |
AI trading signal (x402-gated, LLM reasoning) |
Resources (3):
| URI | Description |
|---|---|
pulsetrader://portfolio |
Live portfolio balances (JSON) |
pulsetrader://economy-loop |
Economy loop stats + treasury (JSON) |
pulsetrader://config |
Agent config, contracts, capabilities (JSON) |
Prompts (3):
| Prompt | Description |
|---|---|
trade_strategy |
Guided workflow: analyze portfolio β research token β suggest strategy |
portfolio_review |
Comprehensive review: balances, prices, allocation vs targets |
economy_deep_dive |
Full economy loop dashboard: fees, sweeps, reinvestments, x402 revenue |
PulseTrader+ runs 4 autonomous loops that operate WITHOUT any user prompting:
| Loop | Interval | Behavior |
|---|---|---|
| Portfolio Rebalancer | 60s check, 120s cooldown | Sells PWETH if >55% of portfolio; buys PWETH if PUSDC >60% |
| Fee Treasury Sweep | On trade events | When fees reach 2 PUSDC, sweeps 50% to treasury (burn address) |
| DCA Reinvest | On sweep events | When treasury reaches 5 PUSDC, auto-creates DCA buy of PWETH |
| Flashblocks Listener | Continuous (WSS) | Subscribes to newHeads for real-time block events |
All autonomous trades use the same swap engine β pay the 0.1% fee β tag with Builder Code β feed the economy loop.
The agent's self-sustaining economy:
User chats β Swap executes β 0.1% fee collected
β
Fee Treasury accumulates
β
βββββββββββββββββΌββββββββββββββββ
β β
Treasury Sweep x402 Payment Revenue
(burn 50% of fees) (sell premium data)
β β
Auto-DCA Reinvest Agent balance grows
(buy PWETH with surplus)
β
Portfolio rebalances automatically
β
Cycle repeats β
| Method | Path | Description |
|---|---|---|
GET |
/ |
Root proof-of-life (service name, chain, uptime) |
GET |
/api/health |
Health check (agent, flashblocks, onchainos, rebalancer) |
POST |
/api/chat |
Chat with AI agent (18 tools, reasoning traces) |
GET |
/api/agent |
Agent wallet info + capabilities |
GET |
/api/balances |
Token balances (PUSDC, PWETH, OKB) |
GET |
/api/quote |
Swap price quote |
POST |
/api/swap |
Execute swap (burn+mint, 200ms confirm) |
POST |
/api/reset |
Reset chat session |
| Method | Path | Description |
|---|---|---|
GET |
/api/prices |
Live token prices |
GET |
/api/trades |
Recent trade history |
GET |
/api/rebalancer/status |
Autonomous rebalancer state |
GET |
/api/treasury/status |
Fee treasury status |
| Method | Path | Description |
|---|---|---|
GET |
/api/onchainos/status |
OnchainOS bridge health check |
GET |
/api/onchainos/uniswap-pools?query=ETH |
Search Uniswap pools |
GET |
/api/onchainos/token-liquidity?address=0x... |
Token liquidity data |
| Method | Path | Description |
|---|---|---|
GET |
/api/x402/pricing |
Pricing info for all tiers (free) |
GET |
/api/x402/status |
Active payment sessions |
POST |
/api/x402/pay |
Create payment session (demo or onchain) |
GET |
/api/analytics/market-overview |
π 0.50 PUSDC β Token prices + gas |
GET |
/api/analytics/pool-stats |
π 1.00 PUSDC β Pool TVL, volume, APY |
GET |
/api/analytics/trade-history |
π 0.25 PUSDC β Agent trade history |
GET |
/api/analytics/economy-loop |
π 0.50 PUSDC β Revenue dashboard |
GET |
/api/analytics/ai-signal |
π 2.00 PUSDC β AI trading signal |
GET |
/api/analytics/full-analytics |
π 2.50 PUSDC β All analytics combined |
Connect to ws://localhost:3001/ws for real-time events:
- β‘ Flashblock
newHeads(every 200ms) - π DCA execution events
- π Rebalancer trade events
- π Heartbeat (every 30s)
| Property | Value |
|---|---|
| Address | 0x9eb8679A851A383D1E2678c29ed92FbB85c72c0E |
| Decimals | 6 |
| Standard | ERC-20 (OpenZeppelin) |
| Features | Public mint(address, uint256), faucet() (1000 PUSDC per call) |
| Property | Value |
|---|---|
| Address | 0x3717C06A65CEd56A99e8ffef1c65a9193e991411 |
| Decimals | 18 |
| Standard | ERC-20 (OpenZeppelin) |
| Features | Public mint(address, uint256), faucet() (1 PWETH per call) |
User: "Swap 100 PUSDC to PWETH"
1. BURN β Transfer 100 PUSDC to 0x000...dEaD (burn address)
βββ Flashblocks confirmation (~200ms)
βββ Builder Code: PULSETRDRV1XLYR0
2. PRICE β Calculate output: 100 PUSDC Γ· $2,500/ETH = 0.04 PWETH
βββ 0.1% fee deducted: 0.03996 PWETH to user, 0.00004 PWETH as fee
3. MINT β Mint 0.03996 PWETH to agent wallet
βββ Flashblocks confirmation (~200ms)
βββ Builder Code: PULSETRDRV1XLYR0
| Property | Value |
|---|---|
| Agent Address | 0x5433B389d9C64f84aa01Dfc4488594F3A72eA1e6 |
| Builder Code | PULSETRDRV1XLYR0 (16-char ERC-8021) |
| Wallet Type | Throwaway testnet wallet (agentic key) |
| Transaction Count | 129+ (all Builder Codeβtagged) |
docker compose up --build| Container | Port | Description |
|---|---|---|
pulsetrader-backend |
3001 | Express API + WebSocket + MCP bridge |
pulsetrader-frontend |
3000 | Next.js standalone (Turbopack build) |
Both containers use multi-stage builds for minimal image size. The frontend uses output: "standalone" for serverless-ready deployment.
| Service | Platform | URL |
|---|---|---|
| Frontend | Vercel | pulse-traderplus.vercel.app |
| Backend | Railway | pulsetrader-production-3d28.up.railway.app |
| Explorer | OKLink | X Layer Testnet Explorer |
cd backend && npx vitest run17/17 tests passing β covering:
- Token registry resolution (symbol β address β decimals)
- Price calculation engine (PUSDC β PWETH at live rates)
- Fee computation (0.1% = 10 bps, with rounding verification)
- Swap quote generation (input/output/fee breakdown)
- Edge cases (zero amounts, unknown tokens, max precision)
| Role | Builder |
|---|---|
| Solo Builder | @midasbal |
MIT
Built for the OKX X Layer Hackathon β X Layer Arena Track
~9,000 lines of TypeScript + Solidity Β· 18 agent tools Β· 12 OnchainOS skills Β· 14 MCP tools Β· 6 x402 endpoints Β· 4 LLM providers Β· 129+ onchain transactions