Documentation
How PrysmCredit works
Two market types, one mechanism
Every PrysmCredit market is a fixed-expiry series of complementary outcome shares, fully collateralised in USDG. A complete pair is one ▲ UP share and one ▼ DOWN share; minting a pair locks a fixed amount of collateral C (1 USDG for the first markets). At expiry the settlement value x of the market’s index decides how C is split. These are not perpetual futures and not leveraged positions: there is no funding, no leverage, no liquidation and no margin.
Market 01 — Realized Volatility
Settles to the annualised realised volatility of BTC over the 7-day observation window that ends at expiry: the root-mean-square of the 168 hourly log returns of the Hyperliquid BTC perpetual 1-hour candle closes, multiplied by √8760 and expressed in percentage points. This is realised (historical) volatility computed from prices, never implied volatility from option quotes.
- Underlying: BTC perpetual on Hyperliquid, 1-hour candle close (USD).
- Provider and feed: Hyperliquid info API, type candleSnapshot, coin BTC, interval 1h; no key.
- Observation window: the 7 days (604 800 s) ending at expiry; sampling frequency 1 hour; 168 expected returns.
- Return: r = ln(P(t) / P(t − 1h)), both closes present; ratios floored to 1e-18, ln in 1e18 fixed point.
- Missing observations: an absent hourly close removes the two returns that touch it; nothing is interpolated or carried forward.
- Estimator: σ² = Σ r² / n over the n returns used (zero-mean convention).
- Annualisation: σ_ann = 100 × √(σ² × 8760); stored at 8 decimals, rounded half away from zero.
- Coverage: n / 168 must reach the series’ minimum (90 % for the first markets) or the observation is not signed.
- Payoff bounds: L and U of the series (percentage points); UP = clamp((σ_ann − L)/(U − L), 0, 1).
- Resolution deadline: challenge delay after the proposal; fallback rule after the maximum settlement delay.
- Cancellation: guardian only, before finalization; resolves at the neutral UP ratio written in the terms.
- Calculation version: rvol-log-returns-annualised-v1.
Market 02 — Funding Divergence
Settles to the cumulative difference between the hourly funding rates of the BTC perpetual on the Lighter Robinhood Chain domain (venue A) and on Hyperliquid (venue B) over the 24-hour window ending at expiry. Both venues pay funding hourly; each realised rate is normalised to a signed fraction per hour (positive = longs pay shorts), the hourly spread A − B is taken where both exist, and the observed spreads are summed and scaled to the full window. Shown in basis points. This index describes funding differences; holding a share does not collect any funding.
- Venue A: Lighter Robinhood Chain domain (contract 0x94bAB9693Ba2f6358507eFfcbd372b0660AFfF9d on chain 4663), market_id 1 = BTC perpetual, GET /api/v1/fundings?resolution=1h.
- Venue B: Hyperliquid, coin BTC perpetual, POST /info {type: fundingHistory}.
- Sign convention: positive = longs pay shorts on both venues. Lighter: rate is a percent per hour with direction (long = positive, short = negative); Hyperliquid: fundingRate is a fraction per hour.
- Included observations: realised, paid hourly funding only; indicative next-hour rates are never used.
- Window: the 24 hours (86 400 s) ending at expiry; interval normalisation: both venues are hourly, no conversion.
- Aggregation: spread(t) = A(t) − B(t) where both exist; value = Σ spread × 24 / n (the mean observed spread scaled to the window).
- Missing hours: excluded from the sum; the mean of the observed hours stands in for them (published rule); coverage n / 24 must reach the series’ minimum (75 %).
- Units: fraction at 12 decimals on chain; displayed in basis points (1 bp = 1e-4).
- Payoff bounds: L and U of the series in the same units; UP = clamp((value − L)/(U − L), 0, 1).
- Resolution deadline: challenge delay after the proposal; fallback rule after the maximum settlement delay.
- Cancellation: guardian only, before finalization; resolves at the neutral UP ratio written in the terms.
- Calculation version: funding-divergence-cumulative-v1.
A funding-divergence share is a bet on a cumulative difference. It does not receive funding from either venue, it is not a hedge of a perpetual position, and it is not an arbitrage or a yield. If compatible data from both venues is unavailable, market creation is disabled and the reason is shown.
Payoff and worked examples
With lower bound L, upper bound U and settlement value x:
upRatio = clamp((x − L) / (U − L), 0, 1) (1e18 fixed point, floored) UP payout = qty × C × upRatio / 1e36 (floored) DOWN payout = qty × C × (1e18 − upRatio) / 1e36 (floored)
Rounding policy: minting rounds the locked collateral up, merging rounds the released collateral down, ratios and payouts are floored. Therefore UP + DOWN for any quantity never exceeds what minting locked, and aggregate payouts never exceed the market reserve (a tested contract invariant). Rounding remainders stay in the reserve and can be swept only once no share of either outcome exists.
Example 1 — Realized Volatility, buy 100 UP
Bounds L = 20.00%, U = 80.00%; C = 1.00 USDG per pair. You buy 100 UP shares at 0.42 USDG each from an escrowed sell order; the taker fee is 0.20%.
Above U or below L, further index moves change nothing. The share’s price today (0.42) and its redemption value at 46 % (0.43) are unrelated numbers: buying above the eventual redemption value loses money even though volatility rose.
Example 2 — Funding Divergence, hold 40 DOWN
Bounds L = -20.00 bp, U = 20.00 bp. The window settles at -6.00 bp (Lighter paid less than Hyperliquid over the day). You bought 40 DOWN at 0.55.
Mint and merge rounding
Fully escrowed order book
Backing is not liquidity. To trade one share for collateral someone must be on the other side. PrysmCredit uses an on-chain limit-order book with full escrow: a maker places an order and the offered side is transferred to the OrderBook contract immediately — the shares for a sell order, ceil(quantity × price) of collateral for a buy order. A taker fills any part of an open order; shares and collateral move atomically in one transaction. The taker pays the protocol fee on the collateral leg (buyer cost rounds up, seller proceeds round down); makers pay none. Partial fills, cancellation (maker, any time), reclaim (anyone, once the order expired or the market stopped trading), expiry, no overfill, no owner self-fill and no fills after the trading cutoff are enforced by the contract; takers set a limit and a deadline.
Self-fill prevention is not wash-trade prevention: two wallets of one person are indistinguishable on chain. An empty book is a valid state; the interface never shows synthetic depth or fictional counterparties.
Settlement lifecycle
- Created → Trading — mint, merge, place and fill. Terms and Credit rules are frozen at creation.
- Trading closed (tradingCloses, before the observation window ends) — no more fills, orders or mints; merge still works; open orders can be reclaimed.
- Observation pending (expiry) — the publisher computes the settlement value from the stored observations of the window, publishes the dataset and calculation version, and signs an observation with observedAt = expiry.
- Proposed — the proposal waits for the challenge delay. The guardian may reject it with a public reason; a value the oracle’s rate limit flagged as extreme needs explicit confirmation.
- Finalized — anyone finalizes after the delay; holders redeem UP and DOWN shares for their payouts, forever. Qualifying wallets may claim a Credit.
Terminal fallback. If nothing is finalized within maxSettlementDelay of expiry, anyone may call resolveFallback: the last oracle-accepted pre-expiry value if it is within fallbackMaxAge, otherwise a fixed UP ratio (50 % for the first markets). Cancellation. The guardian may cancel a market that has not finalized; it resolves deterministically at the same neutral UP ratio for every holder, conserving collateral. Neither is a reimbursement of a secondary buyer’s execution price: shares are transferable and holders paid different prices. Fallback and cancelled markets never qualify for Credits.
Resolver: a signed publisher, disclosed
The oracle is a signed single-publisher adapter with an operator resolver. It is not a decentralised oracle network, and API-based operator settlement is not trustless. Each observation carries the feed id, the value and its precision, the observation timestamp, the publication timestamp, a sequence number, the methodology id and the publisher’s EIP-712 signature bound to this chain and contract. On chain: the signer must hold the publisher role; sequence numbers strictly increase; observation time never goes backwards; publication time is not in the future and not older than the feed’s maximum age; the value must lie within the feed’s plausibility bounds; a move larger than the feed’s maximum step is parked and the feed enters a breaker state until the guardian confirms or dismisses it. Challenges are submitted by the guardian during the challenge delay; adjudication is the guardian’s rejection (with reason) or confirmation; the hard deadline is the fallback.
Trust assumptions: the publisher and the guardian can, together, settle a market at a wrong value inside the bounds. They cannot take collateral or escrow (no such functions exist), cannot change terms or Credit rules of an existing market, and cannot block redemption after finalization.
Prysm Credits: eligibility and utility
A wallet may claim at most one Credit per market, only when the chain shows all of: the market finalized normally (an oracle observation); the wallet paid at least the minimum net protocol fee on its fills there (net = after any discount); it redeemed shares of that market for at least the minimum qualifying payout; and it has not claimed for that market. Maker inventory, share transfers, minting, merging and order cancellation never count. Rules are frozen per market at creation and shown before trading. There is no administrator mint.
The rebate loop cannot be profitable. To earn a Credit a wallet must pay at least 5.00 USDG in net fees; the most a Credit can ever return is its cap, 2.00 USDG. The contract refuses any rules with cap ≥ minimum net fee, and the discount only reduces future protocol fees (never collateral, gas, or a payout) so it cannot be withdrawn and creates no balance or debt. Example: buying 6 000 UP at 0.42 costs 2,520.00 USDG plus a 5.04 USDG fee, which qualifies; burning the resulting Credit saves at most 2.00 USDG on later fees. Prices paid or received for Credits on secondary markets are outside this guarantee, and nothing here projects a reward.
Utility. Burning a Credit (owner only, irreversible) atomically activates one entitlement per wallet: a fixed rate, a fixed cap, a fixed expiry; a second activation is refused while the current one has unused cap and has not expired. Artwork. The seed is keccak256(chain id, market, account, receipt id, renderer version), where the receipt id is keccak256(chain id, collection, market, account); the SVG is rendered on chain by the PrysmArt contract stored with the token, so future renderer versions never change an existing picture. Contracts cannot read the hash of the transaction that creates them: trade, redemption and mint hashes are attached by the indexer as provenance.
Reproducing a settlement
Every market page offers Download JSON: the raw provider observations inside the window (with the stored provider payloads and fetch times), the published rules, the calculation version and the value the methodology computes. Feed the observations array to realizedVol or cumulativeDivergence in src/protocol/methodology.ts with the market’s expiry, window and minimum coverage; the result must equal the published observation. Documented test vectors live in methodology.test.ts and docs/METHODOLOGY.md.
Risks
- A share can expire worth nothing; the maximum loss is what you paid plus fees. Capped is not risk-free.
- Settlement depends on third-party data (Hyperliquid, the Lighter Robinhood Chain domain) and on the publisher/guardian process, including the documented fallback and cancellation rules.
- Liquidity is whatever makers escrow. There may be no bid when you want to exit before expiry.
- Smart contracts can have bugs. The contracts are unaudited; the test suite (unit, fuzz, invariant, end-to-end) is not an audit.
- Funding-divergence markets describe an index of differences; they are not an arbitrage, do not collect funding and are not a hedge for a perpetual position.
- Prysm Credits are collectibles with a bounded fee utility. They are not loans, credit scores, claims on collateral or protocol revenue, or a guarantee of profit, and PrysmCredit is not affiliated with Robinhood, X, or Jack Butcher’s Credits.
Access
PrysmCredit is software that interacts with public smart contracts on Robinhood Chain. Derivatives may be restricted or prohibited for residents of some jurisdictions; it is your responsibility to determine whether you may use these instruments. The operator has not obtained any licence or regulatory approval and makes no representation that access is permitted anywhere.