UTXO vs Account Model

Bitcoin's UTXO model spends discrete unspent outputs as whole units, while Ethereum's account model keeps a balance and state for every account.

Diagram: Alice signs a 1 BTC transfer, the blockchain verifies it, Bob receives it

Bitcoin uses the UTXO model and Ethereum uses the account model. In the UTXO model, funds exist as unspent transaction outputs (UTXOs) that a transaction spends in full, creating new outputs for the recipient and the change. In the account model, the network keeps a balance for every account and each transaction debits the sender and credits the recipient.

UTXO Model (like Bitcoin)

A UTXO represents a certain amount of cryptocurrency that has been sent to a user but has not yet been spent. In simpler terms, think of a UTXO as a digital equivalent of a cash bill. Just like you can use a bill to make a purchase, you can use a UTXO to participate in a new transaction.

Each UTXO is indivisible, meaning you either spend it entirely or not at all.

How the UTXO Model Works in a Transaction

When a transaction occurs, it consumes one or more UTXOs and generates new UTXOs as outputs. Here’s a step-by-step breakdown of the process:

  • Inputs: The sender uses their existing UTXOs as inputs to the transaction. Each input must reference a previous UTXO.
  • Outputs: The transaction then creates new UTXOs as outputs. These outputs are assigned to the recipient's addresses and can be spent in future transactions.

Example Transaction

Suppose Alice wants to send 3 BTC to Bob. She has two UTXOs, one worth 2 BTC and another worth 2 BTC. In this example, the inputs total 4 BTC, the output to Bob is 3 BTC, and the change output to Alice is 1 BTC.

Here’s how the transaction would look:

  1. Input: Alice uses her two UTXOs (2 BTC + 2 BTC) as inputs.
  2. Output: The transaction generates two outputs:
    • 3 BTC to Bob
    • 1 BTC as the change back to Alice
📘

Get started with Bitcoin operations at the following link.

Account Model (like Ethereum)

The account-based model in blockchain is analogous to a bank's ledger system. It maintains a global state of accounts, each identified by a unique address, with associated balances and other states. There are two types of accounts in Ethereum:

  • Externally Owned Accounts (EOAs): Controlled by private keys and used by individuals.
  • Contract Accounts: Controlled by code (smart contracts) and can execute code when receiving a transaction.

How the Account Model Works in a Transaction

In the account-based model, transactions directly modify the account balances and states. Here’s a step-by-step breakdown of the process:

  • Account Balances: Each account has a balance representing the amount of cryptocurrency (e.g., Ether) it holds.
  • Transactions: When a transaction occurs, it specifies a sender and a recipient. The sender’s balance decreases by the transaction amount (plus any fees), and the recipient’s balance increases by the transaction amount.
  • Smart Contracts: Transactions can also trigger smart contracts, which are programs that run on the blockchain. These contracts can change state, interact with other contracts, and even create new transactions.

Example Transaction

Suppose Alice wants to send 3 ETH to Bob. Here’s how the transaction would look:

  1. Sender: Alice’s account.
  2. Recipient: Bob’s account.
  3. Transaction Details:
    • Alice’s balance decreases by 3 ETH (plus a small transaction fee).
    • Bob’s balance increases by 3 ETH.

FAQ

What is the primary difference between Bitcoin's UTXO model and Ethereum's account model?

The UTXO model tracks discrete unspent outputs that are spent as whole units, while Ethereum's account model keeps a persistent balance and state for every account. A Bitcoin transaction consumes UTXOs and creates new ones, and an Ethereum transaction updates the sender's and recipient's balances directly.

What is a UTXO?

A UTXO (unspent transaction output) is an amount of cryptocurrency sent to an address that has not been spent yet. Like a cash bill, it is indivisible: a transaction spends it in full and returns any excess to the sender as change.

Which blockchains use the UTXO model?

Bitcoin, Litecoin, Dogecoin, and Bitcoin Cash are UTXO-based. Ethereum and most other smart contract platforms use the account model.

How does the account model keep transactions in order?

Each account has a nonce that counts the transactions sent from its address. On Ethereum and other EVM-compatible chains, every transaction needs a unique nonce that increases by 1, so the network processes transactions in order and rejects replays. See Nonce in EVM chains.

How do I get the UTXOs of an address?

Use the Tatum Data API endpoint Get unspent UTXOs for an address (GET /v4/data/utxos). It returns enough unspent UTXOs to cover a totalValue you specify, ready to use as inputs for a new transaction.


Did this page help you?