I’m sure you’re aware that the main purpose of the lightning network is to help Bitcoin scale by enabling faster and cheaper payments.

Did you know it’s possible to use it to send arbitrary data along with a payment?

Why might you do that?

Should you?

Let me break it down 👇
Normally when you make a payment using the lightning network the receiver has to create an invoice for the specific amount and then get that invoice to you somehow.

You then instruct your wallet or node to pay that specific invoice and the money is routed to the recipient.
There’s a feature called ‘keysend’ that allows you to send money directly to a node's public key without an invoice.

This means instead of having to communicate with the recipient in order to send a payment you can now do so spontaneously as long as you have their public key.
This is useful for sending tips and is currently used by the podcasting 2.0 apps you might have heard about so you can stream money directly to the podcaster’s node as you listen.

Keysend is pretty useful for sending money but it can be used to do much more.
Because of the way payments are routed through the network it turns out there’s a bunch of random data that is added to the payment as it is routed around the network.

This data provides privacy by making it impossible for a routing node to know where it is along the route.
If Alice is trying to route a payment to Dave and has to route through Bob and Charlie to get to Dave then it means Bob has no idea that he is the first hop and he has no idea if Charlie is the final destination or not. The same is true for Charlie.
This means your payment has to have a lot of this random data to be able to support enough hops to navigate the entire network.

It also means that you can use this space to embed additional data in the payment that the recipient can access.
This is how apps like Sphinx and Zion are able to implement messaging over the lightning network.

When you send a message to your friend you use keysend to send them a 1 sat payment and use the extra data to include an encrypted message they can decrypt when they receive it.
This is pretty interesting at first glance because you can now utilize the lightning network to enable end-to-end encrypted onion-routed messaging.

It’s really the first time that you can atomicly send data and a payment in the same request.

It enables a new set of applications
It’s not to say it doesn’t raise some important questions though.

Most importantly, just because you can do it, does it mean you should?

Some would argue that it’s an abuse of the network because you are routing tons of messages when it was intended to route actual payments.
On a network where there is already liquidity and max payments-in-flight concerns should we really be overloading it with arbitrary messages?

Some other folks would argue that it’s not abuse or spam because the users are still paying fees in order to send their messages.
As long as routing nodes set their fee rates appropriately and the users are paying them then who’s to say what payment is spam or not?

It’s a bit of an open debate and it’s hard to know where it will settle as there’s new related functionality coming called Onion Messages.
Onion Messages are a topic for another thread but they are being developed as part of the new Bolt 12 specification that will allow nodes to negotiate on-demand invoices.

This will enable a whole new mechanism for sending and receiving money on the lightning network.
I hope this helped you understand keysend payments and how they can be used to send arbitrary data in an end-to-end encrypted fashion over the lightning network.

Do you think this is an abuse of the lightning network?

Let me know below!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with John Cantrell

John Cantrell Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @JohnCantrell97

Jan 29
The adoption and therefore price of Bitcoin might accelerate faster than most people realize.

What is game theory?
How does it apply to Bitcoin?

You probably heard the ideas thrown around but let me break it down for you 👇
Game theory is the study and analysis of the strategy used by rational actors within some environment.

In its simplest form you can think of as analyzing how each player should play in a board game.

The ideas can be applied more broadly to all types of ‘games’.
So what games are going on in Bitcoin?

There’s actually many separate but related games being played within the Bitcoin ecosystem.

There’s the mining ecosystem, development process, individuals, company treasuries, and even nation state games at play.
Read 14 tweets
Jan 27
To truly understand why we need Bitcoin it’s important to understand money itself.

What is money?
Why do we need it?
Why Bitcoin?

There’s many books written on these topics but let me try to break it down for you:
At the core of any economy are people who perform work that produces value for other people.

A farmer grows food for us to eat.
A painter creates art for us to enjoy.
A mechanic fixes our car so we can travel.
A teacher educates our children so they can prosper.
Without money the mechanic can only eat if the farmer needs his car fixed.

Each person needs to want what the other is producing at the same time.

A teacher only needs their car fixed so often but the mechanic needs his children educated all of the time.
Read 19 tweets
Jan 26
Did you know that Bitcoin maintains a 10 min avg time between blocks regardless of the amount of hash power that on the network?

It’s possible because of a mechanism called the difficulty adjustment and it’s incredibly important to understand.

Let me break it down for you 👇
The difficulty refers to how hard it is for a miner to find a hash that would be considered a valid block on the network.

A higher difficulty translates to more hashes needing to be calculated on average whereas a lower difficulty means less hashes are needed on average.
If we recall from my previous thread on how mining works we know that a miner is hashing random values in search of an output that is less than some target.

When they find an input that produces an output below this target they are able to produce a block and claim the reward
Read 14 tweets
Jan 25
You’ve done your homework on Bitcoin and are learning about Lightning or just set up a node. You aren’t sure how it works and are nervous about losing funds

What’s involved in backing up a lightning node?

I’ve been using lightning for years, let me break it down for you 👇
Your Bitcoin is in cold storage. You stamped your mnemonic into a piece of solid steel.

It won’t be destroyed in a flood, fire, or acid bath.

You can finally sleep at night knowing your Bitcoin are safe.

With Bitcoin covered, you are excited to experiment with Lightning.
You fully expect a similar security model when booting up your lightning node for the first time.

I’ll get a seed phrase and stamp it into another piece of steel.

Unfortunately, it won’t quite be as simple.

What makes lightning more difficult to backup and secure?
Read 13 tweets
Jan 24
While we all now know what a Bitcoin price halving is 😂, I’m sure you’ve heard about Bitcoin’s other less brutal halving.

What is being cut in half?
How often does it happen?
Why should I care?

I’ve been working with Bitcoin for almost a decade, let me break it down for you 👇
When you hear the word halving you probably wonder what exactly is being cut in half.

Is it the price?
The number of coins?
The number of coins I own?
The mining hash rate?

Luckily it’s none of those things. It’s referring to the rate at which new Bitcoins are produced.
A block is mined roughly every 10 minutes.

Each block that is mined produces a certain amount of Bitcoin.

The amount of Bitcoin per block started at 50 when Bitcoin was first released and it is that amount which halves roughly every 4 years.

What was once 50, is now 6.25
Read 15 tweets
Jan 23
My thread about the security of 12 vs 24 word mnemonic phrases surfaced some good discussion and some confusion. To clarify it further it’s important to understand the answers to:

What is a seed?
How’s it different from a private key?

Let me further break it down for you 👇
A seed is a set of random data that is used as the starting point for wallets to generate an endless supply of public and private keys for you.

If someone has your seed they can use it to generate the private keys for ALL of the addresses you use and ever will use.
The mnemonic phrase is used as an easy way to remember and/or write down your seed.

So if someone gets your mnemonic phrase they can use it to get your seed and eventually all of your private keys.
Read 10 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(