Fees

Trading fees are necessary to help sustain the protocol over the long term. They are broken out into 3 areas; position fees, funding fees, and borrowing fees.

Position Fees

Position fees are paid when opening, increasing or decreasing a position. They are based on position size and a trading rate that is set per asset as follows:

positionFee=posSize×positionRate[asset]positionFee = posSize \times positionRate[asset]
Asset ClassRate

Crypto

0.08%

Forex

0.08%

Metals

0.08%

Funding Fees

Funding fees are in place to keep open interest balanced. The rate is determined by the net difference between long and short open interest per asset and usdc in the vault. If positive, then longs pay shorts, and if negative, then shorts pay longs.

fundingRate=fundingRateFactor×longOIshortOIusdcVaultfundingRate = fundingRateFactor \times \frac{longOI-shortOI}{usdcVault}

The funding rate shown on the UI is per hour, even though fees are continuously accrued every block. For example if the rate shown is 0.01%/hr then this means an APR of 87.6% (0.01% * 24 * 365).

A funding index (unique to each asset) is introduced which is updated each time a function is called. It increases/decreases over time based on a positive/negative funding rate as follows:

fundingIndex=fundingRate×(currentTimestamplastTimestamp)fundingIndex = fundingRate \times (currentTimestamp - lastTimestamp)
deltaFundingIndex=fundingIndex[current]fundingIndex[posID]deltaFundingIndex = fundingIndex[current] - fundingIndex[posID]
fundingFee={posSize×deltaFundingIndex/1000000if LONGposSize×deltaFundingIndex/1000000if SHORTfundingFee =\begin{cases} posSize \times deltaFundingIndex/1000000 &\text{if } LONG \\ -posSize \times deltaFundingIndex/1000000 &\text{if } SHORT\end{cases}

For example, lets say: the user opens a 100k BTC long position and the current funding index for BTC is 15010.

A simple flow for illustration:

  1. User calls a function to open a new position which sets fundingIndex[posID] = 15010.

  2. User holds position for a few hours at which time they decide to close 80% of their position. Now, due to dynamic conditions with other users opening and closing BTC positions as well as BTC funding rate changing, the funding index for BTC is now 15510.

  3. User pays 80% * 100k * (15510 - 15010)/1000000 = $40

Borrow Fees

A borrow fee is implemented to help mitigate/offset the vault's risk of always taking the opposite side of each trade. The borrow fee will be based on the position size as well as the duration, in seconds, the position is held open.

borrowFee=posSize×borrowRate×durationborrowFee=posSize\times borrowRate \times duration

Borrow rate will be determined per asset by using each assets historical volatility. This is set manually, based on analysis, and will be periodically reviewed and updated to ensure the vault's risk is being managed appropriately.

Asset Risk

We consider assets either Low, Medium, or High risk, and group them into one of these categories to illustrate their borrow rate classification. For example, BTC and ETH have relatively low historical volatility in the crypto market.

Last updated