There is a 0.3% fee for swapping tokens. This fee is split by liquidity providers proportional to their contribution to liquidity reserves.
Swapping fees are immediately deposited into liquidity reserves. This increases the value of liquidity tokens, functioning as a payout to all liquidity providers proportional to their share of the pool. Fees are collected by burning liquidity tokens to remove a proportional share of the underlying reserves.
Since fees are added to liquidity pools, the invariant increases at the end of every trade. Within a single transaction, the invariant represents at the end of the previous transaction.
At the moment there are 0.0003% protocol fees is sended to feeTo.
is a gnosis-safe wallet that is specified in the Pulsar contract to receive the swap fees from the liquidity pools. This allows the protocol to earn passive income from the fees generated by the liquidity pools.
The feeTo address can be set or changed by the feeToSetter.
feeArg represents the proportion of the swap fees that is charged to the protocol's feeTo wallet, with a ratio of 1/(feeArg+1). The current feeArg is
The feeArg can be set or changed by the feeToSetter.
In the future, it is possible that a protocol-wide charge of 0.15% per trade will take effect. This represents 1/2th of the 0.30% fee. The fee is in effect if feeTo is not
0x0000000000000000000000000000000000000000), indicating that feeTo is the recipient of the charge.
This amount would not affect the fee paid by traders, but would affect the amount received by liquidity providers.
Rather than calculating this charge on swaps, which would significantly increase gas costs for all users, the charge is instead calculated when liquidity is added or removed.