How are fees charged?
Position fees
Concept
Fees are charged for short positions, and fees from long positions are used to offset the short fees.
The fee rate is based on market conditions and pool utilization, similar to Compound v2's Jump Rate model. With an exception on short fee rate, a minimum rate of 1% is applied to prevent system misuse.
Native fetches the latest borrow and supply rates on-chain every hour. Market Makers can check the current rate via the
/token-settings
endpoint to determine if borrowing from Native Lend remains profitable.Fees are calculated based on on-chain positions and elapsed seconds. Long fees (Market Maker earns) offset short fees (Market Maker pays) in notional values.
Formula
For each token, we have the values below:
: as the position of the -th token at time . Positive value means long position, negative means short
and : long fee rate for -th token at time , which is snapshot at the start of each hour and this rate is fixed and used for that hour
= , where is an indicator function that equals 1 when (indicating a long position) and 0 otherwise. ,and is in each second
= , similar to the long fees
After consolidating the long fees and short fees of all the tokens, long fees (MM earns) will offset the short fees (MM pays), in notional values:
Convert long fee from token amount to USD value and sum together
Convert short from token amount to to USD Value for each token
Distribute Long Fee to Short Fee Proportionally
Recalculate the Short Fee in Token Amount ,
Example
Prices: ETH = $2000, USDT = $1, LINK = $20, USDC = $1
Fee rates per time unit:
Long: USDT = 0.01%, LINK = 0.002%
Short: ETH = 0.02%, USDC = 0.04%
At t0, MM1 has position of -1 ETH, +2000 USDT, +100 LINK, -1500 USDC
At t5,
Short fee = -0.001 ETH, -3 USDC
Long fee = + 1 USDT, + 0.01 LINK
Short fee USD = -2 USD (from ETH), -3 USD (from USDC)
Long fee USD = +1 USD (from USDT), +0.2 USD (from LINK), 1.2 USD in total
Long fees offset short fees proportionally
Final short fee ETH = -2 + (2 / (2+3) * 1.2) USD = -1.52 USD = -0.00076 ETH
Final short fee USDC = -3 + (3/ (2+3) * 1.2) USD = -2.28 USD = -2.28 USDC
Interest fees
The principal position is stored on-chain while the fee is calculated off-chain. Approximately every 8 hours, Native's off-chain engine posts the fee data on-chain, updating the on-chain position data (Epoch Update). This means that the fee merges into the principal, increasing the short position amount by that amount.
Note: If long fees exceed short fees, it will cancel out the short fee without increasing the long position.
Last updated