Protocol & Trading Fees
Protocol Fees
L3X Network is built for efficiency, offering up to a 90% cheaper ETH gas cost and sub-second finality for most transactions. This allows the L3 to perform complicated tasks, such as cross-chain message passing, in a fraction of the time.
Protocol fees are distributed as follows: [insert jpg diagram]
Trading 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]
Velocity-based Funding Fees
We leverage a proven and predictable funding fee model in order to support our traders and market makers in an equitable manner. Our competitive structure offers dynamic fees for markets of all types and primarily serve to balance Open Interest (OI).
By smoothing out the time it takes to reach the target funding rate, market makers are incentivized to balance OI and the reduce skew. All parties benefit from the resulting stability:
Traders experience more predictable, reduced funding fees
LPs benefit from reduced counterparty risk as OI skew becomes balanced
Market makers and traders can arbitrage in order to earn funding fees
How Does it work?
The funding rate is determined by the following variables:
targetRate: the funding rate at which an equilibrium would be established (ie: fundingVelocity = 0) given OI and tempMaxRate do not change.
tempMaxRate: the highest funding rate possible per asset, it varies with historical asset volatility
longBias: ensures that longs pay shorts when OI is balanced by a small percentage. Defaulted to 2.5% for crypto assets and 0% for non-crypto assets.
skewRatio: the difference between long and short OI divided by the total OI limit at that time
velocityFactor: this determines the velocity at which the funding rate proceeds to the target rate. Defaulted to 24hrs for all assets.
volatilityFactor: this is the output of the volatility and therefore risk associated with each asset; it is based on the average true range percent (ATR%) over the past 21d period
openInterest (OI): the total amount of all open positions, per asset, per side (long/ short)
maxRateFactor: a config parameter for mapping asset volatility to the maximum possible desired funding rate per asset. Defaulted to 0.5% for all assets.
π πππ€π ππ‘ππ=ππππππΌβπ βπππ‘ππΌπππππΏππππ‘ππΌ+π βπππ‘πΏππππ‘ππΌskewRatio=longLimitOI+shortLimitOIlongOIβshortOIβπ‘ππππππ₯π ππ‘π=πππ₯π ππ‘ππΉπππ‘ππΓπ£ππππ‘ππππ‘π¦πΉπππ‘ππtempMaxRate=maxRateFactorΓvolatilityFactorπ‘πππππ‘π ππ‘π=π‘ππππππ₯π ππ‘πβ(π πππ€π ππ‘ππ+πππππ΅πππ )targetRate=tempMaxRateβ(skewRatio+longBias)ππππ‘ππ ππ‘π=π‘πππππ‘π ππ‘πβπππ π‘π ππ‘πdeltaRate=targetRateβlastRate
The funding velocity can be expressed as:
ππ ππ‘=ππππ‘ππ ππ‘ππ£ππππππ‘π¦πΉπππ‘ππdtdRβ=velocityFactordeltaRateβ
Solving for funding rate,π R, as a function of time, π‘t, yields the following:
π (π‘)=π‘πππππ‘π ππ‘πβππππ‘ππ ππ‘πΓπ(βπ‘π£ππππππ‘π¦πΉπππ‘ππ)R(t)=targetRateβdeltaRateΓe(velocityFactorβtβ)
From this is can be shown (given no changes in OI) that when π‘=π£ππππππ‘π¦πΉπππ‘ππt=velocityFactor (24 hrs) then π R will have moved by approximately 63% of the deltaRate to target. For example assume BTC funding rate is currently 0.001%/h and Bob opens a large BTC long position making the new targetRate = 0.005%/h. If no other trades are made on BTC after this point then 24 hrs later the new fundingRate on BTC will be ~ 63% x (0.005 - 0.001) + 0.001 = 0.00352%/h.
Funding Fees
A funding index (unique to each asset) is introduced which is updated each time a trading event is triggered. It increases/decreases over time based on a positive/negative funding rate as follows:
ππ’ππππππΌππππ₯=ππ’ππππππ ππ‘πΓ(ππ’πππππ‘πππππ π‘πππβπππ π‘πππππ π‘πππ)fundingIndex=fundingRateΓ(currentTimestampβlastTimestamp)ππππ‘ππΉπ’ππππππΌππππ₯=ππ’ππππππΌππππ₯[ππ’πππππ‘]βππ’ππππππΌππππ₯[πππ πΌπ·]deltaFundingIndex=fundingIndex[current]βfundingIndex[posID]ππ’ππππππΉππ={πππ πππ§πΓππππ‘ππΉπ’ππππππΌππππ₯/1000000if πΏπππΊβπππ πππ§πΓππππ‘ππΉπ’ππππππΌππππ₯/1000000if ππ»ππ πfundingFee={posSizeΓdeltaFundingIndex/1000000βposSizeΓdeltaFundingIndex/1000000βif LONGif SHORTβ
For example, lets say: the user opens a 100k BTC long position and the current funding index for 15010.
A simple flow for illustration:
user calls a function to open a new position which sets fundingIndex[posID] = 15010.
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.
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Γ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 use Average True Range (ATR) over a 21d period to determine an asset's risk to the vault. All fees are automatically and dynamically adjusted according to this percent in order to assign OI and fees.
Mint/ Redeem
Minting LP3 incurs a fee of 0.05% and redeeming is free.
Spread
This new mechanism will simulate an order book by adding a slippage percentage to each order that is proportional to the vault utilization and position size.
Each index token will have its own slippage factor that will be a function of the tokens historical volatility, that of which is most often correlated to depth of market.
ππππ‘ππππππππ‘=π ππππππππΉπππ‘ππβ2Γπ‘ππ‘ππππΌ+πππ πππ§π2Γπ£ππ’ππ‘πππΏdeltaPercent=slippageFactorβ2ΓvaultTVL2ΓtotalOI+posSizeβππ₯πππ’π‘ππππππππ={πππππππππΓ(1+ππππ‘ππππππππ‘)if πΏπππΊπππππππππΓ(1βππππ‘ππππππππ‘)if ππ»ππ πexecutionPrice={markPriceΓ(1+deltaPercent)markPriceΓ(1βdeltaPercent)βif LONGif SHORTβ
Each index token will have its own slippage factor that will be a function of the tokens historical volatility, that of which is most often correlated to depth of market.
Slippage
Upon order confirmation of a new position users can also manually enter the max slippage that they are willing to accept as shown in the red box. The order will only execute if the execution price is less than the current mark price plus/minus (if long/short) the slippage percent entered here. Slippage is essentially the price difference that a user is willing to potentially accept during the process of executing an order.
Last updated