Solana priority fee examples: compute limits, rounding and v1
By MassLauncher · Updated · 2 min read
For a legacy or v0 transaction, 200,000 requested compute units at 250 micro-lamports each add 50 lamports to the base fee. Version 1 specifies the priority fee directly in lamports.
Legacy and v0: price the requested limit
Multiply the requested compute unit (CU) limit by the price in micro-lamports per CU. Divide by 1,000,000 and round up to a whole lamport. A request for 200,000 units costs the same priority fee if execution uses only 80,000.
| Signatures | CU limit | Micro-lamports/CU | Priority (lamports) | Total (lamports) |
|---|---|---|---|---|
| 1 | 200,000 | 0 | 0 | 5,000 |
| 1 | 200,000 | 250 | 50 | 5,050 |
| 1 | 200,001 | 5 | 2 | 5,002 |
| 2 | 200,000 | 250 | 50 | 10,050 |
Where the extra lamport comes from
In the third row the product is 1,000,005 micro-lamports, just over one lamport. Rounding down would understate the priority fee by one lamport. The base fee in these examples counts ordinary transaction signatures; the examples contain no signature-verification precompile instructions. Those instructions can add chargeable signatures even if the list of wallet signers stays the same.
Version 1 uses a total
A v1 message specifies an absolute priority fee in lamports. If it sets 50 lamports and has one chargeable signature at the assumed rate, the network fee is 5,050 lamports. Multiplying that 50 by a CU limit would apply the wrong rule.
For a landed transaction, read meta.fee for the total network fee, including priority. An execution error can still leave that fee charged. An RPC submission or simulation error alone does not show that a transaction landed or that anyone paid a fee. Account funding, token purchases and separately transferred tips are outside these examples.