Here is a quick thread to get you started with the AR in LNDg. It can take a bit to get the hang of it but once you do, it's very powerful. 💪
-
In the channels table, identify a good paying and high outflow channel. This is a great channel to start learning with as attempts are based on the enabled or targeted channel. Also check that the peer's fees on the other side is less than yours else it could never rebalance.
-
Once you have identified a well earning outflow channel, use the enable button on the right side to start targeting this channel to be refilled with outbound liquidity. We know this channel flows out well and earns sats, lets keep it filled and busy routing! 😎
-
Repeat this process for all channels that earn well and you do not want to lose outbound liquidity on (a good example would be LOOP). Don't worry too much about keeping each channel at 50/50 balance but instead keep your focus on putting liquidity back where it earns you sats.
-
Now that you have a few channels enabled and targeted, you can drop the iTarget% for each enabled channel down to your desired preference. If you keep the iTarget% at 100 then nothing will ever happen because the inbound liquidity can never go above 100.
-
To get the AR working on this channel, the inbound liquidity on the channel must be above the iTarget% and thus the 100 would never do anything. Setting an iTarget% of 60 however would refill this channel with outbound liquidity until the inbound liquidity fell below 60%.
-
A tip when entering a new value into the iTarget% bow, you must hit enter afterwards for the value to be saved! Now that we understand how to refill channels, lets talk about where we have to pull the liquidity from in order to refill these channels.
-
One setting that will affect which channels can feed others during refilling is AR-Outbound%. This can be found in the AR settings table. If you don't see a particular setting in the table yet, try to set it using the form just below the table. When targeting a channel to be refilled, LNDg will use any channel that is not already enabled AND the outbound liquidity of the channel is greater than the AR-Outbound%. Advanced users may prefer to update the oTarget% for each channel, which overrides this global setting.
-
Just to recap, we are enabling channels we want to refill with outbound and those channels will be fed liquidity by channels that are not enabled. We can control how far to push the inbound liquidity down during refilling outbound liquidity of a channel with the iTarget%.
-
Now that you have things setup on a channel basis, you can review the global settings a bit and make sure things are to your liking. Lets look at each global setting and how to use it.
-
AR-Enabled: This is used to turn the AR on and off. By setting this value to 1 you will allow LNDg to start scheduling rebalances based on your specifications. Think of this as a global on and off switch.
-
AR-Target%: This specifies how big the rebalance attempts should be as a function of the channel capacity. This can be overridden in the advanced settings by setting a channel specific target amount. Updating this value will also update all specific channel target amounts.
-
AR-Outbound%: This marks how full a channel must be in order to be considered to feed another channels during a rebalance attempt. This can be overridden as well in the advanced settings by setting a channel specific oTarget%.
-
AR-MaxCost%: This lets LNDg know what % of the fees you charge on the enabled channel to put towards rebalancing that channel. If you charge 100 ppm out on an enabled channel with a 0.50 (50%) max cost. Then the max you will ever pay for this rebalance attempt will be 50 ppm.
-
AR-Time: This determines how long we should search for a route before moving on to the next rebalance attempt. LNDg will not look again for 30 minutes after failing an attempt so try to keep things busy without making rebalances too long. Recommend staying around 3-5 mins.
-
AR-MaxFeeRate: This is a fail safe to globally cap the max fee rates on any rebalance attempt. This cap will override the max cost % calculated value if it is lower. In our max cost example, a MaxFeeRate of 40 would have capped that rebalance down to 40 ppm instead of 50.
-
AR-Autopilot: This setting will allow LNDg to automatically enable and disable channels based on the flow pattern of your node. This is a pretty great feature but go slow and try things out manually a bit before letting LNDg take over. This will help build more confidence.
-
If you want to get an idea of what LNDg thinks you should be enabling or what would LNDg do if you were to turn on AR-Autopilot, then just head over to the Suggested AR Actions page (link right above channels table). If you see things here, this is what AP would do.
-
If there are any channels you want to make sure are excluded from all rebalancing, you can either enable it and make sure the iTarget% is set to 100 or set the oTarget% to 100 as well if you want to keep it disabled.
-
You should now be all set to fire things up! Go ahead and change the AR-Enabled value to 1 and start watching for rebalances to get scheduled by refreshing the page after a few moments. A new table should appear showing all the rebalances that LNDg has started to schedule.
-
That's it! You are now on your way to maximizing your flow and potential earnings! 😎💪