Docs
Tech stack
What Flatstock is built on, and exactly what each piece does here. Links go to the code.
Robinhood Chain
The Layer-2 network (chain ID 4663) where everything happens. The vote, router and lock contracts are deployed there, and every vote, burn, buy and sell is a transaction on it. The app reads rounds, burns and your history straight from the chain, and uses Blockscout as the explorer. Code: web/src/config.ts · src/FlatstockVotes.sol
Stock Tokens
The assets you actually buy: Robinhood's tokenized US stocks and ETFs on Robinhood Chain. Flatstock never issues or holds them. The router swaps USDG for them and sends them to your wallet; you can sell them back to USDG. Dividends and splits change your share count through the token's own multiplier, which the app shows as shares. Eight are used (AAPL, NVDA, MSFT, AMZN, GOOGL, META, TSLA, SPY). Code: web/src/config.ts · src/FlatstockRouter.sol
$WIF
The community token. Voting burns 1 $WIF per vote in the vote contract. Locking 10 $WIF in the lock contract makes a wallet eligible for sponsored gas (up to 3 sponsored transactions a day). Nothing is paid in $WIF as gas. Code: src/FlatstockVotes.sol · src/FlatstockLock.sol
Chainlink
Every Stock Token has a Chainlink price feed on Robinhood Chain. Flatstock uses it in two ways: the price guard (each swap leg must be within 2% of the feed, and the feed must be fresh, at most 24 hours old, or the whole buy is blocked) and the live price and small chart beside each stock in the app (the last 20 feed rounds). The feeds report the token price already adjusted by its multiplier. Code: web/src/lib/chain.ts · web/src/lib/prices.ts
QuickNode Stock Token API
Our relayer calls QuickNode's Stock Token API for Stock Token balances in USD, corporate actions (dividends and splits), oracle health (feed status and the market session) and transaction finality. The app waits for finality before it says "Buy complete". The Stock Token API is QuickNode-only. Code: web/relayer/server.ts
GetBlock RPC
GetBlock is our hackathon RPC endpoint. If it is unavailable, or its access is withdrawn or rotated, the relayer falls back to QuickNode automatically. General chain reads (prices, the vote mix, balances, the relayer's own reads) go to GetBlock's Robinhood Chain RPC first. If GetBlock errors, times out, rate-limits us or rejects our key (HTTP 401, 403 or 404, or an invalid-key error), the same request is retried on QuickNode, then on the public Robinhood Chain RPC. If QuickNode is down, GetBlock keeps serving. A provider that fails is skipped for 30 seconds so users do not wait on it. Transactions the relayer sends are signed once and broadcast; if a provider times out after accepting one, the relayer looks the transaction up by its hash and reports success instead of a false failure, and never signs a second time. The same method allow-list, request limits and 2% Chainlink check apply whichever provider answers, and sending transactions is still refused by the proxy. The relayer's health endpoint reports whether GetBlock is up. The GetBlock endpoint stays on the server and is never sent to the browser.
Uniswap
The venue. Stocks are bought and sold against USDG in Uniswap pools, priced with Uniswap's quoter and executed through its swap router. Each stock uses the pool fee tier with the tightest quotes (0.05% or 0.3%). Flatstock's own router wraps the swaps so a whole mix, from 2 to 8 stocks, happens in one transaction that you sign once. Code: src/FlatstockRouter.sol · web/relayer/stock-study.mjs
Notice Not available to US persons, or in Canada, the UK, Switzerland or other restricted jurisdictions. Not investment advice. Restricted jurisdictions