Forwardable Peerswaps: Improving Network Health Via Pressure Release Valve



Summary:

The Lightning Network is a payment protocol that enables fast and cheap transactions on top of Bitcoin. However, managing liquidity on the network has been an issue, leading to the development of various liquidity markets. These markets often target net receivers in touch with forwarding nodes, but the actual need is to match up net receivers to net senders. This is where forwardable peerswaps come into play. By using forwardable peerswaps, nobody knows who the net receivers are, and the packet-switched system naturally gravitates from net senders to net receivers. This effectively forms a matchmaking between them.Currently, forwarding nodes manage their balances via rebalancing, which can lead to random altruists being exploited when forwarding nodes keep rebalancing via their low-fee channels. In contrast, if forwardable peerswaps were widely deployed on the network, forwarding nodes could rebalance two of their channels favorably without spending anything. Accepting and forwarding a forwardable peerswap would gain the same benefit as a successful rebalance, but at zero cost to the forwarder.There have also been proposals for some kind of "flow valve" to modulate payment flows on the Lightning Network. However, fee-based valves and `htlc_maximum_msat` valves have limitations and are not effective solutions. Overall, forwardable peerswaps offer a promising solution to managing the liquidity of the Lightning Network.The Peerswap protocol allows for swapping onchain funds and offchain in-Lightning funds to manage inbound and outbound capacities without rebalancing. However, the limitation of Peerswap is that it can only be performed with a direct peer with which one has a channel. ZmnSCPxj proposes an extension to the Peerswap protocol called "forwardable peerswap" that works around this limitation. With forwardable peerswaps, using A, B, and C as an example, A can offer onchain funds to change the state in their channel, getting more outbound capacity from A, and B can propose a peerswap between B and C, forwarding peerswap messages from A to C and replies from C to A. There are actually two sub-protocols of Peerswap: Onchain-to-offchain and Offchain-to-onchain. An initiator offers onchain funds to get more outbound capacity while net senders want to do this. Meanwhile, an initiator offers offchain funds to get onchain funds and more inbound capacity while net receivers want to do this. Unfortunately, only the first sub-protocol (onchain-to-offchain) is actually forwardable. In currently deployed swap servers like Lightning Loop and Boltz, there is a feature called prepayment where the initiator pays a small off-chain fee to the swap server for them to make onchain tx, which works as a DoS prevention. However, this is not the case in Peerswap in general, so there is a risk that after the user has paid prepayment, the responder simply ignores and does nothing. To avoid this, the prepayment and the responder's duty can be paid with an onchain tx, where the initiator and responder makes a Payjoin tx which pays a small amount to the responder.The article discusses the advantages of forwardable peerswaps over current peerswaps and multi-hop swaps, including improved blockchain space utilization and each node having perfect information on which channels would benefit from a change in capacity. Additionally, the article discusses fees and incentives for individual nodes and how net receivers can benefit from forwardable peerswaps. The article also compares forwardable peerswaps to the "just make a channel" technique and explains how the latter can result in capital being locked inefficiently if the recipient is not actually a net receiver. Overall, forwardable onchain-to-offchain peerswaps are beneficial for the network, and future innovations may allow for offchain-to-onchain remote swaps to be forwardable as well.The Lightning Network is a payment network that utilizes Bitcoin's blockchain to enable fast transactions. However, as the network becomes more congested, flow valves are required to limit transaction speed and prevent congestion. Flow valves increase friction and decrease user experience, leading to users switching to other payment networks. Instead of utilizing flow valves, forwardable peerswaps can be used as a pressure release valve to divert pent-up pressure-to-pay on a swap over the base Bitcoin blockchain. This effectively admits that another payment network may be necessary once Lightning becomes overloaded. A successful forwardable peerswap is a payment from a net sender to a net receiver over the Bitcoin blockchain, rather than over Lightning, which resets the state of multiple channels on the network, enabling further payment flows. There is no need for flow valves or broadcasting anything, and forwarding nodes do not need to leak their channel balances over the gossip network. Onchain surveillors cannot derive any information from this onchain payment, other than "looks like the Lightning Network is busy today".


Updated on: 2023-06-03T10:19:51.138473+00:00