Introduction to the blockchain and blocks

Bitcoin uses what's known as the blockchain to record the history of bitcoin transactions. A copy of this blockchain is stored on the nodes which make up the bitcoin network. When a new transaction occurs and has been broadcasted to the network, nodes and miners reference the blockchain to confirm the validity of the transaction to confirm that it is a valid coin, spent by the actual owner, and has not been double-spent. If it is a valid transaction, the nodes will propagate it across the network and a miner will include it in a new block of transactions which is then appended to the blockchain. Any new blocks are also confirmed by the nodes.

Dimensions, State Machines, and Time

Think of the bitcoin network as a state machine. A state machine is something that enforces the laws, hosts and stores the status or the state of something at any given time. Multiple states chained together form a timeline. A dimension is a state or timeline which is hosted on the state machine.

In the bitcoin dimension, the state machine is the bitcoin network made up of physical computers called nodes. In bitcoin, the present state is the ownership of bitcoins and balances, determined by the record of transactions. The state is also known as a block and this chain of states together, the timeline, is known as the blockchain. Whenever there is a new transaction, that transaction is included in the next block and is then appended to the blockchain. Each block added to the blockchain is a bundle of new transactions. The history of each transaction, its timeline, is the chain of blocks relevant to that specific transaction and is unique.

state machine = bitcoin network

state = blocks

timeline (chain of states) = blockchain

dimension = layer

In the bitcoin reality, the blockchain is the 1st dimension also known as layer 1. There are higher up and parallel 2nd dimensions that utilize the 1st dimension as its host. State machines inside of state machines. Dimensions inside of dimensions. There may eventually even be layer 3 dimensions as more development continues.

Smart Contracts

When a node verifies it was "spent by the actual owner" of that coin, that is just a very simple explanation. To be a valid transaction, the coins being spent actually need to satisfy the predefined rules and conditions of the bitcoin address that they are coming from. Many transactions are simply being sent from one person to another and just need to satisfy the condition of having a valid signature of the sender. However, a transaction can have many more spending conditions that open up many possibilities, thanks to Bitcoin's smart contract language called Script. A smart contract is a contract in the form of computer code that self executes and is self-enforced to carry out a predefined action when predefined conditions are met.

Layer 1 and Layer 2

With developments that have been applied to bitcoin building on top of the capabilities of smart contracts, the blockchain has come to be known as Layer 1. Smart contracts have enabled transactions to take place on higher up layers outside of the blockchain, yet still be enforced or settled by the blockchain as necessary. The ability to facilitate transactions outside of the blockchain has enabled the ability to transact off-chain with high transaction volume, cheap or no transaction fees, fast or instant transactions, and high privacy. All without sacrificing the security or decentralization that layer 1 offers. It is layer 1 which higher up layers are built upon and used as their foundation. With higher up layers, layer 1 the blockchain is optionally used as a store of value and settlement layer. A blockchain is a very inefficient database, as it stores a historical copy of every single transaction that is shared with every node. This inefficient design is what enables decentralized auditing and verification of transactions. But to remain decentralized the blockchain must be kept as small as possible and not grow exponentially in size. Otherwise, it would be impossible for nodes to download, share, and audit the entire blockchain from the genesis block to the current block. And so it makes sense to have a majority of transactions take place off-chain if possible. Higher up layers enable this possibility.

There are multiple layer 2 solutions that exist, and even more which will be developed over time. Here are various layer 2 solutions for bitcoin transactions.

Lightning Network

