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#Q1ycXiC3fcsRbIYUVBxMFDQZAqKbW5PHWZdhqkj0P8AOriginal post:
https://twitter.com/robin_linus/status/1723343871067804060 Published at
2023-11-12 10:24:17Event JSON
{
"id": "2562dcbd7bcf1b800c3b8efd6ac7c29b8fef4d6b076a4297a1a9c85a53f80606",
"pubkey": "50d94fc2d8580c682b071a542f8b1e31a200b0508bab95a33bef0855df281d63",
"created_at": 1699784657,
"kind": 1,
"tags": [
[
"r",
"https://mega.nz/file/rVsF1RQS#Q1ycXiC3fcsRbIYUVBxMFDQZAqKbW5PHWZdhqkj0P8A"
],
[
"r",
"https://twitter.com/robin_linus/status/1723343871067804060"
],
[
"r",
"https://image.nostr.build/8a31466566bb0ab73c60d246df35c33e1416b428878cde169e5f3673a54a9bfe.jpg"
]
],
"content": "\nI've implemented a BitStream proof of concept by Robin Linus in Cashu for atomic swaps between files and Lightning payments.\n\nAtomicity is achieved via a \"Nutbond\" Ecash contract which can be challenged if the downloaded file doesn't decrypt right.\n\nAn explainer and demo video is linked below.\n\nHow it works:\n- Clients requests download\n- Server sends encrypted file, Lightning invoice \u0026 Nutbond\n- Client verifies bond and pays LN invoice\n- Client decrypts file with LN preimage\n- If decrypt fails, client challenges Nutbond \u0026 gets refund\n\nSome notable differences to the original proposal:\n- Nutbonds are issued for each user, not per file\n- Bond doesn't burn but acts as a refund to user\n- No Merkle trees yet. Next logical step. Vibes well with BitTorrent.\n- Bond is Ecash. Payment is on LN, could also be Ecash.\n\nThis took me a few hours to implement showing how easy it is to experiment with new contracting primitives in Cashu.\n\nBitcoiners are coming up with beautiful solutions for practical problems. Special thanks to Robin for sharing his cool ideas with us. Love the energy!\n\n🎥👇 Demo (10 min):\n\nhttps://mega.nz/file/rVsF1RQS#Q1ycXiC3fcsRbIYUVBxMFDQZAqKbW5PHWZdhqkj0P8A\n\nOriginal post: https://twitter.com/robin_linus/status/1723343871067804060\n\nhttps://image.nostr.build/8a31466566bb0ab73c60d246df35c33e1416b428878cde169e5f3673a54a9bfe.jpg",
"sig": "e33ccbcb5d93ce374b88db07b0bcc3104e95fdcfef8445bb09abc4c5d3374cc806d214cf41dbba1223ee2e39739eb58d79a04b122d14740b0b927aa60ae0ed97"
}