Author: Olaoluwa Osuntokun 2023-01-04 03:02:23
Published on: 2023-01-04T03:02:23+00:00
The article discusses the challenges of moving funds from on-chain to Lightning Network, especially when trust-minimization is required. The need for confirmation of on-chain transactions creates delays that can be particularly problematic for mobile phone use-cases. To address this, a new protocol called Swap-in-Potentiam has been proposed, which allows for immediate transfer of already-confirmed-received on-chain funds to Lightning while minimizing trust requirements.The Swap-In-Potentiam proposal by Rusty Russell allows users to swap on-chain funds for Lightning Network (LN) funds through a smart contract. The idea is based on CLTV-style unidirectional time-limited channels and Spilman-style channels, which allow Alice to pay to another onchain address or to a Lightning invoice/keysend. Bob, the potential swap partner, is an LN service provider (LSP) who can either sign any arbitrary on-chain transaction or receive an on-chain HTLC from the UTXO. The LSPs can also offer special services by committing to a swap with the mobile client as "Alice" and the LSP as "Bob" to provide inbound capacity towards the mobile client. The Lightning Network development team has proposed a new protocol that will enable atomic swaps between Bitcoin and Litecoin. The swap-in-potentiam protocol will allow users to send funds from one blockchain to another without the need for an intermediary or exchange service. The protocol will use Taproot with Schnorr signatures, but without using the keyspend path initially. For the on-chain use-case, Alice wants to spend the UTXO to an on-chain address, and the protocol between Alice and Bob would be: request_arbitrary_signature, response_arbitrary_signature, and reject_arbitrary_signature. For the channel use-case, Alice wants to spend the UTXO to a Lightning receiver, and the protocol messages are: request_swap_in, reject_swap_in, accept_swap_in, swap_in_signed, and swap_in_resolved. The swap-in-potentiam UTXO(s) will be operated as a Spilman-like channel over two states: HTLC-offering and Resolved. As-is, a similar result can be obtained using openv1, wherein a swap-in is combined with a channel open, with the swap-in immediately credited while the channel open is awaiting confirmation. However, this method is not safe, as Bob can complete the protocol by using the HTLC-offering state transaction. This can be fixed by having Alice open two channels with the same amount, one with the HTLC-offering state transaction as the funding tx, the other with the Resolved state transaction as the funding tx, and later erroring the channel corresponding to the transaction that is not confirmed.Overall, the Swap-in-Potentiam protocol offers a promising solution to the challenge of moving funds from on-chain to Lightning Network while minimizing trust requirements. However, it requires a cooperating LSP, and if the LSP is down or refuses to cooperate, on-chain funds may be locked for some time. Nevertheless, the protocol shows potential for enabling atomic swaps between different blockchains without the need for an intermediary or exchange service.
Updated on: 2023-06-03T11:27:37.022612+00:00