Once working equity exceeds stake_cap/pct ($6,250 at 4%), surplus cash sweeps
to state["reserve"]/portfolio reserve - banked, never bet, immune to drawdown
- keeping stakes at the $250 level where marketable fills sit inside typical
book depth. Feed/summary gain reserve; realized = cash+exposure+reserve-bank.
June backfill: equity $15,684 (+1468%), $9,185 banked, next stake pinned $250.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
+$2,454 copy P&L, 72.4% conviction win (144-55), $257 avg bet, 2.1h median
lead. Added to bot configs (p80 floor $115.27) + backtest set. June backfill
with him: +2677% (in-sample selection bias + compounding, next stake $1,070 -
treat as a ceiling; depth-aware fills become necessary at these clip sizes).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Realism section updated (0.95 entry cap, asymmetric guard, measured lag);
new gotchas list leads with the CLOB winner=False semantics that caused the
2026-07-02 settle bug.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- guard: by rule, a price BELOW the sharp's fill always passes (strictly
better odds; the symmetric guard once skipped a 0.70->0.51 improvement that
won +$36). Only adverse drift is gated by price_guard_pct.
- entry cap: June sweep (0.75-1.0) peaked at max_entry 0.95 - >95c favorites
added ~23 wins yet lowered final equity (slip+fee eat 1-3% payouts, capital
compounds better elsewhere); deep caps cut real winners. Set in all configs
+ portfolio MAX_ENTRY (env-overridable for sweeps; PORTFOLIO_OUT added).
Canonical June backfill: +716%, 219W/52L, $374 fees.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
All 7 missed entries were insta-settled as losses under the pre-fix semantics.
Chain-verified reality: 4 won, 2 lost, 1 still unresolved (reopened). Missed
P&L -249.17 -> -18.36.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The CLOB reports winner=False on EVERY token of an unresolved market; only a
True winner anywhere means resolved. resolution_price treated False as "lost",
so the 60s poller settled live in-play positions as instant losses 1-3 min
after entry (June's ~2h Actions cadence masked it - markets had genuinely
resolved by the next check). Same semantics fixed in _market's resolved-cache
gate and validate_timing._clob_winner (unresolved held bets were counted as
losses, biasing copy_pnl selection downward).
Also: _record_lag now AGGREGATES fills per token (ADD used to overwrite the
display record, showing one fill's cost against the whole position's P&L -
the Cost $20.84 vs P&L -$57.30 confusion).
State repaired: the four July bets all actually WON on-chain (verified by
token winner flags) - settled correctly, +$225.40 proceeds restored, book
$1,045.19 (+45.19 realized, 4W/0L).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Root README now leads with what actually runs (Mac daily pipeline, Railway
copybot worker, Discord watcher, static dashboard), the July live test, the
realism model (fees/lag/dynamic sizing/missed-bet ledger), a new-developer
quickstart, secrets map, and file map; research story condensed with current
numbers (12 fee-aware sharps, +531% in-sample backfill clearly labeled).
live/README: fee-aware selection, dynamic-sizing portfolio, three dashboard
feeds, copybot now 24/7 on Railway (was "in progress").
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
max_trade/max_position guards lifted in both paper configs; backtest STAKE_CAP
-> inf. June backfill uncapped: +531%, next stake $252, $195 fees.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Engine default + both bot configs + backtest set to 0 (cap logic stays, opt-in
via risk.max_per_event). June backfill without the cap: +465%, 237 resolved
(202W/35L), 22 missed, $170 fees.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
preflight_live.py verifies key/auth, USDC balance, market access, and redeem
gas read-only (no orders). LIVE_TEST.md is the supervised $5-trade runbook.
config.live.json + copybot_state.live.json gitignored (key never committed).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Engine records every blocked OPEN (no free cash, event cap, price guard) with
its would-be stake; settle_resolved marks them won/lost at CLOB resolution with
hypothetical P&L (fee-inclusive) - the live counterpart of the backtest's
Missed table. Feed gains missed[] + missed_pnl.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- engine (copytrade): stake_usd() = bankroll_pct x current equity (cash + open
cost basis) - Kelly-style compounding both directions - halved while equity
sits below 80% of its high-water mark; new risk.max_per_event (default 2)
blocks stacking correlated markets on one real-world event (dated-slug prefix
grouping; LSB1 once put 6 conviction bets on a single match).
- copybot: feed/summary report the dynamic stake, stake_pct, event_cap, hwm.
- portfolio backtest mirrors the exact same rule (PCT 4%, clamp $5-$150,
EVENT_CAP 2, brake 80%/half), with per-bet stakes in every table row and a
persistent CLOB slug cache for event grouping. June backfill: +426% vs +168%
flat - compounding amplifies the in-sample month; July live is the test.
Misses fell 62 -> 19 cash-missed (+26 deliberate event-cap skips): smaller
early stakes capture more signals.
- configs: bankroll_pct 0.04, max_trade/max_position 150 (runaway guards),
max_per_event 2.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- portfolio.py: follow set -> the fee-aware copy-positive sharps (Kruto2027,
shisan888, fortuneking) + LSB1; entries pay the 0.03 sports taker fee and a
+0.5%/~90s lag haircut (entry_model); backfilled from June 1; feed exposes
fee_rate/slip/lag_est_s/fees_paid and unreal uses true cost basis.
- copybot.paper.json: same four wallets, p80 conviction floors from the cache
(Kruto $123.08, shisan $704.33, fortuneking $970, LSB1 $231). Fresh $1k state
committed separately by the bot - clean July book.
- host/start.sh + nixpacks: turnkey 24/7 worker for Railway/Fly/VPS - clones
with GITHUB_TOKEN, resumes the committed state, polls 60s, publishes
state+feed+fills back through publish_feed. Replaces the Mac poller.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- bets table gains asset (token id = position identity), src/ts (endpoint
provenance + close time), resolved (False = early-sold in an unended market;
won is a curPrice mark). Auto-migrates v1 in place (~8s, 3,697 exact dupes
merged); legacy rows carry NULLs until their wallet refreshes.
- refresh is now an upsert by token instead of a wallet wipe: rows sliding out
of the rolling pull window survive, so per-wallet history accumulates into a
permanent archive. Same-asset rows from both endpoints (partially-closed
positions) dedupe to the larger-stake row - kills the two-endpoint
double-count class (~35k suspect pairs found in the audit).
- p stored raw (0 = avgPrice missing), clamped on read by get_bets, so missing
prices stay distinguishable from real 0.1c longshots; insider CLI + oos clamp
their own direct use.
- resolved_bets(strict=True): a failed page raises instead of returning a
silently truncated history; get_bets no longer caches or marks failed pulls
(pre-v2 an API error cached the wallet as empty-and-fresh for 14 days -
Kruto2027 was a live victim of this last night).
Verified: migration 18,289,320 -> 18,285,623 rows; forced refreshes of two
sharps show 0 same-asset dups, 0 legacy/new mixing, clamped reads, conviction
stats intact (Kruto conv win 73%).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- get_json: catch OSError + http.client.HTTPException (RemoteDisconnected/
IncompleteRead escaped the retry loop and killed last night's validate_timing
run on a single dropped keep-alive).
- validate_timing: per-wallet retry+exclude guard so one bad wallet can't take
out the whole selection; regenerated watch_sharps.json — the first fee-aware,
resolved-only sharp list (10 copy-positive holders of 254).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>