Skip to main content

Smart Contracts Overview

Panoptic is a protocol that facilitates the trading of Panoptions, which are perpetual options instruments with fixed gamma between two prices that operate on a streaming premium model. Under the hood, this consists of two components:

  1. A lending market for Uniswap liquidity chunks that allows option sellers (lenders) to earn a multiplier on Uniswap fees paid by borrowers (option buyers) that utilize their liquidity.
  2. An undercollateralized, interest-based token lending protocol that gives option sellers flexibility in managing their positions β€” allowing them to modify their payoffs and LP on Uniswap with more capital efficiency.

Protocol Parameters
​

The Panoptic protocol is governed by a set of immutable parameters used to calculate collateral requirements, streamia, fees, price feeds, and more. These parameters are shared across all Panoptic instances and set once on each chain. To read more about the parameters and their current values, visit the parameters page.

Pool Criteria
​

Panoptic Pools can be deployed permissionlessly by anyone, but pools listed on our interface must meet a certain set of criteria before they can be traded. To read more about the listing criteria and learn how to ensure a pool appears on our interface, visit the pool criteria page.

Architecture & Contracts (Panoptic V2)
​

Panoptic V2 is the second major release of the Panoptic Protocol. It expands Panoptic into a unified system for lending and perpetual options, enabling lending markets within Panoptic and options trading on Uniswap V3 and V4 pools.

Version 2 introduces a redesigned interest rate model for lending markets, modular risk engines that support higher, controlled leverage and improved capital efficiency, and streamlined position management. Additional upgrades include internalized oracles and builder codes for trading fee discounts and protocol fee capture.

Panoptic V2 also works in tandem with Panoptic Vaults, which add vault-based automation for passive deposits and strategy execution, enabling optimized and hands-off yield generation.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Panoptic v2 Contracts β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ PanopticPool │───▢│ SFPM β”‚ β”‚
β”‚ β”‚ β”‚ β”‚ (Semi-Fungible β”‚ β”‚
β”‚ β”‚ - dispatch() β”‚ β”‚ Position Mgr) β”‚ β”‚
β”‚ β”‚ - liquidate() β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ - forceExerciseβ”‚ β”‚ - ERC1155 β”‚ β”‚
β”‚ β”‚ - getAccumFees β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚CollateralTrackerβ”‚ β”‚ RiskEngine β”‚ β”‚
β”‚ β”‚ (x2: token0/1) β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ β”‚ β”‚ - getMargin() β”‚ β”‚
β”‚ β”‚ - ERC4626 vaultβ”‚ β”‚ - solvency β”‚ β”‚
β”‚ β”‚ - interest rateβ”‚ β”‚ - safe mode β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ - oracle β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ PanopticFactory β”‚ β”‚ PanopticHelper β”‚ β”‚
β”‚ β”‚ - deployPool β”‚ β”‚ (Upgradable) β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚
β”‚ β”‚ - getLiqPrices β”‚ β”‚
β”‚ β”‚ - getNLV β”‚ β”‚
β”‚ β”‚ - getGreeks β”‚ β”‚
β”‚ β”‚ - quoteFinalPx β”‚ β”‚
β”‚ β”‚ - getPoolLiqs β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Directory
​

  • CollateralTracker
    • Tracks and manages collateral using a shares model.
  • PanopticFactory
    • Deploys an options market on top of an existing Uniswap V4 pool.
  • PanopticPool
    • Creates and manages undercollateralized options. Manages positions, collateral, liquidations and forced exercises.
  • SemiFungiblePositionManager
    • The Semi-fungible Position Manager contract for Panoptic acts as a position manager for Uniswap V4 LPs. Wraps up to 4-legged Uniswap V4 positions in the ERC1155 semi-fungible token interface.
  • RiskEngine
    • Defines risk policy and fee routing for a given pool deployment. The RiskEngine specifies parameters used in solvency checks and fee calculations (e.g., commission rates, buffers, builder-code routing), and acts as the recipient for protocol-routed fees.
  • base
    • Inherited metadata and multicall contracts
  • interfaces
    • Custom interfaces used in the contracts
  • libraries
  • tokens
    • Token implementations and interfaces used in the contracts
  • types
    • Custom data types used in the contracts

Architecture & Contracts (Panoptic V1.1)
​

Panoptic V1.1 is an upgrade to Panoptic V1 that introduces the ability to create options markets on Uniswap V4 pools. The upgrade adds support for native ETH and native token pools on other chains, as well as pools with hooks (expansions to Uniswap V4) with the permissions beforeInitialize, afterInitialize, beforeDonate, afterDonate, beforeSwap, afterSwap, beforeSwapReturnDelta, and afterSwapReturnDelta. Panoptic V1.1 still uses V3-style oracles (which can consist of a Uniswap V3 pool or a Uniswap V4 hook that exposes the same interface).

Directory
​

  • CollateralTracker
    • Tracks and manages collateral using a shares model.
  • PanopticFactory
    • Deploys an options market on top of an existing Uniswap V4 pool.
  • PanopticPool
    • Creates and manages undercollateralized options. Manages positions, collateral, liquidations and forced exercises.
  • SemiFungiblePositionManager
    • The Semi-fungible Position Manager contract for Panoptic acts as a position manager for Uniswap V4 LPs. Wraps up to 4-legged Uniswap V4 positions in the ERC1155 semi-fungible token interface.
  • base
    • Inherited metadata and multicall contracts
  • interfaces
    • Custom interfaces used in the contracts
  • libraries
  • tokens
    • Token implementations and interfaces used in the contracts
  • types
    • Custom data types used in the contracts

Architecture & Contracts (Panoptic V1)
​

CommissionsCommissions

Panoptic V1.0 is the original version of the Panoptic Protocol. It facilitates options markets on Uniswap V3 pools.

Directory
​

  • CollateralTracker
    • Tracks and manages collateral using a shares model.
  • PanopticFactory
    • Deploys an options market on top of an existing Uniswap V3 pool.
  • PanopticPool
    • Creates and manages undercollateralized options. Manages positions, collateral, liquidations and forced exercises.
  • SemiFungiblePositionManager
    • The Semi-fungible Position Manager contract for Panoptic replaces the functionalities of the Nonfungible Position Manager from Uniswap v3-periphery. Wraps up to 4-legged Uniswap V3 positions in the ERC1155 semi-fungible token interface.
  • base
    • Inherited metadata and multicall contracts
  • libraries
  • tokens
    • Token implementations and interfaces used in the contracts
  • types
    • Custom data types used in the contracts