Damus
calle profile picture
calle
@calle

I've implemented a BitStream proof of concept by Robin Linus in Cashu for atomic swaps between files and Lightning payments.

Atomicity is achieved via a "Nutbond" Ecash contract which can be challenged if the downloaded file doesn't decrypt right.

An explainer and demo video is linked below.

How it works:
- Clients requests download
- Server sends encrypted file, Lightning invoice & Nutbond
- Client verifies bond and pays LN invoice
- Client decrypts file with LN preimage
- If decrypt fails, client challenges Nutbond & gets refund

Some notable differences to the original proposal:
- Nutbonds are issued for each user, not per file
- Bond doesn't burn but acts as a refund to user
- No Merkle trees yet. Next logical step. Vibes well with BitTorrent.
- Bond is Ecash. Payment is on LN, could also be Ecash.

This took me a few hours to implement showing how easy it is to experiment with new contracting primitives in Cashu.

Bitcoiners are coming up with beautiful solutions for practical problems. Special thanks to Robin for sharing his cool ideas with us. Love the energy!

πŸŽ₯πŸ‘‡ Demo (10 min):

https://mega.nz/file/rVsF1RQS#Q1ycXiC3fcsRbIYUVBxMFDQZAqKbW5PHWZdhqkj0P8A

Original post: https://twitter.com/robin_linus/status/1723343871067804060

2428❀️42πŸ€™26πŸ‘€5πŸš€4πŸ’œ3⚑2
MSServices Global · 118w
Thanks for the work and updates to both of you! Keep it up!πŸ‘πŸ‘πŸ‘
Michael Anton Fischer · 118w
My head is trying to wrap itself around fully around what you just said… so you mean we could essentially make fully offline Lightning payments?
Kc · 118w
How do you know the downloaded file will decrypt to something useful and not to random garbage?
captjack πŸ΄β€β˜ οΈβœ¨πŸ’œ · 118w
#bitvm #bitstream #cashu #bitcoin #poc #proofofconcept beta testing ready folks #atomic #swaps #plebchain
Don Hackote · 118w
Awesome!!!πŸ’ͺπŸ’ͺπŸ’ͺ
Colby Serpa · 118w
Hi Calle! I’m Colby, the guy mentioned at the bottom of the BitStream paper. Robin and I worked on it all year! It’s great to see traction like this. If you want to use Merkle Trees capable of file storage, check out these Merkle DAG Trees. These new trees have smaller branches than IPFS Merkl...
Jack⚑️ · 118w
You had me at Nutbond
Big Barry Bitcoin · 118w
This is really cool. So with something like this, do we start to identify files by their decrypted hashes? I know torrents do this, but we can always get a hash of a virus paired with the name of a file you want. At the end of the day, Torrents never really solved the issue of getting what you want...
Azz · 118w
So, for the non technical... Is it pay to view?
Max · 118w
I heard you like 'em trees. But how about the scionic merkel dag trees? https://www.hornetstorage.com/
mutatrum · 118w
Downsized video so it can be embedded. https://video.nostr.build/1bb1603219587b9bdebc9625ac08bfb9e3b2cccee6482d9989bb79c327e0bf41.mp4
Sound Money Bitcoin · 118w
Waiting for your application
. · 118w
ser, you crush so hard
Rijndael · 118w
Ser. Why isnt the demo served up via bitstream?
Kirk · 118w
serious question: do you ever sleep?
d_viant · 118w
What if the file isn't necessarily what the client was looking for? (i.e. I upload a file called Terminator Movie, but it's actually Star Wars or just the first 30 minutes of the movie or even some kind of malware). Would that punishment just be reputation since the file could still be decrypted pro...
El presidente Eloy Musketti · 116w
Is there a way to swap a privatekey with a balance known but not address or pubkey to a buyer?