Skip to content

Trading agent evolution: funding-rate arb on L2 (post-hackathon roadmap) #17

@fritzschoff

Description

@fritzschoff

Tracking the post-hackathon evolution of Tradewise from an x402 quoting agent into an autonomous trading agent whose capital is raised via AgentShares IPO and whose revenue flows back through RevenueSplitter.

Full design rationale in TRADING_AGENT_BRIEF.md. Highlights:

  • Edge: funding-rate arbitrage. Low MEV competition, mechanical revenue, easy to attest. Capacity ~$50K with ETH-only — fine for IPO-scale capital.
  • Venues: Hyperliquid (perp) + Aerodrome on Base (spot). GMX v2 is the backup if HL trust profile or bridge latency flunks M1.
  • Stack: new TradingTreasury contract becomes the SharesSale deployer. AgentShares/RevenueSplitter/SharesSale untouched. x402 demoted to optional read-side surface.
  • KeeperHub: load-bearing for capital safety. funding-poll, rebalance, kill-switch (6h dead-man's-switch), dividend-distribute.

Milestones

M0 — Today ✅

  • x402 quoting agent live
  • AgentShares + RevenueSplitter + SharesSale deployed
  • ERC-8004 reputation loop closes
  • RevenueSplitter double-pay bug fixed + redeployed on Base Sepolia (#TBD)

M1 — Testnet plumbing (~2 weeks)

  • `TradingTreasury` contract: holds capital, executes trades via delegated EOA, streams realized fees to splitter
  • Funding-rate simulator that emits ticks (stubbed exchange on Base Sepolia)
  • Agent opens/closes mock positions, P&L flows through `RevenueSplitter`
  • Kill-switch via KeeperHub heartbeat (6h timeout)
  • Every state transition emits a clean event for the trade log
  • Verify before M2: Hyperliquid mainnet maker/taker fees, funding rate distribution, withdrawal latency under stress
  • Gate to M2: Treasury contract audit-clean, kill switch tested by pausing the agent EOA

M2 — Live with $100 personal capital, no IPO (~4 weeks)

  • Real Hyperliquid mainnet account funded
  • Real Aerodrome on Base mainnet integration
  • Owner is sole shareholder for ≥30 days
  • On-chain attested trade log via 0G Storage
  • HL withdrawal stress-tested
  • Gate to M3: 30-day P&L positive, matches attested trade log within 1bp, zero unexpected kill-switch events

M3 — Open IPO (~8 weeks)

  • Mainnet SharesSale at $0.50/share × 10k shares = $5K initial cap
  • M2 P&L data published
  • Treasury contract audit complete
  • Kill switch demoed publicly
  • RevenueSplitter has paid out at least one real dividend during M2
  • Gate to M4: 60 days running with no significant drawdown, ≥3 distinct shareholders bought at IPO (at least one not founder-adjacent)

M4 — Multi-strategy (~16 weeks)

  • BTC pair (HL ↔ Base spot)
  • SOL pair
  • Basis trades (funding-sign flipping)
  • Cap raise beyond $5K

Honest cuts (if we commit to this direction)

Things to remove from the current repo since the pivot makes them noise or worse:

  • Pricewatch agent (fake data labelled `source: "uniswap-mainnet"`)
  • MCP stub at `app/api/mcp` (advertised in agent-card, returns 501)
  • AgentMerger / AgentBids contracts
  • ReputationCredit (actively misleading once real capital is at risk)
  • ComplianceManifest (front-runnable, not load-bearing for this thesis)
  • The three test-client crons that exist to drive the demo

KeeperHub round-two pitch

Existing: KH used for `heartbeat`, `reputation-cache`, `compliance-attest` — cosmetic.

Proposed: KH becomes load-bearing for capital safety. The kill-switch is the killer demo: shareholders verify on-chain that if the agent operator vanishes, their capital comes home automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions