Default funding rates on dYdX Chain

Default funding rates on dYdX Chain

Roselynn Chang avatar
Written by Roselynn Chang
Updated over a week ago

Funding Rates on dYdX Chain

Funding rates contemplated in the default v4 software will be subject to adjustments by the applicable governance community.

What are funding rates?

Perpetual contracts have no expiry date and therefore no final settlement or delivery. Funding payments are therefore used to incentivize the price of the perpetual to trade at the price of the underlying.

The purpose of the funding rate is to keep the price of each perpetual market trading close to its Oracle Price. When the price is too high, longs pay shorts, incentivizing more traders to sell / go short, and driving the price down. When the price is too low, shorts pay longs, incentivizing more traders to buy / go long, driving the price up.

How are funding rates calculated on dYdX Chain?

As part of the default settings of the v4 open source software (”dYdX Chain”), the main component of the funding rate is a premium that takes into account market activity for a perpetual. It is calculated for every market using the formula:

Premium = (Max(0, Impact Bid Price - Index Price) - Max(0, Index Price - Impact Ask Price)) / Index Price

Where the impact bid and impact ask prices are defined as:

Impact Bid Price = Average execution price for a market sell of the impact notional value Impact Ask Price = Average execution price for a market buy of the impact notional value

And the impact notional amount for a market is:

Impact Notional Amount = 500 USDC / Initial Margin Fraction

For example, at a 10% initial margin fraction, the impact notional value is 5,000 USDC.

At the end of each hour, the 1-hour premium is calculated as the simple average (i.e. TWAP) of the 60 premiums calculated over the course of the last hour. How is the sample calculated? At a high level, the proposer determines the premium for each block based on their local view of the order book and then proposes a FundingPremiumVote. At the end of each funding-sample period (default to 1 minute), the median FundingPremiumVote is taken as the sample for that period. Therefore, at the end of each funding-tickperiod (default to 1 hour), the average of the past samples is used as the final funding rate.

In addition to the premium component, each market has a fixed interest rate component that aims to account for the difference in interest rates of the base and quote currencies. The funding rate is then:

Funding Rate = (Premium Component / 8) + Interest Rate Component

As part of the default settings of the v4 open source software, the interest rate component for all markets is 0% . For markets with no interest rate component, the funding rate is simply the one-hour premium.

What role do block proposers play in funding rates on dYdX Chain?

As part of the default settings of the v4 open source software, there are two distinct epochs established with the Epochs module. Every block proposer proposes a funding premium vote during each block. At the end of a funding-sample epoch, the state machine deterministically computes a funding sample from all the funding premium votes in this epoch (1 minute).

The second epoch is the "funding-tick epoch," which happens every hour at the start of the hour and is responsible for adjusting funding rates based on the collected funding samples from the preceding epoch.

Where is the funding rate for a particular market located on dYdX Chain?

Traders have the option to click on the "Funding" tab on the top part of the trade page.

Traders will then be able to see the 1-hour, 8-hour, or annualized funding rate for the specified market.

What is a funding rate cap?

The funding rate cap refers to a predetermined maximum limit on the funding rate that is applied to a particular contract, aiming to limit the potential costs incurred by traders especially during volatile market conditions. As part of the default settings of the v4 open source software, there’s a cap on each funding sample (per minute) as well as the funding rate (per hour).

How is the funding rate cap calculated?

The 8-hour rate cap is calculated by 600% * (Initial Margin - Maintenance Margin).

Market

Initial margin

Maintenance margin

Large-Cap

5%

3%

Mid-Cap

10%

5%

Long-Tail

20%

10%

Safety

100%

20%

For example, for BTC-USD which falls under Large-Cap, the 8-hour rate is capped by 600% * (IMF - MMF) = 600% * (5% - 3%) = 12%.

Disclaimer and Terms

This document may provide information with respect to the default settings of dYdX Trading Inc. (”dYdX”) v4 software, or non-mandatory guidelines and suggestions that may help with using v4 software. dYdX does not deploy or run v4 software for public use, or operate or control any dYdX Chain infrastructure. dYdX is not responsible for any actions taken by other third parties who use v4 software. dYdX services and products are not available to persons or entities who reside in, are located in, are incorporated in, or have registered offices in the United States or Canada, or Restricted Persons (as defined in the dYdX Terms of Use). The content provided herein does not constitute, and should not be considered, or relied upon as, financial advice, legal advice, tax advice, investment advice or advice of any other nature, and you agree that you are responsible to conduct independent research, perform due diligence and engage a professional advisor prior to taking any financial, tax, legal or investment action related to the foregoing content. The information contained herein, and any use of v4 software, are subject to the v4 Terms of Use.

Did this answer your question?