> ## Documentation Index
> Fetch the complete documentation index at: https://solana.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Fees

> Solana transaction fees: a base fee of 5,000 lamports per signature plus an optional priority fee. How fees are calculated, paid, and distributed.

## In short

Every transaction pays a small flat network fee, currently a fraction of a cent, whatever the amount. The transaction's fee payer pays, and that can be your app rather than your customer.

<div className="sol-usedin not-prose" data-concept="fees">
<span className="sol-usedin-label">You've used this in:</span> [Quickstart <span className="sol-usedin-step">Step 2</span>](/developers/docs/quickstart/send-dollars) [Payments <span className="sol-usedin-step">Overview</span>](/developers/docs/payments/checkout) [Pay-per-call <span className="sol-usedin-step">Overview</span>](/developers/docs/payments/paywall-api)
</div>

Every [transaction](/developers/docs/core/transactions) pays a fee in SOL, in two parts:
a **base fee** that pays validators to verify signatures, and an optional
**prioritization fee** that makes the current leader more likely to schedule
your transaction ahead of others.

<Frame caption="The two parts of a transaction fee and where each goes.">
  <img className="block dark:hidden" src="/docs-assets/assets/docs/core/fees/fees-light.svg" alt="A transaction fee is the base fee, 5,000 lamports per signature, plus an optional prioritization fee, compute unit price times compute unit limit." />

  <img className="hidden dark:block" src="/docs-assets/assets/docs/core/fees/fees.svg" alt="A transaction fee is the base fee, 5,000 lamports per signature, plus an optional prioritization fee, compute unit price times compute unit limit." />

  <img className="block dark:hidden" src="/docs-assets/assets/docs/core/fees/fees-sm-light.svg" alt="A transaction fee is the base fee, 5,000 lamports per signature, plus an optional prioritization fee, compute unit price times compute unit limit." />

  <img className="hidden dark:block" src="/docs-assets/assets/docs/core/fees/fees-sm.svg" alt="A transaction fee is the base fee, 5,000 lamports per signature, plus an optional prioritization fee, compute unit price times compute unit limit." />
</Frame>

<Columns cols={2}>
  <Card title="Fee structure" href="/developers/docs/core/fees/fee-structure">
    How each fee is calculated and distributed, with code for setting them.
  </Card>
  <Card title="Compute budget" href="/developers/docs/core/fees/compute-budget">
    Compute unit limits, ComputeBudget instructions, and block limits.
  </Card>
</Columns>

## Key facts

- **Base fee**: per-signature, split 50% burned / 50% to the validator.
- **Prioritization fee**:
  `ceil(compute_unit_price * compute_unit_limit / 1,000,000)` lamports. 100% to
  the validator. In the
  [v1 format](/developers/docs/core/transactions/versioned-transactions#v1-format) the fee
  is an absolute lamport total set in the message config instead.

## Limits

| Limit                          | Value          | Source                                                                                                                                   |
| ------------------------------ | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| Base fee per signature         | 5,000 lamports | [`lamports_per_signature`](https://github.com/anza-xyz/agave/blob/v3.1.8/fee/src/lib.rs#L64-L71)                                         |
| Default CU limit / instruction | 200,000        | [`DEFAULT_INSTRUCTION_COMPUTE_UNIT_LIMIT`](https://github.com/anza-xyz/agave/blob/v3.1.8/program-runtime/src/execution_budget.rs#L44)    |
| Builtin instruction default CU | 3,000          | [`MAX_BUILTIN_ALLOCATION_COMPUTE_UNIT_LIMIT`](https://github.com/anza-xyz/agave/blob/v3.1.8/program-runtime/src/execution_budget.rs#L47) |
| Max CU limit / transaction     | 1,400,000      | [`MAX_COMPUTE_UNIT_LIMIT`](https://github.com/anza-xyz/agave/blob/v3.1.8/program-runtime/src/execution_budget.rs#L39)                    |
| Micro-lamports per lamport     | 1,000,000      | [`MICRO_LAMPORTS_PER_LAMPORT`](https://github.com/anza-xyz/agave/blob/v3.1.8/compute-budget/src/compute_budget_limits.rs#L17)            |
