1. What the system observed. A settings file had held a minimum-hold-time value — 22 hours — since roughly 2026-06-04. Its intent: stop the funding-decay and sign-flip exit conditions from closing a position within hours of opening, before enough funding could accrue to cover the fixed round-trip fee.
2. Why it mattered. Without a minimum hold, a position can open, immediately see a brief funding-rate wobble, and close again within minutes — paying the full entry-plus-exit fee for a trade that never had a chance to earn anything back. This is a near-guaranteed small loss every time it happens, not a market outcome.
3. What the model expected. With the setting in place, this failure mode should not have been possible — the code was supposed to check elapsed hold time before firing a decay or grace exit.
4. What changed. A review of the exit-check code found the setting was being read into a variable — and that variable was never referenced anywhere else. Dead code. The safeguard existed on paper and did nothing in practice, for the entire two months since it was added.
5. Funding, price movements, and costs. 23 trades on one venue, all opened before 2026-06-04, closed this way — purely on short-term funding-rate noise, before the round-trip fee could be recovered.
6. Final result. Total loss attributable to this bug: −$219.72. Small in absolute terms, but 100% avoidable and 100% attributable to the bug rather than the market — every one of these 23 trades was a loss the strategy's own rules were supposed to prevent.
7. What was learned. The fix was one line: wire the existing setting into the four grace/decay exit conditions that were supposed to check it. The lesson is broader — a safeguard that exists in configuration but isn't actually read by the code that's meant to enforce it is functionally identical to having no safeguard at all, and it can sit undetected for months because everything looks configured correctly. This is exactly the kind of bug a backtest replaying historical data would never surface (it would have applied the rule correctly by construction) — only running the real rules against real, ongoing data exposed it. See How we test entry and exit rules without live capital for why that gap matters.