How Lightning Labs "loop in" with p2tr work?
I was sure that I'm generally know how submarine swaps work, but it seems like I need a serious update to my knowledge. Maybe it's some new taproot magic.
When I do a "loop in" on modern lnd/loop/loopd, I get a p2tr address to which I send the payment. Let's consider such an address for one of my own loop ins.
I expected that for a submarine swap, the side who does "loop in" gets a hash for an unknown preimage for making the invoice. Then I make an invoice, receive a "payment" (which I cannot redeem until I learn the preimage), then I send payment to an on-chain address that can be sweeped by my loop counterparty only by revealing the preimage. The counterparty sweeps, I see the preimage, I settle the invoice, all done.
What I really see is that after my on-chain payment gets approximately 3 confirmations, nobody sweeps the destination p2tr address, but I get my invoice settled and lnd channel balance topped up. Several hours later I see a transaction sweeping that p2tr address among others, but the transaction seems not to use any "script path" (I'm unsure on this part, maybe mempool.space just can't display taproot scripts).
How did I get the incoming lightning payment before the on-chain destination was swept? Is it some optimized happy path for loop in, maximizing privacy and user satisfaction?
I suppose that loop in is non-custodial, otherwise my questions don't make sense. Please correct me here if I'm wrong.
from Recent Questions - Bitcoin Stack Exchange https://ift.tt/8AsaEeq
via IFTTT