Liquidity Ads for Lightning – Everything You Need to Know

I was asked to Give a short presentation on our new Build on L2 platform and the topic was Kind of anything that I was excited About enlightening and um so yeah Liquidity ads was my choice of topic and Um there's I don't know quite a lot Going on right now in lightning Network Um Spec development there's uh you know Taproot channels coming online music too Uh and all the benefits that that'll Offer uh there's a lot of privacy Discussion in terms of breaking the Um channel to utxo linkage Um it kind of doxes your Um your on-chain funds and you know History there Um We're working on Ln symmetry or L2 Greg Sanders is currently that's really Exciting I think that'll offer Um a lot of benefits but you know all of That aside I was still most excited to Talk about liquidity ads I think they're Criminally underappreciated and um so I Thought today I would give just kind of A A little bit of a high level discussion On Um what are the benefits and Um just kind of more of the the Philosophy of why we Ought to be excited about something like

I show You how To Make Huge Profits In A Short Time With Cryptos! I show You how To Make Huge Profits In A Short Time With Cryptos! Welcome to the Future of Money

This Um So I think I'll start with just the uh As you're explaining the lightning Network to someone Um the historical example was the barn Tab right so this is where Bob is Um running a bar and Alice wants to buy a drink so instead of Doing an individual transaction each Time she just opens up a tab and that's Like our lightning channel so we've got Our our lightning Channel funded Um you know maybe Alice buys a single Drink and then over the night she buys a Couple more the tab is updated that's Our our commitment Um signatures each time and then at the End of the night Um that's finally settled in one Fell Swoop and that could be you know going On chain uh but it doesn't necessarily Necessarily have to be Um I think that that analogy was kind of Helpful in the very beginning but now That we've got actual use cases for the Lightning Network and people see regular Payments going on it it quickly breaks Down and now we're just talking about Something Um more similar to like IP packets Routed over the internet and in an Example like this you're already talking About

Um you know how you might interface with An ISP and that connection now can go Both ways and get you access to the Entirety of the network Um And under that sort of model uh you know People just understand it as this is my Wallet I'm connected to the network and I want to send and receive as many times As possible Um and so that's that's a little bit Different than just the very trivial bar Tab analogy and it needs a little bit More effort to to get there because now We're talking about liquidity in both Directions so not just a single side Funded by the opener of the channel Um but liquidity to receive payments as Well And As soon as we start talking about that Kind of functionality Um Well there's a lot of ways to to achieve It and so I think we should start by Just discussing Um What are some of those ways and Um you know kind of who's working on Building this capacity into the Lightning Network So I think there's generally three broad Categories as I would describe it Um I don't know if that's the most

Appropriate way to describe it but at Least conceptually for me it works so This is the The most fundamental one is the Lightning Network spec so this is the uh The bolts and those building on this are Mainly the um The implementations So this would be like eclair LDK lnd and Of course core lightning Um this is a process that um It goes through Um a series anytime we want to you know Add anything to the spec Um generally Uh one of the implementations proposes In addition to the spec they'll submit a Pull request They typically demonstrate it first on Their own implementation so this could Be an optional or experimental feature That they're interested in A a second implementation comes along And says yeah I'd like that too so they Go with the Documentation that's been provided so Far try to just pick up the ball and run With it see if they can Implement Everything that's needed based on that a Lot of times there are some pain points They'll say hey I think it'll be more Efficient if we modified it a little bit To uh do this or that Um but ultimately they get more or less

Um Where they need to be and then they try Interoperability testing so Um it's one thing to have your own Feature work among nodes of the same Implementation but now can you actually Talk to another node of a different Implementation and successfully use that Feature So once that's done then the proposal is Kind of ratified or it's just really the Pr is merged and it becomes a part of The official spec so now anyone that Wants to You know say they wanted to write a Lightning network uh implementation from Scratch they would have everything that Would be needed to recreate that And um it's really nice having that spec Process I think Um you know being a developer working on This it um It's really useful to Be able to see exactly what was the Rationale behind it exactly what are the Steps needed to implement it Um without having to just delve into a Source code to kind of try and reverse Engineer all of that So that's the the spec process and those Are the Um the major lightning implementers Working on it Um the

