TFTC: A Bitcoin Podcast - #169: Alex Bosworth
Episode Date: June 9, 2020Join Marty as he sits down with Alex Bosworth, Lead Infrastructure Developer at Lightning Labs, to discuss: - Why exchanges should use Lightning - Lightning as a tool that can thwart spam - Managing ...a Lightning routing node - The nuance of payment channels - Lightning Loop - Lighting's evolution with the fee market - Creating standards for Lighting - Lighting + privacy - much more Follow Alex on Twitter Check out Lightning Labs Shoutout to this week's sponsors. Cash App. Start #stackingsats today. Use the promo code: "stackingsats" to receive $10 and contribute $10 to OWLS Lacrosse when you download the app.
Transcript
Discussion (0)
What's up freaks, it's your boy Marty here to introduce this episode of Tales from the Crypt.
I had the immense pleasure of sitting down with Alex Bosworth, Head of Infrastructure at Lightning Labs.
Somebody who's been working on the Lightning Network and teaching individuals how to successfully run a routing node on the Lightning Network for some time now.
This episode, frankly, was a long time coming. I can't believe it took me this long into TFTC's life to get Alex on the podcast.
but i'm very happy i did shout out to desiree dickerson for putting this together um we had
a great conversation covering everything lightning what's going on uh what needs to be done uh and
and how the network has grown to date and may grow moving forward this episode of tales from
the crypt is brought to you by our good friends at the
I hope you do many things, including stack sats.
You can send sats, receive sats, and sell sats if you have to.
What I'm really liking is that they've made sats to standard,
really helping eliminate that unit bias out there.
We're buying millions of sats at a time,
tens of thousands of sats at a time,
hundreds of thousands of sats at a time.
It makes it seem like you're getting more bang for your buck.
On top of that, they have cash app investing.
If you want to stack slivers of stonks, a lot of people are stacking slivers of stonks right now.
Stonk market is going absolutely crazy.
I don't know what the hell is going on, but if you want to get in on that stonk market insanity, cash app investing is letting you do that.
If your favorite stonk is a little too expensive in this recent run-up, don't worry.
You can buy as little as $1 of your favorite stonk because cash app is directly connected to your bank account.
There's no four to five day waiting periods and start investing today.
And guess what?
Cash App may even be your bank account now.
If you didn't notice, they're giving out accounting and routing numbers so you can get direct
deposits into the Cash App.
They're becoming a new bank, a bank where you can stack sats, stack slivers of stonks,
participate in their boost program, which helps you save at partner merchants.
You get a little personalized debit card, your signature on it, a little Bitcoin on
it, whatever you want to put on there.
You go to partner merchants, you activate a boost, you save some money.
Then you can take that and stack sacks.
I almost said snocks.
Sats.
All right.
If you have not downloaded the Cash app yet and you are going to do that, make sure you use the code stacking sats.
That's S-T-A-C-K-I-N-G-S-A-T-S.
One word.
You're going to get $10.
And $10 is going to go to our good friends at Owl's Lacrosse.
That's Owl's Lacrosse.
that dirtbag al was back at it again he responded to uh the restraining order idea that i threw out
on the will cole episode he's very very uh combative about this he's scaring me freaks
uh he's talking about his inchworm on twitter this guy is dangerous to stay away from him
download the cash app and enjoy this episode with alex bosworth
You've had a dynamic where money's become freer than free.
When you talk about a Fed just gone nuts, all the central banks going nuts.
So it's all acting like safe haven.
I believe that in a world where central bankers are tripping over themselves to devalue their currency, Bitcoin wins.
In the world of fiat currencies, Bitcoin is the victor.
I mean, that's part of the bull case for Bitcoin.
If you're not paying attention, you probably should be.
What is up, freaks?
Welcome back to Tales from the Crypt.
It's your boy, Marty Bent, here on a lovely Tuesday afternoon where I am.
It's early afternoon where you are, where my guest is, day after Memorial Day.
Excited about this conversation.
We're going to get a huge breakdown on everything that's going on on the Lightning Network.
It's something that I use every day, whether I'm receiving or sending transactions.
And I think it is the Lightning Network particularly is something that is vastly underestimated at the moment.
So I'm very excited to be sitting down with Alex Bosworth, Lightning Infrastructure Lead at Lightning Labs.
Alex, welcome to the podcast.
Thanks. It's great to talk to you.
Again, very excited for this conversation.
And before we get into the nitty gritty of everything that's going on on the Lightning Network layer, how did you get to building on Bitcoin and Lightning specifically?
I think I first started working in the Bitcoin space in around 2016 when I participated in this program from Chaincode Labs, which was then called the Hacker Residency.
and that was an idea that Matt Corallo had where they would bring in people who were interested
in working on Bitcoin and then they would have Bitcoin Core developers kind of take people
through how the process of developing Bitcoin Core worked and the philosophy of Bitcoin and that was
a one-month kind of program and it just so happened that the timing worked out I was in
New York at the time and there was a few other people who participated in the program with me
It was a really great program, and I got an overview of Bitcoin, Bitcoin Core, how everything
is working.
And from there, I'd always been kind of like an enthusiast in Bitcoin, I just hadn't really
worked in it.
So at that point, I had connected with this company BitGo in Palo Alto, and they were
at the time, like this Bitcoin API platform for like Kraken, Bitstamp, the exchanges and
they kind of do the backend Bitcoin indexing and things like that for them.
And they were looking for people and I connected with them and then I went to work at Bitco.
So when I was working there, I worked on a kind of a derivative of the Bitcoin blockchain,
was kind of like a private blockchain project for um transferring um gold tokens but it was actually
just like a fork in the bitcoin protocol um so that's that really helped me like get um deep
into like how the actual bitcoin protocol works um by creating this like private blockchain um
and then when i was working at bitco so this is you know more into 2017 we started to see like
um a big rise in like you know the price of bitcoin and also just like there was just a
you know a huge explosion in the space and um we also had you know issues with the mempool so um
when i was working at bitco we one thing we noticed is that like customers were paying huge
amounts in chain fees because the people who are using the mempool the most um are the exchanges
like they're paying for those fees so um i'd already like shipped the private blockchain
project um and uh i was looking for what to work on next and um we were thinking okay what if we
could use lightning network to help reduce the um the fees that uh the the exchanges are paying
because it's it's really a large large amounts and you know we we just had kind of a fee fee
bump recently where where fees were going up to maybe a few dollars of a transaction
but in those days you know we were starting to see like 30 dollars per transaction so that was
there was a lot of pressure to figure out like how can we make lightning into a workable solution
and then exchanges can deploy.
And I was working at Bitco, and then I decided to leave Bitco
and really focus on a concept of bridging people
onto the Lightning network, and that's called submarine swaps.
So I came up with this concept to allow
people who are not necessarily already on Lightning
to get onto Lightning from the chain
in a way that is non-custodial, like an atomic swap.
And I created the concept as like an open source project,
so anybody could run it and I ran it myself.
And it kind of allowed access to the Lightning Network,
even if you didn't have any Lightning Network software.
So just like the bare minimum of what you would need
to go from one system to the other system.
And then it also started working on this idea
you could go the other way too so you could go from the lightning network back onto the blockchain
um and i did some presentations about this and i released this software um and lightning labs um
after a while came called me up and they said you know we're uh kind of expanding um and we're
looking for somebody to you know help us build out our our products and um i joined lightning labs
and um it lightning labs is also interested in the same kind of submarine swap concept um so um
i worked with them on this project called lightning loop and lightning loop is the the
same kind of concept the submarine swaps um that we offer as a product um and then at lightning
labs i also help out with other um lightning lightning projects like trying to kickstart
this whole network because like you know it's still a small network we really need to get more
adoption we need to get more integrations and there's a lot of integration work that has to
happen for that fascinating journey and before we get into loop that's one thing i want to touch on
like the state of the lightning network because somebody uses it every day again i think it's very
underutilized uh i recently put up a couple ads on bitcoin bounty hunters that that uh first player
shooter game that recently came out and allows you to use the lightning network to
pay for billboards within the game i showed my cousin yesterday an example of how i could just
get an ad in this video game for less than a cent if i wanted to i just put like a thousand
sats on there it's not less than a cent i don't know what that converts to right now but
whatever that is very cheaply get like yeah yeah get a get a billboard ad on this video game and
it blew his mind like i just create an invoice on the website funded my ad via via zap which is
the wallet i use and um it was up there my cousin was like are you kidding me you can like buy
billboard ads in this video game that's mind-blowing and so it seems like to me at least as a user the
utility is is massive but it seems like people are sleeping on lightning uh you hear a lot of
fud from the ethereum crowd that there's more bitcoin locked on on like rap btc than there is
on lightning network uh why do you think lightning at this point has the adoption that it does
whether it be too little or or pacing where it should be well i think it's a it is a function
of the of the total amount so what you kind of need is for there to be like a critical mass of
people to address so like if you wanted to sell an ad you need enough people to buy the ad and
you know have enough need enough people who are consuming the ad so um right now you can make
really cool concepts right because like you can kind of show the promise what if everybody could
buy these ads for you know a penny and you didn't need to put down your credit card or anything
um like i'm on this telegram bot and all the telegram bot does is like spam me with messages
and so anybody can kind of like bid to spam other people and every time i get the spam i get like
two satoshis or something and you can kind of set your threshold like how much is your attention
worth to you um and you know it's it's a cool project that somebody can make up but in order
to bring it to scale you need to have a bunch of users like because i think the number of people
who are on the telegram bot it's like 500 people so um i i'd say like right now we're we're we're
still in the in the concept phase and um you know it's it's anyone's guess like what will be the
killer app um and it's just hard work of like getting people to um growing the audience and
um figuring out where lightning is solving the most problems
yeah and how much does protocol maturity come into this like how how mature is the protocol
protocol right now? Is there still a long way to go from a networking perspective, correct?
I would say that protocol maturity, that's like where everything starts. So like how
sound is a protocol? How much does it define? Does it define everything? So I would say
that is still a work in progress. So there will be like a couple major overhauls. The
recent overhaul that's being discussed is this idea of anchor outputs. And that's kind
of addressing a problem with lightning channels where they're not very adjustable to fee and
market changes. Because every time you have a payment channel, you have to kind of like
reconsider what the on-chain fees are going to be because the state of the channel changes
like as the balance moves around. But then you need to figure out like who is supposed
to pay the fee and how much is this fee going to be and then um the fee market changes so now you
have to renegotiate and what happens if they go offline now you can't renegotiate so maybe you
have to go for the chain it's it's really um kind of a problem for the protocol level um so the most
recent version of lnd actually has this experimental new channel type it's uh like a new new protocol
um it's a not a standard but it's it's um potentially going to be a standard and uh in
that it uses this thing called anchor channels that will allow you to adjust the fees after the
fact using child pays per parent and this is also going to be um using kind of like this these uh
changes in bitcoins like uh relaying and mining protocol that will allow you to the miners and
the relayers to kind of consider a package of transactions together how much fees are those
generating um and that will help us like make a more sustainable um protocol that's like more
reliable we can kind of predict what's going to happen because we have control over the over the
fees even if the other person goes away and it's also going to impact the liquidity of the market
because right now an issue is you create a channel with somebody else and um maybe in the future you
decide that your the peer that you created the channel with somebody random on the network they
decide to close the channel um so who pays those fees well it's actually you paying the fees because
you created the channel so that's kind of like how it's supposed to work out to be fair but the other
side of your peer could could do it in a way that's like going to be annoying to you like maybe
your peer it sees oh wait i have some money on my side i want it really fast so i'll pay the top
dollar fees like if the fees went super high like thirty dollars they would have just cost you thirty
dollars because they wanted their money quick um so with anchor outputs it's going to be flipped
so the way that it's going to work is that whoever wants it fast they're going to pay for that extra
speed and by default it will just be at the slowest level um so that that's a that's a big
protocol change that requires a lot of re-architecting of things and um i think that
will come in the near term and then the long term there's maybe even new kind of concepts like
aftershore and taproot maybe l2 like there's other soft forks that could allow for different
types of channels um but the the i would say like right now as far as adoption goes like the anchor
channels are kind of like the biggest step forward as far as like making improving the security and
reliability uh predictability of payment channels and the rest of the thing that's uh causing like
hindering of adoption is just engineering work so we need to make sure that the implementations
are rock solid like you're putting your bitcoins in here if you're putting a million dollars in
something you you better make sure that that's been audited and um that has a lot of great
guarantees for you and that involves building a lot of features to make that make you feel good
about it yeah yeah i mean it is a a relatively new protocol how old is it less a little over
two years old now at this point yeah well and it's definitely been evolving like the original
white paper has has you know is totally different from how it's come out and there those even you
know different protocol implementations um and it will change it will change a lot as it goes forward
yeah and i mean how hard is it building the second layer as as bitcoin at the protocol
layer is changing too like you mentioned l2 uh that could be enabled if schnor gets enabled
correct and and well it's a separate it's a separate of the software um potentially um but
But as things seem like they're currently envisioned, it would be a separate soft fork.
So it's a whole new kind of can of worms, really.
Schnorr and Taproot will have their own implications on the Lightning channels.
I would say it's actually nice, my perspective, that the Bitcoin protocol is slow moving.
If you're thinking about getting your software obsoleted or having breaking changes coming
along because there's like lightning is already pretty fast paced moving so if you also had to
think oh well the bitcoin protocol is changing underneath our feet um then we need to like be
recreating channels or you know dealing with changes to the protocol so um i'd say bitcoin
it has the good aspect that it's like okay i know that what's here today it's going to be there
tomorrow yeah and that's correct i got that confused a little bit l2 would be a different
soft work and what what would that change particularly at the protocol level um what
would that change at the protocol level um it would kind of like in a lightning protocol it
would it would kind of change how um it would change how the states are kind of folded up
so like um it would change it would change to more of like a counter model so right now we
have this this model which is like a secret model and whenever you make a payment channel
that's bi-directional you want to have some way to say that the old state that i that i previously
countersigned to i want that to go away i don't want i don't want you to use an old state anymore
and so the the model that was currently used in the lightning network is that um the way that we
prove that we're not going to use this old state and it is dead is that we reveal a secret and the
secret allows um unilateral spending of funding if um the other side goes to the chain and they
shouldn't they should if they use it an out-of-date state um and it's a very harsh protocol because
if you ever if you ever try to cheat the other side then you can take all the money um and so
like the criticism has kind of been like this is so harsh what if people like do it by accident
and then L2 has a different model it's a different type of protocol where
it's based on kind of like this counter system so the counter system is
every time we commit to a state of the payment channel
we're going to increment a number and so there's going to be state one and
there's going to be state two state three state four
and if you go to the chain with the out of date state number
I can I'll still have a period of time when I can challenge it and all I really
have to do to challenge it and override it is to present a higher state number and that way you can
kind of say well it's not so it's not so harsh to to use an out-of-date state because the worst that
happens is the other side just corrects you um and uh that you know is um possible through a
soft fork that's changing like how the um how the signatures like validate right how like
you are um like it's introducing a new way that scripts can execute yeah yeah that's the very
controversial part is like should we be soft working stuff at the protocol level for lightning
has that set a weird precedent but that does seem like it would create a much better ux on
on the lightning network well and i think the research is still out in terms of like
there's there's lots of different ways of lightning can be done so um and the chain
making a consensus rule, that's like really something there's no undo button on.
So you better make sure that it's super necessary and it has, you know,
great results. And, you know, uh, it's not a hundred percent, um,
like known that this is actually even a huge problem of this. Like, um,
this breaching is a problem because right now, like, um,
like I have a node that I set up for y'all's that's on tour.
It's been running for a year plus nobody's ever tried to breach me. Um,
that and the the way that you in order to to do this accidental breach you would also have to be
like um you would also have to like ignore lots of other safety safety precautions that are built
into lnd um and like in practice it doesn't seem to be a huge problem and the reverse might might
actually work out to be true if you remove the penalty because if you remove the penalty for
trying to cheat somebody um well maybe they're going to try it more so maybe you have to think
like if there's a million dollar channel and they could try to cheat you and then just hope that you
don't get it in but there's nothing that they have to lose and they can win a million dollars
like maybe that's not as secure as as a um as a model that we currently have yeah that is
interesting to think of like even though it's possible now people aren't aren't aren't really
executing those attacks um right right i mean and it would be very interesting if they started to
execute them because you would kind of have like people playing dead and they'd be like oh i'm
vulnerable to an attack and in order but then they would try to like um have the other person put
their money up at stake and then try to steal the money but then they would actually execute the
justice transaction and take money back um there's a lot of like theoretically interesting things that
could happen it's just that they they aren't really yeah yeah it's so fascinating it'll be
it'll be interesting to see how and if these attacks are executed if if more adoption comes
um but like back on the topic of adoption and like the killer apps that will bring it like
something like lsat where it fixes the the 402 error that exists on on the uh on the internet
right now or ln url auth these applications seem pretty groundbreaking and paradigm shifting when
you think about how individuals interact with the internet particularly and really sort of
shifts the the dynamic of power between uh people and the websites they interact with it seems
yeah for sure um like that that's one thing i played around with when i did like uh when i made
y'alls.org um i i was like uh what if we had this um and y'alls.org like you don't see it but it has
like a 402 error it's like you need to pay you need to pay some money and um i thought it just
makes so much difference that you can um have micro incentives um like one thing i really don't
have to deal a lot with is spam because you know if you go to a web if you set up a bulletin board
normally um well anybody can access it from their website and basically you know whoever is caring
the most about annoying you is going to like hit the form and spam you or you know maybe put some
ads up or whatever grief people but once it starts costing them money to do that they're not doing it
so um yeah i think that's that's like a larger lesson that can be applied to protocol like in
general like um we had all these peer-to-peer protocols like when i was a kid there was like
that was the era of Napster and stuff. And I was like, Oh my God, Napster, it's like so
groundbreaking. Um, but what, what, what, you know, of course there was like a legal challenge
to Napster, but then when people try to make decentralized versions, they were like, well,
everybody was just like stealing and or posting garbage. And like, there was no feedback mechanism,
but potentially like Bitcoin and micro payments can enter into peer to peer protocols to give
feedback mechanism so people like cooperate yeah i think i mean again i think people are
sleeping on the lightning now we're going to wake and change the dynamic on the internet
just via creating little mini paywalls that like you said dissuade attackers from and spammers from
spamming uh use cases and then on top of that like using a lightning node as uh quasi identity
across the internet too seems seems very interesting especially when you get into the whole
concept of uh something like ln url auth or i believe you could even probably leverage lsat
for this just using uh your node as a way to access websites and services instead of having
your username and password stored on on their databases you could store it on your node and
give it out at will as you go around the internet which seems like a much safer way to me at least
off the top of my head yeah for sure like um and it's not even really your node like the identity
is coming from your seed like your the seed phrase that you wrote down so like imagine if all of your
passwords for all of your websites could just be derived from from a seed phrase um that would be
so awesome um and it's also a seed phrase that you're kind of like already incentivized to keep
that safe keep that backed up so you have just have this one thing that not only is your money
but it's also kind of like all of your identities or like maybe virtual properties that kind of
thing um so yeah that's definitely one thing i think is really cool is getting people onto like
this asymmetric cryptography um that allows you to you know it feels archaic that we have to like
remember some password or like choose the right password thing um what if you just have like one
central kind of authenticator thing that like um you just record write this down on paper and then
it works across across your sites and there's another interesting thing also about the lightning
network which is we have kind of like this um set of channels so people actually are kind of
creating these relationships and um that's kind of like uh you know harkens back to this idea of
web of trust where you know we didn't invent like public key cryptography and back in the day you
everybody was trying to like get everybody into this like public key sign web of trust so you
could know like okay this guy vouchers for this guy and this guy vouchers for that guy
like uh when i was like first buying bitcoin i went to this like irc chat room which is which
is like um which had this web of trust website to kind of and so you can kind of rate other people
you were buying bitcoin from because like that was the days when like mount gox was like seemed
pretty sketchy or wasn't even around and people were like trying to create this grassroots kind
of connections but the lightning network actually has that like inherent into it because you're
creating channels with people then these are like long-lived connections these are people helping
you out like over a year so potentially we can use those kind of like trust connections
or you know you know like i have at least a history with you you're not just somebody
randomly coming to me and i can also analyze who you are connected to and who they are connected to
So I think that could be something pretty cool
that could be leveraged in the future.
Yeah, a lot of people like to point to the channels
and the connectivity to channels and say,
you should be getting sort of Sybil attacked by authorities.
We're looking to track you around the Lightning Network.
But very few focus on this aspect of it
where you could create like a reputation market
with people that you're connected to
and the good actors who are using it
in uh in a way that it's meant to be used not tracking everybody uh again there could be
vast benefits that come from that and that's the big question like does the game theory
play out like are these attackers gonna want to put up the cost for that because you do have to
lock bitcoin in these channels for an extended period of time and you have to have that capital
in the first place so and you have to be like an active participant so it's you know it's not just
like you you spin up a node and now you become a good router like you actually have to help people
you have to work with them so it's almost like a community yeah well that's a good point you bring
up being a router as something you've been tweeting a lot about and documenting a lot is
the experience uh being a routing node and and how to do that profitably what what can you tell us
today about that experience is it doesn't seem very easy right now it is it is a job but if you
do it uh it seems like it could be profitable in the future yeah i mean i would say that it's um
it's it's it's fun like that's that's that's the high level point i would make about routing it's
like it's so cool like i'm participating in hundreds of like online transactions every day
with with random people throughout the world like how cool is that like i can just go every day back
And I can say, okay, I was part of a hundred, a hundred transactions, um, like with Bitcoin
on chain, that's like, you know, maybe I'd make one purchase every once in a while.
Um, but now I'm doing it all the time, every hour.
So, um, in terms of incentivizing routing nodes, I do think that is important, like
beyond just like altruism and, you know, trying to help the network.
Um, and that's something I do work on, um, in terms of, I try to set up my nodes so that
they are going to earn routing fees.
and to see how I can make it so that this
is a sustainable system, that as the network scales up,
that routing nodes have monetary incentives
to expand themselves, to help scale.
And so I noticed that there's a lot of people who
try to set up routing nodes, and they fail,
because it's an involved process.
It's not just you turn on your node,
and then you're forwarding.
And it's a lot, I mean, even a Bitcoin node,
if you just like run a normal Bitcoin node
and you want to help the network,
most of the times you wouldn't really be helping the network
because you're probably, the network, you know,
probably doesn't need you.
So really you're maybe helping in a very marginal way.
And even if you're a pro,
but if you're like, if you're relatively decent
at setting up infrastructure,
you could set up like a nice Bitcoin node
that would be a relay node
and it would allow out incoming connections
and it would be expanded and it would be relaying tons of Bitcoin transactions around.
You wouldn't really need to touch it.
But a routing node is different because you need to be managing liquidity.
You're kind of like a trader.
You're figuring out where should I place my capital and where am I going to get returns?
And returns means like where do people want to be sending money?
And if you place money where people are not wanting to be sending money,
well, then you're not really helping anybody.
So that's like the whole process that I'm like involved in is like, how does that work?
and so how do you scale a routing node and what are the limitations like is there
a level at which uh you may have too many channels and you sort of need to
weigh the opportunity cost of opening a channel with one node over another uh how much how many
stats are you putting in these channels do you try to put as many as possible um at the onset and
yeah there's endless questions really about like how to how to operate these routing nodes
um as far as how much money well okay why would you not want to create uh just a bajillion channels
and that's that's a strategy right this is kind of like a game like um there's no set answer here
it's like a market we have to like figure out what the best answer is and we're competing against
each other for these routing um so the the reason i would say that like you wouldn't want to create
a ton of channels is because um of the balancing liquidity issue so whenever you create a channel
all the balance starts out on your side, because you wouldn't want to have a network where people
could just like demand other people lock capital to them. So all the balance is starting on your
side. So if you make 100 channels, that means that there's 100 channels now in your node,
where the balance is all on your side. And what routing is doing is it's saying I have
somebody else has pointed some capital at me, and I pointed some capital at somebody else.
So I'm going to reduce the capital that somebody else pointed at me. And I'm going to reduce the
capital that I pointed at somebody else. And that's, that's routing, I'm passing the money
from one hand to the other hand. But if you just open up 100 channels, then all the money is in
your hands, there's no money in other people's hands, it's pointed at you. And so you can't
route, it's impossible. And what's, what's more is that in lightning, we don't advertise the fact
that balances are on our side or on the other side, because of privacy, we want to make sure
that like balances are kind of invisible and even in terms of scalability it it would be
infeasible to advertise constantly everybody's balanced everybody else that just wouldn't scale
so um when people encounter your node they when people try to route a payment what they're doing
is they're they're they're like uh mapping the network they're they're trying to figure out like
which path can my payment take and so when they hit your node what could happen if you've created
these hundred channels is that they try each one they try to get into your node and they they're
like okay i want to i want to use this guy as a router but then nobody's assigned capital to you
so every time they try one of your channels it doesn't work to go into you because all the money
is on your side so lnd has actually added a feature which will after a while it will give up
on you and it will say like this person has just got too many channels who that are that the money
is unbalanced so like um i'm going to give up even trying the other ones um and so you're going
to be like losing out as a router so that's kind of like pushing back on you from just like creating
tons of unbalanced channels um and there is something that you can do to balance channels
which is you can get other people to open up to you um and then there's also like liquidity
services like lightning loop that um you know that i'm working on which basically allows you to um
pay out off off chain and then receive the money back on chain in an atomic way and what that's
what that's helping you to do is to get the money kind of moved between the channel
so that you can both rescind and receive and so you don't need the other person
on the other side of that channel to open up another channel with you right exactly that's
yeah and that's kind of the terms of the deal like if you open up a channel with somebody
and they accept the channel then the deal is that you're allowed to spend down that channel
and then the funds that you do that you spend down on that channel they can be used to receive
by you in the future yeah so let's dive more in the loop how long you've been working on this
what's this the state of loop and and uh what can we expect it to be more uh commonplace between
lightning users um yeah i started working on loop i mean i guess i started working on the concept
before I even joined Lightning Labs.
And then when I joined Lightning Labs,
that was kind of like the first thing
that I started working on.
But I kind of switched more from the developer side
to like the PM side.
And the big takeaway that I had
when I joined Lightning Labs is like,
what people really want out of these swaps
is they want to go, they want inbound liquidity.
They want to go from Lightning
and move that funds out onto the chain.
And not only because of inbound liquidity
allows them to receive,
like a merchant would want it,
because they would be wanting to receive but it would all it's also a way to kind of reduce the
amount of funds that you have to keep in your lightning wallet because like if you're receiving
a lot of a lot of funds on lightning like if you're if you're selling gift cards or something
like funds are always stacking up stacking up on your hot wallet and you you want to get that out
you want to you want to get that money out so um but you don't want to like mess up the channels
that have been created like those channels have delivered a lot of sales to you those are good
channels that your customers are using so lightning loop allows you to um kind of reduce
clean out like your cash register so your cash register kind of fills up and you've got all the
money that's come over to your side on the lightning on the lightning network and then
you can just move that out um onto the chain um so we we release that and i guess loops a year old
now um and the big thing that we've been like working on for like loop two or like the future
of Loop is the interesting thing about Loop is that actually it's also a scalability solution
for on-chain transactions. And it's a scalability and privacy solution because
one thing that we can do with all of these loops that are happening is that we can batch them
together into major batches. And batching is, you know, there's Segwit. You can always upgrade
your on-chain sends to Segwit, you know, you can save half of your fees. But if you upgrade to
batching it can be even more savings it can be like up to maybe 5x savings so you can pay five
times less for your on-chain fees um and but the problem with batching is that normally when you
try to do the only people who can do batch sends are people who have enough volume to justify doing
batch sends and even they have to kind of wait a while so like an exchange is going to say wait an
hour and then we'll batch together all the withdrawals and we'll send them out all after
the people and we'll save on-chain fees by batching together all of those withdrawals
But you as just a random person you you don't have enough volume to justify doing batching
Maybe if you maybe you could just like save up all the on-chain things you want to do for the weekend or something and then
Send them out as one transaction, but you can't really realize those massive savings of making these mega transactions
but the interesting thing with lightning loop is that
It allows you access to our batch transactions in a way that's non-custodial. So this can be kind of built into wallets
because it's an open source service
that just anybody can use.
Yeah, and you're sort of seeing that already, right?
Like Ride the Lightning, has it integrated?
Yeah, for sure, yeah.
They, you know, there's certain integrations
that are kind of like private integrations.
I think, you know, services like gift card resellers
and things like that are using Lightning Loop,
which is really only available as an API
and a command line process.
So it's not something you can just go download right now.
We haven't, I mean, that's another thing that I think that we'd like to improve upon is to just make Lightning Loop into a product that you could just like try out.
But right now, we've really focused on just making it into an API that other wallets, other people could integrate.
And yeah, so Ride the Lightning is probably the easiest way to just download something and you can use Loop right away.
Yeah.
No, I mean, the UX that they're building at Suheb and team are building over there at Ride the Lightning.
It makes it really easy and visualizing it.
And Zach's implemented this as well, too, right?
Because you can slide, or at least I know Jack's thought about implementing it,
just slide, and visually you can just slide to rebalance your channel,
and that makes the UX so much better.
Yeah, for sure.
And it also, like, Loop works well, I think, with circular rebalancing,
which is another feature that RTL just added.
And circular rebalancing is kind of like I have a lot of liquidity on one channel,
and now I want to shift it over.
I want to spread it out between my other channels so that they're all nice and balanced.
But the problem with circular rebalancing is that you can't increase the amount of inbound
liquidity that you have.
So you can't increase the amount of around.
So you need like an external service to say, okay, I'm going to move more funds pointed
in your direction.
And Lightning Loop also isn't the only way to do that.
On yalls.org, I actually just like sell channel open attempts.
So, you know, you just come to y'alls.org and you like, say, I need a channel, I need
some inbound liquidity.
So there's like two components to that question, which is one is like, once I have this inbound
liquidity, like I need to make sure that it's shuffled around so that it's in good channels.
And like, and remember, people who are paying, they don't know exactly which channel has
the correct liquidity.
So they're going to hit one, and then they're going to try another one, and they're going
to try another one.
And then if too many of them fail, they're just going to give up on you.
so if you can balance it around so that they always succeed then you're going to do more routing
and that's that's also where fees come in because you can use kind of like the routing fees to
justify the operational costs like going to chain creating new channels buying channels
buying liquidity like doing rebalances that kind of thing yeah and multi-channel rebalance feature
has me thinking about amp too and so like sending yeah well that that's something that we that we
recently also added to lightning loop which is pretty exciting um so uh one issue with doing a
lot of liquidity changes on your lightning node so like let's say you have 10 channels and they all
have like um a bitcoin each and you want to um you want that funds on chain you want those 10
bitcoins so normally what you would have to do is um you would you would either close the channels
and you would you would take that 10 bitcoins on chain or you could do in the past you could
do 10 lightning loops maybe and each one of those lightning loops would be a payment um
and then that would mean but that's still chain transactions because the lightning loop is
so it would still cost you some some money in chain fees even with the batching
um but the thing that we have now with the multipath payments is that you can actually
use those 10 channels as if they were one channel and pay and complete the payment to the um to the
lightning loop server who will send you back one on-chain htlc so we've taken 10 10 10 transactions
that you would have to do with closing channels or you'd have to do with 10 loops and we've turned
it into one one uh one transaction um so that's like potentially a huge savings for people who
are doing this like on the regular like okay i'm i'm a merchant and i've just received in 100
different channels and now i need to move that money to the exchange to buy more gift cards or
something so i can just do that in one operation that's saving me 10 100x on my changes yeah it's
pretty crazy concept yeah the condensing that from 10 channels to one or 10 transactions to
one transaction on chain seems like a huge uh burden reducer for users and then would that
help reduce just overall activity at the protocol level and help reduce the amount of transactions
or well it helps kind of reinforce like the value of long-lived channels because it's it's kind of
a disruptive act to like close the channels and get your money out that way like now the other
side has to like recreate the channel and they have to notice that they have to do that and
there's a whole setup time um they have to pay the cost um it's it's nicer if we just have these
like super long-lived channels it's like i have this relationship with you and you're not just
tearing it down every time i'm successful at forwarding a lot of payments to you the balance
will reset and um we're it's generating more traffic inside the lightning network so uh
otherwise it would just be one directional like people will pay to merchant people will pay to
merchant and um this way the the the volume kind of stays inside the lightning network because it
also goes back the other way um and in order for fees to come down on the lightning network it
actually they kind of have to go up first they have to be like premium first and then they can
be downgraded once there's enough volume to justify going down um so we have to make improvements on
the technological side to reduce costs but also just like the activity of kind of setting up the
node and monitoring it and you know putting your funds on the line all that stuff um that kind of
has to be justified with some volume otherwise you're going to have to charge like a high premium
rate it's like if you make a luxury car you have you have to put a luxury price on it because
you're not selling very many units but if we can make this super commonplace if we can make more
more volume in the lightning network then you can have routers who can just deal in huge volumes and
charge lower amounts yeah getting there what do you think we need to get there these these hardware
nodes that allow you to easily set this up out of the box better education combination of both like
is there i think a point i mean like there's so many possibilities for how the network could take
off um but i think the most obvious one is that exchanges would use the lightning network to move
between themselves and not just the big exchanges but also there's a whole like uh galaxy of like
little exchanges that you've never heard of that are just like they do they deal with you know in
this one island nation or something they deal with the regulatory problems of buying how those people
buy and sell bitcoin but how do they do arbitrage between you know the other like little town or
little little city state or something who has their own exchange who has their own arbitrage
and there's just hundreds of these guys and they're using the block space like the block
space isn't currently being used by um you know people buying coffee it's by people making big
trades and you know hundreds of dollars thousands millions of dollars um so i think that's just the
obvious solution of like why don't these people are paying i mean even now the fees are way lower
than they were before like before the median payment fee was going to be like 30 and now
the highest is like three dollars which still feels pretty high um but that's working out to
like two thousand dollars a minute it's almost like reaching a billion dollars a year so once
you once you hit that you start to think like let's move some of this volume over to where it's
cheaper where i'm not having to spend thousands of dollars tens of thousands of dollars a month on
chain fees what is a bitfinex has been a first mover in this space yeah for sure any note up
uh but yeah a bit like bitmex notoriously does a huge transaction every morning like 9 a.m eastern
Yeah. And it's all about the network effect. If you just have one or two,
it's not really helping that much. But if you have everybody on it, then
there's really no question. Should I go to the chain or should I keep it off the chain? Well,
everybody's on it, so I can just always go off the chain.
What do you think their apprehensions are today? Do you think they're just lazy?
Well, I think there's a lot of factors. Even with upgrades like Segwit, which are relatively
straightforward um and you know very well proven like the highest standard and on the network for
years there's still lack of support for it so i think that the exchanges are very focused on
revenue generation and they're less focused on like technical technical innovations like only
certain exchanges really invest a lot into staying cutting edge with technology and um really keeping
up with all the best bitcoin practices um the other exchanges are more focused on like customer
support and regulatory compliance um so that's one reason why i think of course we would only
see the support coming from certain exchanges because only certain exchanges are doing this
like technical integration and it's kind of on us to like make make it easy for people who don't
necessarily want to invest in in innovation to just integrate this stuff yeah and do you think
it'll get to a point where it'll be pretty easy to do within the next five years maybe i think so
and the the other aspect is like what really motivates these exchange guys to to add stuff
because they do add software they do change things up they add in because they want to make money
really so if if you have to like if you have to ask them to like update their bitcoin library
they're not going to do it because they don't see the dollars and cents but if you ask them to add
some random coin and then you pay them they're going to do it immediately because that's going
to that's how they make their money so uh one interesting thing i think that the early adopters
of Lightning have been experimenting with is actually making money on Lightning themselves,
like becoming a liquidity provider or becoming a routing node. They just kind of see this as
potentially there's some ways to make money by just leveraging some of the things that they
already have. Like if you're an exchange, you already have systems in place for how to deal
with Bitcoin security. You already have systems in place for how to monitor that. And you already
have to sit on bitcoin because that's kind of like part of your business so um i think that's
potentially a way that people could get moved on although there's also the counter argument which
is um some exchanges have started to realize that like charging people on-chain fees to withdraw
is kind of good for their bottom line they they actually see that as like now a revenue stream
so if you go go and make it cheaper to go on chain then you you lose kind of like this you
know if you're if you're an exchange that's charging people five dollars to
withdraw and you're just poppiting the difference then you you know you don't
want it to be too cheap sometimes yeah so they're not just after the fact if
their transactions they're just not sending a transaction and whatever the
fee is just taking that from the customers are actually making sure and
they also have the benefit of batching so that yeah those are becoming pretty
good revenue streams yeah that's interesting is that messed up well it's good and bad i mean the
one of the good sides about it actually is that it kind of discourages people from just over
withdrawing like uh so you know it's it's bad in the sense that like it encourages more people to
keep their funds on a custodial exchange but it's good in the sense that like it's kind of a way to
do batching it's like you should think twice about doing an on-chain transaction make sure you really
need it yeah yeah no i mean especially after the last couple weeks with with fees going up a bit
especially during the week yeah i've certainly been thinking more about uh sending on chain
yeah i always wait wait till the weekend because like can i wait and that's a way that the market
is supposed to decide what those fees are going to be it's going to help like smooth that out
yeah i checked yesterday mempool my mempool is around like 12 000 transactions right now it's
around 18 000 not too bad um but uh these dynamic that's what's like we could go down like so many
more rabbit holes here at the lightning network specifically like so tour capacity versus public
capacity uh private versus public channels how how much privacy uh is afforded to users of the
lightning network if they if they use it correctly well i think that there's like two different modes
using lightning one is sending and the other one is receiving so when you send you have kind of
like there's kind of like an onion network already built into lightning because you don't really pass
along who's doing the sending and that's already like a huge improvement over sending bitcoin
because right now when you send bitcoin people are monitoring the chain they're looking at that
global state to say oh who's this person what are their coins related to and unless you do a super
good job of like separating out your wallets um you might be targeted and they're doing other
things like they're setting up fake bitcoin nodes just to like triangulate your position um so i
think lightning is doing a good job just like cutting out the number of people even without tor
with tor um it's a bit better because potentially in the future they could work backwards
like where where a payment came from by just like going and finding those new people and just saying
oh where did you get this from um and we could do other different algorithm changes to like make it
uh enhance the privacy by taking like circuitous routes or even trying to like prioritize tor nodes
that's something that i made before um to try to prioritize going through nodes that just can't
easily be looked up um receiving i would say is kind of the worst story in terms of privacy
on lightning right now because as a sender um your send gets wrapped in this onions and so nobody
knows like where it's coming from unless they go to the person each hop and then figure out where
it came from. But when you're receiving, you're telling other people, okay, here's how to get to
me. And then every time you receive, generally you're using the same public key. And not only
that, like even if you create private channels, the private channels for whatever reason include
like the actual UTXO. So you're also kind of revealing some of your on-chain points to whoever
you create an invoice and share an invoice with. That's something that I think we can do better
with in the future. We don't necessarily have to share those UTXOs, but that's not the best
privacy story, even with Tor. Fascinating. It can get better though, correct?
Yeah. There's no real reason that we have to share those on-chain markers. The only reason
that those are shared is because in public channels, we need to prove that you actually
have channels. So we relate them to the blockchain to say, okay, these channels actually represent
some Bitcoins on the blockchain. But for private channels where you just made it, you don't have
to share it with everybody um all you really need is kind of some indicator between the peers like
okay use you know you use whatever channels you want like we don't care about it um because it's
private yeah yeah because that's uh it seems that if architected correctly it could be a very
private way to use bitcoin um but it seems like there's there's some some ways to go to get get
perfect privacy but again these things take time right and considering that two years in are you
happy with the state of lightning network i mean i feel like we could always do better but um i'm
pretty happy with uh like all the progress that has been made in terms of like making things more
real like when i first started using the lightning network i would i would turn on my node and it
would crash every day like i would be at work at bico and i'd be like okay my all my things just
died because the node just crashed and um that's not like the the sexiest part of software is like
just making it so that everything is reliable but that is taking up all the time it's like making
sure that all the apis work as you need them to making sure that it's it's rock solid in terms of
like it's uh not losing data it's not dying um and i think we're we're things are light and day
from when i first started using lightning and now i would agree for for me as well it's certainly
become a better experience in the beginning it was even i'm not the best connected node
right now my node's not incredibly connected but it's connected enough where i only see like three
loops and a transaction gets confirmed where a year year and a half ago that would something
like a lot of my transactions should just not get routed yeah i think liquidity is getting a bit
smarter and we're also working on the pathfinding algorithm like it didn't used to be that it would
ignore a node that wasn't doing a good job as a routing node um so it would only follow one
algorithm which is let me try to find the cheapest possible route but that can take forever and then
there's also a timeout on it so it would just like fail um so now it's more intelligent about
how it makes that trade-off and there's way more that could be done on that yeah it feels like it's
happening like what's the developer interest like that you're seeing are you noticing more
people come and gravitate towards a protocol to help build it out i think it's really it's it's a
wave it's it's a wave system like the big challenge that lightning has is there's no like new token so
it's not like anybody's trying to pump their bags i mean unless their bags are bitcoin but
this it's not like you know the the fund that the ico can give to all these developers it has to be
organic like people have to actually like build businesses on this um so i would say that there's
waves of interest where it's like people say oh there's so much potential of what app i could
build what i could do and then there's kind of a crest because it takes time for adoption and
the thing about a network effect is if you have a network that's very small there's very little
utility because you can't really interact with a lot of people so you need to slowly build up that
that network adding more and more people and it's going to just going to take time to grow that
utility utility and you can't we can't just airdrop that on everybody no you cannot airdrops
or frown upon around these parts but it seemed like again the game sats getting integrated into
games is very encouraging to me something like key send where people are able to build
use chat apps and you're sending p2p encrypted messages across the lightning network is
mind-blowing to think that you could recreate a we pay alley pay experience using the lightning
network and completely flip the table on that where you're not having every transaction and
message surveilled by the chinese communist party instead you're just acting directly with
the peers on the network that you're connected with that's that seems another like another
groundbreaking application in its own just key set yeah i think while monetizing any kind of like
peer-to-peer protocols like i always feel like that was a missing piece like um we need to make
it so that you can't just like and and that's that's why a lot of companies back off of this
idea that there would be like uh secure open communication standards like there used to be
like this idea that like when google talk like launch and google was doing their messenger they
were like this is going to be an xmpp standard and everybody's going to be able to use it it's
all going to be encrypted and it's going to be great and then they just had a lot of problem
with spam with people you know connecting to other people and they were like why are we spending money
on this and that's just this is a full-time job so only like email made it over that hump where
it's like so embedded that companies kind of have to focus on spam and the spam is still an ongoing
issue um whereas all of our regular messaging has been siloed into these companies um and those
aren't those aren't open standards that can benefit from peer review and end-to-end encryption and
things like that yeah and so i mean it's pretty revolutionary isn't it like key send in itself
like yeah i think i think it's also it's still going back to like like originally in bitcoin
you could send a like a message with your bitcoin transaction there was like a memo field in the
like original satoshi nakamoto bitcoin and that was so natural it's like i'm sending money to
somebody so i should be able to attach a little note a message and the message can be anything
even like you know machine readable data so you could create protocols on it but the thing is
and this is like in the early days of bitcoin when you would like directly connect to people
and like that's how you would transfer bitcoin you'd have to like connect to their node directly
um the that was kind of dropped because it wasn't scalable of course but in lightning we can we can
recreate that same functionality but it can be scalable now yeah is it scalable a lot of people
say well i wouldn't say it's scalable for um beyond something that would be related to payments
because the design is really focusing around payments um but like i wouldn't like stream a
video over lightning unless you really like the lightning network itself would kind of struggle
with that um but the you know in the future maybe it could um once we if we could get all the
incentives like lined up potentially you could just have that be a streaming movie that that
compensates everybody who's participating in the streaming movie um i'd say at this stage i would
lower i would set the expectations to be like sending a payment and it has a message that's
already super powerful yeah i agree i agree and so i guess we can wrap it up with just a
question on how much does a significant increase of on-chain fees affect the potential scaling and
increased usage of Lightning in the future? I think it has positive and negative effects
on Lightning. I mean, the positive effect of the mempool getting full is that it really justifies
the investment and making your channel, setting up your node. Because if you are just sending
money around and the mempool is empty you're spending maybe a penny with segwit on on these
transactions and so you're not really thinking about an investment in setting up channels setting
up a node setting up lightning integrating that if mempool is more consistently full it makes more
sense to really think about that and the bad side of the mempool getting full is that we still have
to improve the protocol to deal with fees so it's it's easier to deal with the protocol when fees
are more predictable they're low and it's also easier for people to experiment with lightning
when it just costs very little to set up a channel um it just lets lets people play around with
different channels um although it doesn't it also doesn't encourage necessarily like the most
efficient operation and that kind of takes foresight so like with lightning loop we're like
looking ahead of like when the mempool is full like how do we use lightning and the blockchain
most efficiently and then lnd itself has features like back to channel opening so you can use one
transaction to open up a channel to 10 different peers 100 different peers that's something that
i've tried out um and like we're kind of setting the groundwork for that future um so that uh but
it kind of requires a little bit of faith that the mempool will fill up to justify doing those
things yeah is it wrong to envision a future where you could sort of construct a transaction
on chain to set up a channel when certain parameters of the network are hit like
average set is x uh i'm gonna i'm just thinking all my ass or out of my ass here you could
definitely make some some kind of bots to switch over and like i think with lightning loop you
could even kind of like um still do on-chain transactions that you need to do but but fund
it with lightning and not even really be part of the lighting network but just like benefit from
the batching of, of, um, the lightning loop, like putting your transactions together with
other people.
Um, and then, and then you kind of do like a cost comparison.
You could say like, well, I'm spending down my pool that I reserved here.
And, um, you know, does it, is, is it worthwhile for me to like allocate more capital?
There's just so many things you could do, but fees have to go up for people that really
care about it.
Yeah.
That's a, that's like, again, it's a double edged sword.
I think it makes people care about it, but.
well the other thing is they should have cared earlier the other thing is the more that people
start caring that actually also solves the problem right like if people really use the blockchain
more efficiently it would cease becoming full and now you wouldn't care about it anymore so you'd
have kind of an oscillation effect where people would like all go and do batching do segway do
lightning and the mempool would basically you know be more efficiently used and then it would go back
and it would be like oh well it's more efficiently used but we still have a lot of people using it so
So it would kind of oscillate between those two phases.
Yeah.
Yeah.
And potentially, you know, we could have chain, you know,
we could have consensus changes like, you know,
maybe the days of like efficiency are mostly over, but like,
let's say tap root is actually more chain efficient.
That could have impacts as well.
And there's plenty of other forks that could be done to improve the,
the on-chain efficiency.
Agreed.
And I really want to see DLC.
I want to see discrete log contracts come.
So I'm hoping we get.
Yeah, with Snore, I think that should take off more.
Yeah.
And that whole concept with the team at ShortBits is doing to really research and create demos around discrete log contracts makes me extremely excited about the future.
That could be one of the killer use cases alone is smart contracting capabilities via the Lightning Network.
Yeah, for sure.
yeah well alex our hour is done here i know you're a busy man a lot to do yeah i think my
airpods are dying yeah it was great to talk to you no it's great to talk to you we should do this
again um at some point and i'm happy to say that i was able to to respond that i recognize half or
fewer of the lightning network things of the tweet you just you just uh sent out a few hours ago
yeah it's pretty deep if you get into it yeah i think i'm close to half like things like az
sweeps tlv no idea what's going on there um but uh it's the fact that there's this many different
projects being worked on or aspects of the lightning network that people are thinking about
is again infinitely encouraging and thank you for doing what you do to help build out this network
and educate people about why it's important and how you can use it uh efficiently and profitably
yeah it's so fun i mean it's really a privilege to work on bitcoin you know before i was just an
enthusiast and now i work on it every day it's kind of like a dream come true yeah um is there
any parting notes final thoughts you want to want to leave the freaks out there before we wrap up
I would definitely try out becoming a routing node.
I think we need it to be more distributed.
We need it to be just enthusiasts, activists, those type of people, and potentially there
is a way to make money on it.
If you're looking for kind of a new hobby, something to do while you're at home, I would
try it out.
Set up a lightning node.
See if you can route some payments.
Try it out.
You heard it here first.
Get routing freaks.
Where can we find out more about you?
Uh, well, I, yeah, you said I have the Twitter, uh, um, Twitter, Alex Bosworth, and, um, I have
a GitHub as well. I'm posting some like demo code, you know, if you want to get started with making
lightning apps. Um, I posted some stuff from like what I worked on with the alt.org and, um, uh,
watch the lightning labs blog. Hell yeah. Check all that out freaks. Alex, thank you again for
your time. Really appreciate it. Hope you have, uh, an incredible afternoon and evening.
oh you too talk to you later talk to you later bye peace and love freaks
