DEV Community

ABROWNFOX001
ABROWNFOX001

Posted on

abrownfox001 Series (3/4): Slot Lifecycle — Enter, Scratch, Redeem

GitHub: https://github.com/abrownfox0/abrownfox001-twap60-prediction-trigger-system

YouTube walkthrough: https://www.youtube.com/watch?v=XzhugRL6BV4

Part 2 covered the target variable: 60-second Chainlink TWAP and a calibrated P(up).

This post is the execution layer. A good probability is useless if you overpay, over-hold, or never cut a decaying ticket.

Live profile: @abrownfox001

1. The State Machine

Every active btc-updown-5m-* market runs one lifecycle:

SlotOpen
  → Wait for edge
  → Accumulate in 45–55¢
  → Re-score every 10–30s
       ├─ conviction decayed → Scratch ~breakeven
       └─ conviction intact  → Hold
            → Redeem winner at $1
Enter fullscreen mode Exit fullscreen mode

This is not market making.

This is not 99¢ farming.

It is directional micro-forecasting + risk culling.

2. Entry Rules

The engine buys only when both conditions are true:

  1. |P(up) − 0.5| clears the edge threshold
  2. The ask sits in the fair 45–55¢ band

Typical live behavior from public samples:

Item Observed pattern
Clip size ~$50–175
Per-slot cap roughly $200–500
Average held entry ~0.503
Median buy time ~47 seconds after open
Fills in 45–55¢ ~90%

Why not the first 5 seconds?

Early books are often thin. Paying 53–55¢ for a 50¢ fair value deletes the edge before the thesis starts.

Why stagger?

Entries are spread through the first half of the slot so the bot sources liquidity near 50¢ instead of lifting the whole offer.

3. The Re-Score Loop

After entry, the position is not “set and forget.”

Every 10–30 seconds the engine recomputes:

  • latest 60s TWAP vs open reference
  • updated P(up)
  • time remaining
  • whether the original thesis is still alive

This loop is the difference between a directional engine and a hope-and-hold script.

4. Scratch Exits Are the Second Edge

Most directional bots are only entry engines.

This system treats scratching as a first-class strategy component.

Public footprint:

  • Buy/sell mix about 73% / 27%
  • ~930 markets with buy and sell at almost the same price
  • Average scratch path: buy ~0.504 → sell ~0.503

Those sells are not profit-taking. They are conviction culls.

if signal decayed:
    taker sell back to flat
    recycle capital into the next live read
else:
    keep holding
Enter fullscreen mode Exit fullscreen mode

Why this matters:

  • A raw 55–58% signal still bleeds if every weak loser is held to $0
  • Filtering can lift the resolved book toward ~60.7% even if the raw model is less accurate
  • Capital turnover stays high

5. Timing Inside the Slot

Observed BTC 5m activity by seconds after open:

Bucket Share
0–5s 6.3%
5–30s 16.6%
30–150s 35.7%
150–270s 26.1%
270–300s 15.3%

Interpretation:

  • Buys skew earlier — accumulate near fair value
  • Sells skew later — cut decaying tickets as the slot matures

That pattern is exactly what a re-score + scratch design should look like on-chain.

6. Hold-to-Resolution Path

Only tickets that keep clearing conviction stay open.

If the slot resolves in favor of the held side:

  • redeem at $1
  • that is where the main PnL is realized

The system almost never depends on fancy mid-slot profit-taking. PnL comes from:

  • fair entries
  • fewer full losers
  • winners that reach redemption

7. Execution Constraints That Actually Matter

At ~50¢, fees are not the main enemy. These are:

  1. Fill quality — do not pay 3¢ extra just to be first
  2. Latency — a slow loop buys the move after it is priced in
  3. Book depth — “breakeven scratch” requires liquidity near 50¢
  4. Idempotent orders — no double-sends when the socket blips
  5. Per-slot caps — one hot slot should not consume the whole book

The public TypeScript shell implements discovery, CLOB routing, and the state machine. The live calibrated trigger remains private.

8. Code Map for This Layer

Module Role in the lifecycle
markets.ts Find the active BTC 5m slot
engine.ts enter → hold → scratch → redeem
clob.ts CLOB v2 orders
signal.ts updated P(up) for each re-score
config.ts size, thresholds, dry-run switches

Windows path: Abrownfox001.exe

Developer path: npm start (dry-run by default)

9. Common Implementation Mistakes

  • Entering immediately at slot open
  • Using one giant clip instead of staggered size
  • Holding every fill to resolution
  • Scratching too fast on a smoother 60s TWAP path
  • Scratching too slow after the thesis is already dead
  • Treating sell-side volume as “the strategy failed” instead of “the filter worked”

10. What Part 4 Will Cover

Architecture is not the same as results.

Part 4 covers:

  • public sample numbers and what they do / do not prove
  • risks after the TWAP60 cutover
  • why the signal stays closed
  • how to verify the live wallet independently

Links

Not financial advice. Paper or micro-size first.

If you have more questions, please feel free to contact me at any time: https://t.me/abrownfox001

My Polymarket Activity: https://polymarket.com/@abrownfox001?tab=activity

#Polymarket #BTC #TWAP #TradingBot #AlgoTrading #PredictionMarkets #QuantTrading
Enter fullscreen mode Exit fullscreen mode

Top comments (0)