Add Robinhood Chain exchange rates - #123
Merged
Merged
Conversation
Contributor
Author
Register the robinhood pluginId across the v3 provider maps so its assets
resolve a rate. The v3 API keys on {pluginId, tokenId}, so an ETH-native
chain still priced at zero until the pluginId itself was registered.
Native ETH prices off ethereum on both CoinGecko and CoinMarketCap.
CoinGecko lists this chain as platform 'robinhood' (chain_identifier 4663),
which maps its tokens, but it carries no address for the canonical USDC,
USDT and WBTC coins, so those three bridge to their Ethereum counterparts
through the cross-chain map. WETH and USDG need no entry: CoinGecko does
list those here, so the daily sweep maps them on its own.
CoinMarketCap has no platform id for this chain yet, so token lookups
there stay null and fall through to CoinGecko.
j0ntz
marked this pull request as ready for review
August 13, 2026 18:23
j0ntz
force-pushed
the
jon/robinhood-chain
branch
from
August 13, 2026 18:23
25a2243 to
c65ac1c
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
peachbits
approved these changes
Aug 28, 2026
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.

Technical Design Document
robinhood-chain.md
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Description
Asana task
Robinhood Chain assets have no exchange rate, so every fiat figure for them renders
$0in the app: wallet list, wallet scene, send confirm and swap quote. On the exchange scene the zero destination value also trips a "High Price Impact" warning, which reads to users as a broken or predatory quote on an otherwise correct swap.The cause is that the v3 API keys on
{pluginId, tokenId}, not on currency code. Robinhood Chain's native asset is ETH, but therobinhoodpluginId was never registered, so no provider could resolve it. Reproduced against production before the change, on the hosts the app actually calls (RATES_SERVERSin edge-react-guisrc/util/network.ts):rates1,rates2andrates4all behave identically.What this registers
coingeckoMainnetCurrencyMappingethereumcoingeckoPlatformIdMappingrobinhoodcoinmarketcapMainnetCurrencyMapping1027coinmarketcapPlatformIdMappingnulldefaultTokenTypesevmdefaultPlatformPriority630defaultCrossChainMappingCoinGecko lists this chain as platform
robinhood(chain_identifier: 4663,native_coin_id: ethereum) with 534 coins on it, so its tokens map automatically. It carries no Robinhood Chain address for the canonicalusd-coin,tetherorwrapped-bitcoincoins, which is why those three need explicit cross-chain entries. WETH and USDG need none: CoinGecko does list those here, so the daily sweep maps them on its own.Deploying this: one part is automatic, one part is not
templatesin aDatabaseSetupare written only when the document does not yet exist, so on an existing deployment they are inert. That splits this change in two.Automatic. The native ETH rate needs only the mainnet maps, and the daily
tokenMappingengine rewrites<provider>:automatedas{...existingDoc, ...uidMappingFromTheCodeConstant}, with the code constant spread last. Deploying this branch fixes the reported$0bug on the next engine run with no manual step.Needs a one-time write to the production
rates_settingsdatabase. The token rates do not self-propagate, because the platform, token-type, priority and cross-chain docs are template-only and already exist. Their values are exactly the ones in this diff:That asymmetry is worth fixing separately: the mainnet maps are read from the code constant every sweep, while the platform, token-type and priority docs are read only from CouchDB, so a newly added chain never reaches production on its own. Making the sweep merge the code defaults underneath the DB docs (
{...codeDefault, ...dbDoc}) would remove this manual step for every future chain. Deliberately left out here because it changes shared merge semantics for every chain and provider, which does not belong in a PR that registers one chain.Testing
Verified against a local instance of this server (local CouchDB and Redis, real provider code path, no code modified for the test).
robinhoodout of all eight documents so the local DB matched an existing deployment. The patched server still returned no rate, confirming the DB document wins over the code default at runtime and that a deploy alone is not sufficient.tokenMappingengine once, as its daily loop does.coingecko:automatedgainedrobinhood: {id: "ethereum"}, whilecoingecko:platforms,tokenTypesandplatformPrioritystayed empty, exactly as the template semantics predict. The native rate then resolved at1878.73, matchingethereumat1878.73to the cent.constantrateson the Ethereum token keys only (USDC111.111, USDT222.222, WBTC333.333) and queried the Robinhood Chain token ids. Each returned its sentinel, which is reachable only through the remap. An unmapped Robinhood Chain address returned no rate, confirming this is not a blanket fallthrough.robinhoodcurrency plugin priced off live market data:yarn prepareandyarn test(56 passing) both pass, andverify-repo.sh --base origin/masterpassed.Note
Medium Risk
Changes core rate-resolution mappings for a new chain; production token pricing depends on correct CouchDB docs plus cross-chain remaps, but scope is limited to configuration defaults with no auth or payment logic.
Overview
Registers Robinhood Chain (
robinhood) so v3 rates resolve for native ETH and EVM tokens instead of returning no rate and showing $0 fiat in the app.Provider maps: CoinGecko treats native ETH like Ethereum (
ethereum/ platformrobinhood); CoinMarketCap uses ETH id1027with no platform id yet.Edge rates defaults:
robinhoodis classified as EVM, given platform priority 630 (last) so bridged assets prefer canonical-chain pricing, and three cross-chain entries remap Robinhood USDC, USDT, and WBTC to their Ethereum token ids where CoinGecko has no on-chain addresses.Deploy note: Native ETH can pick up from code on the next automated mainnet sweep; token type, platform priority, platform doc, and cross-chain rows may still need a one-time update in production
rates_settingsbecause existing CouchDB templates do not overwrite those documents.CHANGELOG entry added under Unreleased.
Reviewed by Cursor Bugbot for commit c65ac1c. Bugbot is set up for automated code reviews on this repo. Configure here.