The next kind of broad category I would Say are the uh the other developers and Entrepreneurs that are kind of building On top of this So in that I would say Um things like Uh liquidity tools additional protocols Or LSPs lightning service providers Would fit in that category Um so I would think of loop Thor Um Bolts or let's see we've got um ambos With Magma or voltage with flow so these Are all Um you know additional Uh liquidity tools that are provided by Entrepreneurs who are trying to serve Um This you know segment of the this need In the market space We've also got you know other protocols That are kind of built on top so lnurl Allen bits Um even the podcasting 2.0 Um feature you know that's built um Kind of into lightning but it's an Optional feature that you have to you Know manually enable and support Um And uh you know I think we could talk About peer swap somewhere in here as Well Um and also maybe like the the xiaomian Mints

Um But uh but yeah so there's this whole Ecosystem Um where it's not strictly part of the The spec but there's Um you know people building on top of This all of these additional Functionality And then finally there were uh there are The users themselves and so I think Early on this was the best way to get uh Inbound liquidity which is Um What liquidity adds is is basically Trying to do for you And Um so we had you know very early on Things like the liquidity triangles Um plebnet that sort of thing there were You know automated tools for rebalancing And getting some inbound liquidity on Your channels Um Or even just you know if you have a if You personally know Um a friend with a node you can swap on Chain funds for Um For a channel Um liquidity So uh yeah I think the the lines between These three different groups are Um Are very fluid but I guess the the

Benefit that liquidity ads has is that Um its goal is to become part of the Base protocol part of the spec And um I think what that fundamentally does is It kind of lowers the barrier to entry When any node implementation is suddenly Interoperable and has Um The ability to to receive that inbound Capacity on their channels Um Okay so let's talk about Um you know what are Liquidity ads Um They're uh I'm gonna see if I can share My screen Foreign So Um here we are at the uh The spec so this is on GitHub this is Lightning slash bolts and this will get You the the Lightning spec Um So if we go to pull requests We can check out Um here's the liquidity ads PR So this was from Um about a year and a half ago Uh so yeah you can read all about the The details of the spec but we'll just Kind of discuss the high level And um so this is built on top I'll go

Back This is built on top of Dual funding so Dual funding was a way to open channels Where both sides could contribute Funding instead of just the single-sided Contribution But this has a bit of a coordination Problem so how do you know how much Funding to to add who's willing to do This that sort of thing so What it needs now is a way to Um say hey here I am I'm willing to Contribute funding if you want to open a Channel with me So uh If we check out this commit And um You know this has been open for a while There's been a lot of discussion so I'm Going to kind of Breeze past a lot of This Um So let's see yeah these are all Interesting details but Um The gist of it is kind of this this key Point right here So we've got the the node announcement Now this is part of the gossip so Anytime Um your note comes online Uh you need to let all the other nodes Know hey this is where uh

This is how you can reach me and um So your node sends out this announcement It says here I am Um here's the the features that I Support Um Here's my addresses my Alias favorite Color all the good details This one's this particular message is Sent out periodically so at least every Two weeks it's always kept fairly Current And um so part of the Um liquidity ads is to add a feature bit Uh to the this node announcement that Says hey I support liquidity ads and Um So that way you can you can identify Which uh which nodes that you'd like to Connect to and use this feature And In order to provide all of the details On what specifically that entails you've Got this extra tlb field in here and so It has these extra Bits of data that describe the Um You know basically which Uh what your fee is for for for Providing this liquidity Um kind of the maximum transaction size That you're willing to support And then supposing someone opens a Channel and gets some inbound liquidity

