MutantDeFi · Build

Assemble a trader on Virtuals

Your agent reads DataFi instruments over x402 and trades on its own keys. DataFi publishes GM!. MutantDeFi is the guide. Your agent decides.

1 · Create the agent

Create an agent on Virtuals. It is an independent consumer: it pays per read, holds its own wallet, and owns its decisions. MutantDeFi does not run it.

2 · Give it DataFi instruments

GM! is published on datafi.live by venue and horizon. Every cell names its source_venue and its address, GM! / VENUE / INSTRUMENT / HORIZON. GM!/HYPERLIQUID is built from Hyperliquid prices for Hyperliquid traders. DataFi also prints GM!/KRAKEN_FUTURES series for Kraken Futures traders. A Virtuals trader on Hyperliquid does not read them.

SeriesBookBarHorizonStatusExample cell
GM!/HYPERLIQUIDCore-61h1DproductionBTC1D/DFY
GM!/HYPERLIQUIDCore-6 · opposite-sign oscillator1h4HproductionBTC4H/DFY
GM!/HYPERLIQUIDCrypto-31h8Hexperimentalnot served

Pay per read in USDC on Base with x402. Machine origin: https://gm.mutantdefi.com, moving to https://gm.datafi.live. Read /.well-known/x402 there for prices.

  • /v1/gm/conviction?symbol={BASE}4H/DFY ($0.10) — The basis cell: signed conviction, hurdle-net omega, venue, address, timestamps.
  • /v1/gm/conviction_history?symbol={BASE}4H/DFY&limit=720 ($0.10) — The cell's own hourly record, oldest first, ending at the live cell. The band ranks it, so it exists on day one. Free with an API key.
  • /v1/feed/metadata (free) — Feed version, params hash, and the venue series block. A changed params hash means re-reading the cell's history. The 4H book's support (opposite_sign_oscillator) decides gate 2.
  • /.well-known/x402 (free) — Prices, network, asset and payTo for the public routes.
  • /v1/gm/market_line?universe=core6&horizon=4H ($0.10) — The omega market line for the book, for the record.
  • /v1/gm/hazard?symbol={BASE}4H/DFY&side={side}&entry_ts={unix} ($0.10) — DataFi's exit hazard for the lot you describe. Advisory: logged, never an exit.

3 · Give it the trader policy

A Hyperliquid policy: τ from your Hyperliquid maker and taker rates, a post-only entry only in the index's own tail and only when the expected return, net of funding, clears 2τ, a lot size from the trade-side gain mass, and a floor that rises over an 4-hour hold. It is carried in SOUL.md. The selection and exit numbers are provisional until a Hyperliquid paper record confirms them.

  • Band. The 87.5th percentile of |signed_conviction| over the trailing 720 hours, excluding this hour, with at least 168. Long at or above the band, short at or below its negative. The series is seeded at start from the cell's own history (conviction_history) and extended by each hourly read. No trade under 168 hours.
  • Hurdle-net. The cell's omega, netted at its omega_hurdle, points to your side (omega_direction on composite cells). On an opposite-sign book (the 4H basis: support opposite_sign_oscillator in /v1/feed/metadata) this part is skipped: the conviction fades the move omega reads, so omega points the other way by construction and is not same-side support. Your own Ω at τ_H over the taken sample is logged; it exceeds 1 exactly when E[R | taken] > τ_H, so the profit bar implies it.
  • Profit-net. E[R | taken] − f₄ > τ_H + π with π = τ_H, so the bar is h* = 2 τ_H, where τ_H = τ + ρ·4 adds the time value of the notional at your declared r_f. f₄ is the funding your side pays over 4 hours at the current hourly rate. E[R | taken] is the mean side-signed 4h log return over trailing hours the band admitted on this side, at least 20 of them.
  • Blocks. Not while a same-side stay-out holds, while mid is within τ of the last flatten, after the kill, or when the hour's cell was refused.
  • Size. Rank the trade-side gain mass (G0 long, L0 short, of 4h log returns over 720 hours) against its prior 720 hours: thirds give 3, 5 or 8 lots; unranked gives 5. Round down to szDecimals; skip under the $10 minimum order value.

Exits, whichever comes first:

  • Floor. Long when mid ≤ entry·(1 + floor(t)); short when mid ≥ entry·(1 − floor(t)). floor(t) = (6·τ_b/4)·min(t, 4) − 12·τ_b.
  • Move-against. Long when mid ≤ entry·(1 − 12·τ_b); short when mid ≥ entry·(1 + 12·τ_b).
  • Time. The lot is 4 hours old. Winners and losers alike.

Paper until the record confirms: 60, 120, 180 closed lots, mean above zero, day-clustered P(mean > 0) ≥ 0.80. The kill stops new lots at −10 R, where one R is a lot's own initial floor risk (12 τ_b of notional), so it scales with each instrument's loss mass.

4 · Execute on Hyperliquid

GM! tells your agent the indexed information state. Hyperliquid tells it the trading state: mark, spread, funding, position, margin, orders, fills. Keep the two apart.

Log every decision with the cells it read (venue, horizon, signed, confidence, omega), the x402 receipt, the venue state at the time, and what followed. That record is what tells you whether the policy works for your agent.

5 · Build it

The developer docs cover x402 payment in Python and TypeScript, Virtuals ACP, the cell, the read budget, the full policy, the SOUL.md, a reference hourly loop, execution, and the record.