fix(badge): emit per-chain badges instead of misleading global aggregate#377
Merged
Conversation
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  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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Backing logic untouched: /api/badge/[slug]/[provider]?chain= already supported the scoped rank computation. This is a product-page-only fix.