Compute Unit (CU)

The measure of computational work a transaction consumes, capped at 1.4 million per transaction and 48 million per block, which determines both whether your transaction fits and how much priority fee you'll pay.

What is a Compute Unit

The Compute Unit (CU) acts as Solana's accounting system for the amount of computation a transaction performs. When you send a transaction, every instruction it invokes costs CUs while the transaction executes. You begin every transaction with a fixed amount of compute units you can use, called your CU limit; the limit is 200,000 CU by default, and the limit can be set to anything up to a hard maximum of 1.4 million. If your transaction is too complex to complete in 200,000 CU, it will fail unless you have requested a larger limit. This is conceptually similar to how Ethereum handles its Gas, but there's an important difference: CUs on Solana do not factor into the base fee. A typical signature on Solana has a flat fee of 5,000 lamports (0.00005 SOL) regardless of how many CUs your transaction uses. To be more precise, 5,000 lamports is ~$0.0004 when SOL is at $80. This means that you pay to secure space within Solana's block space, while CUs help to measure how busy a block is and, thus, schedule transactions.

Think of this like airline luggage. An airplane has a maximum total weight of cargo, each passenger indicates their luggage's weight while booking tickets, and the airline then fills the hold with luggage according to passenger declarations. You declare too little luggage weight and your bags get rejected for loading, while you declare way more luggage than you actually have, and you're taking up a bunch of valuable baggage space that someone else should be able to use. If you want to be guaranteed to get loaded on the plane, you need to pay for priority luggage handling.

How Compute Units Work

Solana's Compute Budget program provides two instructions to adjust your compute budget: one to increase (or decrease) your Compute Budget limit, and one to specify the compute budget's price per CU in micro-lamports, where a micro-lamport is one millionth of a lamport (SOL). Your transaction's priority fee is calculated by multiplying the CU limit by the CU price. Let's say you have a CU limit of 200,000 and you're going to use 10,000 micro-lamports per CU, your transaction is going to bid $2,000,000,000$ (billion) micro-lamports, or $2,000$ lamports, or $0.000002$ SOL. These prices can be much higher during periods of high network congestion. This means a transaction requesting 200,000 CUs and paying a priority fee of 10,000 micro-lamports would cost ~0.00408 lamports or ~$0.000003264 SOL at $80 SOL. It's still quite cheap, and explains why fee spikes can feel more acceptable on Solana than on EVM chains.

The Compute Unit is also applied on the block level to determine the total capacity of a block. The per-block CU limit in Solana has been steadily increasing. SIMD-0256 proposed increasing the per-block limit of CUs to 60 million in July 2025. The limit has been further increased to 100 million CUs (a 66% increase) with SIMD-0286, partially implemented through the usage of XDP networking, which is the fast path within the Linux kernel for packets in the Agave 3.0 (latest validator client release). More CUs within a block (which has a duration of 400 milliseconds) equates to more transactions able to fit in that one block.

How Compute Units Compare to Ethereum Gas

In Ethereum, every transaction is required to consume some amount of gas, and users pay a priority fee that is equal to a base fee multiplied by the total gas units used. A swap transaction uses 100k+ gas, and sometimes, depending on the market, users have paid tens of dollars to have their swap transaction successfully included in a block. On Solana, you're not charged for every CU unit you used, but only for the CUs that you declare upfront. This means you're not charged extra for heavy computations. The only way to get your transaction processed faster is by offering the leader a higher CU price for it. While this has a significant advantage where expensive computations are essentially negligible on-chain, it has a significant disadvantage: it makes it much cheaper for bad actors to spam the network. Another drawback is a phenomenon called overdeclared CU limit. A transaction that requests a 1.4M CU limit but uses 80k CUs during execution will occupy the network space that it requested. This wastes precious resources for the validators, which is why they are starting to charge higher fees for overdeclared CUs.

Why Compute Units Matter

Imagine a popular NFT mint, or the start of a volatile market. Thousands of transactions are being submitted, and all of the transactions are trying to spend the same accounts. This means all transactions can't be executed simultaneously and must be sequenced. The leader selects which transactions go into the block with the higher priority fee per CU. Phantom silently increases your priority fee during these times so that it's much more likely to land in your wallet. Jupiter automatically adjusts the CU limit for each route so that you aren't surprised when you're halfway through a four-hop swap with the message "you ran out of compute budget." Jito adds an extra priority lane, so traders can pay directly to the validators to have a specific transaction prioritized. Once you understand that your transaction is priced by (micro-lamports per CU * CU limit), it's not as scary to pay an $1 fee to have your transaction executed. It turns out you can verify that "network fee" amount right before signing the transaction. The price paid only affects your transaction and how contended your transaction is with other txns that want to use the same accounts. This means that if I'm bidding against someone in a popular trading pool, it will have no effect on your separate unrelated transaction on a different token, or even on the same token in another trading pool; the only time my transactions will have an effect on yours is if you and I are both bidding in the same pool! Contrast this with EVM chains where a bidding war in one token can affect your txns to every other token, which is something that can occur if one particular token is going through a very volatile event where gas prices spike to $100.

Do you receive a refund for compute units not used?

No. You only pay your CU price * CU limit. If you don't use as many CUs as you claimed you needed, you're not refunded for the unused CUs. This means requesting a tight limit is like free money, which means that any good wallet or dApp should simulate any transaction before submitting in order to ensure the CU limit is set appropriately.

Contents

Writen By

Stay Updated - Follow us on X

Project review threads, dApp insights, announcements, news, and more.