# Fee-aware anti-chase paper challenger pattern

Use this when a tiny live or live-preview Hyperliquid strategy closes most trades negative and user observes entries happen at the worst local moment.

## Trigger

- Live fills show repeated negative closes, low win rate, or short-hold losses.
- User reports entries are chasing local tops/bottoms.
- Paper/replay looked good but Mainnet fills reveal slippage/fee/chop reality.

## Immediate response

1. Treat this as an **edge failure**, not a sizing/leverage issue.
2. Keep or activate live-entry blocks / kill-switch.
3. Verify current live process state and read-only Mainnet reconcile.
4. Confirm any open position has a reduce-only stop; manage/close only with explicit user approval.
5. Pull real exchange fill history and compute: closed count, wins/losses, win rate, closed PnL, fees, net after fees, coin attribution, short-hold vs longer-hold buckets.
6. Document the finding in runtime reports/learnings.

## Replacement strategy pattern

Build a **paper-only** challenger; do not tune live settings directly.

Core gates:

- Primary/liquid coins only until evidence supports alts.
- Anti-chase: block entries after overextended 15m/1h moves unless there is a meaningful pullback/retest.
- Retest/reclaim confirmation: prefer buying a held retest over buying the breakout candle.
- Breadth filter: require multiple core candidates/market support, not an isolated alt spike.
- Relative-strength and liquidity filters.
- Fee-aware hurdle: expected edge must clear round-trip fee + spread + slippage + funding by a conservative multiple, e.g. >=4x.
- Paper-only runtime with `mainnet_signed_action=false` and explicit `CTB_PAPER_TRADING=true`, `CTB_DRY_RUN=false`.

## TDD workflow

1. Add failing tests first for:
   - overextended no-retest entry is rejected;
   - valid retest/reclaim creates an OrderIntent;
   - weak edge versus realistic costs is rejected;
   - recent fill-history evaluator marks low-win/negative-fee-adjusted samples as `edge_failure`.
2. Implement pure strategy dataclasses/functions before wiring runtime.
3. Add runtime integration test that verifies paper-only env and signal journal schema.
4. Run focused tests and then the full suite.

## Evaluation gate before live discussion

Do not restart live from a one-shot scan. Require at least 30-50 closed paper/shadow trades with:

- positive net-after-fees;
- acceptable win rate or profit factor;
- no negative short-hold bucket pattern;
- no excessive top-coin concentration;
- no API/degraded/reconcile blockers;
- open exposure included in the scorecard.

## Reporting style

Keep the user-facing report short and trader-focused: live/no-live decision first, then key numbers and next gate. Put implementation details in runtime reports unless the user asks for code detail.
