ZmnSCPxj [ARCHIVE] on Nostr: 📅 Original date posted:2022-10-11 📝 Original message: Good morning Joe, > > ...
đź“… Original date posted:2022-10-11
📝 Original message:
Good morning Joe,
> > Unfortunately, only the first sub-protocol (onchain-to-offchain)
> > is actually forwardable.
>
>
>
> I think it's possible to forward offchain-to-onchain swap as well, by
> just making a payjoin tx by net receiver (initiator) and net sender.
>
> Let me explain it in a bit more detail.
>
> IIUC, In currently deployed swap servers like lightning loop and
> boltz, there is a feature called prepayment. In case of
> offchain-to-onchain swap (i.e. loopout), initiator pays a small
> off-chain fee to the swap server for them to make onchain tx, it works
> as a DoS prevention.
>
> The reason this works is because those swap servers are not
> pseudonymous. So users are fine to put small trust against them.
>
> This is not the case In your protocol (or peerswap in general). So
> there is a risk that after the user has paid prepayment, the responder
> simply ignores and does nothing.
>
> I suppose this can be avoided by paying this DoS prevention fee with
> onchain tx. initiator and responder makes a Payjoin tx which pays a
> small amount to the responder.
>
> In this way, the prepayment and the responder’s duty (i.e. to create a
> first HTLC/PTLC tx for the swap) are atomic.
>
> And with the additional anonymity bonus that payjoin brings.
The offchain-to-onchain swap protocol is intended to be used by end-users to pay onchain when all their funds are in a Lightning channel.
Thus, there is the possibility that the end-user has no onchain funds to payjoin into the onchain HTLC, only Lightning funds, and the only way to get it out is to swap it out to onchain, hence, catch-22.
Regards,
ZmnSCPxj
Published at
2023-06-09 13:07:04Event JSON
{
"id": "81d0f043dca3c1a0634da6285e0ae45c2f071cbe86410986321a275aa7a911d4",
"pubkey": "4505072744a9d3e490af9262bfe38e6ee5338a77177b565b6b37730b63a7b861",
"created_at": 1686316024,
"kind": 1,
"tags": [
[
"e",
"297fed99fa3fe6a78c6a64856aa9312577febc417828d48a9c8cf1acfaf01a34",
"",
"root"
],
[
"e",
"8b4a5cb903993ad0e4e1890f08d8c4f050cdfdabcaaa5b6ac6688b57ae369b84",
"",
"reply"
],
[
"p",
"4505072744a9d3e490af9262bfe38e6ee5338a77177b565b6b37730b63a7b861"
]
],
"content": "📅 Original date posted:2022-10-11\n📝 Original message:\nGood morning Joe,\n\n\u003e \u003e Unfortunately, only the first sub-protocol (onchain-to-offchain)\n\u003e \u003e is actually forwardable.\n\u003e \n\u003e \n\u003e \n\u003e I think it's possible to forward offchain-to-onchain swap as well, by\n\u003e just making a payjoin tx by net receiver (initiator) and net sender.\n\u003e \n\u003e Let me explain it in a bit more detail.\n\u003e \n\u003e IIUC, In currently deployed swap servers like lightning loop and\n\u003e boltz, there is a feature called prepayment. In case of\n\u003e offchain-to-onchain swap (i.e. loopout), initiator pays a small\n\u003e off-chain fee to the swap server for them to make onchain tx, it works\n\u003e as a DoS prevention.\n\u003e \n\u003e The reason this works is because those swap servers are not\n\u003e pseudonymous. So users are fine to put small trust against them.\n\u003e \n\u003e This is not the case In your protocol (or peerswap in general). So\n\u003e there is a risk that after the user has paid prepayment, the responder\n\u003e simply ignores and does nothing.\n\u003e \n\u003e I suppose this can be avoided by paying this DoS prevention fee with\n\u003e onchain tx. initiator and responder makes a Payjoin tx which pays a\n\u003e small amount to the responder.\n\u003e \n\u003e In this way, the prepayment and the responder’s duty (i.e. to create a\n\u003e first HTLC/PTLC tx for the swap) are atomic.\n\u003e \n\u003e And with the additional anonymity bonus that payjoin brings.\n\nThe offchain-to-onchain swap protocol is intended to be used by end-users to pay onchain when all their funds are in a Lightning channel.\nThus, there is the possibility that the end-user has no onchain funds to payjoin into the onchain HTLC, only Lightning funds, and the only way to get it out is to swap it out to onchain, hence, catch-22.\n\nRegards,\nZmnSCPxj",
"sig": "abc1b7e74dc5a30187048bc98d69532da82e6c395c76e8f2657ce72b529cdad708bb1fb0983173197659356dcf06e5b987df1b6a309e960f80c93c62b8ebdff5"
}