Zaros Docs
  • 🏠Getting Started
    • What is Zaros?
    • Tree Proxy Pattern
    • Protocol Architecture
      • Zaros Core
      • USDz - Zaros' Ecosystem Stablecoin
      • Perps Engine
      • Market Making Engine
    • Roadmap
  • 📚Products
    • Perpetuals DEX
      • Introduction
      • Oracles and Keepers
      • Chains
      • Markets
      • Social Login and One-Click Transactions
      • Collaterals
      • Funding Rate
      • Liquidation
    • Earn (Re)Staking dApp
      • Introduction
      • Boosted (Re)Staking Vaults
      • Integrations
  • ▶️Using Zaros
    • First Steps
      • Connecting your wallet in Zaros dapp
      • How to mint USDC & Create a Trading Account
        • Where to get Faucet
        • How to mint USDC
        • How to Create a Trading Account
    • For Traders
      • Profit and Loss (PNL)
      • Collateral/Leverage management
      • How to open & close a position?
        • Order Entry & Margin Overview
        • Market Buy/Long | Limit Sell/Short (Opening a position)
        • Take Profit/Stop Loss Triggers (Closing a position)
      • Margin & Leverage
      • Trading Data
        • Market Data
        • TradingView
        • Trading Activity Panel
        • Order entry & Margin Overview
    • For Liquidity Providers (LPs)
      • How to stake
      • How to unstake
  • 🪙ZRS Token
    • Introduction to $ZRS
    • Tokenomics
      • $ZRS Supply & Emissions
      • LBP System
    • Phase 1 ZRS/ETH Incentives
    • veZRS
      • What is veZRS?
      • The ve80/20 System
    • Governance
      • Zaros DAO
      • gZRS
  • 🔵zPoints
    • Introduction
    • Trading League Competition
  • ⛲Resources
    • Glossary
    • FAQ
    • Audits
    • Community & More Informations
Powered by GitBook
On this page
  • Zaros Funding Mechanism & Price Marking
  • Funding Rate Calculation
  • Premium Discount Calculation
  • Price Marking Mechanism
  1. Products
  2. Perpetuals DEX

Funding Rate

PreviousCollateralsNextLiquidation

Last updated 1 year ago

Zaros Funding Mechanism & Price Marking

In the complex world of digital asset trading, the concepts of Zaros funding mechanism and price marking play pivotal roles in ensuring fair trading practices and price stability. This document aims to shed light on these crucial components, detailing the methodologies behind premium discount calculation and funding rate calculation. By understanding these elements, traders can navigate the market more effectively, making informed decisions that align with their trading strategies.

To calculate the premium discount, we utilize the following formula:

premiumDiscount=markPriceindexPrice\text{premiumDiscount} = \frac{\text{markPrice}}{\text{indexPrice}}premiumDiscount=indexPricemarkPrice​

This ratio provides insight into the relationship between the mark price and the index price.

Funding Rate Calculation

The funding rate is adjusted based on the premium discount and the interest rate. The general formula is as follows:

Premium Discount Calculation

The process to adjust the funding rate based on the premium discount falls into two scenarios, depending on the initial result's position relative to a specific clamp range. The operations proceed as follows:

Scenario 1: Outside the Clamp Range

When the computed outcome exceeds the boundaries of the clamp range, the funding rate is approximated to the interest rate. The formula is expressible as:

fundingRate=interestRate\text{fundingRate} = \text{interestRate}fundingRate=interestRate

simplifies to the interest rate, reflecting an unaltered funding rate beyond the clamp limits.

Scenario 2: Within the Clamp Range

For outcomes nestled within the clamp range, adjustment is essential to keep the rate within predetermined bounds (-0.05% to 0.05%). The calculation involves adding the premium discount to a clamped value, falling within these bounds, of the difference between the interest rate and the premium discount:

In this formulation, the clamp function acts as a regulator to ensure the funding rate's alignment with set parameters, thereby maintaining it within a sustainable range.

Interest Rate Determination

The interest rate is a critical component in calculating the funding rate. It is determined as follows:

Where:

  • interestQuote is the 8-hour TWAP (Time-Weighted Average Price) of the quote asset's lending rate.

  • interestBase is the 8-hour TWAP of the base asset's lending rate.

  • fundingTimesPerDay: Represents how often funding occurs per day (typically, 3 times).

The usual value for the interest rate is 0.01% (1 basis point, bps).

Funding Interval and Rate

  • Funding Interval: 1 hour

  • Funding Times Per Day:

Price Marking Mechanism

Zaros Skew Scale

The skew scale, central to Zaros's trading strategy, adjusts the market position based on the desired price impact. It is calculated by dividing the impactNotional by zaros.desiredPriceImpact. This calculation ensures that trades adjust the market price in a controlled manner, in line with Zaros's strategic goals.

Desired Price Impact

This is a key metric that outlines Zaros's goal for influencing the market price. It is the product of priceImpactPremium and cexPriceImpact, aiming to achieve a specified change in the market price through trades. The priceImpactPremium is adjusted by the risk team based on market liquidity and other conditions, reflecting Zaros's approach to managing its trades' market impact.

Impact Notional

This measure helps Zaros to standardize its trading impact across different market conditions and liquidity environments. Default value is $100,000.

Price Impact Premium

A coefficient set by Zaros's risk team, this premium adjusts the price impact of trades according to the current market conditions and Zaros's liquidity position. It plays a crucial role in formulating the desired price impact by modulating how aggressive or conservative the trading strategy should be in light of current market dynamics.

Skew Scale Calculation Method

The method involves dividing the impactNotional by zaros.desiredPriceImpact, giving a scale that Zaros can use to adjust its trading strategies according to the desired effect on the market price. The result is a fine-tuned approach that allows Zaros to influence market prices in alignment with its strategic objectives.

This is because the adjustment formula, fundingRate=premiumDiscount+(interestRate−premiumDiscount)\text{fundingRate} = \text{premiumDiscount} + (\text{interestRate} - \text{premiumDiscount})fundingRate=premiumDiscount+(interestRate−premiumDiscount)

fundingRate=premiumDiscount+clamp((interestRate−premiumDiscount),−0.05%,0.05%)\text{fundingRate} = \text{premiumDiscount} + \text{clamp}((\text{interestRate} - \text{premiumDiscount}), -0.05\%, 0.05\%)fundingRate=premiumDiscount+clamp((interestRate−premiumDiscount),−0.05%,0.05%)

interestRate=interestQuote−interestBasefundingTimesPerDay\text{interestRate} = \frac{\text{interestQuote} - \text{interestBase}}{\text{fundingTimesPerDay}}interestRate=fundingTimesPerDayinterestQuote−interestBase​
(fundingInterval1 hour)\left(\frac{\text{fundingInterval}}{1\, \text{hour}}\right)(1hourfundingInterval​)
📚