Skip to content

feat: split token-quote availability from route coverage - #1787

Merged
Flotapponnier merged 2 commits into
devfrom
feat/token-quote-availability-split
Aug 5, 2026
Merged

feat: split token-quote availability from route coverage#1787
Flotapponnier merged 2 commits into
devfrom
feat/token-quote-availability-split

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Summary

  • Adds token_quote_api_ok_total Prometheus counter (incremented on HTTP 200, regardless of outAmount) alongside the existing success and attempts counters
  • Replaces RecordProbe(ok bool) with RecordProbeDetailed(apiOk, routeFound bool) in all 6 provider adapters (jupiter, kyberswap, mobula, odos, paraswap, relay)
  • Adds availability and coverage_given_available query slots to each provider in benchmarks/token-quote-coverage.yml

Why: Previously p50 == p99 == mean == success because all four slots computed the same success/attempts ratio. Network errors and API 4xx were conflated with "no route found" making it impossible to tell if a low score meant the API was down or the routing engine had gaps.

After this change:

  • availability = api_ok / attempts (is the API up and returning 200?)
  • coverage_given_available = success / api_ok (given the API responded, did it find a route?)
  • p50 stays as success / attempts to preserve historical continuity

Deploy

Harness needs rebuild on VPS after merge: docker build --no-cache on ocb-par-main for the token-quote-coverage service. New counter starts accumulating from restart; old data is unaffected.

Add token_quote_api_ok_total counter (HTTP 200 regardless of outAmount)
and RecordProbeDetailed(apiOk, routeFound) in all 6 provider adapters.
YAML gets availability and coverage_given_available query slots per provider.
- publishedAt 2026-08-04 -> 2026-08-05
- Mobula aggregate 677 -> 678 ms (2 occurrences: table + scorecard)
- GeckoTerminal aggregate 12,340 -> 12,319 ms (3 occurrences)
- StatTable caption: p50 -> mean of per-chain p50s
- Removed speculative Mobula Solana mechanism sentence; replaced with
  caveated explanation noting reorg exposure
- 8.2x Mobula-Base gap -> 7.9x (773/98)
- RH Chain 4x faster blocks -> 2x faster block cadence (Base 200ms/RH 100ms)
- 28 pp wallet-labels gap -> 24 pp (79.9 - 55.6 = 24.3)
- Quote section: removed 'entire cohort' claim; fixed Mobula framing to
  reference availability confound instead of 29% miss rate
- Methodology: removed dangling Singapore regional-table reference
- coverage_given_success -> coverage_given_available (correct metric name)
- Removed auto-rendered duplicate citation block from page.tsx layout
@Flotapponnier
Flotapponnier merged commit 2f6c05b into dev Aug 5, 2026
1 check failed
@Flotapponnier
Flotapponnier deleted the feat/token-quote-availability-split branch August 5, 2026 16:32
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.

1 participant