fix(prices): give the book spread limit room for an ordinary Tuesday

We lowered MAX_BOOK_SPREAD_PCT to 25 earlier today to refuse a WOW-USDT book
we stand on both sides of, at 42% wide. That worked, but 25 sat directly on
top of this market's ordinary breathing: WOW-BTC widened to 26.1% within the
hour, failed the limit, and fell back to a stale last print at 12.0 sat
against a 10.5 sat book. A 14% error in the feed then tripped the desk's own
divergence rail, which held every WOW market.

35 clears the normal case and still refuses the reflection. The docblock we
replaced said a 30% spread is a normal Tuesday on these venues; today is
evidence for that.

Verified against today's live books rather than a fixture, since this repo
has no test framework: WOW-BTC at 11/13 sat is 16.7% wide and passes at both
limits, so the served mark does not move today. WOW-USDT at 42.0% and WOW-XMR
at 40.8% fail at both. The change buys headroom for the next time the book
breathes past 25, and nothing else. GRIN is unaffected: it prices from Gate.io
and is deliberately outside NICHE_TICKERS.
This commit is contained in:
jwinterm
2026-09-17 18:53:06 -04:00
parent 1f26456215
commit 7ae7c48f12
+9 -2
View File
@@ -113,9 +113,16 @@ async function fetchEcbFiat(): Promise<Record<string, number>> {
* $0.01000 midpoint dragged the blended mark to $0.00901 against a truth of
* $0.00805. A spread that wide on these venues means no counterparty stands
* between our quotes, which is the desk pricing itself. WOW-BTC at 10/11 sat is
* 10% wide and prices correctly; 25 keeps that and refuses the reflection.
* 10% wide and prices correctly; 25 kept that and refused the reflection.
*
* Raised to 35 hours later, on evidence: WOW-BTC widened to 26.1% inside the
* hour and fell back to a stale print at 12.0 sat against a 10.5 sat book, a
* 14% error that then tripped the desk's own divergence rail. 25 sat on top of
* this market's ordinary breathing. The docblock this replaced said a 30%
* spread is a normal Tuesday here, and that was right; 35 clears it while
* still refusing the 42% book we are both sides of.
*/
const MAX_BOOK_SPREAD_PCT = 25;
const MAX_BOOK_SPREAD_PCT = 35;
/**
* A cexswap `last` print older than this is not evidence of the current price.