Lightning transactions often fail due to liquidity problems.
AMP splits a single payment, which is completed if all parts are successfully submitted.
Atomic multiparty payments (AMP) are a technology in increasing use on the Lightning Network (LN), the second most important layer of Bitcoin. These allow a payment to be split across multiple channels, making it easier to use this second layer.
More and more protocols and wallets use this technology, which solves a common problem experienced by users of the Lightning network. These problems are the illiquidity of the channels and their difficulties in routing or channeling the transactions sent by users.
What do multiparty atomic payments solve on the Lightning Network?
Atomic multiparty payments on Lightning solve a long-standing problem with the Lightning network: liquidity requirements per channel. Currently, the Lightning network works in such a way that a payment goes in a single line through various channels. To get from A to B, if the nodes are not directly connected, the payment will have to be routed through C, D, E, etc. This implies that all nodes involved must have all the required capacity.
According to a blog post by Lightning Network Plus (LN+)an application that facilitates collaboration between LN node operators, AMP seeks to solve Lightning’s liquidity problems, “especially for larger transactions,” because this solution increases the success of payments in the second layer “while using the liquidity available more efficiently.”
Larger denomination payments in bitcoin will benefit. Users using AMP They will be able to send payments greater than the individual capacity of any channel.
Under normal conditions outside of AMP, when a payment does not find a channel with sufficient liquidity it tries to find another that does. As funds can be fragmented using atomic payments, each fraction of the same payment will be more likely to find a liquid channel to reach the node recipient. This would presumably reduce commission payments using the lightning network “as payments are divided among routes with better fare structures.”
As CriptoNoticias reported in 2019, AMP was developed with a view to becoming a standard specification of the Lightning Network.
How do atomic payments work in Lightning?
AMP breaks a single payment into multiple parts. Each of these parts can occupy and travel on different channels of the Lightning network. Then, each of the parts of the fragmented payment They are reassembled at the payment receiving node.
As a payment is divided into smaller fractions each fraction can better and more efficiently meet the liquidity requirements of each channel.
An important mechanism that AMP employs to ensure payment success is the so-called “atomicity guarantee.” This warranty ensures that all parties to the payment succeed or none dowhich mitigates the risks of incomplete payments or lost funds. Every payment is, therefore, completed or canceled in its entirety thanks to a shared secret cryptographic mechanism.


This is how Lightning Network+ explains the mechanism that ensures the complete processing or cancellation of a payment:
AMP is based on the generation of a single paid secret that is used to derive multiple child secrets. Each payment shard uses a secondary secret, allowing them to be routed independently. The recipient can only claim the funds when all shards arrive, using the added secrets to reconstruct the original payment secret.
Lightning Network Plus, Lightning network app.
AMP is based on a combination of Hash Time Locked Contracts (HTLC) and a payment secrecy key delivery mechanism to protect transactions. “HTLCs ensure that payments cannot be released until the correct preimage is provided, while time locks prevent stale or unresolved payments from remaining on the network, protecting both senders and receivers from risk,” the blog post explains.
Lightning node operators will also benefit along with users from the implementation of AMP. Fragmented payments They mean greater routing opportunities for operators. And, therefore, more commission charges.
Among the limitations of atomic payments in Lightning is that, at first, multi-party sends can tend to fail. The requirement to reassemble all transactions in the receiving node can cause this when the adoption of AMP is not yet universal, both in other wallets, protocols and in services as well as in the channels themselves, due to users’ lack of knowledge.
In terms of privacy, more transactions means more data and information produced by participants. This can present some privacy challenges and difficulties.
What wallets and protocols allow the use of AMP?
At the time of writing, wallets currently adopting AMP features and capabilities are Phoenix, Breez, Eclair Mobile, Muun, WOS, and Electrum. Thunderhub and Ride the Lightning (RTL) are some of the tools that integrate atomic payments.
On the other hand, the protocols in Lightning that support AMP are LND (Lightning Network Daemon)which was one of the first node managers to implement it; Core Lightning (CLN)which offers configurability for advanced users, and Eclairfocused on lightweight node management through mobile devices. All of these protocols allow you to create and manage Lightning Network nodes.
Node management enables the creation and closure of payment channels, channel status management, routing of incoming and outgoing payments through the network, and automatic updating of transaction fees.