From 5dcbf360579b5028289a394885eefcedd97c8118 Mon Sep 17 00:00:00 2001 From: Flotapponnier Date: Sun, 20 Sep 2026 00:06:40 +0200 Subject: [PATCH] bridge-monitor: the slippage pulse is gated on the existence of a quote, not on a positive quoted fee (Mobula Sol to Base quoted the full ticket back and its +$0.003 slippage was skipped) Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01HJgbZCqjR4nvCfcJSzofbw --- harnesses/bridge-monitor/cmd/monitor/executor.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/harnesses/bridge-monitor/cmd/monitor/executor.go b/harnesses/bridge-monitor/cmd/monitor/executor.go index 870832f70..404ee394e 100644 --- a/harnesses/bridge-monitor/cmd/monitor/executor.go +++ b/harnesses/bridge-monitor/cmd/monitor/executor.go @@ -1053,7 +1053,11 @@ func (e *Executor) recordExecutionMetrics(result *ExecutionResult) { // it would inject spurious 0 / negative samples into the realized-cost bench. // Slippage is only meaningful against a quoted fee; Near Intents used to // publish its whole realized fee here (QuoteFeeUSD was never set). - if result.Success && result.RealizedOnChain && result.QuoteFeeUSD > 0 { + // Gate on "a quote existed", not on "the quoted fee is positive": a + // quote that promises the full ticket back (Mobula Sol to Base quoted + // $3.0000 out of $3) has a quoted fee of exactly zero, and its slippage + // (+$0.003 realized) is the most honest row on the page. + if result.Success && result.RealizedOnChain && result.QuotedOutputUSD > 0 { pulse(bridgeQuoteSlippageUSD, labels, result.ActualFeeUSD-result.QuoteFeeUSD) } if result.ExecGasUSD > 0 {