From the Binance Academy
Published Nov 27, 2018 – Updated May 15, 2024
The Lightning Network is a network that runs on top of a blockchain to facilitate fast peer-to-peer transactions. It’s not exclusive to Bitcoin – other cryptocurrencies have integrated it.
You might be wondering what we mean by “runs on top of a blockchain.” The Lightning Network is what’s called an off-chain or layer two solution. It allows individuals to transact without having to record every transaction on the blockchain.
The Lightning Network is separate from the Bitcoin network – it has its own nodes and software, but it nonetheless communicates with the main chain. To enter or exit the Lightning Network, you need to create special transactions on the blockchain.
What you’re actually doing with your first transaction is building a sort of smart contract with another user. We’ll get into the details shortly – for now, just think of the smart contract holding a private ledger for you and another user. You can write many transactions to this ledger. They’re only visible to you and your counterparty, but neither of you can cheat due to some peculiar features of the setup.
This mini-ledger is called a channel. Say Alice and Bob put 5 BTC each into the smart contract. In their channel – they’d now both have a balance of 5 BTC. Alice could then write to the ledger “pay 1 BTC to Bob.” Now, Bob has 6 BTC on his side, and Alice has 4. Then, Bob could send 2 BTC back to Alice at a later date, updating the balances to 6 BTC on Alice’s side and 4 BTC on Bob’s. They can continue to do this for a while.
At any time, either can publish the current state of the channel to the blockchain. At that point, the balances on each side of the channel are allocated to their respective parties on-chain.
True to the name, Lightning transactions are lightning-fast. There are no block confirmations to wait for – payments can be made as fast as your internet connection will permit.