Skip to content

fix(badge): emit per-chain badges instead of misleading global aggregate#377

Merged
Flotapponnier merged 3 commits into
devfrom
fix/badge-per-chain-honesty
Jun 10, 2026
Merged

fix(badge): emit per-chain badges instead of misleading global aggregate#377
Flotapponnier merged 3 commits into
devfrom
fix/badge-per-chain-honesty

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Closes the dRPC-style misleading badge bug. When a provider's global aggregate is #1 but the per-chain ranks show leadership only on a subset of chains, the embeddable badge section was still emitting an unscoped 'Ranked #1 on <bench>' card.

New flow:

  • Benches without chainDimensions: unchanged.
  • Benches where the provider leads on every chain: single global badge.
  • Benches where the provider leads on a subset of chains: drop the global badge, emit one per-chain badge per chain led, with chain label in the alt text and X intent tweet so downstream claims are accurate.

Backing logic untouched: /api/badge/[slug]/[provider]?chain= already supported the scoped rank computation. This is a product-page-only fix.

Addresses the Mobula conflict-of-interest gap flagged in external SEO
audits and required for the 'neutral methodology arbiter' positioning.

New section iii on the About page declares:
- Mobula funds the project + why
- Mobula competes in 5 benchmarks and leads 2 (made explicit above the fold)
- Three safeguards: open Prometheus data, open harness source, public
  methodology review (with the Coinpaprika story as the live example)
- No paid tier, no sponsored slots, no token policy
- Hosting funding source

E-E-A-T signal: makes the conflict legible, links the recent methodology
review PRs (#349, #352, #353), and gives Search Console / AI citation
engines a concrete reason to treat the bench as authoritative.
…ards

Providers who clear the rank-1 threshold see embed-ready badge cards on
their /products/[slug] page. Today it surfaces an SVG preview plus an
HTML copy block. This adds two more ship-helpers:

- 'Share on X' link with a pre-baked tweet intent. Opens X with the
  ranking claim, the bench URL and the @OpenChainBench tag pre-filled.
  Removes the friction of having to write the post; anchors every share
  back to us as a tagged tweet that the provider's followers will see.
- 'Copy Markdown' details block for GitHub READMEs and docs. The
  markdown form ![alt](badgeUrl) is what 80% of crypto provider docs
  use, second only to HTML in landing pages.

Both reuse the existing /api/badge/<bench>/<provider> dynamic SVG so
the displayed rank always reflects the live leaderboard.
…of chains

Closes the misleading-badge bug: a provider with a global aggregate #1
on a chain-dimensioned bench (like dRPC #1 cross-region on
rpc-capabilities) was getting an unscoped 'Ranked #1 on Fastest free
public RPC' badge even when they only led the rankings on a subset of
chains. Embedders broadcasting that badge would parrot an inaccurate
claim and torch the bench's neutrality positioning the first time a
competitor diffed the per-chain ranks.

New logic in /products/[slug] Embeddable badges section:

  - Benches without chainDimensions: keep one global aggregate badge
    per #1 finish (unchanged behavior).
  - Benches with chainDimensions where the provider leads on every
    declared chain: still one global badge. A true cross-chain leader
    earns the unscoped claim.
  - Benches with chainDimensions where the provider leads on a
    subset only: drop the global badge entirely, emit one badge PER
    chain led using the existing ?chain= query param. Each card's
    title, alt text, HTML / Markdown snippets and X intent tweet
    include the chain label so the claim downstream is honest.

The /api/badge/[slug]/[provider]?chain=<chain> endpoint already
supported the per-chain rank computation. This PR just stops the
product page from generating the misleading unscoped URL when a
chain-restricted leader exists.
@Flotapponnier
Flotapponnier merged commit 1b716f9 into dev Jun 10, 2026
1 check failed
@Flotapponnier
Flotapponnier deleted the fix/badge-per-chain-honesty branch June 18, 2026 20:14
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