Skip to main content

Protocols on Bitcoin

Bitcoin's base layer prioritizes security and decentralization. Higher layers and adjacent protocols add speed, programmability, and new capabilities while anchoring to Bitcoin's security.

Lightning Network

The Lightning Network is Bitcoin's primary Layer 2 solution for instant, low-fee payments.

How It Works

  1. Two parties open a payment channel by locking BTC in a 2-of-2 multisig on-chain
  2. They exchange signed transactions off-chain to update the channel balance
  3. Payments are routed through a network of channels using HTLCs
  4. Either party can close the channel at any time, settling the final balance on-chain

Key Concepts

ConceptDescription
Payment channelTwo-party balance sheet secured by Bitcoin
HTLCHash Time-Locked Contract for routing payments
InvoiceBOLT-11 encoded payment request
RoutingFinding a path through the channel graph
CapacityMaximum amount a channel can route
LiquidityAvailable balance on each side of a channel

Implementations

ImplementationLanguageFocus
LNDGoMost popular, feature-rich
Core Lightning (CLN)CModular, plugin-based
EclairScalaMobile-friendly (Phoenix wallet)
LDKRustLibrary for custom implementations

Building on Lightning

# Create an invoice (LND)
lncli addinvoice --amt 1000 --memo "Test payment"

# Pay an invoice
lncli payinvoice <bolt11_invoice>

# Check channel balances
lncli listchannels

For custom applications, use the gRPC/REST APIs or build with LDK.

Sidechains

Sidechains are separate blockchains pegged to Bitcoin, enabling features Bitcoin doesn't natively support.

Liquid Network

Liquid is a federated sidechain by Blockstream:

  • Confidential Transactions — Amounts and asset types are hidden
  • Issued Assets — Create tokens on the Liquid chain
  • Faster blocks — 1-minute block time
  • Federation — Managed by a set of functionaries

Fedimint

Fedimint is a federated custody protocol using Chaumian e-cash:

  • Community custody — Trusted federation holds Bitcoin
  • Privacy — E-cash tokens are unlinkable
  • Lightning integration — Gateway for Lightning payments
  • Open source — Build your own federation

Nostr

Nostr (Notes and Other Stuff Transmitted by Relays) is a decentralized social protocol that uses Bitcoin-style cryptography (secp256k1 keys):

  • Identity — Your Nostr key pair is your identity
  • Zaps — Lightning payments integrated into social interactions
  • Decentralized — No central server, messages relay through multiple servers

Nostr + Bitcoin Integration

NIP-57 (Zaps): Lightning payments via Nostr
NIP-47 (Nostr Wallet Connect): Control wallets via Nostr

Comparison

ProtocolLayerSpeedTrust Model
LightningL2InstantTrustless (channel partners)
LiquidSidechain~1 minFederated (functionaries)
FedimintCustodial L2InstantFederated (guardians)
StacksL1 (anchored)~10 minPoX consensus
RGBClient-sideVariesTrustless (client validation)