For you uh you don't want to raise the Fees such that it would be unusable Right so they want some sort of Guarantee that hey Um What's the maximum fee that you're going To charge me for inbound uh routing over This channel And uh so that's what these fields are Here so this is kind of the the bare Minimum that you need to know uh in Order to open a channel Um So let's see Um the other kind of interesting detail I think is I believe it's back here Yeah so this is on your lease Channel Um this is under bolt three transactions Um it adds this you know extra Delay so that you're actually Um With this uh op CSV and That's what actually Makes it so that the uh the least Liquidity actually stays Um locked up for About like 4 000 blocks It's a fixed period of time just uh so That It makes it easy for everyone to kind of Come to an agreement Um Yeah so

Let's see I will Go ahead and drop that in the chat as Well for anyone following along Um And yeah so uh the point of this is that Uh We really just want a peer-to-peer based Solution for opening balance channels Um It it offers a lot of benefits but Primarily we get the efficiency gain of Opening a channel and having it already Useful bi-directionally Um Again there's you know multiple ways to Solve this you could do the liquidity Triangle Um but that takes additional Coordination where you have to you know Communicate with node Runners out of Band and potentially You know docs Um your node ID and that sort of thing Um but this is all like part of the base Protocol and uh you know having it Part of the protocol means that there's No additional interactivity required Um it also uses a market-based approach So this way you can set your own fees You can set your own Um you know the channel size that you Want to support and Um you know people can Choose whichever nodes they would like

To lease a channel from and um you know Do it in this Open Marketplace Um but I think more than that it's you Know this is kind of a way to do this in A maximally Decentralized manner Um I think these other liquidity tools Are Really incredible Um I'm really supportive of the the Entrepreneurs that are building all These you know External tools to you know uh get you Know purchase an incoming Channel with Extra liquidity or rebalance your Channels Um that's great but uh to the extent That we can we ought to maintain the Ability to do this in a decentralized Manner so that's what the liquidity ads Brings to the table Um and then I think finally one of the Coolest points about it is that Uh we're kind of breaking this Um This uh Heuristic related to inputs for a Channel and Now we actually have uh you know two Inputs being provided and there's a Couple change addresses but now the you Know we've introduced some sort of Ambiguity about well you know which node Was it that actually provided which

Input Um so breaking that link of uh you know The utxo's history to you know prior Transactions I think is really important Um you've basically got a little uh coin Join in each Channel open this way Um have I got any questions about any of This so far I'm I'm just kind of rolling Through it um I think there's a lot of Reasons to to be excited for this but um Uh yes okay I'll get to that one and uh In just a little bit but yeah I'm glad You asked thank you for a pronounced Uh the question was Um if there's a user-friendly GUI to Access this or if it's via CLI and um Yeah I think it's a little of both But there is some progress being made Um but yeah before I get to that I think Um Maybe just a slight discussion on the Role the the protocols uh play Um And I Depending on how the the protocol is Written it can have a A strong impact on the level of Decentralization that's uh you know Created in the network behind it so I'm just thinking of a couple really Easy examples here Um the Internet Protocol or TCP Uh This has been around for a while it's

It's generally open enough Um but it does have its problems uh Primarily it's dependent Um On a DNS server on a DNS service And also it um it outsources routing Typically to an ISP so Um You know this is when we're building a Network from scratch these are things That we'd want to avoid to keep it as Maximally peer-to-peer as possible Um Again it's not a problem for you know uh Many of The users around the world but um just Creating this potential for Um you know denial of access censorship Surveillance Um are all things that we want to avoid Uh additionally just having the the Backbone nodes Um centralizes it in such a way that you Know now it's It's possible to create a great firewall Type of scenario where Uh it's just easy to you know choke off Access Uh and then the other one that we've got Um the email protocol comes to mind Uh this one I think it's kind of fascinating because It's a pretty open and permissive Protocol

