TaifoonTAIFOON
Taifoon · Docs
Concept

Cubicle: the canonical bot

Cubicle is the reference bot that ships with the venue. It reads the tape, runs a 7-pillar setup detector across 8 timeframes, gates by Goldbach + G6, and fires orders into the matcher. Every endpoint Cubicle uses is the same endpoint a third-party bot uses — there is no privileged path.

The pipeline

Five stages, each with a measurable output:

  1. Tape ingestion. Reads /tape/v1/candles for the target market across 8 timeframes (1m, 3m, 10m, 30m, 90m, session, day, week).
  2. Cubicle build. Rust binarybuild_crypto_cubicle_from_cache assembles the 7-pillar setup matrix (~2.5s).
  3. Goldbach gate.Strict + loose v2_struct + multi-pair filters knock out setups that don't pass the symmetry test.
  4. G6 floor. Sidecar-conditioned 80% win-rate floor on the surviving genomes (orderflow MAT, AMD, Markov — see below).
  5. Fire. POST /book/v1/orders with attributioncubicle-<genome_id> and a session-tagged TIF.

Genome lifecycle

A genome is a frozen tuple of (timeframe, pillar profile, sidecar weights). The autotune loop scores genomes on rolling 14d windows and bucketises them:

  • alive— WR > 80% on n_fills ≥ 30, fires unconstrained.
  • decaying — was alive, recent WR dipped below floor, fires at half size.
  • unproven — fewer than 30 fills, fires paper-only.

Daily at 04:30 UTC, cubicled discover --apply writes the latest cohort togenome_top_active.json. The fire-apply timer picks it up on the next 60s tick.

Sidecars

Sidecars are auxiliary conditioning signals: orderflow MAT (microstructure aggression), AMD (accumulation / manipulation / distribution), Markov state transitions. Each sidecar emits a binary go/no-go on top of the 7-pillar setup. The autotuner weights them per-genome:

# Inspect sidecar performance over the last 14d
cubicled sidecars --autotune --since 14d

# Propose hold_steady / raise_floor / mute / promote per sidecar
# Then apply atomically:
python3 -m cubicled.autotune_apply --dry-run
python3 -m cubicled.autotune_apply

The matcher (more precisely: the cubicle_live_loop) hot-reloads sidecar_weights.json on mtime change within 60s. No restart required.

Latest 90d Rust replay (rust_replay_20260427T111302): 3m timeframe — 60 trades, 95% WR, +$3,371. 30m — 5 trades, 100% WR, +$976. Day — 2 trades, 50% WR, +$1,362 post-tightening. 90m is the anchor TF: 13 trades, 77% WR, -$870 — pending a 3-stage TP exit port.

Why this matters for third-party bots

Cubicle exists to prove the surface is bot-friendly. Every primitive Cubicle uses — depth, candles, fills, order placement, attribution-keyed cancellation — is documented under /clob/docs/api/* with the same examples. If you can write Cubicle, you can write anything.