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
_______________________________________________
Lightning-dev mailing list
Lightning-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev

Reply via email to