Uh but the problem comes when you have Uh you know spam being sent over it and The The primary way to remediate this is for Email providers Um To basically just Blacklist uh You know any Anyone connected to them who you know Isn't hasn't already been on the network For a long time and isn't um You know they basically had a white list Of Hey these uh email service providers are Okay or these email servers or Are acceptable and uh but you know if You're if you're new trying to spin up a New email node uh like good luck getting Anyone to To route your traffic Um So yeah I was just looking up some basic Stats on this and um It's kind of hard on open protocols to You know get uh really detailed Statistics but Um the latest commercial stats that I Saw were Microsoft Exchange Accounted for 34 of uh Of commercial email traffic and Gmail Was another 34 so we've already got you Know two-thirds of the network is Controlled by Um

By just two nodes basically And then Um you know I found um Just for overall emails opened in General Gmail accounted for 27 percent But when you look at the 18 to 29 Demographic it's uh 61 so you know this Problem is only going to be magnified And future years is kind of what this Indicates to me Uh and yeah it's so bad that you can see Um There was some discussion just recently About how bad the uh like amazon.com Ux is where they strip all of the Payment detail from your Um you know emails just so that you know Google can't Harvest all of this uh all Of this data So yeah these are all things that we Definitely want to avoid Um And uh you know try to keep Keep the network as peer-to-peer as Possible Um Okay so we talked about Um Yeah uh we talked about dual funding Um dual funding was kind of Um The Uh prerequisite to liquidity ads Um and you know it does help break the

Heuristic by doing a coin join in each Dual funding open Um But it also Um You know liquidity ads kind of enables Dual funding to actually be used and This is great because Um dual funding is useful for Um other things it really paves the way Um for channel splicing which if anyone Has followed um Dusty's work on on splicing Um it's a lot of the same sort of issues So now you're taking Uh you're creating a new channel Essentially Um you know it's It's notionally the same as the old Channel but it has one of the inputs Uh to that channel it's the utxo spent By the original Channel Um but now you either add additional Inputs or you get a change output or you Know there's all sorts of Um ways you could do splicing but the The workflow is all basically building Off of dual funding so Um you know just it's another kind of Follow-on benefit to this um This whole line of work in Getting dual funding and liquidity ads Supported by the lightning Network spec Um

Okay and Yeah so I think that's my my Basics feel On why I'm uh I'm super excited for this To get adopted Um Let's go now into just a little bit of The the actual usage and hopefully I'll I'll cover your uh GUI question Um and let's see liquidity ads is like Ambass or magma and voltage Uh if so what's the difference between These services and liquidity ads Um Yeah so I think in general the Difference is going to be that [Music] Um It's more privacy preserving to do this At a Spec level Um Because you don't have to you know Interact with a third party outside of This you basically just advertise that Feature bit in your note announcement And Um or you know uh if you're just Interested in purchasing purchasing Inbound liquidity from someone else Um You know you can basically just initiate This channel open directly with them uh Provided you so the steps are Essentially you

Um read their liquidity advertisement Um and you choose which one Um Let's go ahead and I've got a Screenshot that might be Useful for this Okay so This is the um The Ride the Lightning Um dashboard for uh on my core lighting Node and um this is what uh shahana Faruki works on Um But she has added in a A page where you can basically just Browse all of the liquidity ads that are Being announced so It's got um It's got some nice Filtering mechanisms you know you can Sort it by Fee or lease fee and Um you know we can just kind of walk Through this but Um Basically the the lease fee is when you Want to open the channel Um this is how much you're going to pay Uh in the base fee and then for each Bit of uh you know for each additional Sat of liquidity Um you know what percentage of that are You paying for

Um And then the routing fee again that's Their limits on uh the maximal fees they Will provide or they will charge to uh Route inbound to your node and this Channel opening fee this is just an Aggregate of the lease fee so uh you can Input here the um The the amount that you want to lease From the from the channel and typically Um If you're wanting a balanced Channel Then this would be about half of The channel total Um But yeah so this is just doing the math For you here's the aggregate of what You'll pay Um you know A couple thousand stats something like That Um To purchase this inbound liquidity Um And yeah so Um I guess Under routing fee what is the PPM uh Yeah so that's parts per million and Um So if you you know this like say 1000 PPM if you were routing Um 1000 SATs there would be a one sat Fee uh to use that uh Channel hop

