The Bitcoin blockchain isn’t too viable for micropayments. In case you wish to purchase a cup of tea, you’ll pay more for your cup with BTC equivalent in transaction fees. However, the transaction will not be confirmed promptly, and you’ll have to wait for it to be published in a verified chain block, which takes at least 10 minutes.

2nd and 3rd layer solutions are the networks on the top of the blockchain which make it possible for users to send several transactions of small Bitcoin amounts with no fees at all instantly.

The Lightning Network

The Lightning Network is a layered network in the development, which is expected to eliminate the scaling problems of Bitcoin. It consists of two other layers and allows users to open direct channels between them for sending an unlimited payments number instantly.

The 2nd Layer

When a user conducts a transaction on the blockchain he joins the 2nd layer. He joins a nodes group; these nodes are connected with each other; that is called channel factories.
Channel factories enable a huge number of micropayment channels, which will be created on the 3rd layer.

The 3rd Layer

Micropayment channels make it possible to provide direct payments on the 3rd layer. Thus, this layer isn’t possible to use for validating Bitcoin transactions and ensuring one party paid the other, while blockchain is no longer in that layer. Here the smart-contract technology is used, including multisig addresses (they can be signed off by many users for enabling funds movement), and hashed time-lock contracts (they are secured automated contracts locking funds for some period of time and ensuring the parties could not be cheated with each other). Such technologies solve the problems of trust between users.

The lightning network makes transactions to route to final destinations when using other users in the channel as intermediaries. This happens even in cases when direct connection to the wished user cannot be sought the current channel. It would be perfect if a user would only create a commitment transaction to the secondary layer too rarely, while he remains in the layered network for a longer period of time to conduct most of daily transactions. As soon as the user desires to leave that multi-layered network, there is a settlement transaction madeon the blockchain showing the final Bitcoinbalance of the user after all of his 2nd layer activities. Actually, there are only two blockchain transactions made for letting users conduct an unlimited transactions number for free on the 2nd layer. SegWit lays the ground for the lightning network by removing abilities of nodes to modify witness data.
The 2nd layer is still under development. It is expected to be launched in 2018 and is going to be the greatest transaction scalability improvement.