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
    • Installing Perp.fun
    • Autopilot
      • Weekly Autopilot Rewards
Powered by GitBook
On this page
  1. Protocol
  2. Markets

Payoff & Positions

PreviousOracles & SettlementNextPrice Impact & Trading Fees

Last updated 22 days ago

When a market is initialized, the Market Operator selects a specific payoff function. This function defines the precise logic the smart contracts use to distribute funds between the long and short sides of the market upon settlement.

Perennial offers developers the flexibility to define virtually any payoff function they wish. This can range from simple long [asset] or 3x short [asset] markets to more complex structures like options and other exotic payoffs.

The payoff function for a given market can be any mathematical function operating on an available oracle price feed. This function also defines the nature and magnitude of exposure that one unit (1e18) of a Taker's position represents within that market.

Example Payoff Functions

Product
Payoff
Oracle

3x Leveraged Ether

3 * ETH

Stork ETH Feed

Squeeth

ETH * ETH

Stork ETH Feed

ETH-USDC UniV2 LP

sqrt( ETH )

Stork ETH Feed

The payoff function for a given market can be any mathematical function operating on an available oracle price feed. This function also defines the nature and magnitude of exposure that one unit (1e18) of a Taker's position represents within that market.

IIt's important to note that some payoff functions can be inherently leveraged (e.g., a "3x Leveraged ETH" market where the payoff itself is 3 * ETH_price_change). This leverage is distinct from the leverage that Makers or Takers might employ on their collateral for their positions. For instance, a Maker could be 2x leveraged while providing liquidity to a market with a 3*ETH payoff function.

Positions

In Perennial, positions are denominated in units of a payoff function, not directly in USD. This means a user's exposure is directly tied to the behavior of the chosen payoff function.

For instance, if a user wishes to open a 1 ETH long position where the market's payoff function is 1 * ETH, they would open a Taker position equivalent to 1 * market_payoff. This position would then maintain an exposure equivalent to 1 ETH until it is closed or liquidated.

Conversely, if a user aims to open a position corresponding to a specific USD amount, they must first estimate that USD value in terms of the market's underlying payoff units and then open their position accordingly. For example, if ETH is approximately $1000, and a user wants to establish a $2500 long-ETH position, they might call openTake(2.5). This action would open a position that tracks 2.5 * ETH, which would be approximately equivalent to $2500.

and (such as interest rate fees, price impact fees, and trade fees) are directly debited from or credited to a user's collateral account associated with their position.

🏗️
🏛️
📈
Funding payments
various fees