loop termsshould give us information about the minimum and maximum amounts of satoshis we can Loop In or Loop Out. Additionally, it will give us the CLTV Delta, which is the number of blocks our bitcoin would be locked up in the event our Loop In is unsuccessful (i.e. due to lack of inbound liquidity).
loop getparamsto see current fees, prepaid amounts and autoloop settings.
loop quote in 500000to get a more precise quote for how much a swap would cost. For Loop In, we are making an on-chain transaction, for which we will have to pay the on-chain transaction fees. If we have enough satoshis in our on-chain LND wallet, Loop can give us a good estimate of these transaction fees as well. Either way, we can Loop In from our internal or external Bitcoin wallet.
loop quote out <amount in satoshi>. As you perform Loop Out, the on-chain transaction will be made to a Bitcoin smart contract, called a Hash Time-lock Contract, or HTLC). Once your Lightning payment was made successfully to Loop, you will be able to sweep the funds from the smart contract using the secret obtained in the payment. If your Lightning payment fails, for example due to insufficient outbound liquidity, the funds in the smart contract will be returned back to Loop.
htlc_sweep_fee_sat. This is an estimate based on the amount of data required to sweep the funds as well as the current level of on-chain fees necessary to have your transaction confirmed within the CLTV window.
loop in <amount in satoshis>. For example, you could specify the channel that the Lightning payment should arrive in using the
--last_hopparameter. The last hop is identified by the public key of a node. Make sure that you have an active channel with this node and plenty of incoming capacity. You can also specify a label with
--externalflag. You may set the transaction fees separately there too, or use the
--conf_targetvalue to a higher number for lower fees and longer processing times.
loop in --last_hop 02e7a7d3c1e6055b7b7457d95e04d9bbd24f200fd4a58daca7beee7bc776e17440 --amt 295916Once you run the command, you are quoted the upper bound of the fees for this transaction. Loop will now obtain a LSAT for 1 satoshi and initiate the swap. You are then presented with an ID for the swap and two HTLC smart contract addresses. You may make your on-chain transaction to either of these two addresses, though P2WSH (starting with bc1) is recommended for maximum efficiency. The payment needs to be the exact amount and carry an appropriate transaction fee. There is no time limit with regard to when the on-chain payment has to confirm, but keep in mind that if you specify a channel into which the off-chain funds are to be deposited, the state of that channel might change over the next day or two.
loop termscommand. You can optionally also specify which channel you want to loop out of using the
--channelflag together with the short channel ID.
--fastflag, the Loop server will publish its on-chain transaction quickly, but at a higher fee.
loop out --channel 735057608151793668 --conf_target 250 --label ‘Guide to Loop’ --max_swap_routing_fee 2500 --addr bc1qvnfuf2zvg6mrfyjhc8h4c7ge9a7ywfrav52qru --amt 1000000
Estimated on-chain sweep fee: 7372 sat Max on-chain sweep fee: 737200 sat Max off-chain swap routing fee: 2500 sat Max no show penalty (prepay): 30000 sat Max off-chain prepay routing fee: 610 sat Max swap fee: 3260 sat
loop monitorto follow the status of your transaction. You can view the Bitcoin smart contract using a block explorer and the address provided in the output.
cost: server 3260, onchain 6802, offchain 2524
--sweeplimit valuethe limit placed on our estimated sweep fee in sat/vByte. (default: 0)
--maxswapfee valuethe maximum percentage of swap volume we are willing to pay in server fees. (default: 0)
--maxroutingfee valuethe maximum percentage of off-chain payment volume that we are willing to pay in routing fees. (default: 0)
--maxprepayfee valuethe maximum percentage of off-chain prepay volume that we are willing to pay in routing fees. (default: 0)
--maxprepay valuethe maximum no-show (prepay) in satoshis that swap suggestions should be limited to. (default: 0)
--maxminer valuethe maximum miner fee in satoshis that swap suggestions should be limited to. (default: 0)
--sweepconfvalue the number of blocks from htlc height that swap suggestion sweeps should target, used to estimate max miner fee. (default: 0)
--failurebackoffvalue the amount of time, in seconds, that should pass before a channel that previously had a failed swap will be included in suggestions. (default: 0)
setparamsvisit the Autoloop documentation.
loop listswapscommand to get detailed information about past Loops, including their amounts, on-chain addresses, associated fees and eventual failure messages.
loop swapinfo <swap id>.