Skip to content

bridge execution benches audit round 2: uniform quoted fee, on-chain-only realized cost, realized fee in bps, stale threshold and window wording from the spec, pre-pulse history purged - #2533

Merged
Flotapponnier merged 1 commit into
devfrom
fix/bridge-exec-audit-round2
Sep 19, 2026
Merged

Flotapponnier merged 1 commit into
devfrom
fix/bridge-exec-audit-round2

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

From the bridge-realized-cost audit (NOT READY, 4 blockers, 7 majors):

  • Quoted fee = ticket − quoted output for every bridge (Mobula's provider fee summed gas paid in native, giving a constant negative "slippage" at every ticket).
  • Realized cost only from the on-chain read (RealizedOnChain): no quote projection published as "landed"; fallbacks counted.
  • Realized fee (bps of ticket) from execution-only pulses (bridge_fees_usd is also the quote loop's); ticket-mix output panel removed.
  • Pre-pulse history purged (old persistent samples outweighed new pulses ~1000:1 for a week). Benches read empty until tomorrow's 10:00 UTC cycle.
  • Site: LiveIndicator stale threshold from expected_freshness_seconds; Benchmark.window drives Results caption, infobox and citation suffix.

Rules reloaded and harness redeployed on the VPS.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HJgbZCqjR4nvCfcJSzofbw

…finition (ticket minus quoted output), realized cost published only from the on-chain read, realized fee in bps of the ticket from an execution-only metric, stale threshold and window wording follow the spec, pre-pulse history purged

ocb-bench-audit on bridge-realized-cost: NOT READY, 4 blockers, 7 majors.

- Blocker 4: Mobula's slippage was a constant negative offset at every
  ticket (-$0.0015 on Base at $3 and at $30) because its quoted fee summed
  TotalFeeUsd + GasFeeUsd, gas the realized fee (ticket minus landed) can
  never contain; Relay and LI.FI derived theirs from the output. Every
  bridge now uses ticket minus the output the quote promised
  (QuotedOutputUSD), so both sides of the subtraction are defined the same
  way. Gas we pay stays its own panel.
- Blocker 3 and major 2: the "Realized fee" panel read bridge_fees_usd,
  which the quote loop also writes at $5/$50/$300 and on off-triangle
  routes (LI.FI $0.417 shown against $0.032 executed), and the realized
  output panel was a ticket-mix number. New execution-only pulses
  bridge_exec_realized_fee_usd and bridge_exec_realized_fee_bps; the panel
  is "Realized fee (bps of ticket)"; the output panel is gone.
- Major 1 and 3: fee, output and slippage pulses are published only when
  the destination balance delta was read (RealizedOnChain); a failed leg
  no longer publishes the quote's projection as "landed" and a fallback
  is counted in bridge_realized_fallback_total instead of an exact zero.
- Blocker 1: the 7-day window still held the pre-pulse persistent samples
  (about 2,880 per old execution against 3 per new one), so no new
  execution could move a median before 2026-09-26. Deleted from
  Prometheus for the execution cost series and the retired 24h rules;
  the benches read empty until the 10:00 UTC cycle tomorrow.
- Major 4: LiveIndicator takes staleAfterSec from the bench
  (prometheus.expected_freshness_seconds, carried on Benchmark as
  expectedFreshnessSec), so a daily bench is not "Stale" 23 hours a day.
- Major 5: Benchmark.window (prometheus.window) drives the Results
  caption, the infobox "Leader (7d)" and the citation suffix instead of a
  hardcoded 24h.
- Copy: quoted-fee definition, gating, cohort of four, 7-day findings.

Rules reloaded (14), harness redeployed. validate 236, tsc, eslint, bun
test 255, go vet/build/test.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJgbZCqjR4nvCfcJSzofbw
@Flotapponnier
Flotapponnier merged commit f99e156 into dev Sep 19, 2026
1 check failed
@Flotapponnier
Flotapponnier deleted the fix/bridge-exec-audit-round2 branch September 19, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants