LNbits Extension for Boltz
Swap IN and OUT of the Lightning Network while remaining in full control of your bitcoin at all times.
This extension lets you swap in (chain -> lightning), swap out (lightning -> chain) and, in the case of failure, refund your bitcoin. Supported chains are liquid and the bitcoin mainchain.
- Click on the "Swap (IN)" button to open the following dialog, select a wallet, choose an amount within the min-max range and choose an onchain address for your refund in case the swap fails after you already sent onchain bitcoin.
- After you confirmed, the following dialog with a QR code for the onchain transaction, onchain- address and amount, will pop up.
- After you sent the exact amount of onchain bitcoin to this address, Boltz will pay your lightning invoice and the sats will appear in your wallet.
If a Swap In fails, you can refund your bitcoin after the timeout blockheight was reached. A swap can fail because Boltz, for instance, can't find a route to your lightning node or wallet. In case that happens, there is an info icon in the Swap (In) list which opens following dialog:
When the timeout blockheight was reached you can either press refund and lnbits will do the refunding to the address you specified when creating the swap OR you can download the refund file so you can manually refund your onchain bitcoin to a different address via the boltz.exchange website. If you need help or have questions you can contact us in the LNbits Telegram or the Boltz Team on Discord. In a recent update we added anl automated check; lnbits now checks every 15 minutes if it can refund your failed swap.
- Click on the "Swap (OUT)" button to open the following dialog, select a wallet, choose an amount within the min-max range and choose an onchain address to receive your funds on. Instant settlement: means that LNbits will create the onchain claim transaction if it sees Boltz's lockup transaction in the mempool, but it is not confirmed yet. For urgent swaps we advise to leave this enabled.
If a Swap Out fails, no further action is required, the lightning payment just "bounces back".
A. normal swaps
- test: create -> kill -> start -> startup invoice listeners -> pay onchain funds -> should complete
- test: create -> kill -> pay onchain funds -> mine block -> start -> startup check -> should complete
- test: create -> kill -> mine blocks and hit timeout -> start -> should go timeout/failed
- test: create -> kill -> pay to less onchain funds -> mine blocks hit timeout -> start lnbits -> should be refunded
B. reverse swaps
- test: create instant -> kill -> boltz does lockup -> not confirmed -> start lnbits -> should claim/complete
- test: create -> kill -> boltz does lockup -> not confirmed -> start lnbits -> mine blocks -> should claim/complete
- test: create -> kill -> boltz does lockup -> confirmed -> start lnbits -> should claim/complete