# Funding

**Funding Rate.**Bluefin computes the funding rate following the following formula:

$\text{Funding Rate} = \bigg(\frac{\text{TWA}(P_{\text{market}})}{\text{TWA}(P_{\text{index}})}-1\bigg)/24,$

where TWA is the time-weighted average, the index price is the aggregated price of the base asset in the spot market, and the market price is a median of the last trade price, the best bid and best ask,

$P_{\text{market}} = median(\text{Last Price, Best Bid, Best Ask}).$

The prices are snapshotted every minute. At the end of each hour, the rate is calculated as an average (TWA) of the 60 values calculated over the course of the last hour. The funding rate has an absolute 0.1% hourly cap.

**Funding Payment.**Funding Payments are accumulated every second and settled at the time of every account action, i.e., when trading, managing margin, or changing leverage. Funding payments are the notional value of the position times the holding time (the proportion of the hour) times the hourly funding rate.

If the Funding Rate is positive, long position holders pay short position holders, and vice versa if the Rate is negative. The mechanism incentivizes the convergence of mid-market price towards the index price.

Last modified 1mo ago