Skip to main content

How Is a TWAP Used in Calculating the ‘Funding Rate’ of a Perpetual Swap?

The funding rate in a perpetual swap is a periodic payment between the long and short sides, designed to keep the contract's price (mark price) anchored to the underlying asset's spot price (index price). A Time-Weighted Average Price (TWAP) of the index price is often used to calculate the funding rate to prevent temporary price spikes from causing wild swings in the payment.

This ensures the rate is based on a stable, fair representation of the underlying market.

What Is the “Funding Rate” in a Perpetual Swap and Why Does It Matter for Manipulation?
What Is the Difference between a Constant Product and a Stable Swap AMM?
What Is the Role of Time-Weighted Average Price (TWAP) in DeFi Oracles?
Which Type of Option (Call or Put) Is Generally More Affected by Theta?