To enable the facilitation of swaps on an automated market maker (AMM) like the Xfai decentralizied exchange (DEX), liquidity providers and Infinity stakers are rewarded with fees for their liquidity.
Liquidity providers receive pool specific liquidity tokens to represent their contribution to a pool, whereas infinity stakers receive Infinity NFTs. Whenever a trade or flash loan is initialized on the Xfai DEX, a
fee is charged to the transaction sender.
of the fees get distributed pro-rata to all liquidity providers in the input pool (also known as the primary pool), whereas the other
get distributed to all INFT holders.
Besides swap fees, a
fee is also applied to burning liquidity tokens (in the case where the secondary token is not ether). The burn fee exists to prevent external contracts from using Xfai's liquidity for fee-less swaps (by adding and removing liquidity across pools within the same transaction). Swap fees are applied to the input pool (i.e. the primary pool). In the case of liquidity redemption, when the liquidity tokens of a pool
are burned to redeem the underlying liquidity and any accrued fees, the fee is applied to the secondary pool (