Super Testnet Profile picture
Jun 11 28 tweets 5 min read Read on X
I continue to work on my hedgehog protocol and I've figured out how to add some cool features to it. I wrote a "bridge server" which helps "translate" hedgehog payments into lightning payments, and it works right now, which means a hedgehog wallet can pay...
...regular lightning invoices. I also added support for something I call "unilateral channels." What that means is, someone can be fully offline, not even talking to you, not even aware of you, and if you have their pubkey you can...
...send them $100 in bitcoin (for example) in such a way that they "receive" it in a new hedgehog channel. You just use their pubkey to create a multisig and fund it with the $100, then send them a string of text containing...
...signatures for the "force closure" transactions that they need in case they have to unilaterally exit from the multisig. Then, whenever they next get online, they can paste that string into their wallet and instantly start using the...
...money in their (already confirmed!) new hedgehog channel to make hedgehog payments and lightning payments.

You you could also use the unilateral channel feature to "make up" a bunch of keypairs, get some business cards, print out channel...
...opening/closing information on the business cards (using the pubkeys from each of the keypairs you made up to create the multisigs), fund the multisigs yourself, and then "gift" them to people by just handing them the business card. Each recipient gets...
...a new, prefunded hedgehog wallet with full support for sending and receiving lightning payments, with two simple steps: (1) visit a webpage (or download an app) that runs hedgehog wallet software and (2) scan the qr code to import the channel data.

All of these...
...features have some interesting side effects. For example, since you can receive money into a new hedgehog channel without being online, you can keep your private keys fully offline in an airgapped hardware wallet, and whenever you want to send money...
...over hedgehog or lightning, you can just prepare the transaction in your software wallet, encode it as a series of several psbts, pass those to your hardware wallet for signing, and let your software wallet send the newly signed transactions to...
...the bridge server. You could also *receive* money over lightning into a separate hot wallet, and regularly withdraw it to a cold hedgehog wallet by using your hardware wallet to individually sign the various transactions that are involved in...
...receiving lightning payments and revoking old state (but this requires implementing support for receiving lightning payments on hedgehog, which I haven't done yet -- see below)

I am currently working on a feature that I call "virtual channels" which allow you...
...to make a unilateral channel without going on chain. This lets you cheaply give people hedgehog channels that "fully" work, with the tradeoff that you (the sender) have a copy of this virtual channel's private keys, so you have custody of the recipient's funds. But the...
...channel works just like a regular hedgehog channel, with the same interface, its own balance, full support for sending and receiving hedgehog payments, and sending lightning payments. So it's sort of like you're hosting an lnbits wallet for someone, only with...
...hedgehog's ability to effectively emulate asynchronous payments. Which means you don't need a server to host this software, a regular phone or even a web browser should work fine, because you don't need to be online all the time, only the bridge server does.

Once...
...virtual channels are ready I want to add support for "receiving" lightning payments into a hedgehog channel. I wrote up a specification for it here () but I haven't implemented it yet. Once that is done I think hedgehog will be ready...github.com/supertestnet/h…
...to implement in a "real" wallet. It will have so many cool features:

- keep your keys airgapped and still (a) send hedgehog payments (b) receive hedgehog payments (c) send lightning payments (d) regularly withdraw lightning payments from a "hot" wallet into...
...your airgapped hedgehog wallet without needing to do any base layer transactions

- if exchanges like kraken or swan add support for hedgehog, any user who has monthly or weekly autobuy enabled could receive these regular purchases of bitcoin directly into a...
...hedgehog wallet -- hot or cold -- and be able to spend the money on lightning or hedgehog as soon as it confirms, without needing to come online til they want to actually spend the money

- if you are sending someone money and your recipient is *on*line, you can use a...
...hedgehog wallet as a regular lightning wallet

- if your recipient is *not* online, you can pay them by making a unilateral channel for them on the base layer, and to do that you just need to be willing to pay a base layer tx fee and know one of their...
...pubkeys (technically that part is optional, as you can just make up a keypair for them -- though I personally wouldn't trust a keypair that some rando made up for me and I would sweep all funds from such a channel whenever I next got online)

- if your recipient is...
...not online and you don't want to incur a base layer fee, you can make a "virtual" (i.e. custodial) unilateral channel for them and deposit whatever amount you want to pay them into that. You can then send them its details and go offline, and they can sweep it...
...whenever they next get online, without any further help from you (i.e. you don't need to be online when they sweep the funds! They just need the bridge server to be online)

- this emulates asynchronous lightning payments pretty effectively, without the need for...
...the sender to run a server or rely on a third party custodian. But there is a "first party" custodian -- the sender retains custody of the funds in a virtual channel until the recipient sweeps them. And there is a third party bridge server, who can...
...censor payments, though if that happens, the sender can just retry with a different bridge server and stop using the old one

- it also emulates "pull" payments, which are useful for subscriptions. If you want to subscribe to twelve months of bitflix, you can send...
...bitflix twelve virtual channels where each one has a timelock on the virtual channel opening transaction. This effectively means that the first virtual channel cannot be used til 1 month goes by, the second one cannot be used til 2 months go by, etc. As each timelock...
...expires once per month, a single virtual channel becomes usable each month. This allows bitflix to sweep funds from one channel per month, thus "pulling" pre-authorized funds from your wallet according to a predetermined schedule

- if you ever want to cancel...
...such a subscription, just make a new transaction with the bridge server overwriting all the remaining virtual channels you gave to bitflix. The bridge server will then stop treating the virtual channels as valid, because they can no longer redeem the money in them...
...even if it comes to their side of the virtual channel, so bitflix can't use them anymore either, and thus your subscription is effectively canceled

- all of this can work just fine today without waiting for bitcoin *or* lightning to upgrade -- which I think is just amazing!

• • •

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

Keep Current with Super Testnet

Super Testnet 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 @super_testnet

Oct 4, 2023
How long to a trillion?

This is how long it took the US government to rack up its trillions in debt:

1 trillion: 1776-1981 = 205 years
2 trillion: 1981-1986 = 7 years
3 trillion: 1986-1990 = 4 years
4 trillion: 1990-1992 = 2 years
5 trillion: 1992-1996 = 4 years
6 trillion: 1996-2002 = 8 years
7 trillion: 2002-2004 = 2 years
8 trillion: 2004-2005 = 1 year
9 trillion: 2005-2007 = 2 years
10 trillion: 2007-2008 = 1 year
11 trillion: 2008-2009 = 1 year
12 trillion: Q1 2009 - Q4 2009 = 9 months
13 trillion: Q4 2009 - Q2 2010 = 6 months
14 trillion: Q2 2010 - Q4 2010 = 6 months
15 trillion: 2010 - 2011 = 1 year
16 trillion: Q4 2011 - Q3 2012 = 9 months
17 trillion: 2012 - 2013 = 1 year
18 trillion: 2013 - 2014 = 1 year
19 trillion: 2014 - 2016 = 2 years
20 trillion: 2016 - 2017 = 1 year
Read 6 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

Don't want to be a Premium member but still want to support us?

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!

:(