The lightning network is a decentralized mesh network of computers (including mobile devices) that have lightning channels open with each other to relay transactions amongst each other off-chain. A lightning channel is a bitcoin smart contract where some bitcoin funds are locked up between the two owners of that channel. A lightning channel can be opened with bitcoin funds contributed by either side of the channel, or funds can be contributed by both sides in what is known as dual funded channels. When someone opens up a channel to the lightning network, a virtually unlimited number of bitcoin transactions can take place within the lifespan of that channel until either side of the channel closes it. When a lightning channel is closed, the smart contract will settle the balance of the latest transaction between the two computers. And because the computer on either side of the lightning channel may have more than one connection with the rest of the lightning network, transactions are able to travel across the connected meshnet of lightning nodes from the source to its intended destination. The lighting network truly makes Bitcoin the "internet of money". In this way, a significant number of transactions can take place off-chain within the footprint of just two on-chain transactions. One bitcoin transaction to send bitcoin funds into a smart contract upon opening a lightning channel. Then a second transaction to close the lightning channel (if it ever is closed) and send the final settled bitcoin balance to each side. The lightning network uses onion routing to transfer bitcoin payments across the lightning network so that no single computer along the route knows the complete path of the source and destination. This gives a privacy advantage to payments done on the lightning network.

Side Chains, (Liquid)

A side chain is a layer 2 blockchain, where bitcoin funds can enter from layer 1 (main Bitcoin blockchain) into the side chain via a peg-in. Whenever bitcoin enters back into layer 1 from layer 2 this is called a peg-out. There can be more than one side chain, but I will discuss one that currently exists which is known as the Liquid sidechain by Blockstream.

On the Liquid blockchain, instead of the consensus being controlled by miners via hash rate and proof-of-work, Liquid is controlled by a federation of members. Members of the federation take turn proposing new blocks. Right now the Liquid Federation is made up of 15 members each of whom has a key. The Liquid side chain is secured by an 11-of-15 multisig setup. Because of this setup, in order for the Liquid side chain to act dishonestly, over two-thirds of the federation would have to collude. It is possible the number of federation members with control over Liquid may increase from 15 in a future upgrade.

On Liquid, the block times occur on an average of 1 minute apart, with 2 confirmations being considered safe for transactions. Liquid also features confidential transactions, which conceal the balances being sent, making chain analysis significantly harder to trace the flow of funds.

Physical Transactions

Layer 2 bitcoin transactions can also be in physical form. Specialized devices can be used for physical off-chain bitcoin transfers. Devices that currently exist to serve this function are OpenDimes. OpenDimes are tiny circuit boards with the form factor of and act as a USB drive. When plugged into a computer the bitcoin address and balance of the device can be viewed. These devices contain a security chip that generates a private key and keeps it concealed within the chip. OpenDime does not expose the private key contained within the security chip until it is unsealed. So long as the device remains sealed, the device can be passed around to different owners with confidence that only the one who has physical possession of the OpenDime, has possession of the bitcoin balance loaded onto it. No physical transaction using such devices touches the blockchain. Another advantage to physical transactions is that they can be done with no internet connection, so long as each party in the transaction has a copy of the blockchain. Another similar device that will enable physical off-chain transactions is called SatsCards, which are cards that interface with devices through NFC.

State Chains

A state chain acts similarly to physical transactions, in which the ownership of the UTXO (unconfirmed transaction output) containing funds is what's transferred. Except instead of the transfer of the UTXO being sent physically, it is sent digitally. Think of a statechain as like a digital OpenDime.

A State Chain is defined as:

"A Bitcoin second-layer protocol in which instead of spending an old UTXO and creating a new UTXO as in a base layer transaction, ownership of coins can be transferred by directly handing over the information necessary to spend a UTXO through some other communication channel, while ensuring that the sender becomes unable to spend the UTXO themselves once the transfer is complete. Thus transferring value on Bitcoin without an on-chain transaction for every transfer of ownership." [1]

In a state chain, the ownership of the state itself is what's transferred between owners. A current state chain implementation is Mercury Wallet which also supports CoinSwaps to increase the privacy of bitcoins.


Higher up layers built on top of Bitcoin enable high transaction volume without sacrificing security or scalability. Layer 2 solutions also offer privacy benefits along with transaction speeds and costs. While the Lightning Network is the primary used layer 2 at this time, there are other layer 2 solutions that complement and continue to improve bitcoin's capabilities. Bitcoin is surely the most advanced, most secure, most decentralized digital money. Technological progression is layered, and bitcoin's blockchain is a solid foundation for other layers built upon it.