Comment on page
An overview of how Paradex's unique continuous funding mechanism works
The funding mechanism calculates the funding PnL for each open perpetual position. This PnL is realised when the position size changes after a trade.
The accrued funding contributes to the total unrealized PnL (hence to the account value). The accrued funding PnL is calculated in USDC (settlement asset).
At a given time t, the Funding Premium represents the difference between the last traded price (market price) and the spot price. This difference is expressed in the settlement asset of the instrument (currently USDC) :
Note that the Funding Premium can also be derived from the Funding Rate using the relationship :
At a global level, a Funding Index calculates accrued funding for 1 unit of the asset since launch and is calculated as a time-weighted sum of the Funding Premium :
The Funding Premium is updated along with the mark price (every 5 seconds). This triggers an update of the funding index.
At any point in time, the Current Funding Index can be calculated as :
where timestamps are expressed in seconds.
The Accrued (Unrealized) Funding of an open perpetual position depends on the change in the funding index since its last cached value (from last trade) :
where Perpetual Position Size is a signed position size (positive in case of a long position, negative in case of short position)
Whenever the account updates an existing perpetual position, accrued funding is realised :
- Initial market data at time:
- Alice enters a long position of size 50 XYZ-USD-PERP at
- For example simplicity, we assume prices stay unchanged for 1 hour, i.e. the Funding Premium remains the same :
Within the past hour, Alice accrued a Funding Loss equal to :
Note that this negative PnL affects Alice's account value but is not reflected in the USDC balance until Alice's next
- Exactly at, XYZ-USD-PERP Mark Price jumps to. However, XYZ Spot Oracle Price remains unchanged. The funding premium now increases to
- Assuming prices do not change during the next 2 hours (i.e. until), the funding index becomes :Alice's funding loss increases to
- Alice decides to increase the long position size by successfully submitting a market order. This results in the previous accrued funding loss of 100 USDC to be realized (i.e. USDC balance is debited by 100) and accrued funding to be reset to zero.