StockGuard
A drop-in Morpho oracle for Robinhood Chain stock tokens: the same price as the standard oracle on normal days, and no new loans when the price can't be trusted.
视频
技术栈
描述
Lend against tokenized stocks without getting caught out by the weekend.
Robinhood Chain puts Tesla, Apple and Nvidia on-chain, and Morpho (the lending engine behind Robinhood Earn) already has 169 markets configured with these stock tokens as collateral, with $806.7k of USDG supplied (live, 26 Sep 2026 09:43 UTC). But stocks behave differently from crypto, and a standard oracle doesn't know that:
Markets close. Chainlink's stock feeds have no heartbeat outside market hours, so a standard oracle keeps lending on Friday's price all weekend.
Stocks split and pay dividends. Robinhood tracks this with an on-chain multiplier that is already inside the price feed. Apply it again and every split or dividend is counted twice.
Tickers get copied. On Robinhood Chain mainnet a copycat token uses the exact name "Tesla • Robinhood Token" and the TSLA ticker.
Feeds get mixed up. One live Morpho market prices CoreWeave with Circle's price feed.
What StockGuard does
StockGuard is a drop-in oracle for Morpho markets on stock tokens. On a normal day it returns exactly the price the standard Chainlink oracle returns. When the price can't be trusted (the market is closed, a split or dividend is mid-flight, the feed is for a different ticker, or the token is a copycat) it declines to price, so new borrows and liquidations wait for a real price. Lenders can always withdraw and borrowers can always repay, because Morpho never asks the oracle for those.
For a market creator it's one address: list the stock token with its Chainlink feed, deploy the StockGuard Morpho oracle, create the market. Copycat tokens and feeds for the wrong ticker are rejected at listing.
Who it's for
Anyone creating or curating a Morpho market on Robinhood Chain stock tokens, and the USDG lenders whose money sits in those markets.
See it live: the StockGuard Radar
https://snit292012.github.io/stockguard/ checks every stock-collateral Morpho market on Robinhood Chain live from your browser: is the oracle price right, fresh, and from the right source? Its Monday Crash simulator takes a real pool and a Monday opening drop and shows what lenders could lose if the pool keeps lending over the weekend, compared with $0 in new bad loans under StockGuard. It covers pools on Morpho's standard Chainlink oracle, which has no staleness check. It also names what it finds: 17 stock markets priced from a Uniswap pool instead of Chainlink (a few with small live borrows), and the CoreWeave market reading Circle's feed.
Proof, not promises
Against the real Morpho deployment (mainnet fork of Robinhood Chain): StockGuard's price matches the real TSLA/USDG market's Chainlink oracle to the last digit (379890809827115559599636032 both). Over a simulated weekend the real market lends 99% of that pool's available USDG (6,492 of 6,557) against a 60-hour-old price and, after a -40% Monday open, that loan is bigger than its collateral. An identical market using StockGuard refuses the loan while its lenders can still withdraw.
Real misconfigurations blocked: the live CoreWeave market priced with Circle's feed and a Reddit market priced from a Uniswap pool are both rejected at listing, as is the real copycat "Tesla • Robinhood Token".
17 Foundry tests against real Robinhood Chain contracts, plus invariant fuzzing with a hostile market (price swings, whole weekends, splits): 6 invariants, each over 16,384 random calls; across 1,542 runs, 2,192 borrows succeeded, 5,024 were correctly refused and 50 liquidations ran, with no borrow or liquidation on an unsafe price. A deliberately planted bug breaks 4 of the 6 invariants, so the tests catch it.
Deployed and verified on Robinhood Chain testnet with the real testnet TSLA and AMZN stock tokens. A scripted on-chain weekend shows an unprotected pool lending on a 60-hour-old price while StockGuard refuses.
Honest limits
Testnet deployment only (Chainlink's stock feeds are mainnet-only, so the testnet uses clearly labelled mock feeds and a mock USDG; mainnet behaviour is covered by the fork tests). Real money at risk on Robinhood Chain today is small, because the chain is young: this is the moment to fix it, before it grows. Fuzzing is evidence over the runs above, not a proof, and the code is not audited.
Code: https://github.com/snit292012/stockguard