For every swap that happens in a pool on Raydium, a small trading fee is taken. Depending on the specific fee of a given pool, this fee is split and goes to incentivizing liquidity providers, RAY buybacks and to the treasury.
Standard AMM pools: For every swap in a standard AMM pool, a fee of 25bps is taken on the trade. From that, 22bps goes to LPs in the pool and 3 bps goes to RAY buybacks.
Concentrated liquidity (CLMM) pools: The trading fee for each CLMM pool is set to one of four fee tiers; 100bps, 25bps, 5bps, or 1bp. Liquidity providers earn 84% of the trading fee for every swap in the pool, while 12% of fees are allocated to RAY buybacks and the final 4% to the treasury.
Trading fees that are allocated to buybacks are used to programmatically buy RAY at frequent intervals. RAY bought from these fees is then sent to DdHDoz94o2WJmD9myRobHCwtx1bESpHTd4SSPe6VEZaz.
The remaining 4% treasury fees from CLMM pool trades are auto-swapped to USDC and transferred to 6pJuA19E33AFdPh9oWkWY3u6yCdiqAm26AdcFJQBUhLU, which is controlled by the Squads Mutli-sig and used is to pay for RPCs.