TL;DR
Compute units (CU) are Solana’s measure of computational resources consumed by a transaction, similar to gas on Ethereum but with a fixed cap per transaction.
Every Solana transaction has a compute unit budget (default 200,000 CU, max 1.4 million CU per transaction). Each instruction in your transaction consumes CU — simple transfers use very little, while complex DeFi interactions use more. If a transaction exceeds its CU budget, it fails. You can request a higher budget by including a compute budget instruction, but you pay proportionally more in priority fees.
Solana’s base fee is fixed (0.000005 SOL per signature), but priority fees are priced per compute unit. The formula is: priority fee = compute units × micro-lamports per CU. Setting a higher compute unit price makes validators prioritize your transaction. During congestion, this bidding mechanism determines which transactions get included. Trading bots dynamically adjust CU price based on network conditions.
Request only the CU you need — overestimating wastes money on priority fees. Many bots simulate transactions first to determine exact CU consumption, then set the budget with a small buffer. Lower CU transactions are cheaper and more likely to be included. Jupiter’s routing sometimes finds routes that use fewer CU, saving on fees even if the swap price is slightly less optimal.