A portion of Raydium's revenue comes from trading fees, with the rest going to liquidity providers (LP Fees).
12% of all trading fees programmatically buy $RAY. If there are $100m in swap fees, Raydium collects $12m to buy back $RAY.
The buyback ratio is the amount of revenue used to buy $RAY divided by the operating cashflow. In Q2, 72.% of all protocol revenue went to $RAY buybacks.