pull down to refresh

If a swap fails, generally why is that?
for me so far is 1. lockup failed 2. failed to pay LN invoice due to not enough inbound liquidity or no route
Refund Process a. wait after the lock time and go to refund page b. upload the refund file c. input a Bitcoin address for refund, done.
Again, choose a low-fee time for a refund because the fee would be deducted from your refund sats!
But I'm really curious how the refund works under the hood? how can it be so automatic 👀 @boltz
Hello Natalia, are you aware that this AMA is only happening because of you? So big THANK YOU for luring us onto Stacker News!
Re your questions:
  1. lockup failed
Don't remember if you told us already: but was the reason that you locked up too little e.g. the network fee was deducted from the amount by your wallet?
But I'm really curious how the refund works under the hood? how can it be so automatic 👀
Haha, a lot of magic happening. No but really: what is happening is that there is a "refund path" when you are locking up coins on the chain that can be used after the timeout blockheight if you know a set of secret information only you have. This info is stored in your browser as well as the refund file if you downloaded it. Here an example of what information a refund file contains:
{"id":"G8LwLT","asset":"BTC","privateKey":"f3ac710b058726ceeee17e7aebcbad64b4222b3aa02f14bbc027a50c34322308","redeemScript":"a914c8bd6f30ae123f70961fdeaaec471ced3f2efb9687632102c89b401b7902c000640f39c54e9a4fac2c5b7fbbc19a222f7f2a96955d0061c5670331c926b17521020e045994c22ce920d04418c517446fec0837e09467a0e31fadd09871966de53968ac","timeoutBlockHeight":2541873}
So what is concretely happening that our web app locally in your browser crafts and submits the refund transaction when you use https://boltz.exchange/refund.
Let me know if you want more depth on that
reply
are you aware that this AMA is only happening because of you? So big THANK YOU for luring us onto Stacker News!
my pleasure!
but was the reason that you locked up too little e.g. the network fee was deducted from the amount by your wallet?
yes, I was playing around with Boltz for different situations so that I could have more fun things to share 😂 learning opportunities can be created:) haha
what is happening is that there is a "refund path" when you are locking up coins on the chain that can be used after the timeout blockheight if you know a set of secret information only you have.
this is so cool! curious what would happen in a failed swap - if the user didn't download anything and accidentally closed the browser, then how can he prove that he is the one to refund to?