Skip to main content

High-level

  • LPs deposit the underlying asset into Market (an ERC-4626 vault). This builds pool liquidity.
  • Traders open positions by creating an inbound Superfluid stream to the vault’s SuperApp. The flow rate = spend per second.
  • Lora computes the max notional consistent with pool utilization, a safety buffer, and a lot size granularity.
  • A strike is set using the current oracle price and the trader’s delta parameter (an OTM shift).
  • When the trader closes (or is liquidated if the stream is deleted), notional is unlocked and any payoff is paid from the vault to the trader.

Components and Responsibilities

Market

  • ERC-4626 accounting (shares, totalAssets, deposits/withdrawals).
  • Tracks lockedNotional (aggregate trader exposure) and enforces a buffer fraction of assets.
  • Implements Superfluid CFA SuperApp hooks (onFlowCreated, onFlowUpdated, onInFlowDeleted).
  • Mints positions, sets strikes, pays out on close, and emits events.

JumpRateModel

  • Maps utilization → per-second rate (WAD) with a two-slope, kinked curve; clamps to [min, max].

SentinelOracle

  • Wraps price feeds.
  • Offers a standardized interface.
  • Enforces freshness checks.

PositionLib

  • Pure library with position math helpers.
  • solveNotional - Binary-search the largest notional such that the trader’s available spend per second covers the per-second cost at current utilization.
  • calculatePayout - Computes capped call-like payoff at close