LogoLogo
HomeApp
  • 👋Introduction to Perennial
  • 🌸Perennial Petals
    • 💰Trading Competition - Flight School
  • 🫂Rebates and Rewards
  • ⛓️Perennial Chain
    • 🌺Mainnet
    • 🌼Testnet
  • 📚Guides
    • Bridging to Perennial
    • Create an Account
    • Place a limit order
    • Bridging from Perennial
  • 🏗️Protocol
    • 🏛️Markets
      • 📝Market Design
      • 🔮Oracles & Settlement
      • 📈Payoff & Positions
      • 💰Price Impact & Trading Fees
      • ⚖️Funding & Interest Rate
      • 🌊Margin & Liquidations
      • 👩‍🌾Liquidity Provisioning
      • 📝Advanced Order Types
      • 💵Collateral
    • 📬Intents
      • 📑Mechanism
      • 🔗Offchain Infrastructure
      • 🏦Intent Solvers (Makers)
      • 📑Specification
    • 🛄Collateral Accounts
    • 🏦Vaults
    • 💽Codebase
    • 🛑Protocol Risks
  • 🏗️Building on Perennial
    • Why Perennial?
    • Before Integrating
    • Frontend & Client Integrations
    • Smart Contract Integrations
    • Offchain Infrastructure
    • Guides
      • ✏️Creating a New Market
      • 👂Subscribe to Market Updates
  • ⁉️Frequently Asked Questions
    • Perennial
    • Trading
    • Markets
    • Fees
  • 📡Protocol Info
    • Markets & Vaults
    • Protocol Contracts
  • 🔐Security
    • Audits & Bug Bounty
  • 🎉Perp.Fun
    • Introduction
    • Autopilot
      • Weekly Autopilot Rewards
Powered by GitBook
On this page
  • Oracles
  • Settlement
  1. Protocol
  2. Markets

Oracles & Settlement

PreviousMarket DesignNextPayoff & Positions

Last updated 15 days ago

Oracles

Oracles are the core of each market within Perennial. Each market pulls in one or more prices from oracles to be used in the payoff function.

While a simple market will just use a single price feed (ex. ETH), more complex market could use payoffs with multiple price feeds (ex. ETH / BTC).

Perennial's modular design supports custom oracles. Currently, Perennial markets use an implementation of low latency oracles, allowing for fast & efficient price updates.

Settlement

in Perennial are computed directly from oracle prices. To prevent timing advantages or arbitrage against oracle updates, a delay is introduced into the settlement process.

When a user initiates an action to open or close a position, this request is timestamped. The actual change to the position doesn't occur immediately. Instead, it remains in a pending state. A Keeper later finalizes the trade by providing the oracle price that corresponds to the initial timestamp of the request. Settlement effectively occurs based on this specific oracle price, which is delivered at a subsequent oracle update

Developer Note: The settlement flow happens entirely on-chain, giving strong guarantees for projects building on top of Perennial.

Perennial smart contracts store the current version for position adjustments, allowing for the positions opening price & PnL to be retroactively calculated at the next on-chain settlement period (when the contracts are interacted with again), avoiding the need for a second interaction during opens/closing (or the need for a keeper).

🏗️
🏛️
🔮
Stork's
Market payoffs