Session-aware collateral risk layer for tokenized equity on Morpho Blue, built for Robinhood Chain




Vigil is a session-aware collateral risk layer for tokenized equity (ERC-8056 stock tokens) on Morpho Blue, built for Robinhood Chain.
Problem. Robinhood Chain runs 24/7; Chainlink equity feeds run 24/5 and freeze all weekend. In four years of NVDA data, both gaps that would have produced bad debt in an 86 % LLTV market came at Monday open - 5 Aug 2024 (-14.18 %) and 27 Jan 2025 (-12.49 %) - after ~65 hours in which no liquidation could execute. Utilization-based interest charged nothing for either. Lenders write a free weekend option; curators answer with borrow cap 0.
Mechanism. Vigil attaches to an unmodified Morpho Blue market at three points. Oracle: an on-chain NYSE calendar (verified against nyse.com) drives a haircut priced on the duration of the closure being entered, H(L) = clamp(H_floor + k*sigma*sqrt(L/tau_night)), ramped over 60 minutes, capped at 5 % for the market. Premium: opted-in borrowers pay a USDG session premium from an on-chain index. Backstop: an ERC-4626 first-loss tranche in USDG receives it. Members get a soft unwind before the close (session-aware Morpho PreLiquidation pattern, discount <= 3 %) and liquidateWithCover: the backstop repays the shortfall in the same transaction as the seizure, so Morpho never realizes bad debt. Keepers can only tighten; the calendar alone runs the cycle.
Live. Eight immutable contracts on Robinhood Chain testnet (46630) plus Morpho Blue v1.0.0 deployed from source (the testnet has none), all source-verified on the explorer. USDG, the NVDA token, the feed and the IRM are mocks there; the design and the mainnet-fork suite target the real Paxos USDG. A 37-transaction end-to-end run replays the 5 Aug 2024 gap on the deployment: one member unwound Friday, the other's 42.00 USDG shortfall paid by the backstop inside liquidateWithCover, suppliers untouched - every transaction linked in the README, and the run is the middle of the demo video.
Evidence. 79 Foundry tests + 3 mainnet-fork tests, invariants, ~93 % line coverage, CI. The fork suite runs Vigil against the real Morpho, AdaptiveCurveIRM, Paxos USDG, NVDA ERC-8056 token and Chainlink feeds on mainnet 4663 - only the gap is injected. Calibration on NVDA/AAPL/TSLA 2022-2026: plain market 3 bad-debt closures, Vigil market 0; premium ~122 bp/yr against an expected tail loss of 18-299 bp/yr - a wide band, hence a first-loss backstop with a cap.
Nitro-specific: block.timestamp only (block.number is an L1 estimate), evm paris, FCFS sequencing -> time-based unwind. Prior art named: Morpho PreLiquidation, SSS Protocol (arXiv 2510.05711), Venus bStocks weekend buffer, ZircoFi, Chaos Labs / Gauntlet.
Next: session keeper and unwind bot, mainnet with the real USDG and Morpho (deployment simulated: 24.9 M gas), AAPL and TSLA markets. Solo builder. Code: https://github.com/mdlog/vigil (MIT). Dashboard: https://mdlog.github.io/vigil/
Everything was built inside the buildathon window (opened 14 Sep 2026); the repo's first commit is 19 Sep 2026 and every commit is in-window, structured by feature:
PRD and risk model (haircut surface H(L), premium index, buffer multiplier), then the 8 contracts on Morpho Blue v1.0.0 with a full Foundry suite (unit, historical replay scenarios, invariants). The fuzzer found two real bugs (INV-7 accrual monotonicity, INV-3 keeper-tightening ramp) - both fixed and pinned as regression tests.
Deployment to Robinhood Chain testnet 46630 (v1, then v2 after the ramp fix), all 13 contracts source-verified on the explorer; a read-only live dashboard on GitHub Pages reading the chain through Multicall3.
A 37-transaction end-to-end script on the live deployment (supply -> borrow -> membership -> backstop -> keeper attestation -> soft unwind -> 5 Aug 2024 gap replay -> liquidateWithCover -> restore), recorded from the dashboard by an automated video pipeline whose narration is generated from the numbers the run produced.
A mainnet-fork suite against the real Morpho, AdaptiveCurveIRM, Paxos USDG, NVDA ERC-8056 token and Chainlink feeds on chain 4663; a full calibrator (POT/GPD tails, 4-year backtest across NVDA/AAPL/TSLA, charts) with a parity test against the on-chain curve in CI; the embedded NYSE calendar 2024-2028 verified against nyse.com and pinned by a test; a weekday feed heartbeat so the testnet demo never goes stale.
Only open-source dependencies were imported: Morpho Blue v1.0.0, OpenZeppelin 4.9.6, forge-std. Full history: https://github.com/mdlog/vigil/commits/main
Bootstrapped, no funding raised and no token. Solo builder; the buildathon prize would fund the session keeper / unwind bot service and a security review ahead of a mainnet deployment with the real USDG and Morpho.