> For the complete documentation index, see [llms.txt](https://docs.leather.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.leather.io/learn/how-does-bitcoin-s-utxo-model-work.md).

# How Does Bitcoin's UTXO Model Work?

Bitcoin tracks coins as unspent transaction outputs (UTXOs), not account balances. How the model works and how Leather handles it.

Bitcoin does not keep account balances. It keeps a set of unspent transaction outputs (UTXOs): separate amounts, each locked to an address. Your balance is the sum of the UTXOs your keys can spend.

## How it works

Think of UTXOs as coins and notes in a wallet.

* Receiving bitcoin adds a new UTXO.
* Spending uses whole UTXOs as inputs. A UTXO cannot be split without spending it.
* If the inputs are worth more than the payment and fee, a change output returns the rest to you as a new UTXO.

Example: you hold UTXOs of 0.5, 0.2 and 0.1 BTC and send 0.6 BTC. Your wallet can spend the 0.5 and the 0.2 UTXOs. That creates a 0.6 BTC output for the recipient and about 0.1 BTC of change, minus the fee.

Each UTXO records the transaction that created it (TXID), its output index, its value in satoshis and its locking script.

## Why it matters

* **Fees:** each input adds size, so spending many small UTXOs costs more than spending one large one.
* **Double spending:** a UTXO can be spent only once. Nodes reject any later transaction that spends it again.
* **Privacy:** spending UTXOs together shows on chain that they belong to the same wallet.

## Stacks uses accounts

Stacks does not use UTXOs. It tracks STX and tokens in account balances, like most smart contract chains, and orders each account's transactions by a nonce. See [Configure Transaction Nonces](/transactions/configure-transaction-nonces.md).

## UTXOs in Leather

Leather picks the UTXOs for each Bitcoin transaction and sends change back to your account. It leaves out UTXOs that would cost more to spend than they are worth at the current fee rate. See [Why isn't all my Bitcoin balance available or spendable?](/balances/why-isnt-all-my-bitcoin-balance-available-spendable.md).
