Board

UBC 2026 hackathon entry

How Brace works

An onchain volatility oracle for Solana lending, built from Gemini prediction markets.

01 The problem

Lending markets set loan to value limits by governance vote and change them rarely. When volatility jumps, the limits are still the calm-week numbers. Implied volatility feeds from options markets mostly cover majors, and collateral like ZEC has no options on Deribit, the largest crypto options venue.

02 The signal

Gemini lists regulated "X or above" price ladders for BTC, ETH, SOL, XRP, ZEC and more, from hourly to multiweek expiries. A ladder is a market-implied probability curve, and a probability curve gives you implied volatility.

03 The system

  1. 01GeminiPrediction market ladders, strike by strike
  2. 02RelayerPosts the raw quotes, every minute
  3. 03Brace programFits volatility, stores the limit
  4. 04Demo poolChecks every borrow against it
QuickNode Streams records every program transaction, rejects included, for the History page.

A relayer reads Gemini's live ladders every minute and posts the raw quotes (strike, bid, ask, expiry, event ticker) to Solana devnet.

It posts quotes, never conclusions.

The Brace program filters the quotes, converts each midpoint to a z-score with a fixed lookup table, fits the curve by least squares, and stores implied volatility, a confidence flag and a max LTV per asset. All of this math runs onchain, so anyone can check it.

04 The limit

Max LTV is the lower of the admin-set max and a volatility-adjusted limit. Stale or low confidence data never loosens anything: Brace keeps the last valid limit and steps it down toward a conservative floor until fresh data arrives. A demo pool checks borrows and withdrawals against that limit; liquidation uses the 80% threshold in the config only.

FeedLast postTransaction
SOLreading--
BTCreading--
ETHreading--
ZECreading--
XRPreading--

Reading the relayer log

05 Known limitations

  • The relayer is trusted for quotes and spot. Mitigations: spot only moves on confident posts, must be within 3% of the ladder implied median, and goes stale after 1 hour.
  • initialize can be front run between deploy and setup. Mitigation: deploy, initialize and init_pool run back to back from one script, then admin is verified onchain.
  • Liquidation repays the full debt only (no partial liquidation). Test USD has no value.
  • The check_borrow CPI for other lending programs was cut for time.
  • Devnet only. No mainnet, no real funds, and the demo pool charges 0% interest.

See it refuse a borrow

Borrow over the live limit and the program rejects it onchain with error 6005, RiskTightened.