rh-swap README

The project's README from github.com/kinexbtdev/rh-swap. As one markdown file: README.md.

rh-swap — Uniswap Stock Token Swap UI on Robinhood Chain (4663)

Minimal web app to quote and plan swaps of Robinhood Stock Tokens (NVDA, AAPL, SPY) and USDG on Robinhood Chain via Uniswap. Chain ID is hardcoded to 4663. Quotes use the Uniswap Trading API (Universal Router 2.1.1 / UniswapX v3) when an API key is set; otherwise Uniswap v3 QuoterV2 on-chain.

What this repo does

This is a developer-facing swap surface for Robinhood Chain, not a hosted exchange. It:

  1. Lets you pick a sell token and a buy token (Stock Tokens or USDG) and an amount.
  2. Requests a quote with tokenInChainId = tokenOutChainId = 4663 only.
  3. Applies slippage (hard cap 300 bps) and a 30-minute deadline bound.
  4. Plans ERC-20 approval to Permit2 (not arbitrary spenders).
  5. Never stores a private key; a connected wallet would sign in the browser.

Use it to learn Uniswap routing on Robinhood Chain, test slippage/approval logic, or embed the quote helpers in another dApp.

Stock Tokens are not DTCC shares; they are Robinhood-issued ERC-20s. See Stock Token documentation.

Keywords

Robinhood Chain Uniswap, Stock Token swap, USDG swap, Universal Router 4663, Permit2, UniswapX v3, QuoterV2, slippage, tokenized NVDA AAPL SPY.

Quick start

npm install
npm test
npm run dev

UI: http://localhost:4663. Optional VITE_UNISWAP_API_KEY for the hosted Trading API.

Constraint Detail
Chain ID Always 4663
Slippage Maximum 300 bps
Approvals Permit2, Universal Router, or SwapRouter02 only
Keys Not in the repository
Contract Address Source
Universal Router 0x8876789976dEcBfCbBbe364623C63652db8C0904 Uniswap v3 deployments
Permit2 0x000000000022D473030F116dDEE9F6B43aC78BA3 same
QuoterV2 0x33e885eD0Ec9bF04EcfB19341582aADCb4c8A9E7 same
USDG 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 Token contracts
NVDA, AAPL, SPY RHJ /prices/{symbol} Stock Token APIs

On-chain AMM liquidity for Stock Tokens can be thin. Official venues also include RFQ, Rialto, and Lighter (building guide).

References

Contact

Telegram: kinexbtdev

rh-swap (kinexbtdev/rh-swap)

Searching Database…

What is this?A minimal web app for quoting and planning swaps between Robinhood-issued Stock Tokens (NVDA, AAPL, SPY) and USDG on Robinhood Chain via Uniswap, with the chain ID hardcoded to 4663.
Is this a live exchange or just a developer tool?It's a developer-facing swap surface, not a hosted exchange: it builds quotes and approval plans, while your own connected wallet signs transactions in the browser.
How do I run it?Clone the repo and run the Vite dev server (npm install, then npm run dev); optionally set VITE_UNISWAP_API_KEY to use the hosted Uniswap Trading API for quotes.
Do I need a Uniswap API key to get quotes?No — without an API key the app falls back to fetching quotes on-chain via Uniswap's QuoterV2 contract instead of the hosted Trading API.
What are the main swap limits and risks?Slippage is hard-capped at 300 basis points with a 30-minute quote deadline, and on-chain liquidity for the Stock Tokens can be thin.
Does the app ever touch my private key?No — it never stores a private key; a connected wallet signs transactions directly in the browser.
What tokens can I swap?You can swap between Robinhood-issued Stock Tokens (NVDA, AAPL, SPY) and USDG, all restricted to chain ID 4663 on Robinhood Chain.
Why is the chain ID hardcoded to 4663?The app only targets Robinhood Chain, so both the sell and buy token's chain ID must equal 4663 — it won't quote or swap on any other network.
Are the Stock Tokens the same as real NVDA/AAPL/SPY shares?No — they're Robinhood-issued ERC-20 tokens, not DTCC-settled shares, per the project's referenced Stock Token documentation.
What is Permit2 used for here?Approvals are planned through Permit2 (or Universal Router/SwapRouter02) rather than letting arbitrary contracts spend your tokens, limiting approval scope.
Creator
kinexbtdev
Size
<0.1 MB
Stars
148
Updated
CommitAug 31
Age
1mo
Commits · 90 Days