Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

Stars

169 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages