1
1
# Autoloop
2
- The loop client contains functionality to dispatch loop out swaps automatically,
2
+ The Loop client contains functionality to dispatch Loop Out swaps automatically,
3
3
according to a set of rules configured for your node's channels, within a
4
4
budget of your choosing.
5
5
6
- The autoloop functionality is disabled by default, and can be enabled using the
6
+ The Autoloop functionality is disabled by default, and can be enabled using the
7
7
following command:
8
8
```
9
9
loop setparams --autoloop=true
@@ -12,43 +12,43 @@ loop setparams --autoloop=true
12
12
## Easy Autoloop
13
13
14
14
If you don't want to bother with setting up specific rules for each of your
15
- channels and peers you can use easy autoloop . This mode of autoloop requires
15
+ channels and peers you can use easy Autoloop . This mode of Autoloop requires
16
16
for you to set only the overall channel balance that you don't wish to exceed
17
- on your lightning node. For example, if you want to keep your node's total
17
+ on your Lightning node. For example, if you want to keep your node's total
18
18
channel balance below 1 million satoshis you can set the following
19
19
```
20
20
loop setparams --autoloop=true --easyautoloop=true --localbalancesat=1000000
21
21
```
22
22
23
- This will automatically start dispatching loop-outs whenever you exceed total
23
+ This will automatically start dispatching Loop Outs whenever you exceed a total
24
24
channel balance of 1M sats. Keep in mind that on first time use this will use
25
25
the default budget parameters. If you wish to configure a custom budget you can
26
- find more info in the [ Budget] ( #budget ) section.
26
+ find more information in the [ Budget] ( #budget ) section.
27
27
28
28
In addition, if you want to control the maximum amount of fees you're willing to
29
29
spend per swap, as a percentage of the total swap amount, you can use the
30
30
` feepercent ` parameter as explained in the [ Fees] ( #fees ) section.
31
31
32
32
## Liquidity Rules
33
33
34
- At present, autoloop can be configured to either acquire incoming liquidity
35
- using loop out , or acquire outgoing liquidity using loop in . It cannot support
34
+ At present, Autoloop can be configured to either acquire incoming liquidity
35
+ using Loop Out , or acquire outgoing liquidity using Loop In . It cannot support
36
36
automated swaps in both directions. To set the type of swaps you would like
37
37
to automatically dispatch, use:
38
38
```
39
- loop setparams --type={in|out}
39
+ loop setrule --type={in|out}
40
40
```
41
41
42
- Autoloop will perform loop out swaps * by default* .
42
+ Autoloop will perform Loop Out swaps * by default* .
43
43
44
- Swaps that are dispatched by the autolooper can be identified in the output of
44
+ Swaps that are dispatched by Autoloop can be identified in the output of
45
45
` ListSwaps ` by their label field, which will contain: ` [reserved]: autoloop-out ` .
46
46
47
- Even if you do not choose to enable the autolooper , we encourage you to
47
+ Even if you do not choose to enable Autoloop , we encourage you to
48
48
experiment with setting the parameters described in this document because the
49
49
client will log the actions that it would have taken to provide visibility into
50
50
its functionality. Alternatively, the ` SuggestSwaps ` rpc (` loop suggestswaps `
51
- on the CLI) provides a set of swaps that the autolooper currently recommends,
51
+ on the CLI) provides a set of swaps that Autoloop currently recommends,
52
52
which you can use to manually execute swaps if you'd like.
53
53
54
54
Note that autoloop parameters and rules are not persisted, so must be set on
@@ -64,7 +64,7 @@ set a liquidity rule for a peer, you cannot also set a specific rule for one of
64
64
its channels.
65
65
66
66
### Liquidity Thresholds
67
- To setup the autolooper to dispatch swaps on your behalf, you need to set the
67
+ To setup Autoloop to dispatch swaps on your behalf, you need to set the
68
68
liquidity balance you would like for each channel or peer. Desired liquidity
69
69
balance is expressed using threshold incoming and outgoing percentages of
70
70
capacity. The incoming threshold you specify indicates the minimum percentage
@@ -73,7 +73,7 @@ threshold allows you to reserve a percentage of your balance for outgoing
73
73
capacity, but may be set to zero if you are only concerned with incoming
74
74
capacity.
75
75
76
- The autolooper will perform swaps that push your incoming capacity to at least
76
+ Autoloop will perform swaps that push your incoming capacity to at least
77
77
the incoming threshold you specify, while reserving at least the outgoing
78
78
capacity threshold. Rules can be set as follows:
79
79
@@ -93,14 +93,14 @@ to a percentage of the swap amount using the fee percentage parameter:
93
93
loop setparams --feepercent={percentage of swap amount}
94
94
```
95
95
96
- If you are not using easyautoloop and you would like finer grained control over
97
- swap fees, there are multiple fee related settings which can be used to tune the
98
- autolooper to your preference. The sections that follow explain these settings
96
+ If you are not using Easy Autoloop and you would like finer grained control over
97
+ swap fees, there are multiple fee related settings which can be used to tune
98
+ Autoloop to your preference. The sections that follow explain these settings
99
99
in detail. Note that these fees are expressed on a per-swap basis, rather than
100
100
as an overall budget.
101
101
102
102
### On-Chain Fees
103
- When performing a successful loop out swap, the loop client needs to sweep the
103
+ When performing a successful Loop Out swap, the Loop client needs to sweep the
104
104
on-chain HTLC sent by the server back into its own wallet.
105
105
106
106
#### Sweep Confirmation Target
@@ -116,11 +116,11 @@ loop setparams --sweepconf={target in blocks}
116
116
117
117
#### Fee Market Awareness
118
118
The mempool often clears overnight, or on the weekends when fewer people are
119
- using chain space. This is an opportune time for the autolooper to dispatch a
120
- swap on your behalf while you sleep! Before dispatching a swap, the autolooper
119
+ using chain space. This is an opportune time for Autoloop to dispatch a
120
+ swap on your behalf while you sleep! Before dispatching a swap, Autoloop
121
121
will get a fee estimate for your on-chain sweep transaction (using its
122
122
` sweepconftarget ` ), and check it against the limit that has been configured.
123
- The ` sweeplimit ` parameter can be set to configure the autolooper to only
123
+ The ` sweeplimit ` parameter can be set to configure Autoloop to only
124
124
dispatch in low-fee environments.
125
125
126
126
```
@@ -130,7 +130,7 @@ loop setparams --sweeplimit={limit in sat/vbyte}
130
130
131
131
#### Miner Fee
132
132
In the event where fees spike dramatically right after a swap is dispatched,
133
- it may not be worthwhile to proceed with the swap. The loop client always uses
133
+ it may not be worthwhile to proceed with the swap. The Loop client always uses
134
134
the latest fee estimation to sweep your swap within the desired target, but to
135
135
account for this edge case where fees dramatically spike for an extended period
136
136
of time, a maximum miner fee can be set to cap the amount that will be paid for
@@ -141,7 +141,7 @@ loop setparams --maxminer={limit in satoshis}
141
141
142
142
### Server Fees
143
143
#### Swap Fee
144
- The server charges a fee for facilitating swaps. The autolooper can be limited
144
+ The server charges a fee for facilitating swaps. Autoloop can be limited
145
145
to a set swap fee, expressed as a percentage of the total swap amount, using
146
146
the following command:
147
147
```
@@ -154,13 +154,13 @@ costs. This value will only be charged if your client goes offline for a long
154
154
period of time after the server has published an on-chain HTLC and never
155
155
completes the swap, or if it decides to abort the swap due to high on-chain
156
156
fees. Both of these cases are unlikely, but this value can still be capped in
157
- the autolooper .
157
+ Autoloop .
158
158
```
159
159
loop setparams --maxprepay={limit in satoshis}
160
160
```
161
161
162
162
### Off-Chain Fees
163
- The loop client dispatches two off-chain payments to the loop server - one for
163
+ The Loop client dispatches two off-chain payments to the Loop server - one for
164
164
the swap prepayment, and one for the swap itself. The amount that the client
165
165
will pay in off-chain fees for each of these payments can be limited to a
166
166
percentage of the payment amount using the following commands:
@@ -176,7 +176,7 @@ Swap routing fees:
176
176
```
177
177
178
178
## Budget
179
- The autolooper operates within a set budget, and will stop executing swaps when
179
+ Autoloop operates within a set budget, and will stop executing swaps when
180
180
this budget is reached. This budget includes the fees paid to the swap server,
181
181
on-chain sweep costs and off-chain routing fees. Note that the budget does not
182
182
include the actual swap amount, as this balance is simply shifted from off-chain
@@ -188,33 +188,33 @@ loop command:
188
188
loop setparams --autobudget={budget in satoshis}
189
189
```
190
190
191
- Your autoloop budget is refreshed based on a configurable interval. You can
191
+ Your Autoloop budget is refreshed based on a configurable interval. You can
192
192
specify how often the budget is going to refresh by using the ` setparams ` loop
193
193
command:
194
194
```
195
195
loop setparams --autobudgetrefreshperiod={duration}
196
196
```
197
197
198
198
199
- If your autolooper has used up its budget, and you would like to top it up, you
199
+ If Autoloop has used up its budget, and you would like to top it up, you
200
200
can do so by either increasing the overall budget amount, or by decreasing the
201
- refresh interval. For example, if you want to set your autolooper to
201
+ refresh interval. For example, if you want to set Autoloop to
202
202
have a budget of 100k sats every 168 hours, you could set the following:
203
203
```
204
204
loop setparams --autobudget=100000 --autobudgetrefreshperiod=168h
205
205
```
206
206
207
207
## Dispatch Control
208
208
Configuration options are also exposed to allow you to control the rate at
209
- which swaps are automatically dispatched, and the autolooper 's propensity to
209
+ which swaps are automatically dispatched, and Autoloop 's propensity to
210
210
retry channels that have previously failed.
211
211
212
- ### In Flight Limit
213
- The number of swaps that the autolooper will dispatch at a time is controlled
212
+ ### In-flight Limit
213
+ The number of swaps that Autoloop will dispatch at a time is controlled
214
214
by the ` autoinflight ` parameter. The default value for this parameter is 1, and
215
215
can be increased if you would like to perform more automated swaps simultaneously.
216
216
If you have set a very high sweep target for your automatically dispatched swaps,
217
- you may want to increase this value, because the autolooper will wait for the
217
+ you may want to increase this value, because Autoloop will wait for the
218
218
swap to fully complete, including the sweep confirming, before it dispatches
219
219
another swap.
220
220
@@ -223,25 +223,25 @@ loop setparams --autoinflight=2
223
223
```
224
224
225
225
### Failure Backoff
226
- Sometimes loop out swaps fail because they cannot find an off-chain route to the
226
+ Sometimes Loop Out swaps fail because they cannot find an off-chain route to the
227
227
server. This may happen because there is a temporary lack of liquidity along the
228
228
route, or because the peer that you need to perform a swap with simply does not
229
- have a route to the loop server's node. These swap attempts cost you nothing,
230
- but we set a backoff period so that the autolooper will not continuously attempt
229
+ have a route to the Loop server's node. These swap attempts cost you nothing,
230
+ but we set a backoff period so that Autoloop will not continuously attempt
231
231
to perform swaps through a very unbalanced channel that cannot facilitate a swap.
232
232
233
- The default value for this parameter is 24hours , and it can be updated as follows:
233
+ The default value for this parameter is 24 hours , and it can be updated as follows:
234
234
```
235
235
loop setparams --failurebackoff={backoff in seconds}
236
236
```
237
237
238
238
### Swap Size
239
- By default, the autolooper will execute a swap when the amount that needs to be
239
+ By default, Autoloop will execute a swap when the amount that needs to be
240
240
rebalanced within a channel is equal to the swap server's minimum swap size.
241
241
This means that it will dispatch swaps more regularly, and ensure that channels
242
242
are not run down too far below their configured threshold. If you are willing
243
243
to allow your liquidity to drop further than the minimum swap amount below your
244
- threshold, a custom minimum swap size can be set. If autolooper is configured
244
+ threshold, a custom minimum swap size can be set. If Autoloop is configured
245
245
with a larger minimum swap size, it will allow channels to drop further below
246
246
their target threshold, but will perform fewer swaps, potentially saving on
247
247
fees.
@@ -251,26 +251,26 @@ loop setparams --minamt={amount in satoshis}
251
251
```
252
252
253
253
Swaps are also limited to the maximum swap amount advertised by the server. If
254
- you would like to reduce the size of swap that autoloop created, this value can
254
+ you would like to reduce the size of swap that Autoloop created, this value can
255
255
also be configured.
256
256
257
257
```
258
258
loop setparams --maxamt={amount in satoshis}
259
259
```
260
260
261
- The server's current terms are provided by the ` loop terms ` cli command. The
261
+ The server's current terms are provided by the ` loop terms ` CLI command. The
262
262
values set for minimum and maximum swap amount must be within the range that
263
263
the server supports.
264
264
265
265
## Manual Swap Interaction
266
- The autolooper will not dispatch swaps over channels that are already included
267
- in manually dispatched swaps - for loop out , this would mean the channel is
266
+ Autoloop will not dispatch swaps over channels that are already included
267
+ in manually dispatched swaps - for Loop Out , this would mean the channel is
268
268
specified in the outgoing channel swap, and for loop in the channel's peer is
269
269
specified as the last hop for an ongoing swap. This check is put in place to
270
- prevent the autolooper from interfering with swaps you have created yourself.
270
+ prevent Autoloop from interfering with swaps you have created yourself.
271
271
272
272
## Disqualified Swaps
273
- There are various restrictions placed on the client's autoloop functionality.
273
+ There are various restrictions placed on the client's Autoloop functionality.
274
274
If a channel is not eligible for a swap at present, or it does not need one
275
275
based on the current set of liquidity rules, it will be listed in the
276
276
` Disqualified ` section of the output of the ` SuggestSwaps ` API. One of the
@@ -279,35 +279,35 @@ following reasons will be displayed:
279
279
* Budget not started: if the start date for your budget is in the future,
280
280
no swaps will be executed until the start date is reached. See [ budget] ( #budget ) to
281
281
update.
282
- * Budget elapsed: if the autolooper has elapsed the budget assigned to it for
282
+ * Budget elapsed: if Autoloop has elapsed the budget assigned to it for
283
283
fees, this reason will be returned. See [ budget] ( #budget ) to update.
284
284
* Sweep fees: this reason will be displayed if the estimated chain fee rate for
285
285
sweeping a loop out swap is higher than the current limit. See [ sweep fees] ( #fee-market-awareness )
286
286
to update.
287
- * In flight: there is a limit to the number of automatically dispatched swaps
287
+ * In- flight: there is a limit to the number of automatically dispatched swaps
288
288
that the client allows. If this limit has been reached, no further swaps
289
289
will be automatically dispatched until the in-flight swaps complete. See
290
- [ in flight limit] ( #in-flight-limit ) to update.
290
+ [ in- flight limit] ( #in-flight-limit ) to update.
291
291
* Budget insufficient: if there is not enough remaining budget for a swap,
292
- including the amount currently reserved for in flight swaps, an insufficient
292
+ including the amount currently reserved for in- flight swaps, an insufficient
293
293
reason will be displayed. This differs from budget elapsed because there is
294
294
still budget remaining, just not enough to execute a specific swap.
295
295
* Swap fee: there is a limit placed on the fee that the client will pay to the
296
296
server for automatically dispatched swaps. The swap fee reason will be shown
297
297
if the fees advertised by the server are too high. See [ swap fee] ( #swap-fee )
298
298
to update.
299
- * Miner fee: if the estimated on-chain fees for a swap are too high, autoloop
299
+ * Miner fee: if the estimated on-chain fees for a swap are too high, Autoloop
300
300
will display a miner fee reason. See [ miner fee] ( #miner-fee ) to update.
301
301
* Prepay: if the no-show fee that the server will pay in the unlikely event
302
302
that the client fails to complete a swap is too high, a prepay reason will
303
303
be returned. See [ no show fees] ( #no-show-fee ) to update.
304
304
* Backoff: if an automatically dispatched swap has recently failed for a channel,
305
- autoloop will backoff for a period before retrying. See [ failure backoff] ( #failure-backoff )
305
+ Autoloop will backoff for a period before retrying. See [ failure backoff] ( #failure-backoff )
306
306
to update.
307
- * Loop out : if there is currently a loop out swap in-flight on a channel, it
307
+ * Loop Out : if there is currently a Loop Out swap in-flight on a channel, it
308
308
will not be used for automated swaps. This issue will resolve itself once the
309
309
in-flight swap completes.
310
- * Loop in : if there is currently a loop in swap in-flight for a peer, it will
310
+ * Loop In : if there is currently a Loop In swap in-flight for a peer, it will
311
311
not be used for automated swaps. This will resolve itself once the swap is
312
312
completed.
313
313
* Liquidity ok: if a channel's current liquidity balance is within the bound set
@@ -316,7 +316,7 @@ following reasons will be displayed:
316
316
* Fee insufficient: if the fees that a swap will cost are more than the
317
317
percentage of total swap amount that we allow, this reason will be displayed.
318
318
See [ fees] ( #fees ) to update this value.
319
- * Loop in unreachable: if the client node is unreachable by the server
319
+ * Loop In unreachable: if the client node is unreachable by the server
320
320
off-chain, this reason will be displayed. Try improving the connectivity of
321
321
your node so that it is reachable by the loop server.
322
322
0 commit comments