Solana Compute Unit Price | How to Optimize Your CU Bid
Introduction
Compute Unit Price (CU price) is the amount in micro-lamports you are willing to pay per compute unit consumed by your transaction. Setting an optimal CU price is the key lever for controlling transaction priority on Solana without overpaying.
CU Price vs CU Limit
CU price is your micro-lamport bid per unit of computation. CU limit is the maximum units your transaction can consume — exceeding this causes the transaction to fail. Both are set via ComputeBudgetProgram instructions. Setting CU limit accurately (not too high) helps validators schedule your transaction more efficiently.
Scheduler Priority
Solana's scheduler ranks transactions using: priority = (validator_reward × 1,000,000) / estimated_cost. Validator reward = priority fee + non-burned portion of base fee. Estimated cost is the CU cost of execution. Higher CU price directly raises your priority score, moving your transaction to the front of the queue.
The Compute Unit Price is set using:
ComputeBudgetProgram.setComputeUnitPrice({
microLamports: 50000 // your bid per CU
});
And the Compute Unit Limit:
ComputeBudgetProgram.setComputeUnitLimit({
units: 200000 // max CU for this tx
});
Key constants:
- Default CU price: 0 microlamports (no priority)
- Max CU per transaction: 1,400,000
- Max CU per block: 48,000,000
- Signature cost: 720 CU each








