Skip to content

Add Robinhood Chain swap support - #483

Open
j0ntz wants to merge 1 commit into
masterfrom
jon/robinhood-chain
Open

Add Robinhood Chain swap support#483
j0ntz wants to merge 1 commit into
masterfrom
jon/robinhood-chain

Conversation

@j0ntz

@j0ntz j0ntz commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

Companion PRs for the same chain (this PR is independent of both and passes CI standalone):

Description

Maps the robinhood plugin id (Robinhood Chain, EVM chain 4663) onto each swap provider's own chain code, so quotes can route to and from the chain. No engine or plugin logic changes: lifi.ts, rango.ts and the central plugins all gate on a non-null MAINNET_CODE_TRANSCRIPTION lookup, so a chain the map does not know is invisible to the provider no matter what its API supports.

robinhood is added to src/util/edgeCurrencyPluginIds.ts via mapctl add-plugin; the four provider entries are authored in scripts/mappings/*Mappings.ts and the src/mappings/*.ts files are regenerated with npm run mapctl update-mappings.

Provider Chain code Why
SideShift robinhood /v2/pair/btc-bitcoin/eth-robinhood and /v2/pair/eth-arbitrum/eth-robinhood both quote, in both directions
LI.FI out /v1/quote routes cross-chain into 4663. The key really is the string out, which is what /v1/chains returns for this chain
Rango ROBINHOOD Chain enabled with 495 tokens; quotes via Relay and GasZip
ChangeNow hood Chain listed with three assets. The native-ETH pair is inactive right now, so it will not quote yet

ChangeNow is mapped despite the inactive pair because the map is chain-level while fill availability is per-pair and dynamic. changenow.ts rebuilds chainCodeTickerMap hourly from exchange/currencies?active=true filtered to the chain codes the map knows, so an unmapped chain could never appear even once the pair activates. Mapping it now costs a failed quote and needs no follow-up later.

Two providers advertise the chain but are deliberately left unmapped: LetsExchange carries only CASHCAT and ARROW there (no native ETH, so it cannot deliver gas), and SwapKit's HOOD code turns up in the provider sweep with no tradeable asset behind it.

Testing

npm run test (56 passing), tsc, and verify-repo.sh all pass.

Exercised end to end on the iOS simulator with this branch served into the app, which is what the mapping is for. An exchange of 529.16 S from My Sonic to a Robinhood Chain wallet quoted 0.006243 ETH "Powered by LI.FI" and executed to the success scene; eth_getBalance for the receiving address then returned 6248511112300593 wei and the wallet rendered 0.006248511112300593 ETH.

That balance unblocked the send that the chain integration could not previously test: 0.001 ETH sent from the funded wallet is transaction 0x70e4950b5991c9419eff70ea2478c7ae55c5c58adcc3da237d5889394f8fdf62, success in block 35308086.

The route was pinned to LI.FI/Rango for the test by disabling competitors locally, because SideShift is geo-blocked from this host's egress; its mapping is verified against its live pair endpoint instead.

One unrelated gap this surfaced: Edge's rates server has no entry for robinhood, so ETH on the chain prices at $0 everywhere, and on the exchange scene that zero destination value trips the "High Price Impact" banner. Cosmetic, fixed where rates are configured rather than here.

Design doc: src/docs/robinhood-chain.md, section 7.

Asana: https://app.asana.com/0/1215088146871429/1217382370104887


Note

Low Risk
Mapping-only change with no swap engine logic; mis-mapped codes could cause failed quotes until corrected, but scope is limited to new chain registration.

Overview
Registers the robinhood currency plugin id and wires Robinhood Chain (EVM 4663) into swap routing via provider chain-code maps only—no changes to quote or execution logic.

Enabled providers: SideShift (robinhood), LI.FI (out), Rango (ROBINHOOD), and ChangeNow (hood). Authoritative entries live in scripts/mappings/*Mappings.ts; src/mappings/*.ts are regenerated with mapctl update-mappings.

Other swap plugins gain an explicit robinhood → null entry so the chain stays invisible where it is not supported (ChangeHero, Exolix, Godex, LetsExchange, Maya, SwapKit, Swapuz, Thorchain, Xgram, etc.).

CHANGELOG notes Robinhood Chain swaps via those four providers.

Reviewed by Cursor Bugbot for commit de63cfe. Bugbot is set up for automated code reviews on this repo. Configure here.

@j0ntz

j0ntz commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

📸 Test evidence: swap into Robinhood Chain, then send

lifi quote into robinhood

lifi quote into robinhood

swap executed

swap executed

hood wallet funded

hood wallet funded

send composed

send composed

send success

send success

Captured by the agent's in-app test run (build-and-test).

Map the robinhood plugin id to each provider's chain code so quotes can
route to and from the chain: SideShift 'robinhood', LI.FI 'out', Rango
'ROBINHOOD' and ChangeNow 'hood'. SideShift, LI.FI and Rango all return
live quotes into native ETH on the chain. ChangeNow lists the chain but
its native-ETH pair is inactive, so it is mapped for the assets it does
fill and will pick up ETH when the pair activates.
@j0ntz
j0ntz force-pushed the jon/robinhood-chain branch from 37d5a13 to de63cfe Compare August 13, 2026 10:21
@j0ntz
j0ntz marked this pull request as ready for review August 13, 2026 10:21
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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