Um so that's just part of the normal Um routing and Uh and that might be a good time to Let's see Um to discuss the particular settings so If you never played with this before Um these are some of the configuration Settings that will kind of get you up And running and get you started And um I'll just drop this in the chat As well if anyone wants to Follow along at home Um So yeah uh At least early on you needed the Experimental features flag enabled when You compiled I'm not certain if that's Still true actually in the latest Release but um Extremely helpful Enable the Dual funding here And um Let's see then uh Generally You would have your settings something Like this where your policy is that okay And so this is Um These are all the settings For what you want to advertise to others Right if you're wanting to purchase Liquidity from someone else Um you know those options you have to Look up their specific ad and you know

These would show up uh you know back Here Under their the rates and everything but If you want to set your own rates Uh you'd say okay I'm going to match Whatever They request I'm gonna you know provide 100 of that Um And we'll get into later why you might Want to change that a bit So Um Let's see here's your uh your fees that You're going to charge for contributing To this Um The stool funding open So uh you know I've got a base fee set Here of 500 SATs And then Um this is the lease fee basis So Um Basis points are hundredths of a percent Um so this is you know fairly fairly Minimal but uh depending on you know if As you request more and more Funds uh there ought to be kind of a Proportional cost to locking up your own Funds into someone else's Channel And that's kind of what that covers Um so here we've got Uh these are again your

Your maximal Um Channel fees that you'll charge for For routing out over that channel to the Pier Um you don't want to purchase from Someone if they've set this you know Disproportionately High uh and again so This is in thousands and this gets Translated to you know parts per million Ultimately on the channel uh this is a Rather High fee so uh but this doesn't Have to be your Uh you know you don't have to stick to This this is just the the absolute Maximum so Perhaps consider um you know if your Channel gets really imbalanced or Uh you know you otherwise don't want to Route over a specific Channel you know What's the maximum you might want to set Um over the duration of that lease Uh okay I think this one's pretty Important I'm not sure if this one Really gets covered Um in the medium article But I would definitely recommend Um Setting the The per Channel maximum so here I've got It set to 5 million I believe Uh I think these are in Ms hats Yeah Everything's

Typically Mila Satoshi denominated So this is I will provide a maximum of Five million Um stats to a channel uh assuming they Want a balance Channel they don't just Want all inbound liquidity then you know This would allow up to perhaps a 10 Million Satoshi Channel Uh and then uh this one is particularly Important So I've kind of breezed over this but Um we actually have a We now have all of our funds in our core Lightning wallet That could potentially be locked up into Channels in this manner so this funder Reserve tank parameter says okay make Sure we keep a little bit in reserve and That way Um you know if I need to shuffle funds Around And um you know potentially pay for Um Pay for on-chain fees or something I'll Have a little bit left in reserve that I Can spend so you know don't commit Everything Uh you can also set this if you know you Don't want to Um So now each time a channel open is Initiated in this way you're potentially Giving away a little bit of information

About Uh you know one of the utxos that you're Holding in reserve so this is also a way That you know you can limit how much Information you're you're sharing there Uh You know don't maybe advertise Everything that you've got in your your Lighting wallet if that's um you know Something that's important to you now Ultimately these all go potentially on Chain anyhow so I'm not sure Um how important that is but definitely Leaving some funds available for Um For reserve and and paying on chain fees Would would be wise I think Um okay so now we talked before about How you might want to match exactly what The requester is requesting Uh I think this one's pretty interesting we Have the option here to Basically uh fuzz that amount a little Bit so this fuzz percent three means That we will now instead of providing Exactly the amount we'll provide between 97 and 100 of what's requested or um Of you know what our policy is And uh obviously if they request One million and now we're providing 970 000 uh but they've already paid the full Fee for Um I mean it's simultaneous but they

