Payment Channels: Micropayments in Bitcoin

Theedtron
4 min readMay 12, 2024

Micropayments are tiny transactions, usually online. They could be a more flexible way to pay online. Instead of subscriptions or buying everything whole hog, you could just pay for what you use. This could be good for content creators, who could get paid even for small contributions, and for consumers, who wouldn’t have to pay for a whole bundle if they only wanted a little bit.

Bitcoin’s potential as a global currency has been hampered by its slow transaction times and high fees. Payment channels come to the rescue. A Payment Channel is class of techniques designed to allow users to make multiple Bitcoin transactions without commiting all of the transactions to the Bitcoin block chain. In a typical payment channel, only two transactions (opening & closing) are added to the block chain but an unlimited or nearly unlimted number of payments can be made between the participants.

Several channel designs have been proposed or implemented over the years. Examples are:

  • Nakamoto high-frequency transactions
  • Spillman-style payment channels
  • CLTV-style payment channels
  • Poon-Dryja payment channels
  • Decker-Wattenhofer duplex payment channels
  • Decker-Russell-Osuntokun eltoo Channels
  • Hashed Time-Locked Contracts (HTLCs)

How payment channels work

The general idea of a payment channel is the following:

  • Two frequently transacting parties deposit money via a funding transaction in a 2-of-2 MultiSig account, opening the channel (TX 001 in the example above).
  • Both parties need to sign off on any TX that spends from this account.
  • Both parties exchange signed transactions repeatedly spending from the same funding transaction whenever they transact (TX 002 - TX n).
  • These commitment transactions updating the channel state, although valid on-chain transactions, are never broadcast, but kept locally by the channel participants. They serve as verifiable receipts of channel state modifications.
  • Only when participants want to close the channel will they broadcast a final channel update via a closing transaction on the blockchain (TX (n+1)).

Multiple pair-wise payment channels could be combined to form a network of channels. This enables a party to transact with all other parties in the network without establishing a pair-wise channel to each of them. Using multi-hop transaction routing within this network, individual transactions can take place entirely off-chain. Only the final transaction that settles the payment for a given channel or set of channels is submitted to the blockchain.

The technology used to implement a state channel is specific to the blockchain platform. For example, Lightning network on the Bitcoin blockchain is an implementation of Hashed Timelock Contracts (HTLCs) with bi-directional payment channels which allow secure payments across multiple peer-to-peer channels. A HTLC is a type of payment that use the features of Script, like hashlocks and timelocks, to require that the receiver of a payment acknowledges receiving the payment prior to a deadline by generating cryptographic proof.

Benefits

Below are some of the advantages of payment channels:

  • Latency — As the blockchain is not involved in every transaction, the off-chain transactions can be settled instantaneously. The delay could be in a fraction of a second than minutes of hours for a blockchain where we need to wait for the blockchain network to process the transaction, generate a new block with the transaction, reach consensus, and the desired number of confirmation blocks.
  • Throughput — The number of off-chain transactions that can be processed is not limited by the blockchain’s throughput, which depends on multiple factors such as block size, inter-block time, and transaction fee. Thus a much higher throughput can be achieved for off-chain transactions.
  • Privacy — Other than the settlement transaction(s), off-chain transactions do not show up in the public ledger. Thus, the detail of these intermediate off-chain transactions is not publicly visible.
  • Cost — Costs are reduced since transactions are done off-chain and don’t require fees to pay miners.

Drawbacks

Below are some of the disadvantages of payment channels:

  • Liquidity — To establish a payment channel, money from one or both sides of the channel participants needs to be locked up in a smart contract for the lifetime of the payment channel. The liquidity of the channel participants is thereby reduced.
  • Trustworthiness — Off-chain micropayment transactions might not be as trustworthy as on-chain transactions because the micropayment transactions are not stored in an immutable data store. The intermediate state of payment channels might be lost after the payment channels are closed or it does not have sufficient availability.

Payment channel networks

A good example where payment channels are implemented is the Lightning network. It uses an off-chain protocol to enable micropayments in Bitcoin. Micropayments are enabled by establishing a bidirectional payment channel by committing a funding transaction to the blockchain. This can be followed by a number of micropayment transactions that update the distribution of the funds within the channel without broadcasting transactions to the blockchain network. The payment channel can be closed by broadcasting the final version of the funding transaction to settle the payment.

Further reading:

--

--