LogoLogo
HomeApp
  • 👋Introduction to Perennial
  • 🌸Perennial Petals
    • 💰Trading Competition - Flight School
  • ⛓️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
      • 💰Trading Fees & Price Impact
      • ⚖️Funding & Interest Rate
      • 🌊Leverage & 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
  1. Protocol
  2. Markets

Payoff & Positions

PreviousOracles & SettlementNextTrading Fees & Price Impact

Last updated 9 months ago

When initializing a market, the market operator will select a payoff function. A payoff function describes the logic the smart contracts should use to divide the money between the two sides of the market: long & short, when the market settles.

Perennial allows for developers to define any payoff function they desire — everything from simple long <asset> markets to 3x short <asset> markets to options & exotic payoffs. Below are some examples of possible payoff functions:

Example Payoff Functions

Product
Payoff
Oracle

3x Leveraged Ether

3 * ETH

Chainlink ETH Feed

Squeeth

ETH * ETH

Chainlink ETH Feed

ETH-USDC UniV2 LP

sqrt( ETH )

Chainlink ETH Feed

The payoff function for a market can be any function over an available oracle feed. This function is the definition of the exposure one (1e18) taker position represents within the market.

In the case of the "3x Leveraged ETH" payoff function, the payoff function itself is leveraged. This is independent of Maker positions that can also be leveraged (Ex. a Maker could be 2x leveraged on a 3*ETH market). For more information on Maker/Taker leverage, see the Maintenance (& Leverage) section.

Positions

Positions in Perennial are represented as units of a payoff function. This means exposure is tethered to the payoff function, not in terms of USD.

For example, say one wanted to open a 1 ETH long position (payoff = 1 * ETH). This will open a taker position for 1 * market_payoff, so 1 * ETH. This position would keep 1 ETH of exposure until closed or liquidated.

Conversely, if a user is trying to open a position in terms of some $USD amount, they would have to estimate the USD value in units of the underlying payoff and open a position accordingly.

For example, if ETH is about $1000, and a user wants to open a $2500 long-eth position, they could call openTake(2.5), which will open a position that tracks 2.5*ETH, which will be approximately (but not exactly, because of delayed settlement) equal to $2500.

& are debited from a position's collateral account.

🏗️
🏛️
📈
Funding
fees