Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/pacifica-fi/docs-migrate/llms.txt

Use this file to discover all available pages before exploring further.

Funding rates are periodic payments exchanged between traders holding long and short perpetual positions. Because perpetual contracts have no expiry date, funding rates serve as the mechanism that keeps the perpetual price anchored to the underlying spot market: when perpetuals trade at a premium to spot, longs pay shorts, nudging the price back down; when perpetuals trade at a discount, shorts pay longs.

How Funding Affects Your Account

  • Positive funding rate: Traders holding long positions pay traders holding short positions.
  • Negative funding rate: Traders holding short positions pay traders holding long positions.
Funding payments are applied automatically each hour and directly adjust your account balance — you do not need to take any action.
Funding fees are capped at ±4% per hour. This cap limits the maximum funding cost even during extreme market dislocations.

Funding Rate Calculation

Pacifica calculates the funding rate using two components: the Premium Index and a fixed 8-hour Interest Rate of 0.01%.
funding_rate = (premium_index + clamp(interest_rate - premium_index, -0.05%, 0.05%)) / 8

Premium Index

The Premium Index measures how far the perpetual’s effective traded price (the Impact Price) deviates from the Oracle Price:
premium_index = impact_price / oracle_price - 1

Impact Price

The Impact Price is derived from the average execution price for a hypothetical trade of the Impact Notional size through Pacifica’s live order book:
impact_price = max(impact_bid_price - oracle_price, 0)
             - max(oracle_price - impact_ask_price, 0)

Impact Notional Values

AssetImpact Notional (USD)
BTC, ETH$20,000
All other assets$6,000
The Impact Notional defines how deeply the calculation samples the order book. A larger Impact Notional means a wider slice of book depth is used, making the Premium Index more representative of actual execution costs for meaningful trade sizes.

Clamp

The clamp(interest_rate - premium_index, -0.05%, 0.05%) term keeps the funding rate stable when the premium is small. If the premium index is within 0.05% of the interest rate, the interest rate component dominates and funding remains near a baseline steady state, avoiding unnecessary volatility in funding costs during calm market conditions.

Sampling and Update Schedule

Pacifica samples and updates the funding rate every 5 seconds. The interface displays a time-weighted average (TWAP) of the estimated next 1-hour funding rate based on all samples taken since the last reset. At the end of each 1-hour interval:
  1. The average funding rate over the hour is calculated from all 5-second samples.
  2. That average rate is applied to all open positions.
  3. The TWAP display resets and begins accumulating for the next hour.

Impact on Long and Short Positions

Funding RateLong PositionShort Position
Positive (perps at premium)Account balance reduced (pay fee)Account balance increased (receive fee)
Negative (perps at discount)Account balance increased (receive fee)Account balance reduced (pay fee)

Effect on Isolated Margin Positions

For isolated margin positions, funding payments are deducted from (or added to) the position’s isolated margin balance — not from the main account USDC balance. This means recurring funding payments on an isolated position directly affect that position’s liquidation price. After each hourly funding settlement, Pacifica recalculates liquidation prices for all isolated positions to reflect the updated margin amount.
If you hold a heavily funded isolated position over a sustained period (for example, a long position during a prolonged positive-funding environment), your isolated margin will erode with each hourly payment, gradually moving your liquidation price closer to the current market price. Monitor your isolated margin balance accordingly.

Viewing Historical Funding Rates

Historical funding rate data is available via the REST API:
GET /api/v1/funding_rate/history?symbol=BTC
Query parameters: symbol (required), limit (optional, default 100, max 4000), cursor (optional, for pagination). This endpoint returns per-market funding rate history, allowing you to analyse funding trends and estimate future carry costs or income for a given position. See the Markets API for full response schema and pagination details.

Build docs developers (and LLMs) love