Fees

Fee structure for sustainable yield and trades

The protocol has following fees based on user's action on the specific market:

  1. Swap Market Fees

  2. Futures Market Fees

  3. Liquidity Market Fees

Swap Market Fees

Swap Fees are charged when a user swap an asset A to asset B in a market. The fees varies based on type of swap:

  • Crypto to Stablecoins (Ex: ETH to USDC)

  • Stablecoins to Stablecoins (Ex: DAI to USDC)

  • Crypto to Crypto Assets (Ex: ETH to WBTC)

Fee factors or parameters are specified while creating markets. If undefined, the default values are inherited from asset parameters defined for the asset in Asset Manager.

If FinF_{in} is the default swap fees of Asset In and FoutF_{out} is the default swap fees of Asset Out, then the total swap fees, fswapf_{swap} can be computed as:

fswap=max(Fin,Fout)f_{swap} = max (F_{in},F_{out})

Pool Weight Factor

When a multi-asset composite market is created by any user, each asset must have their assigned target weight which determines if an action, such as swap, should have a discount or a premium in the fees based on the consequence of that action. If an action is supporting the market toward its target weight for a composite asset, the market will offer a discount for that action and vice versa. The maximum amount to be taxed or discounted is stored at asset’s taxBasisPoints.

Let fWFf_{WF} be the total fees of an action to be taxed or discounted for the weight and fINf_{IN} and fOUTf_{OUT} represent the fees for the asset in and asset out then,

fWF=±fIN±fOUTf_{WF} = \pm \: f_{IN} \: \pm f_{OUT}

Negative value represents discount and positive value represents a premium or tax on the action.

Futures Market Fees

The Futures Market has following fees to incentivise LPs and traders:

  • Opening and Closing Fees

  • Borrowing Fees

  • Skew-based Funding Fees

Fixed Opening and Closing Fees

When traders open a trade on the protocol, an opening fee is deducted from the collateral to facilitate execution of the trade. Similarly, a closing fee is deducted from the collateral when the traders close their positions.

The opening and closing fees are fixed and depend on the market creator. Hence, each market may have different fees.

Dynamic Borrowing Fees

The market pool acts as a counterparty in an event of market skew. Hence, all positions pay a borrowing fee on hourly basis for sustainable operation of the protocol.

Let nn be the total time interval in hours until which the position was opened for, then borrowing fees of the position, fbf_{b} at any time tt can be defined as

fb=0nf(t)where0<tnf_{b} = \int_{0}^{n} f(t) \quad where\quad0<t\leq n

and we can define f(t)f(t) as

f(t)=rOI(t)RT  ×Fmax  ×Sf(t) = \frac{r_{OI}(t)}{R_{T}} \; \times F_{max} \;\times S

where ROI(t)R_{OI} (t) is the reserve amount in USD for all opened positions at time tt, RTR_{T} is the total reserve amount in USD for the market, FmaxF_{max} is the maximum allowed borrowing fees for the market defined and SS is the position size.

Since FmaxF_{max},RTR_{T}, SS are constant throughout the position time, so

f(t)=κ  rOI(t)f(t) = \kappa \;* r_{OI}(t)
κ=FmaxSRT \kappa = \frac{F_{max}S}{R_{T}}
fbrOIf_{b} \propto r_{OI}

hence, we can say as the open interest of the market increase the borrowing fees increase and vice versa.

Skew-based Funding Fees

Let the Active Open Interest Skew be θ\theta , then

θ=LSO\theta = \frac{|L - S|}{O}

where LL is the sum of open interest on Long side, SS be the sum of open interest on short side and OO be the sum of total open interest in USD.

If RusdR_{usd} represents pool's maximum reserve amount available for an asset, then

ϑ=LSRusd\vartheta = \frac{|L - S|}{R_{usd}}

Then the funding fee of a position can be defined as

F=ΛθλOF = \frac{ \Lambda * \theta^{\lambda}}{O}

where Λ\Lambda is the asset's funding constant and λ\lambda is the asset's funding power constant.

Direction of Funding Fees

Direction=LSLSDirection = \frac{L-S}{|L-S|}

The possible output of the function is 11 which means long will pay short and 1-1 means shorts will pay long.

Pool Weight Factor

Similar to the swap market, the futures trade in favor of the asset's target weight will occur at a discount and against the favor will occur at a premium.

This page is being updated.