Fees
Fee structure for sustainable yield and trades
The protocol has following fees based on user's action on the specific market:
Swap Market Fees
Futures Market Fees
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 is the default swap fees of Asset In and is the default swap fees of Asset Out, then the total swap fees, can be computed as:
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 be the total fees of an action to be taxed or discounted for the weight and and represent the fees for the asset in and asset out then,
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 be the total time interval in hours until which the position was opened for, then borrowing fees of the position, at any time can be defined as
and we can define as
where is the reserve amount in USD for all opened positions at time , is the total reserve amount in USD for the market, is the maximum allowed borrowing fees for the market defined and is the position size.
Since ,, are constant throughout the position time, so
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 , then
where is the sum of open interest on Long side, be the sum of open interest on short side and be the sum of total open interest in USD.
If represents pool's maximum reserve amount available for an asset, then
Then the funding fee of a position can be defined as
where is the asset's funding constant and is the asset's funding power constant.
Direction of Funding Fees
The possible output of the function is which means long will pay short and 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.