UTXO vs Account Based

Two methods of tracking ownership and transaction history

A UTXO-based system (Unspent Transaction Output) and an account-based system are two different methods of tracking ownership and transactions in blockchain networks.

UTXO-BasedAccount-Based

Definition

  • A UTXO (Unspent Transaction Output) represents a discrete chunk of tokens that can be spent as an input in a new transaction. In BSV, these tokens are commodity tokens called Satoshis.

  • Each UTXO can only be spent as a whole, and any leftover amount from a transaction becomes a new UTXO.

  • BitcoinSV uses a UTXO-based system.

Definition

  • In an account-based system, each user has an account with a balance.

  • Ethereum is a prominent example of an account-based system.

Structure

  • Transactions are collections of inputs and outputs. Inputs are references to previous UTXOs, and outputs create new UTXOs.

  • Each transaction consumes UTXOs as inputs and produces new UTXOs as outputs, forming a chain of ownership.

  • Importantly, each individual UTXO is itself a record of ownership that gets immutably recorded or timestamped to the BSV global public blockchain.

Structure

  • Transactions in account-based systems are instructions to transfer value from one account to another, updating the balances accordingly.

  • The state of the blockchain consists of a list of accounts and their balances.

Verification

  • Verification involves checking the validity of UTXOs used as inputs, ensuring they haven't been spent before (preventing double-spending).

  • A UTXO can only be spent once. All active nodes (nodes that have successfully added a block to the blockchain recently) must agree on which UTXOs are unspent at any given time.

Verification

  • Verification involves checking the account balances to ensure sufficient funds for a transaction and then updating the balances accordingly.

  • Transactions are ordered, and the state is updated sequentially, which can create bottlenecks in high transaction throughput scenarios.

  • As a result, the cost or fee associated with each transaction increases as the network's transaction throughput increases inherently limiting scalability.

Privacy

  • Activity can be private by using and creating many small UTXOs in each transaction, though ownership and transactional activity can always be traced and proven when needed due to the public nature of the blockchain.

  • It is harder to trace the balance of a single individual or entity because Satoshis can be spread across many UTXOs and each UTXO must be known.

Privacy

  • It is easier to track the balance of a user, as all transactions affect account balances directly.

  • Privacy is impossible to achieve in practice because balances and transaction histories are tied to account addresses.

Scalability

  • UTXO-based systems are inherently scalable because transactions can be processed in parallel, as they are independent of each other.

  • UTXOs allow for easier implementation of lightweight clients (Simplified Payment Verification or SPV), which do not need to store the entire blockchain.

Scalability

  • Account-based systems can face scalability issues due to the need for sequential processing and global state updates.

  • It is challenging to shard or parallelize transaction processing effectively without compromising the system's consistency.

  • In fact, the P vs NP problem associated with scaling an account-based system such as Ethereum is so difficult that solving it comes with a reward of one million dollars. It is one of the 7 Millenium Problems.

Flexibility

  • The UTXO model is flexible in allowing complex scripts (conditions) to be attached to each UTXO.

  • These scripts act as locking and unlocking mechanisms allowing a multitude of conditions, functions, and data to be included.

Flexibility

  • In addition to being unscalable in practice, account-based systems are also much less flexible in terms of their scripting capabilities because the entirety of the network state and the relevant accounts must be considered with each transaction.

Key Differences

Granularity

  • UTXO-based transactions deal with discrete units (UTXOs), making it easier to handle microtransactions and avoid partial updates.

  • Account-based transactions directly update account balances, simplifying some aspects of transaction processing but making microtransactions impossible in practice.

State Management

  • UTXO-based state is a set of unspent transaction outputs, which can be verified independently.

  • Account-based state is a set of account balances, requiring more complex synchronization and validation.

Double-Spending

  • UTXO-based double-spending is prevented by tracking the state of each UTXO.

  • Account-based double-spending is prevented by ensuring the system balances out after every transaction.

Last updated