When performing swaps and exchanges of tokens using the Liquidity Aggregator, the difference between best rate, and second-best is calculated, and 50% of that is charged as the fee. If the best rate and second-best rate are equal, no fee is charged. This guarantees MeanFi remains the best option to swap for investors while helping fund the development of the best exchange on Solana.