The Multiple Fee Levels (MLF) feature lets Liquidity Providers (LPs) select the amount of fee to be paid when their liquidity is used for swapping.
How does MLF work?
When opening a liquidity position, liquidity providers (LPs) choose among eight fee levels to add liquidity to 0,01%. 0.02%, 0.04%, 0.08%, 0.16%, 0.32%, 0.64%, and 1.28%. As an assistive tool, they can use the chart showing how the liquidity is distributed across these fee levels. Each fee level is considered a separate subpool and has its own spot price, which may differ because the demand and proposition on each fee level are different. Yet, the maximum difference in spot price can't exceed 1.27%—the difference between the first level and the last one—because when reaching the last level (1.28%), all fee levels get involved in swapping, and the spot price starts to grow evenly across all fee levels.
When a trader performs a swap, Veax scans fee levels for available liquidity from the lowest to the highest; however, the swap is performed gradually, which means, as the swap goes on, the spot price grows. As far as the swap price consists of the spot price, price impact, and transaction fee, at a certain point, the spot price on the given fee level (0.01%) gets higher than the price on the next one (0.02%) even though the transaction fee is higher. From this moment, the system continues to perform the swap using liquidity on the two levels—0.01 and 0.02%. This lasts until the price on the next fee level gets more profitable than on the previous ones. This can continue until all fee levels are engaged in the swap. MFL is designed to achieve the balance between traders and LPs because it makes the LPs compete for better fees and lets the traders get the most advantageous prices for swaps.