How does Bitcoin work?

How does Bitcoin work?

Understanding how standardized rules lead to a global network for transactions

Protocols are standardized rules

Bitcoin works as a set of standardized rules.

In computer terms, standardized rules are known as "protocols", and they enable devices and apps worldwide to communicate with each other. These rules govern how Bitcoin functions as a peer-to-peer electronic cash system. The rules are encoded within the Bitcoin software, so when someone downloads and runs the software on their computer (aka node), they become an enforcer of the rules and an active participant in Bitcoin’s operations.

What this means is that Bitcoin operates as a worldwide network of independent nodes, each running the software containing the standardized rules for adding valid transactions to their own copy of the transaction database (called the blockchain).

To better understand how this works, it’s helpful to define some terms:

  • The Bitcoin protocol: The set of standardized rules within the Bitcoin software that determines how Bitcoin works
  • The Bitcoin software: The software program (aka Bitcoin Core), which can be downloaded and run on computers, thereby making them a node in Bitcoin’s network
  • The Bitcoin network: The global web of connections between nodes that are running the Bitcoin software, through which transaction information can be shared
  • The bitcoin asset (lowercase “b”): The amounts that are specified within each transaction
  • The Bitcoin blockchain: The entire history of all bitcoin transactions, structured as a sequential “chain” of blocks of transactions and which is held and maintained by each node independently

You can think of it like this: bitcoin is an asset, that's transacted through a network, which is built on a protocol.

Each node can start or stop running the software (join or leave the network), without any problem since they’re each redundant to the system as a whole. Whenever a node joins or rejoins the network, they simply follow the rules to check the validity of the transactions that took place in their absence.

Alongside the nodes are the Bitcoin miners – the computers that confirm bitcoin transactions by grouping them into blocks and adding them to the blockchain. Miners perform computational work in a lottery-style competition to win the right to add the next block and earn a reward for doing so – a system known as “proof-of-work.” Miners also follow the rules of the Bitcoin protocol, because if they don’t, any block they attempt to add risks being rejected as invalid by the nodes, which means their time and efforts will be wasted.

Bitcoin works because nodes and miners follow the same set of rules.

What are the rules of Bitcoin?

The standardized rules of Bitcoin’s that are encoded within the Bitcoin software define the different aspects of Bitcoin’s operations:

Supply rules:

  • The total possible supply of bitcoin is capped at 21 million.
  • New bitcoin are to be issued with each block, according to a strict supply schedule that decreases the issuance amount by half (aka a "halving") every 210,000 blocks (roughly 4 years) until the 21 million limit is reached.

Mining rules:

  • New blocks are to be created on average every 10 minutes.
  • Miners must perform computational work to win the cryptographic “lottery” to add a new block of transactions to the blockchain, thereby confirming that block’s transactions and re-confirming all preceding blocks upon which it is built.
  • The difficulty of winning the lottery automatically adjusts every 2,016 blocks (roughly 2 weeks), to maintain the 10 minute block time regardless of the total mining power (aka hashpower) being deployed.

Transaction rules:

  • Transactions require the digital signature that corresponds to the sender’s address, ensuring that only the owner of the bitcoin can send it.
  • All transactions must have inputs and outputs to specify the sender, recipient, and amount of bitcoin being sent, except for “coinbase” transactions (the newly issued bitcoin in each block), which lack input details.
  • The amount of bitcoin in the inputs must equal the amount in the outputs, less the fee amount to be paid to the miner for the service of confirming the transaction.
  • Invalid transactions (e.g., invalid signature, invalid bitcoin amount, or double-spending of the same bitcoin) are to be automatically rejected.

Consensus rules:

  • Nodes accept the longest valid chain with the most cumulative proof-of-work as the correct version of the blockchain (aka the “heaviest chain”) and discard any other version of the blockchain
  • To undo a transaction that has been added to the blockchain requires performing a greater amount of proof-of-work than the total accumulated work since the transaction was made, an effort which exponentially increases with time and makes bitcoin transactions effectively unchangeable after a few blocks.

Scripting language rules:

  • Any scripts included in a transaction, which can define bitcoin transaction conditions, must follow certain rules regarding their size and complexity.

Connectivity rules:

  • Nodes must follow specific rules for how to communicate with each other, such as how data is to be formatted and transmitted.

Blocksize rules:

  • Blocks of transactions have a maximum size of 1 megabyte (with some additional space allowed for other data), which indirectly limits the number of transactions that can be included in a block.

Collectively, these rules define how to form the network, make transactions, and establish the attributes of the bitcoin asset, namely its scarcity and peer-to-peer transactability. When nodes run the software, a network is formed through which bitcoin transactions can be sent.

Incentive-alignment of Bitcoin

As more nodes run the software, the rules become more difficult to change. Changing the rules entails creating a new version of the Bitcoin software and getting nodes to download and run that new version. Unlike mandatory smartphone software updates, the Bitcoin software can’t be forced on nodes, as they’re free to download and run whatever version of software they want. Nodes will only download and run software if it’s in their best interest, and will avoid any software that doesn’t..

Additionally, since any block or transaction that violates the rules is automatically rejected by all other nodes, both miners and nodes are incentivized to avoid adopting incompatible rule changes, lest their time and efforts be wasted. Furthermore, bitcoin’s value as an asset is intrinsically linked to the unchanging nature of the rules, as they establish its scarcity, transactability, and reliability. Since miners are rewarded in bitcoin and nodes process bitcoin transactions that they want added to the blockchain, everybody has a vested interest in maintaining the rules that support the value of bitcoin and the network’s consistent operations.

In this way, Bitcoin benefits from network effects – people run nodes, mine bitcoin, or buy bitcoin because it offers them a way to acquire, transact, and secure an immutable digital asset with desirable and robust attributes. Through their activities, the bitcoin asset is made more robust, immutable, and scarce, further incentivizing others to do the same. It’s a self-reinforcing cycle of network strengthening, rule solidifying, and price appreciation.

The openness of the Bitcoin protocol stands in contrast to legacy financial systems, which are closed and opaque. There aren’t clear and transparent rules governing the supply of dollars, or who is to receive newly issued dollars and in what quantities and for what reasons. Also, entrepreneurs can’t simply build their own dollar app, capable of holding or transacting dollars independently – that’s a privileged service performed by financial institutions within predetermined limits and jurisdictions.

What this means is that Bitcoin is structurally different from legacy finance. It’s an open, transparent, and rules-based system, with specific built-in incentives that people can opt-into, rather than being forced into. It’s fair, radically transparent, and therefore opens new possibilities for building products and services, unconstrained by arbitrary rules, privileges, and limits. Those possibilities are set to transform how money can work.

Ultimately, Bitcoin works because well-aligned incentives lead all participants to follow Bitcoin’s rules.

Read more


What is the Lightning Network?

The global bitcoin payments network that’s instant, private, and low-to-no cost