on-chain prediction bot
InvisiPaw
On-chain Polymarket BTC prediction bot. It reads Bitcoin from Chainlink's on-chain oracles, signs its own orders, and places 5-minute up/down predictions on Polymarket's order book — live on Polygon mainnet.
Python 3.12 · FastAPI · web3.py · React 19 dashboard
Why it exists
Polymarket runs 5-minute Bitcoin up-or-down markets around the clock — the purest possible test of short-horizon signal against noise. InvisiPaw is my attempt to trade them properly: an autonomous, self-custodial bot with risk rails I can audit line by line, not a black box pointed at a wallet.
It reached Polygon mainnet the hard way — a native order signer after the official tooling was abandoned, continuous on-chain reconciliation, circuit breakers at every layer — and it still treats paper trading as the default. Going live is a deliberate, four-gate decision, never a config accident.
Safety
Four gates before a live dollar.
Paper trading is the default. A real order leaves the machine only when four independent gates are all opened by hand — miss any one and the execution engine refuses.
LIVE_TRADING_AUTHORIZED
An explicit environment flag that defaults to off. Unset, the execution engine refuses to construct a live order at all — every instance trades simulated equity.
Bounded max_trade_usd
A hard per-trade dollar cap that must be set to a finite, sane number. No cap, no trade — position sizing can never silently scale past what was authorized.
LIVE_SAFETY_ACK literal
A typed acknowledgement string — a human has to write out the exact phrase accepting live-trading risk. A config template or copy-paste default can't open this gate by accident.
POLYMARKET_FUNDER_ADDRESS
The funded wallet must be named explicitly. Orders can only ever spend from the one address that was deliberately wired in — there is no wallet discovery.
Under the hood
Built like it handles money.
Because it does. The interesting parts of the build, from the oracle feed down to the crash-recovery story.
Chainlink price feeds
BTC price comes from Chainlink's on-chain oracles over Polygon RPC — the same source the markets settle against, not a lagging exchange API.
Native EIP-712 signer
A hand-rolled V2 order signer replaced the abandoned py-order-utils after Polymarket's schema migration — the wire protocol is owned, not borrowed.
Multi-instance strategies
Each instance owns one strategy core plus a stack of modifiers — and its own equity, circuit breaker, daily-loss cap, and trade history.
Continuous reconciliation
A reconciler continuously checks orders and positions against the chain, with alerts and a wallet-drift breaker when reality and the books disagree.
Auto-resume from SQLite
Every boot re-hydrates active instances and open trades from SQLite — a restart mid-trade picks up exactly where it left off.
Auditable risk rails
Kelly-bounded sizing, circuit breakers, probation rate-limiting, and a live-spend timeline — all configured in one risk.yaml and inspectable in the dashboard.
The strategies stay home.
InvisiPaw is a private build — the edge is the point. Same Flowtron workflow that scoped this site, though.