Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

53.3 KB
Raw Blame
[{"slug":"01-what-is-robinhood-chain","title":"What Robinhood Chain actually is","section":"Foundations","index":"01","description":"Architecture, chain IDs, and what's real vs hype — the no-token fact, the US-person restriction, and permissionless deployment, all sourced.","headings":["The one-paragraph version","Architecture, precisely","The two networks","The three facts everyone gets wrong","1. There is no chain token. Gas is ETH.","2. Stock Tokens may not be sold to US persons.","3. Anyone can deploy. The chain is permissionless.","What&#39;s actually live","Where to get canonical addresses","You now know more than most"],"text":"Robinhood Chain launched its mainnet on July 1, 2026. In the weeks since, the amount of confident, wrong information written about it has been remarkable. This page is the antidote: the architecture, the chain IDs, and — more importantly — the three facts that every newcomer gets backwards. Everything here is sourced. Where a claim matters, it links to the official docs or to something you can verify on-chain yourself in the next tutorial. # The one-paragraph version Robinhood Chain is a permissionless Arbitrum Orbit Layer 2 that settles to Ethereum, posts its data as blobs, and pays gas in ETH . Blocks land in roughly 100 milliseconds. It supports ERC-4337 account abstraction. Its headline feature is ~95 Stock Tokens — tokenized US equities, each a plain ERC-20 with a Chainlink price feed — plus USDG , a dollar stablecoin. That's the whole chain in one breath. The rest of this page is the fine print, and the fine print is where the money and the mistakes are. # Architecture, precisely Property Value Type Arbitrum Orbit L2 (Nitro stack) Settlement Ethereum mainnet Data availability Blobs (EIP-4844) Gas token ETH (not a chain-native token) Block time ~100 ms Account abstraction ERC-4337 supported Multicall3 0xca11bde05977b3631167028862be2a173976ca11 (canonical) Because it's a standard Nitro Orbit chain, your existing Ethereum tooling just works — viem, ethers, wagmi, Foundry, Hardhat. There is no exotic SDK you're forced to adopt, no bespoke RPC dialect. That is the single most important practical fact for a developer, and it's why the rest of this course is mostly \"normal EVM development, applied well.\" # The two networks You will use both. Reads and demos happen on mainnet; anything that writes, you rehearse on testnet first. Mainnet Testnet Chain ID 4663 46630 RPC https://rpc.mainnet.chain.robinhood.com https://rpc.testnet.chain.robinhood.com Explorer robinhoodchain.blockscout.com explorer.testnet.chain.robinhood.com Sequencer feed wss://feed.mainnet.chain.robinhood.com — Faucet — faucet.testnet.chain.robinhood.com viem ships the chain definitions As of [email protected] , both networks are built in: import { robinhood, robinhoodTestnet } from 'viem/chains' . Never hand-roll the chain config — you'll get the multicall address or the block explorer wrong and spend an afternoon debugging it. Let viem do it. # The three facts everyone gets wrong # 1. There is no chain token. Gas is ETH. Search social media and you'll find people trading \"the Robinhood Chain token,\" quoting its price, and posting its contract address. It does not exist. Robinhood Chain pays gas in bridged ETH, exactly like Arbitrum One or Base. There is no native gas token and no official chain coin. Anyone showing you a \"$HOOD chain token\" contract is showing you a memecoin someone permissionlessly deployed on the chain — which is allowed and common (see Tutorial 7) — not a token of the chain. Internalize this now; it will save you from a scam later. # 2. Stock Tokens may not be sold to US persons. This is the fact with legal teeth. Stock Tokens are tokenized debt securities , issued by Robinhood Assets (Jersey) Ltd . They may not be offered, sold, or delivered to US persons , with additional restrictions for Canada, the UK, and Switzerland. The critical nuance for developers: The restriction is legal and front-end enforced — not enforced at the contract level. The ERC-20 contracts will happily transfer to anyone. Compliance is your responsibility as the operator of any interface or agent. Reading and displaying Stock Token data is unrestricted. Prices, supply, someone's holdings — all fair game. Most of this course is reads, and none of it is gated. Any flow that acquires a Stock Token needs an eligibility gate. A buy button, a swap that outputs a Stock Token, an agent that accumulates one — those require a clear disclosure and a geo/eligibility gate, defaulting to off . You'll see this enforced in code in Tutorial 6: the hoodchain SDK throws a StockTokenEligibility"},{"slug":"02-connect-and-read","title":"Connect and read the chain in 5 minutes","section":"Foundations","index":"02","description":"Add the network to a wallet, get testnet funds, and make your first read against mainnet with viem — a real block number and gas price in your terminal.","headings":["Add the network to a wallet (optional, 60 seconds)","Read the chain with raw JSON-RPC (zero dependencies)","Read the chain with viem","Use a faster RPC (when the public one isn&#39;t enough)","Skip the boilerplate: the hoodchain client","Troubleshooting","What you learned"],"text":"Talk is cheap. In the next five minutes you'll connect to Robinhood Chain and pull real data off it — the current block height, the chain ID, and the gas price — with about fifteen lines of code. No wallet, no funds, no signup. Reads are free and public. # Add the network to a wallet (optional, 60 seconds) You don't need a wallet for reads, but if you want to poke around a block explorer with a browser wallet, add the network manually. In MetaMask: Settings → Networks → Add network → Add manually , then: For anything that spends, use testnet (chain ID 46630 , RPC https://rpc.testnet.chain.robinhood.com ) and claim funds from the faucet first. The faucet needs a real browser The testnet faucet is behind Cloudflare Turnstile and Google Sign-In — it can't be scripted. It drips 0.01 ETH plus five of each test Stock Token (TSLA, AMZN, PLTR, NFLX, AMD) per 24 hours. Claim once, up front, and reuse that wallet for every write tutorial. There's also a Chainlink faucet for testnet LINK/ETH. # Read the chain with raw JSON-RPC (zero dependencies) Before any library, prove the RPC is real with nothing but curl . This asks the node for its chain ID: 0x1237 is 4663 in decimal — the mainnet chain ID. The chain is answering. That's the entire foundation of everything that follows. You just saw the landing page's secret The live stats strip on this site's home page is doing exactly this — plain fetch calls to that same RPC from your browser. Read-only chain access needs no backend, no key, and no SDK. That property is why so much of this course runs client-side. # Read the chain with viem curl is fine for a sanity check; for real work you want typed results and helpers. Install viem: Create read.ts (or .mjs ) and paste: Run it: That block number was live when this tutorial was written; yours will be higher, because Robinhood Chain produces a new block roughly every 100 milliseconds. Do the math: that's on the order of half a million blocks a day. Keep it in mind when you scan historical logs later — \"the last hour\" is tens of thousands of blocks. # Use a faster RPC (when the public one isn't enough) The public RPC is perfect for learning and light apps, but it rate-limits. The moment you're scanning large block ranges or serving users, move to a dedicated endpoint. Alchemy is the recommended provider: You'll feel the difference immediately in Tutorial 7 when scanning launchpad history — the public RPC will return 429 Too Many Requests on a wide scan; a dedicated key won't. # Skip the boilerplate: the hoodchain client Everything above is standard viem. As your app grows you'll want the batteries-included client from the hoodchain SDK — it wraps viem with multicall batching on by default, both networks pre-wired, and an optional wallet: hood.public is a normal viem PublicClient , so nothing you learned is wasted — the SDK just removes the setup. From the next tutorial on, we use createHoodClient because it also knows about Stock Tokens, feeds, and swaps, which raw viem does not. When you need to drop to the metal, hood.public and hood.wallet are right there. # Troubleshooting Cannot use import statement outside a module — add \"type\": \"module\" to your package.json ( npm pkg set type=module ), or use the .mjs extension. fetch failed / ECONNREFUSED — check the RPC URL for a typo; it's rpc.mainnet.chain.robinhood.com , no port, HTTPS. Confirm you have network access with the curl command above. npx tsx is slow the first time — tsx is being downloaded. Install it once ( npm i -D tsx ) to make subsequent runs instant. The block number looks huge / grows while you watch — that's correct. ~100 ms blocks. It's a feature, not a bug. # What you learned You connected to Robinhood Chain three ways — raw curl , plain viem, and the hoodchain client — and read live data with each. You know reads are free and keyless, why block numbers are enormous, and when to upgrade off the public RPC. Next, the one concept that makes Stock Tokens different from every other E"},{"slug":"03-stock-tokens-explained","title":"Stock Tokens explained for developers","section":"Foundations","index":"03","description":"ERC-20 + a Chainlink feed + ERC-8056 uiMultiplier(). The split/dividend trap, with a worked example showing the wrong and the right valuation.","headings":["Anatomy of a Stock Token","The multiplier, and why it exists","The trap: which number do you multiply by the price?","A worked example","Doing it correctly, with the SDK","Not every token has a feed","Troubleshooting","What you learned"],"text":"If you remember one page from this course, make it this one. Stock Tokens look like ordinary ERC-20s, and 95% of the time they behave like ordinary ERC-20s. It's the other 5% — corporate actions like splits and dividends — that quietly breaks naive integrations and reports the wrong dollar value to a user. Here's exactly how they work, and the one worked example that makes the trap impossible to fall into. # Anatomy of a Stock Token A canonical Stock Token on Robinhood Chain is three things bolted together: A plain ERC-20 , 18 decimals. balanceOf , transfer , approve — all the usual methods, nothing surprising. A Chainlink price feed — a separate contract, one per token, exposing latestRoundData() and answering with an 8-decimal USD price. An ERC-8056 uiMultiplier() — a single function returning a 1e18 -scaled ratio that encodes every corporate action the underlying stock has had. Every canonical Stock Token proxies to one shared Stock beacon contract, which is how the hoodchain SDK verifies that an address is a real Stock Token and not a lookalike: it checks the EIP-1967 beacon slot points at that one shared beacon. # The multiplier, and why it exists Stocks split. They pay dividends. A traditional token would handle a 2-for-1 split by rebasing — doubling everyone's balance overnight. Rebasing tokens are notoriously hostile to integrators: your cached balances silently go wrong, and every DeFi protocol that holds the token has to special-case it. Robinhood Chain took the other path. Balances never change from corporate actions. Instead, uiMultiplier() moves. It's the shares-per-token ratio, scaled by 1e18 : 1000000000000000000 (i.e. 1e18 ) → 1 token represents 1 share. This is the starting state for every token. After a reinvested dividend or a split adjustment, it rises above 1e18 . Your token balance is unchanged; each token now represents more than one share of economic exposure. So a Stock Token has two different quantities you can ask about, and they answer different questions: Quantity Formula Answers Token balance balanceOf(you) \"How many tokens do I hold?\" Share-equivalent balance × uiMultiplier ÷ 1e18 \"How many shares of the stock is that?\" # The trap: which number do you multiply by the price? Here's where integrations break. You have a token balance, a multiplier, and a Chainlink price. To get a USD value, which do you multiply? The instinct — and it's wrong — is: shares × price . That is, balance × multiplier × price . It feels right (\"value = number of shares times price per share\"), and it produces a number that looks plausible. After a corporate action, it is too high , because you've counted the multiplier twice. The reason: Robinhood's Chainlink feeds are already multiplier-adjusted . The feed for a Stock Token returns the total-return price of one token , not the price of one underlying share. The corporate action is baked into the feed answer. So: The rule, memorize it USD value = token balance × feed price. Nothing else. The feed price already includes the multiplier. Applying uiMultiplier to the value double-counts every split and dividend. Use uiMultiplier only to report share-equivalents to a human — never in a valuation. # A worked example Suppose a token has had a corporate action, so its multiplier is 1.5e18 (each token now represents 1.5 shares). You hold 10 tokens. The Chainlink feed answers 20000000000 — that's $200.00 at 8 decimals, and remember, that's the price of one token . Wrong (double-counts the multiplier): Right (feed price is per token, already adjusted): The wrong version overstates the position by exactly the multiplier — a 50% error here. On a real portfolio dashboard that's the difference between a user trusting your app and closing it forever. And the share count itself is still useful — you'd show \"10 tokens ≈ 15 shares\" as context — you just don't put it in the dollar math. The feed answer isn't stale on weekends — it's closed Stock feeds update 24/5, following market hours. Read"},{"slug":"04-live-price-ticker","title":"Your first app: a live price ticker","section":"Building","index":"04","description":"Build a terminal price ticker that streams multiplier-adjusted Chainlink quotes for any Stock Token, with staleness handling done right.","headings":["The naive version (and why we won&#39;t ship it)","The real ticker","Add the multiplier, for context","A browser version (no backend needed)","Troubleshooting","What you built"],"text":"Time to build something that runs. A live price ticker is the \"hello world\" of market data: it reads prices, formats them, and refreshes. By the end you'll have a terminal that streams multiplier-adjusted Chainlink quotes for any Stock Token — and you'll have handled the two things beginners skip, staleness and unpriced tokens. # The naive version (and why we won't ship it) You could read a Chainlink feed directly and print the answer: This works, but it hardcodes an address, ignores whether the round is complete, and will happily print a price from a feed that hasn't updated in a month. We can do better in the same number of lines. # The real ticker getQuote from the hoodchain SDK does the address lookup, the multiplier-correct interpretation, the staleness guard, and the answer validation. Create ticker.ts : Run it: Those are real prices, pulled live while writing this. The feed ages are ~40 hours because this run happened over a weekend — the market was closed, the feeds paused, and our 7-day window correctly accepted them instead of throwing. That's the staleness handling from Tutorial 3, doing its job in production. Every design decision here is deliberate 15-second interval, not 1s. Chainlink stock feeds update on the order of minutes to hours, gated by a heartbeat and a deviation threshold. Polling every second just wastes RPC calls to see the same number. Promise.all , not a loop. All symbols are fetched concurrently; the ticker's latency is one RPC round-trip, not N of them. Typed catches. FeedNotFoundError and StaleFeedError are distinct outcomes with distinct UI — \"no feed\" is permanent, \"stale\" is temporary. Never collapse them into a generic \"error.\" # Add the multiplier, for context Users like to see share-equivalents. Remember the Tutorial 3 rule: the multiplier is for display , never for the dollar math. Add it as a separate column: For the mega-cap tickers above, the multiplier is 1.0000 — no corporate action since the token launched. When one does have a split or dividend, this column is where you'd surface it, while your USD math stays untouched. # A browser version (no backend needed) Everything here works client-side too — that's how this site's home-page ticker runs. In a browser you'd skip the SDK's Node bits and hit the RPC with fetch , decoding latestRoundData() yourself (the answer is the second 32-byte word of the response). The ticker.js on this very site is a complete, dependency-free reference for that — read it if you want the raw JSON-RPC version. # Troubleshooting Every symbol prints stale — your maxAgeSeconds is too tight for the current time (weekend/holiday). Widen it. During market hours you can go as tight as the feed's heartbeat. UnknownSymbolError — the ticker you passed isn't in the registry. Symbols are case-insensitive tickers as listed on-chain. Run listStockTokens() to see all 95, or listPricedStockTokens() for the priceable ones. Screen flicker on redraw — the \\x1b[2J\\x1b[H clear-and-home is crude but portable. For a polished TUI, reach for a library like blessed or ink ; for a learning ticker, the escape codes are fine. 429 Too Many Requests — you're on the public RPC and polling too hard, or running several scripts at once. Raise the interval or switch to an Alchemy endpoint (Tutorial 2). # What you built A real, live, multiplier-correct price ticker with proper staleness and unpriced-token handling — the market-data foundation every other app in this course builds on. Next, we take reads a step further: valuing an entire portfolio in a single call, and getting it right where naive trackers get it wrong."},{"slug":"05-portfolio-tracker","title":"Portfolio tracker done right","section":"Building","index":"05","description":"Value any address's Stock Token holdings in one multicall — and understand exactly why a naive tracker reports the wrong number after a split.","headings":["Why &quot;just loop and call balanceOf&quot; doesn&#39;t scale","The right approach: one multicall","What getPortfolio is actually doing","Correctness, proven, not asserted","Handling the unpriced case in a UI","Troubleshooting","What you built"],"text":"Every wallet tracker on every chain does the same thing: enumerate token balances, price them, sum them. On Robinhood Chain, that naive recipe is wrong twice — once from the multiplier trap (Tutorial 3), and once from the sheer number of round trips a naive implementation makes. This tutorial builds the tracker correctly: one multicall sweep, multiplier-correct valuation, and an honest treatment of holdings that can't be priced. # Why \"just loop and call balanceOf\" doesn't scale There are 95 Stock Tokens in the registry. A naive tracker does: That's 95 sequential RPC round trips before you've even started pricing anything. On the public RPC, each round trip is real latency — this loop takes seconds and burns your rate limit for nothing, since most addresses hold a handful of these tokens at most. # The right approach: one multicall viem's public client (used by hoodchain ) batches calls into Multicall3 automatically when batch: { multicall: true } is set — which createHoodClient() does for you. So the fix is almost free: fire all 95 balanceOf reads as a single batch, filter to the ones that are actually held, then multicall those for balance + multiplier together, and multicall the feeds for pricing. That's what getPortfolio does under the hood: Run it against any address (this example uses the Multicall3 deployer, a busy contract address, purely to demonstrate the zero-holdings path): That's the honest empty state — the tracker checked all 95 tokens in one batch and confirmed zero holdings, rather than silently returning nothing. Point it at a wallet that actually holds Stock Tokens (your testnet wallet from Tutorial 2, once funded, or any address you find via the explorer) and you'll see rows like: # What getPortfolio is actually doing Reading the source is worth five minutes, because the pattern generalizes to any multi-asset dashboard you'll ever build: One multicall for balanceOf across all 95 registry tokens, allowFailure: false — if this fails, something is fundamentally wrong (bad RPC), so let it throw. Filter to non-zero balances. Most wallets hold a handful of tokens; there's no reason to fetch multiplier and feed data for tokens you don't own. A second multicall , this time for balanceOf + uiMultiplier() together, only over the held tokens. A third multicall for feed prices , allowFailure: true — a single bad feed (stale, or a reverting call) shouldn't take down the whole portfolio. Positions with a failed feed fall back to valueUsd: null . Valuation , per the Tutorial 3 rule: valueUsd = balanceTokens × quote.priceUsd . Multiplier is used only for shareEquivalent , never for valueUsd . Total RPC round trips for a full 95-token sweep: three , regardless of how many tokens the wallet actually holds. That's the difference between a tracker that feels instant and one that spins for ten seconds. # Correctness, proven, not asserted It's easy to claim multiplier-correct math. The SDK's live test suite instead cross-checks its share-equivalent computation against the token contract's own balanceOfUI() — a view function the Stock Token contracts expose that does the same multiplication on-chain. If the SDK's shareEquivalent field and the contract's balanceOfUI() ever disagree, the test fails. That's the standard to hold your own money-math code to: don't just compute a number, find an independent on-chain source of truth and assert equality against it. # Handling the unpriced case in a UI portfolio.unpricedSymbols exists because 95 tokens exist but only a subset have a live Chainlink feed (34 at the time of writing). A dashboard that silently omits unpriced holdings is lying by omission — a user who holds one would wonder where it went. Show it, clearly labeled as unpriced, and let totalUsd reflect only what could actually be valued: # Troubleshooting Portfolio total looks wrong after I know a token split — you're computing value somewhere outside getPortfolio , and you're multiplying by the multiplier. Revisit Tutorial 3; t"},{"slug":"06-swapping-on-chain","title":"Swapping on-chain: quotes, slippage, execution","section":"Building","index":"06","description":"Quote a Uniswap v3 swap across every fee tier, set slippage correctly, and execute on testnet — with a Stock Token eligibility sidebar.","headings":["The routing problem","Getting a real quote (mainnet, read-only, no wallet needed)","Building and sending the transaction","Two router flavors, handled for you","The eligibility gate","Slippage and deadlines, tuned correctly","Testnet verification status","Troubleshooting","What you built"],"text":"Swapping is where reads become writes, and where a single wrong assumption costs real money. This tutorial covers all three layers — quoting a route, protecting yourself with slippage, and sending the transaction — plus the eligibility gate that exists specifically because some of the tokens you can swap into are regulated securities. # The routing problem Robinhood Chain's DEX layer is Uniswap v3. A v3 pool exists per token pair per fee tier (0.01%, 0.05%, 0.3%, 1%), and plenty of those pools exist with zero liquidity — deployed, but never seeded. A naive swap implementation that assumes \"the 0.3% pool\" will revert constantly. The right approach probes every fee tier for a direct route, plus two-hop routes through common intermediates (WETH, USDG), and picks whichever produces the best output. That's what quoteSwap does. # Getting a real quote (mainnet, read-only, no wallet needed) This runs right now, with no funds and no risk — quoting is a simulated call, not a transaction: That's a live capture: 100 USDG quoted at 0.0555 WETH , filled through the 0.01% fee tier. Note the router picked a two-hop path even though fees.join() shows one number — quoteSwap probes single-hop routes across all four tiers and two-hop routes through WETH/USDG, and the winner here happened to be the tightest single-tier pool. Run it again in your own terminal and you'll get a live number of your own; Uniswap v3 pricing moves with every block. USDG has 6 decimals, not 18 This is the single most common bug in a Robinhood Chain integration. USDG deliberately mirrors USDC's convention, unlike most L2-native stables which use 18. Always use the SDK's parseUsdg / formatUsdg helpers instead of hardcoding a decimals count — they encode the correct value so you can't get it wrong. # Building and sending the transaction A quote alone doesn't move funds. buildSwapTx turns a quote into calldata with a slippage-protected minimum output and a deadline; executeSwap does the whole pipeline — quote, build, approve if needed, send, confirm — in one call: Under the hood, executeSwap : Calls quoteSwap to find the best route. Calls buildSwapTx to encode calldata with amountOutMinimum set from your slippage tolerance (default 0.5%, slippageBps: 50 ) and a deadline (default 10 minutes). Calls ensureApproval — checks the router's current allowance and sends an approve only if it's short , so a second swap of the same token doesn't re-approve for no reason. Sends the transaction and waits for the receipt. # Two router flavors, handled for you Mainnet routes through SwapRouter02 (no deadline field in the call struct — it's enforced by wrapping the call in multicall(deadline, [data]) ). The testnet community deployment uses the classic SwapRouter , whose struct carries deadline directly. buildSwapTx detects which network you're on and encodes the right shape automatically — this is exactly the kind of chain-specific footgun a good SDK exists to remove. # The eligibility gate Every canonical Stock Token is a regulated security under the restriction from Tutorial 1: it may not be offered, sold, or delivered to US persons. buildSwapTx enforces this at the SDK boundary — any swap whose output is a canonical Stock Token throws before it builds calldata , unless you've explicitly affirmed eligibility: To proceed, the operator — not the end user, the person deploying the software — affirms eligibility explicitly: This default-closed design is worth copying even outside this SDK: gate the risky path, not the safe one. Reads and sells of Stock Tokens are never restricted — only acquisition is, matching the actual legal restriction. Not a substitute for real compliance This flag is a development safety rail, not a KYC system. If you're building a real product that lets users acquire Stock Tokens, you need actual jurisdiction detection and legal review — this flag just stops you from accidentally shipping an unrestricted buy button. # Slippage and deadlines, tuned correctly The default"},{"slug":"07-streaming-the-chain","title":"Streaming the chain: launchpads + firehose","section":"Building","index":"07","description":"Watch NOXA and The Odyssey for new memecoin launches, then tap the raw sequencer firehose to see transactions ~100ms before they're queryable.","headings":["Two memecoin launchpads, two designs","Watching for new launches","Proving the decoder works: a historical scan","The raw sequencer firehose","How the decoding works","A simpler alternative: watching confirmed transfers","Troubleshooting","What you built"],"text":"Robinhood Chain moves fast — ~100ms blocks, hundreds of transactions per second at peak. This tutorial covers the two ways to watch it live: confirmed event streams (launchpad watchers, the pattern you'll use for almost everything) and the raw sequencer firehose (transactions decoded before they're even in a block). Both examples below are real captures against mainnet. # Two memecoin launchpads, two designs Robinhood Chain is permissionless (Tutorial 1), and two launchpads have grown on top of it, with genuinely different mechanics: NOXA — an instant launcher. One transaction deploys the ERC-20, creates a Uniswap v3 pool at the 1% tier, seeds single-sided liquidity, and permanently locks the LP NFT. There's no bonding curve and no graduation — the token trades as a normal Uniswap v3 pool from block one. The Odyssey — a pump.fun-style bonding curve , priced in native ETH with virtual reserves. Trades happen against the curve ( Traded events) until it fills, at which point PoolCompleted + PoolMigrated fire and liquidity moves to a locked Uniswap v3 pool — the \"graduation\" moment. The hoodchain SDK ships decoded event ABIs and watcher functions for both, extracted from each platform's frontend bundle and confirmed against live logs during SDK development (neither publishes verified source on Blockscout, so this took direct log inspection rather than an ABI download). # Watching for new launches Running getRecentLaunches with the default 30,000-block lookback (roughly the last hour) against live mainnet returned zero launches at the time of writing — both launchpads were genuinely quiet in that window. That's a real, useful data point about the current state of the ecosystem, not a bug: widening the scan confirms the watcher logic itself is correct. # Proving the decoder works: a historical scan To confirm getRecentLaunches actually decodes NOXA's TokenLaunched event correctly (rather than just returning zero because nothing happened), scan the 9,000 blocks starting at NOXA's own recorded deploy block: Real result: 21 launches , decoded correctly, first token address included. The watcher works; the launchpads have simply had quiet stretches. This is a useful verification technique generally — when a live \"recent activity\" query returns zero, don't assume it's broken; confirm the decoder against a window you know had activity before you trust the \"quiet\" result. The public RPC rate-limits wide scans Scanning a million-block window ( lookbackBlocks: 1_000_000n ) against the public RPC returned a real 429 Too Many Requests from eth_getLogs during testing — even with getRecentLaunches 's built-in chunking ( chunkSize , default 10,000 blocks per request). For anything beyond a rough \"last hour or two\" scan, use a dedicated RPC key (Tutorial 2) or narrow your chunk size further. # The raw sequencer firehose Confirmed-event watching (above) is what you want for almost everything — it's simple and it's what block explorers show. But Robinhood Chain also publishes its Arbitrum Nitro sequencer feed directly: every transaction the sequencer accepts, decoded, ~100–300ms before it's queryable over RPC . That latency matters for MEV-sensitive or ultra-low-latency use cases; for everyone else it's a fascinating window into how much traffic the chain actually carries. A real 12-second capture against wss://feed.mainnet.chain.robinhood.com : 6,451 real transactions in 12 seconds — over 500 tx/s sustained. That number alone tells you Robinhood Chain is carrying meaningfully more traffic than a quiet L2; at ~100ms blocks, that's roughly 50+ transactions landing in every block. If your mental model of activity on this chain came from watching a slow block explorer feed, the firehose is a useful correction. # How the decoding works The sequencer publishes frames matching the Nitro broadcast feed shape: a header (kind, sender, L1 block number, timestamp) plus a base64 l2Msg payload. The first byte of the decoded payload is the message kind — 0x04 ( S"},{"slug":"08-sell-your-api-for-usdg","title":"Sell your API for USDG with x402","section":"Monetizing & agents","index":"08","description":"Put a Stock Token data endpoint behind an HTTP 402 paywall settled in USDG, and take your first real on-chain payment — from zero to a paid request.","headings":["How x402 actually works","A gap worth naming up front","The server","The client","What was verified, and what&#39;s a documented gap","Hardening for production","Troubleshooting","What you built"],"text":"You've built a live price ticker (Tutorial 4) and a portfolio tracker (Tutorial 5). Both produce data other people would pay for. This tutorial turns one into a paid API using x402 — the HTTP-native payment protocol that resurrects status code 402 Payment Required — settled in USDG on Robinhood Chain. # How x402 actually works The protocol is deliberately simple, and worth understanding at the wire level before you write any code: A client requests a paid endpoint with no payment attached. The server responds 402 Payment Required with a JSON body describing what it costs, in which token, on which chain, paid to which address. The client constructs a payment (an EIP-3009 transferWithAuthorization , or a plain on-chain transfer), signs it, and retries the request with an X-PAYMENT header carrying the payment payload. The server verifies the payment is valid and sufficient, serves the response, and optionally settles the transfer on-chain. No API keys, no subscription billing, no dashboard. The payment is the auth. # A gap worth naming up front x402's reference implementation (the x402 / x402-express npm packages, and the hosted x402.org facilitator) ships built-in support for specific EVM networks — Base and Base Sepolia primarily — verifying EIP-3009 signatures against known USDC deployments there. Robinhood Chain is not one of the pre-configured networks , and USDG does not implement EIP-3009 or EIP-2612 (confirmed in Tutorial 6 — it has no permit -family functions at all, verified against its Blockscout-verified implementation). That rules out gasless signature-based payment for USDG entirely. So this tutorial teaches the pattern that does work today: a hand-rolled 402 flow that verifies a real, mined USDG transfer on-chain , using the hoodchain SDK you already know. It's more code than dropping in x402-express 's one-liner, but it's honest about what's actually deployed, and it generalizes to any chain or token a hosted facilitator hasn't caught up to yet. # The server # The client # What was verified, and what's a documented gap The server code above — this exact route, verification logic included — was run locally against live mainnet reads, and three cases were checked by hand with curl : No X-PAYMENT header → real 402 with the challenge body. ✅ A fabricated X-PAYMENT (a made-up transaction hash) → getTransactionReceipt correctly returned null , rejected with 402 . ✅ A real, successfully-mined mainnet transaction hash — but one that never paid PAY_TO anything → this was wrongly accepted ( 200 OK ) by an earlier version of this route. That third case is not a hypothetical: it's what happened when this tutorial's code only checked \"a Transfer log exists on the USDG contract address\" instead of decoding who it paid and how much . Any already-mined USDG transfer by any party — unrelated to this API entirely — satisfied that check. The code above (with parseEventLogs and the explicit to / value comparison) is the fix, re-verified against the same three cases with the correct outcome in all three. This is why the tutorial ships the fixed version, not the first one written — treat it as a demonstration of exactly the kind of bug a \"just check a log exists\" shortcut produces, and why decoding the actual event arguments is not optional. A real, funded USDG payment that this route accepts end-to-end was not captured in this environment, for the same reason as Tutorial 6's testnet swap: it requires a funded wallet from the browser-gated testnet faucet, which wasn't available here. If you fund a wallet and run both halves above, the flow completes exactly as written — and, per the fix above, will correctly reject any transaction that isn't a real payment to your PAY_TO address. `scheme: 'onchain-transfer'` is not a registered x402 scheme The official x402 spec defines schemes like exact (EIP-3009) with specific verification semantics that facilitators implement. This tutorial's hand-rolled verification is compatible with the x402 wir"},{"slug":"09-ai-agent-chain-access","title":"Give your AI agent chain access with MCP","section":"Monetizing & agents","index":"09","description":"Build a Model Context Protocol server that exposes Robinhood Chain reads as tools, then wire it into Claude Code, Claude Desktop, or Cursor — with a real transcript.","headings":["What MCP actually is","The server","A real transcript","Connecting to Claude Code","Connecting to Claude Desktop","Connecting to Cursor","Troubleshooting","What you built"],"text":"An AI coding assistant is only as useful as the tools it can call. This tutorial builds a Model Context Protocol (MCP) server that exposes Robinhood Chain reads — quotes, portfolios, the registry — as tools any MCP-compatible assistant can invoke, then wires it into Claude Code, Claude Desktop, and Cursor. Everything below was run against a real MCP client, not described secondhand. # What MCP actually is MCP is a JSON-RPC-based protocol that lets an AI assistant discover and call tools exposed by a separate process — your server. The assistant doesn't need special Robinhood Chain knowledge baked in; it needs your server to expose well-described tools, and it reasons about when to call them. This is the same shape as the paid MCP tools you may have already used from three.ws ( forge_free , crypto_news , and friends) — except here, you're the one writing the server. # The server Three tools: a live quote, a portfolio valuation, and a registry listing — the exact operations from Tutorials 4 and 5, now callable by an LLM instead of a terminal script. Notice what this server does not do: no wallet, no write tools, no private key. Read-only MCP tools need none of that — exactly the same \"reads are free and keyless\" property from Tutorial 2. A write-capable version (place a swap, transfer USDG) is a natural extension, but it should prompt for confirmation before every transaction — treat an LLM's tool call exactly like a user action, not an autonomous decision, for anything that spends. # A real transcript Rather than describe what connecting an assistant would show, here's an actual MCP client — built with the same @modelcontextprotocol/sdk package — connecting over stdio, listing the server's tools, and calling two of them against live mainnet: This is the exact protocol exchange an assistant like Claude performs when it decides to call get_stock_quote — a real handshake, a real tool list, a real live price. The 34 matches the priced-token count from Tutorial 3; if that number drifts as Chainlink adds feeds, your server will report it correctly without any code change, because it reads the SDK's registry live rather than hardcoding a count. # Connecting to Claude Code Claude Code discovers MCP servers from a project or user config. Add this server with the CLI: Or add it directly to .mcp.json in your project root: Restart Claude Code (or run /mcp to reconnect) and ask something like \"What's the live price of TSLA on Robinhood Chain?\" — Claude will call get_stock_quote and answer from the real response, not from training data (which has no idea Robinhood Chain exists, or that it launched in July 2026). # Connecting to Claude Desktop Claude Desktop reads its MCP config from claude_desktop_config.json ( Settings → Developer → Edit Config opens the file directly): Fully restart the app after editing (not just close the window) for the new server to be picked up. # Connecting to Cursor Cursor uses the same MCP config shape, in .cursor/mcp.json at your project root or ~/.cursor/mcp.json globally: Open Cursor Settings → MCP to confirm the server shows as connected with its three tools listed. # Troubleshooting Server doesn't show up / \"0 tools\" — double-check the args path is absolute, not relative; MCP host apps don't inherit your shell's working directory. Run node /absolute/path/to/server.mjs by hand first — if it hangs waiting on stdin with no error, that's actually correct (stdio transport blocks reading for the next message); Ctrl-C to confirm it started without throwing. Tool call errors with UnknownSymbolError surfaced as a generic failure — MCP wraps thrown errors into an error-content response by default; add a try/catch per tool if you want to return a structured, LLM-readable error message instead of a stack trace. Assistant answers from stale training knowledge instead of calling the tool — make your tool description field more specific about when to use it (\"always use this for current Robinhood Chain prices — do not answer"},{"slug":"10-autonomous-trading-agent","title":"Build an autonomous trading agent","section":"Monetizing & agents","index":"10","description":"A paper-mode trading agent with a real strategy, hard spend caps, and a kill switch — risk-first framing before a single lira of real capital.","headings":["Design the risk controls first","A minimal strategy: dip detection, paper mode","Going from paper to real (the parts that change, and don&#39;t)","Logging and observability","Troubleshooting","What you built"],"text":"Read this section before the code An autonomous trading agent is software that spends money without asking you first, every time it runs. Every idea below is built with a hard spend cap , a kill switch , and paper mode as the default — not as afterthoughts, but as the first things written. If you take nothing else from this page: never remove the spend cap \"just to test something real,\" and never run an agent with a live wallet key until you've watched it behave correctly in paper mode for longer than you think is necessary. This is not investment advice, and nothing here is a strategy anyone should expect to be profitable. It's a template for the engineering of an agent that spends — the risk controls transfer to any strategy you actually design. # Design the risk controls first Before a single line reads a price, decide three things: Per-trade spend cap — the maximum a single trade can move, regardless of what the strategy wants. Period spend cap — a rolling limit (daily is typical) that trips even if every individual trade was within its own cap. Kill switch — a way to stop the agent immediately and safely, mid-loop, without corrupting state. Notice the kill switch doesn't process.exit(0) immediately. If the agent is mid-way through building a transaction when SIGINT fires, you want it to either finish that operation cleanly or not have started it — never leave a half-sent transaction or a corrupted spend counter. Setting a flag and checking it at loop boundaries is the safe pattern. # A minimal strategy: dip detection, paper mode This agent watches a basket of Stock Tokens, and on a mainnet dip beyond a threshold, logs what it would buy — respecting both spend caps — without ever building or sending a transaction: Run it against real mainnet quotes: A real, unedited capture from a 15-second run: Notice what this doesn't show: a fabricated trade. This capture ran over a weekend, when Chainlink stock feeds are closed (Tutorial 3) — the prices genuinely didn't move between ticks, so the agent correctly held every time. That's the right behavior, not a disappointing demo. Never fake a trade to make a tutorial look more exciting than the real market was at the time you wrote it — that habit is exactly how you end up trusting an agent's logs that lie to you. # Going from paper to real (the parts that change, and don't) When you're ready to let the agent actually spend, the strategy logic above is untouched. What changes is narrow and specific: The spend caps, the kill switch, and the strategy decision are identical code — only the final action ( console.log vs. executeSwap ) changed. That's by design: if your paper-mode agent and your live agent share every line except the actual send, you can trust that what you watched in paper mode is what will happen live. If they're structurally different code paths, you're testing something you're not shipping. Start with an amount you'd be fine losing entirely Even with caps and a kill switch, a strategy can be wrong, a feed can behave unexpectedly, or a bug can exist in code you wrote an hour ago. DAILY_SPEND_CAP_USDG = 100 is a ceiling, not a promise of safety. Fund the live wallet with exactly what you're prepared to lose, and nothing more, for at least the first several days of live operation. # Logging and observability An agent with no audit trail is an agent you can't debug after the fact. At minimum, persist (to a file or a database, not just stdout) every: quote observed, decision made and why, transaction sent with its hash, and cap-triggered skip. When something looks wrong three days from now, you want to reconstruct exactly what the agent saw and decided, not just what it did. # Troubleshooting Agent never trades, even during a volatile market — check DIP_THRESHOLD_PCT isn't set unreasonably high for the volatility of your basket, and confirm getQuote isn't throwing StaleFeedError silently (wrap the tick loop's body in a try/catch per symbol so one bad feed doesn't kill the w"},{"slug":"11-launch-a-coin","title":"Launch a coin programmatically","section":"Monetizing & agents","index":"11","description":"How Robinhood Chain's launchpads work, how to decode their events, and the responsible path to launching a token on testnet from code.","headings":["A fuller launch monitor","What &quot;launch a coin programmatically&quot; actually requires — and a real gap","The responsible path today","What a launch monitor is good for right now","Troubleshooting","What you built"],"text":"Tutorial 7 taught you to watch NOXA and The Odyssey. This tutorial takes it one step further — a live launch monitor with fuller event decoding — and then gives you an honest account of what programmatic launching actually requires today, including a real gap this course found and didn't paper over. # A fuller launch monitor Extend the watcher from Tutorial 7 to decode every field each platform's events carry, so you can react to specific launch shapes rather than just \"something launched\": This is exactly the decoding verified in Tutorial 7 against 21 real historical NOXA launches — extended here with curve-trade and graduation handling for Odyssey specifically. If you're building a trading bot or an alert system (Tutorial 16-style tooling), this is the complete event surface you'd hook into. # What \"launch a coin programmatically\" actually requires — and a real gap Watching launches only requires decoding events , which are public and don't need a verified ABI — you can decode a known event signature off any contract, verified or not. Sending a transaction that creates a new launch is different : it requires the factory contract's write function signature — argument names, types, and order — which you can only get reliably from a verified source contract, or by painstakingly reverse-engineering calldata from a real transaction. This course checked both launchpads' factory contracts against the Blockscout API before writing this page: Neither the NOXA launch factory ( 0xD9eC2db5f3D1b236843925949fe5bd8a3836FCcB ) nor The Odyssey's bonding-curve factory ( 0xEb3FeeD2716cF0eEAda05B22e67424794e1f5a80 ) returns verified source through Blockscout's API — confirming what the hoodchain SDK's own source comments already note: \"neither publishes verified source on Blockscout.\" That's why the SDK ships event ABIs only (for the read/watch path you used above) and no write-function ABI for either factory — extracting one would mean either reverse-engineering calldata from real launch transactions or asking the platforms directly, and doing that with unverified confidence long enough to publish it as \"the\" launch function would risk shipping guessed calldata that either fails or, worse, succeeds with the wrong parameters. We will not publish a guessed function signature It would be easy to fill this section with a plausible-looking createToken(name, symbol, supply, ...) call. It would also be irresponsible: an unverified guess at a factory's write interface, if wrong, can burn real gas on a failed transaction or — worse — succeed with parameters you didn't intend (wrong fee tier, wrong initial liquidity split, wrong lock terms). This course only ships code that was actually run and verified. For the launch-transaction write path specifically, that bar isn't met yet. # The responsible path today Until a launch factory's write ABI is verified from a primary source, the correct way to launch a token on NOXA or The Odyssey is through the platform's own front-end (fun.noxa.fi/robinhood, theodyssey.fun) — it already encodes the correct calldata, has been tested against the live contract by its own team, and gives you a UI to review exactly what you're about to deploy before you sign. That's not a cop-out; it's the same advice you'd give anyone about to send a transaction to a contract they don't have a verified interface for. If you want to pursue the programmatic path yourself: launch a token through the front-end once , on testnet, with a throwaway wallet, then pull the transaction's calldata from the explorer and decode it against the four-byte selector directory or by testing candidate ABIs against eth_call in simulation. That reverse-engineering work is exactly what standing up a verified, publishable write-ABI would require — and it's future work this course is flagging rather than rushing. # What a launch monitor is good for right now None of the above weakens the read side. A production-quality launch monitor — alerting, filtering by crea"},{"slug":"12-ship-it","title":"Ship it: deploy and go mainnet","section":"Capstone","index":"12","description":"Deploy your static app to Pages, your API to Cloud Run, and walk the going-mainnet checklist: funding, keys, spend caps, and monitoring.","headings":["Deploying a static app: GitHub Pages","RPC calls from a static site","Deploying a server: Google Cloud Run","An alternative: Vercel","The going-mainnet checklist","Funding","Keys","Spend caps","Compliance","Correctness","Infrastructure","Monitoring","Where to go from here"],"text":"Everything in this course has been real, run code. This capstone is about the last mile: getting what you built in front of actual users, and the checklist to walk before you let it touch mainnet with real money. # Deploying a static app: GitHub Pages If what you built is client-side — a ticker, a portfolio dashboard, anything using only hood.public reads (Tutorials 2, 4, 5, 7) — it needs no backend at all. This very site is the reference example: it's a static build in docs/ , deployed from a branch. One-time setup: Push your repo to GitHub. Settings → Pages → Build and deployment → Source: \"Deploy from a branch.\" Branch: main , folder: /docs . Save. Your site is live at https://<username>.github.io/<repo>/ within a minute or two. That's the entire deployment. No build step runs on GitHub's infrastructure — you commit the already-built docs/ folder, exactly as this repo does. Re-deploying is npm run build && git add docs && git commit && git push . Why deploy-from-branch instead of a GitHub Actions build It's simpler, it's faster (no CI queue), and it means what's live is exactly what you built and tested locally — no environment drift between your machine and a CI runner. The tradeoff is you must remember to run the build before committing; a pre-commit hook or a habit covers that. # RPC calls from a static site A pure static deploy still makes real, live RPC calls — straight from the visitor's browser to rpc.mainnet.chain.robinhood.com , exactly like this site's live chain-stats strip does. That's the whole trick behind \"the landing page can show live data on GitHub Pages\": public reads need no server. The only thing you can't do from a static site is anything requiring a private key or server-side secret — which brings us to Cloud Run. # Deploying a server: Google Cloud Run The moment your app needs a wallet key (an agent, Tutorial 10), verifies payments server-side (the x402 API, Tutorial 8), or holds any other secret, it needs a real backend. Google Cloud Run is a strong default: pay-per-request, scales to zero, and a straightforward Dockerfile gets you there. Two things Cloud Run requires that are easy to miss the first time: Listen on process.env.PORT , not a hardcoded port. Cloud Run injects PORT (usually 8080 ) and routes traffic there — a hardcoded 3000 will silently fail health checks. Bind to 0.0.0.0 , not localhost . app.listen(port) defaults to all interfaces in Express and is fine; some frameworks default to loopback-only, which Cloud Run can't reach. Deploy: Never bake a private key into the container image or set it with --set-env-vars in a command you'll paste into a README. Use gcloud run services update --update-secrets backed by Secret Manager, or your platform's equivalent secret store — the difference between an env var and a secret-manager binding is the difference between a key that leaks the moment someone reads your shell history and one that doesn't. # An alternative: Vercel If your app is a standard Next.js/Vite frontend with lightweight serverless API routes, Vercel remains a fine choice for the same static-plus-functions shape — deploy with vercel --prod after vercel link . Prefer Cloud Run specifically once you have a long-running process (an always-on trading agent, a WebSocket firehose consumer) — Vercel's serverless functions are request-scoped and will terminate a background loop between invocations. # The going-mainnet checklist Everything below was demonstrated somewhere in this course. This is the assembled version — walk it in order before flipping any switch that spends real money. # Funding The wallet holds only what you're prepared to lose during the first live days (Tutorial 10) — not your full intended capital. You've verified the wallet's mainnet ETH balance covers gas for your expected transaction volume; Robinhood Chain's ~100ms blocks mean a busy agent can rack up transaction count fast. # Keys The private key lives in a secret manager or env var injected at runtime — never in "}]