SHARE THIS ARTICLE

    16 Oct 2026

    A Closer Look at Perp DEX Funding Rates: Who Pays Whom?

    blog-1

    Perpetual futures markets have an interesting way of balancing trading activity. When one side of the market becomes more expensive to hold, traders on the opposite side may receive payments simply for maintaining their positions. These payments, known as funding, can affect trading returns without any change in the size of a position or the need to execute another trade.

    The idea sounds clear-cut until the funding rate changes direction. A long position that was paying funding could start receiving it, while shorts face the opposite situation. The amount also varies depending on the exchange's calculation method, making funding an important consideration beyond entry prices and leverage.

    This matters equally to the exchanges handling those payments. When it comes to perpetual DEX development, funding calculations need to account for changing market conditions and individual position exposure.

    Without much further ado, let's delve into what determines the funding rate, who pays whom, and how does the exchange calculate the amount?

    What Are Funding Rates in Perpetual Futures Trading?

    Let’s understand this through an example. 

    Say, Bitcoin is trading at $50,000 on the spot market, but its perpetual contract is priced at $50,500. Traders are paying a $500 premium for perpetual exposure.

    That difference matters. If the exchange's funding calculation produces a positive rate, long positions pay funding to shorts. Holding a long becomes more expensive, while traders on the short side receive compensation.

    If the perpetual trades at a discount instead, the calculation may produce a negative rate and reverse the payment direction.

    The price difference won't necessarily disappear straightaway. Traders can continue holding positions despite paying funding, particularly when they expect the market to move far enough in their favour to cover the additional cost.

    Who Pays Whom? Positive vs. Negative Funding Rates

    The direction of a funding payment depends on the rate's sign, not whether a trader is making or losing money.

    Who Pays Whom? Positive vs. Negative Funding Rates

    Positive Funding: Longs Pay Shorts

    Positive funding commonly occurs when perpetual contracts trade above their reference prices.

    Suppose two traders hold opposing positions worth $20,000 each. At a funding rate of +0.01% for the settlement interval:

    • The long trader pays $2.

    • The short trader receives $2.

    The long trader might still profit if Bitcoin rises. Funding simply adds another cost to the position.

    Negative Funding: Shorts Pay Longs

    Negative funding commonly occurs when perpetual contracts trade at a discount to their reference prices.

    At a rate of -0.02%, a $20,000 short position pays $4 for the interval. An equivalent long position receives $4.

    A short trader can therefore profit from falling prices while paying funding.

    On Hyperliquid, funding transfers are peer-to-peer and the venue does not collect a portion of those payments. That arrangement should not be confused with separate trading fees or other charges an exchange may apply.

    How Are Perp DEX Funding Rates Calculated?

    There are two main components being taken into account while calculating, and the methodology also depends on how the exchange measures market prices and manages trading exposure.

    In premium-based models, two components are particularly relevant.

         1. Premium Index

    The premium index measures the difference between perpetual contract pricing and the underlying reference price.

    Some exchanges calculate this using impact bid and ask prices, which reflect available order book liquidity rather than relying only on the latest traded price.

        2. Interest Rate Component

    Certain perpetual exchanges incorporate a predefined interest-rate adjustment representing financing differences between the underlying and quote assets.

    The value of this component and its interaction with the premium depend on the exchange.

    For example, Hyperliquid calculates funding from an averaged premium index and a clamped interest adjustment. It settles funding hourly, using one-eighth of the calculated eight-hour rate.

    The calculation also distinguishes between several prices. An oracle or index price supplies the external market reference. A mark price is commonly used for position valuation and liquidation checks. On Hyperliquid, funding notional is calculated using the oracle price rather than the mark price.

    Funding Payment Formula With an Example

    Once the applicable rate is known, the basic payment calculation is:

    Funding Payment = Position Notional |Funding Rate|

    Assume the following hypothetical position:

    Parameter Value
    BTC Perpetual Position $50,000
    Initial Margin $5000
    Leverage 10x
    Hourly funding rate +0.02%
    Holding period 8 hours
    The hourly funding payment is: 
    $50,000 X 0.0002 = $10


    If the trader holds a long position, they pay $10 for that hour. An equivalent short position receives $10.

    Assuming the rate and notional remain unchanged, eight hourly settlements cost the long trader $80.

    That represents 1.6% of the initial $5,000 margin.

    Funding is calculated against the position's notional exposure. And it is to be kept in mind that funding payments can change as market prices and position sizes fluctuate owing to the volatility of the market. 

    Why Do Funding Rates Change?

    Funding rates respond to market conditions, particularly differences between perpetual pricing and its reference market or imbalances in trading exposure.

    1. Long and Short Demand

    Strong demand for long exposure can push perpetual contract prices above their reference prices. This may result in positive funding.

    Greater demand for short exposure can produce the opposite effect.

    However, simply counting the number of long and short traders does not establish the funding rate. What matters is the exchange's chosen pricing or exposure measure.

    1. Volatility and Market Conditions

    During sharp market movements, order book premiums may change rapidly.

    Exchanges commonly use sampled or averaged market observations rather than calculating funding from a single trade.

    This distinction matters because a temporary price movement should not automatically determine an entire funding interval.

    High funding rates can indicate expensive directional exposure. They do not, by themselves, predict an imminent market reversal.

    How Do Funding Payments Affect Open Positions?

    Funding changes a trader's net profit or loss without requiring an equivalent movement in the underlying asset's price.

    A profitable trade may incur substantial funding costs. Conversely, funding credits can partially offset losses from an unfavourable price movement.

    1. Holding Positions Across Multiple Intervals

    Consider a trader maintaining a $40,000 long position at a constant hourly funding rate of +0.01%.

    Holding Period Funding Period
    1 Hour $4
    8 Hours $32
    24 Hours $96
    72 Hours $288


    These figures assume constant position notional and funding rates. They illustrate why holding periods matter, particularly for leveraged traders.

    1. Margin and Liquidation Risk

    Funding debits can reduce the collateral available to maintain a position.

    If the account is nearing its maintenance margin requirement, the chances of liquidation risk amplifies. 

    Funding credits may improve margin health, but they do not eliminate losses caused by adverse market movements.

    Funding must also be distinguished from trading fees. Trading fees generally arise when orders execute. Funding relates to open exposure under the applicable settlement rules.

     

    How Do Decentralized Perpetual Exchanges Handle Funding?

    A perpetual DEX needs a mechanism for determining the rate and applying the resulting obligations to trader positions.

    The calculation differs across exchange architectures.

    How Do Decentralized Perpetual Exchanges Handle Funding? - Codezeros

    1. Order Book-Based Exchanges

    Order book exchanges match trading interest through bids and asks.

    Funding can be derived from premiums observed in the order book relative to an external reference price.

    Hyperliquid follows this general approach. It samples premium information throughout the hour and applies funding through its clearinghouse.

    Accurate position records are essential because funding obligations depend on the applicable position exposure at settlement.

    1. Liquidity Pool-Based Exchanges

    Pool-based perpetual protocols may use long and short open interest imbalances rather than an order book premium as the primary funding input.

    GMX uses adaptive funding in which the rate changes according to the imbalance between opposing positions.

    Its mechanism can adjust gradually. If the dominant side changes, the direction of funding does not necessarily reverse immediately.

    The distinction matters when choosing between order book and AMM models for perpetual DEX development. A funding methodology should match the exchange's liquidity structure and pricing rules.

    1. Funding Calculation vs. Settlement

    Calculating funding establishes what a position owes or receives. Settlement determines when that obligation affects the trader's account.

    Some exchanges settle at scheduled intervals. Others accrue funding continuously and realize the amount when a position is modified or closed.

    Cumulative funding indexes can track these obligations without requiring constant individual transfers.

    In systems with off-chain execution and on-chain settlement, the design must also establish how funding state is recorded and verified. An incorrect update can affect both collateral balances and liquidation calculations.

     

    What Does It Take to Build a Reliable Funding Mechanism?

    Funding logic must remain accurate when positions change or market conditions deteriorate. That makes it an important part of Perpetual Smart Contract Development rather than a standalone pricing calculation.

    Several implementation decisions deserve attention.

    1. Oracle Reliability: The exchange needs a defined response to stale reference prices or unusual deviations. Invalid market data should not silently produce incorrect funding obligations.

    2. Rate Configuration: Funding intervals and rate limits influence how costs accumulate. The chosen parameters should reflect market structure rather than simply copying another exchange.

    3. Accounting Precision: Small rounding errors can accumulate across repeated settlements. Partial position closures and changes in exposure must update funding checkpoints correctly.

    4. Settlement Integrity: Funding updates should not be applied twice or calculated against outdated position records.

    What Should Businesses Evaluate Before Developing a Perpetual DEX?

    Let’s look at this objectively. 

    A perpetual DEX development company should be able to explain how the proposed mechanism behaves under ordinary trading conditions and during significant market imbalances.

    Three decisions deserve particular attention.

    1. Which funding model fits the exchange?

    An order book-based market may use premium-based funding, while a liquidity pool-based model may depend on open interest imbalances.

    The right choice depends on the intended market structure.

    2. How will funding affect collateral and liquidation calculations?

    Funding obligations must be incorporated into margin accounting according to the exchange's settlement rules.

    3. Can the implementation handle exceptional conditions?

    When businesses hire perpetual DEX developers, they should assess the team's understanding of oracle failures and derivatives accounting. Testing position state changes is equally important.

    Perpetual Exchange Development Services should cover these requirements as part of the wider trading infrastructure.

    Founders evaluating the complete exchange build can also refer to Codezeros' guide on how to launch a perpetual futures DEX like Hyperliquid, which examines execution architecture and other development decisions.

    The objective is to build funding logic that remains consistent with the exchange's markets, rather than simply replicating another protocol's formula.

     

    Build a Perpetual DEX Where Every Calculation Counts

    A perpetual exchange needs more than a working trading engine. Funding calculations, margin accounting and liquidation logic must work together.

    Codezeros offers perpetual DEX development services covering funding logic, smart contract engineering and oracle integration. Its development scope also includes trading infrastructure and liquidation systems.

    Have a perpetual DEX in mind? Let's discuss what it takes to build it right.

    Post Author

    Deep Shah
    Deep Shah

    Explore Deep's insightful blog posts that help businesses stay ahead of the curve, explore new possibilities, and unlock the full potential of blockchain technology

    Frequently Asked Questions

    Frequently asked questions about this article.

    Yes. Negative funding means shorts generally pay longs. It commonly occurs when perpetual contracts trade below their reference prices, although some exchanges use other inputs. The exact rate depends on the exchange's methodology. Negative funding does not necessarily indicate that the underlying asset's price will increase.

    Yes. Funding is separate from trading profit and loss. A profitable long position can still incur funding costs when rates are positive. A profitable short may pay funding when rates are negative. Traders need to account for these payments when evaluating their actual returns.

    It is calculated using a position's notional exposure. A $10,000 position that opens with $1,000 collateral typically incurs funding based on the exposure of $10,000. The exact value depends on the calculation rules and the applicable reference price.

    Yes. Traders on the receiving side of funding can earn payments while their positions remain eligible. Some strategies attempt to capture these payments while hedging directional exposure. However, funding rates can reverse. Trading costs and execution differences may also reduce or eliminate potential returns.

    No. Funding methodologies differ across decentralized exchanges. Order book models may calculate premiums from market prices, while pool-based systems can respond to long and short open interest imbalances. Settlement timing and rate limits also vary. These differences influence both trader costs and exchange implementation requirements.

    More questions? Contact us.

    Build a Perpetual DEX With Funding Logic Designed for Your Markets

    Funding calculations influence position costs and margin accounting. Their implementation deserves the same attention as the exchange's execution and risk mechanisms. Whether you're planning a new decentralized perpetual exchange platform or evaluating an existing design, discuss the funding methodology and technical requirements with our blockchain development team.

    Schedule Your Blockchain Consultation

    Phone
    Blogs

    Our Latest Blogs

    Discover valuable industry insights and stay up-to-date with the latest updates by exploring our curated collection of recent blog posts.

    Let us know your requirement

    We know ideas matter, we are the product of one. We Provide Full Assistance In Your Business

    Let us know your requirement
    Phone
    + =