What is Nostr?
calle 👁️⚡👁️
npub12rv…85vg
2023-11-12 10:24:17

calle 👁️⚡👁️ on Nostr: I've implemented a BitStream proof of concept by Robin Linus in Cashu for atomic ...


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

Author Public Key
npub12rv5lskctqxxs2c8rf2zlzc7xx3qpvzs3w4etgemauy9thegr43sf485vg