LogoLogo
  • 👋Welcome to Zeta
  • The Zeta DEX
    • 🔗Official Links
    • 📚Learn how to trade on Zeta
      • 🎓Introduction to Perpetuals
      • 💸Compatible Wallets
      • 📖Getting Started on Zeta
      • ✅Order Types
      • 💟Margin Account Parameters
      • 📑Asset Parameters
      • ⚖️Funding Rates
    • 🔧Trading Specifications
      • Fee Tiers
      • Delisting Process
    • 🏗️Exchange Architecture
      • Margin Accounts
      • Margin System
        • Collateral Framework
        • Liquidations & Insurance
          • Insurance Fund
          • Socialized Loss
      • Oracles
      • Orderbook & Matching Engine
      • Trigger orders
      • Trading Mechanism
      • Perpetual Funding System
    • 📱Mobile is LIVE !
    • 🌉Bridging Guide
      • 💱From Exchanges
      • ⛓️From Other Chains
  • Rewards Programs
    • 🪙$ZEX
      • 🪙Staking
        • Staking $ZEX: Step-by-Step Guide
    • 💱Trading Rewards Program
      • Z-Score Active Boosts
        • 🎁Z-Loot
      • 🥩Stakers' Boosted Trading Rewards
      • $BERA Listing (Live)
      • 🗃️Ended Trading Campaigns and Boosts
        • 🪐Jupiter x Zeta (Finished)
        • 1️⃣Season 1 (Finished)
          • 1️⃣Z-Score Season 1
            • 👥NFT Community Partners
          • ⚡S1 Zeta Cards
        • 2️⃣Season 2 (Finished)
          • 2️⃣Z-Score Season 2
            • 🍴Bitcoin Halving (Finished)
            • 🐶$WIF Listing (Finished)
            • 🔴$RNDR Listing (Finished)
            • ⬛$TNSR Listing (Finished)
            • 🔮Pyth Stakers (Finished)
            • 🟥Backpack Boost (Finished)
            • 🏁AssetDash Elements (Finished)
          • ⚡S2 Zeta Cards (Finished)
          • 🎉Community Airdrop (Finished)
        • $POPCAT Listing (Finished)
        • 👯Referral Z-Score Boost (Finished)
        • $EIGEN Listing (Finished)
        • 🟡$DBR Listing (Finished)
        • 🟡$GOAT Listing (Finished)
        • 🟪$DRIFT Listing (Live)
        • 🟪$PNUT Listing (Finished)
        • $PENGU Listing (Finished)
        • $TRUMP Listing (Finished)
    • 🔒Final Epoch
    • 🚰Maker Rewards Program
    • 👨‍👩‍👦‍👦Referrals Program
      • Genesis Epoch Referral Boost (Finished)
      • Breakpoint Referral Boost
    • 🫂Content & Community Programs
      • Creators Program
      • Community Referral Program
  • Build with Zeta
    • 💽SDKs
      • 🐍Python SDK
        • Market Making Bot
      • 🧱Typescript SDK
        • 📚Examples
          • 👶Basic example
          • ⚙️Cranking
          • 🌊Liquidator
          • 🚅Subscription
          • 📬Versioned Transactions
    • 😴REST Data API
    • 💥Program ABI
    • 🎨Brand Assets
      • 📣Brand Book
      • 📰Media Kit
      • 🎨Logo & Visual Guidelines
  • Zeta X
  • Zeta Node
    • 🌐Validator Details
  • Legal
    • Terms and Conditions
    • Staking Terms and Conditions
    • Privacy Policy
    • Location Restrictions
    • TradingView
    • Audit Reports
  • Educational Resources
    • 🆕New to Solana? Start Here!
    • 🆘Support
Powered by GitBook
On this page
  • How does Zeta calculate funding rates?
  • How is funding paid on Zeta?

Was this helpful?

  1. The Zeta DEX
  2. Exchange Architecture

Perpetual Funding System

PreviousTrading MechanismNextMobile is LIVE !

Last updated 1 year ago

Was this helpful?

Unlike dated futures, perps don’t have an expiry. In place of that, users are charged a funding rate based on their position and the orderbook on Zeta.

How does Zeta calculate funding rates?

Over 24 hours, longs pay shorts based on the following formula:

fundingRate=impactMidpointoracle−1fundingRate = \frac{impactMidpoint}{oracle} - 1fundingRate=oracleimpactMidpoint​−1
payment=fundingRate∗oracle∗positionSizepayment = fundingRate * oracle*positionSizepayment=fundingRate∗oracle∗positionSize

impactMidpointimpactMidpointimpactMidpoint is the midpoint of the orderbook given $1000 worth of quotes on both the bid and ask side.

For example, let’s say you are long 100 lots of SOL-PERP and hold it for 24 hours. Over that time, the orderbook midpoint is $11.76 and the SOL oracle price is $12 (in reality these will fluctuate).

fundingRate=11.7612−1=−2% per dayfundingRate = \frac{11.76}{12} - 1 = -2\%\ per\ dayfundingRate=1211.76​−1=−2% per day
payment=−2%∗12∗100=$24payment = -2\% * 12 * 100 = \$24 payment=−2%∗12∗100=$24

A negative funding rate means that shorts pay longs. Therefore your long position will be paid $24 per day as funding is negative.

How is funding paid on Zeta?

Funding rates on Zeta are calculated on Zeta approximately every 10 seconds.

Rather than applying funding on a set timer, we apply it to your balance on any balance-sensitive operation (placeOrder, withdraw, liquidate, etc.), as well as every couple of minutes using our cranks.

At any point you can apply any unpaid funding to your account with our SDK's utils.applyPerpFunding() function.

🏗️