Obviously would be a little bit of Um upset if they didn't receive the you Know full amount Of the channel capacity they requested So Uh if you play with the the fuzz percent Make sure the awesome Um use this policy mod setting as well Which will increase so now our policy is To provide 105 of what is asked for Um Meaning that The Our contribution to this channel open Will now be between something like 102 To 105 of what was requested Um I think I'm sure there's some some advantages to Doing this but it could be nice to to Fuzz this a little bit so that you Introduce some Randomness and Um you know if someone's just trying to Probe like what exact utxos you have or Something of that nature having that Extra fuzz in there means that you can't Be real precise with you know I want to See something exactly the size Um okay and so then finally this is just One of the normal Um settings for default Channel fees uh But I think You know regardless of of what you set For your maximum Fee you probably want to have you know

The default Um set so that it doesn't end up being You know this this 2000 PPM but Something more reasonable to what you'd Normally expect Uh are those Channel fees really Enforced Um Okay I'm not 100 Certain on that and I've been meaning to Dig into it myself Um so yeah follow that uh that PR Uh and you can check Um I'm I'm not certain that it is Enforced but I would be pretty Interested to find out All right uh have we got any other Questions on uh yeah so I went through That you know pretty quickly Um but those are the The general settings that you'll need to Configure liquidity ads Um Have we got any other questions on on How they work or the benefits Uh certainly yeah we can have a Follow-up thread on liquidity ads I'd Love to discuss it more Uh and I will just share I'll just share the RTL screenshot in Case anyone's interested in checking That out Um Yeah so

Um If you want to browse the liquidity ads RTL is a very easy way to do it Um In the the medium article Uh let's see here So in the medium article Um Yeah it mentions uh you know you can Just run list nodes And grab for the option will fund bit And that will get you the details as Well Um now this is definitely the the more CLI way to do it Um I was playing around with the SQL plugin Um a week or two ago just checking out That new feature and you can run an SQL Command Um for this as well so I will find that And drop that Um In the discussion Um I mean if you really want to to sort And query based on specific parameters That would would definitely be the The way to do it in my book Uh but yeah following this guide we'll We'll get you um Get you started there Uh so Yeah I guess Um

I think that's about all I've got Um I guess I had to uh kind of summarize it Um I think the the liquidity triangles That you know users have been using Since the beginning of the lightning Network uh were pretty innovative Uh and they work Uh and it creates kind of a nice Community Um around it I'm really excited to see all the Entrepreneurs building all of these Services to help with these pain points As well Um but ultimately in the end Personally I want to see this network Grow and maintain a decentralized nature To the full extent possible and Um In order to uh to to see that end Um I think the liquidity ads will you Know provide the really decentralized Way that you know any new shop owner can Come online and Um you know these like GUI tools are Still kind of being fleshed out they're Not quite fully featured yet but Um I think as this As this gets adopted by the spec and has More implementations start using it and More node Runners start Um

Start providing this feature it will Make a really easy onboarding process Where there's an Open Marketplace It's all built into the protocol you Don't have to dox your node ID to anyone You don't have to connect to a major Centralized Hub node you know you can Just do it in a totally peer-to-peer Organic manner and that's what I'm here For and that's what I'm excited about so I hope you guys are Are excited for that as well All right Um Well thank you for for joining me uh Yeah Um I don't know about l d uh Claire is Definitely interested they have Um dual funding I think that interoperability testing is Basically done uh the pr for dual Funding hasn't been uh merged just yet Um but I'm not sure that there's any Hold up so as soon as dual funding is Merged I think uh yeah they're I know They're definitely interested in in Liquidity ads and um I'm hopeful that The interop there will be done soon as Well Foreign Thank you everyone for attending Until next time

You May Also Like