calle 👁️⚡👁️ on Nostr: Yes, I think it can be done via an atomic swap using HTLCs: - You share your pubkey ...
Yes, I think it can be done via an atomic swap using HTLCs:
- You share your pubkey with me and your order ("I want to trade 100 sat against $0.10”)
- I generate an HTLC preimage and lock 100 sat to it and to your pubkey and share the ecash with you, together with my pubkey
- If you like what you see, you lock $0.10 to the same HTLC hash as me and to my pubkey and send the ecash to me
- If I like what I see, I spend your $0.10 ecash by unlocking the HTLC, you obtain the preimage from the mint (using /check) and unlock my 100 sat with it.
We've traded 100 sat against $0.10.
Published at
2024-05-01 09:39:32Event JSON
{
"id": "a15286a50799eb868a65641a39e2a95704c2ba88d7beb99a03558638858bec5d",
"pubkey": "50d94fc2d8580c682b071a542f8b1e31a200b0508bab95a33bef0855df281d63",
"created_at": 1714556372,
"kind": 1,
"tags": [
[
"e",
"0b28d409ef37bdd8c051bc269e35501e91c74bad90872cc348997693cb6dec1d",
"",
"root"
],
[
"e",
"0b28d409ef37bdd8c051bc269e35501e91c74bad90872cc348997693cb6dec1d",
"",
"root"
],
[
"e",
"a4e2d5b4c733928effdb0206a82619ebc0680f9153c811e15647777c9f88da9a",
"",
"reply"
],
[
"p",
"50d94fc2d8580c682b071a542f8b1e31a200b0508bab95a33bef0855df281d63"
],
[
"p",
"7adb520c3ac7cb6dc8253508df0ce1d975da49fefda9b5c956744a049d230ace"
]
],
"content": "Yes, I think it can be done via an atomic swap using HTLCs:\n\n- You share your pubkey with me and your order (\"I want to trade 100 sat against $0.10”)\n- I generate an HTLC preimage and lock 100 sat to it and to your pubkey and share the ecash with you, together with my pubkey\n- If you like what you see, you lock $0.10 to the same HTLC hash as me and to my pubkey and send the ecash to me\n- If I like what I see, I spend your $0.10 ecash by unlocking the HTLC, you obtain the preimage from the mint (using /check) and unlock my 100 sat with it.\n\nWe've traded 100 sat against $0.10.\n",
"sig": "db071558adcc946ecc457562d9f5feda4b01447fe7447d4cb7bd4c2ef1fa5231f92175af05f948f80535451fbbe6f8aa1f607fb7705cd3b97648b2094de6b0dd"
}