Bitcoineros!
My name is Kilian and I am Co-Founder of Boltz. Boltz started out as a simple non-custodial swap service between lightning and mainchain in early 2019. Since the beginning, we have been focused on pushing the adoption of the Lightning network and by now we are running some of the largest nodes on the network, integrated CLN as additional implementation into our backend and recently added liquid swaps.
Our vision is to build out Boltz to become Bitcoin's Layer 2 bridge.
Topics to ask me about: Bitcoin Liquid Lightning Layer 2s API Atomic/Non-custodial Swaps Competition/Differentiation Vision and Mission
160 sats \ 1 reply \ @anon 5 Dec 2023
Can you ELI5 how atomic swaps work? How are LNBTC transformed to onchain BTC? What is the difference to services like deezy.io? Regarding privacy and onchain footprints...can i use noncustodial swaps instead of coinjoins?
reply
Sure, on a basicl level an atomic swap consists of two phases
  1. the set up phase: both parties, user and Boltz, lock up funds to be swapped. Usually one part on lightning and one part on the chain. Special crypto trick is: both payment are locked with the same key, the so-called "preimage that always the user has.
  2. Once that is done and both sides locked up funds, user unlocks the incoming payment from Boltz. This unlocking is "public" so Boltz gets to see the preimage and can use it to unlock its incoming payment.
Tada, we exchanged two payments non-custodially. For the more in-depth version and a demo you can watch https://youtu.be/ghtKBqA-5T0?t=353
For comparison with coinjoin, see my answer below: #339271
reply
Just used Boltz for the first time yesterday. Great experience. I understand how Boltz could be used to gain inbound liquidity on my own nodes, but I am more wondering the privacy implications of using a custodial LN provider like Strike or CashApp. From a tracking standpoint, how does the process of Strike —> Boltz —> hardware wallet compare to a coinjoin. It seems like it should be “better” than a single cycle but am not sure how to compare the two any further.
Thanks!
reply
Good question. It's very different from a coinjoin, as your coins are not joined with anyone to "hide among others". You are simply swapping your coins on lightning for our coins on e.g. liquid (Boltz is always the counterparty in a swap).
You nevertheless have a nice privacy gain with Boltz swaps because the two transactions of a swap are de-linked, stopping anyone tracing the transaction graph. In layman terms: it's pretty hard to figure out that a particular transaction on the chain is related to a Boltz swap. Additionally, if you swap to Liquid, confidential transactions provide increased privacy by hiding amounts. You can learn more about it here: https://help.blockstream.com/hc/en-us/articles/900001390743-How-does-Liquid-keep-my-transaction-data-confidential-
To summarize, boltz swaps and coinjoins are very different in functionality and goals, but we recently started exploring payjoin, which would further increase privacy: https://gist.github.com/DanGould/425bde63ca13da238071a7935bb3ea3f
reply
Love the fact you’re interested in payjoin. Was about to ask about that 😁
Are you approaching that from a viewpoint of reducing fees or user privacy? Or both?
reply
Both! And it was Dan really that got the ball rolling, all credit goes to him!
reply
Agree. @dangoulddev is the man
reply
When do you think you'd be adding payjoin? How would that work with a swap (I understand you need at least 2 or 3 UTXO'S with change)
reply
Definitely not this year. Honestly can't really promise anything and we still need to give it a proper look to decide how it will work. How it could work for the two different swap directions is outlined here, but as you can see Dan highlighted some issues https://gist.github.com/DanGould/425bde63ca13da238071a7935bb3ea3f
reply
TBH I personally dont see how that would work with a swap service, even though I love the idea of pay join.
Maybe with LN to onchain swaps coordinating with join market or on nostr (joinstr) with an equal output (or a few!) would be cool
reply
Maybe with LN to onchain swaps coordinating with join market or on nostr (joinstr) with an equal output (or a few!) would be cool
Love it, wen github gist?
A link to your website would be handy!
reply
you took more time writing that instead of a quick guulag search :)
reply
I mostly just want OPs in AMAs to provide links to their resources. I know I could find it on my own but I think it should be linked here by OP.
reply
You are absolutely right: https://boltz.exchange/ and if you are typing this instead of pasting you can also use our handy short url: https://bol.tz/
reply
fair enough
reply
deleted by author
reply
Are you planning to add the swap from Liquid to Btc onchain?
reply
Yes @michael1011 is working on it day and night. It's not a small feat and we need to get it right.
reply
Great!
reply
When swaps are even more seamless and users don’t have to think about them, where do you see Boltz key role and services in the marketplace?
Do you want to be more merchant and hobbyist B2B facing for Lightning infrastructure?
Or do you also want to be offering more B2C client services and software in future?
reply
When swaps are even more seamless and users don’t have to think about them
That's precisely what we are working on with new upcoming non-custodial mobile wallets integrating Boltz swaps. User's won't necessarily know that they are doing a Boltz swap, they just "pay a lightning invoice".
where do you see Boltz key role and services in the marketplace?
We will always maintain our web app at boltz.exchange for anyone to be able to swap easily via a browser with any wallet and any lightning implementation, but we see our role as a swap provider that operates in the background. Other projects integrating Boltz and bringing them either to C or to B. That really really depends on what integrations do with Boltz. We are working with both kinds currently. For us: enhancing our API and developer experience is key.
reply
84 sats \ 1 reply \ @kr 5 Dec 2023
what are the biggest lessons you learned from operating one of the world’s largest Lightning nodes?
reply
A ton for sure.
  • The biggest is probably watch out for implementation-specific issues. But it's incredibly hard to detect these early on.
  • That's why bite the bullet and go multi-node, multi-implementation.
  • You need more than one node anyways for maintenance downtimes.
  • The more an implementation let's you control, the better. Take e.g. CLN's plugin system which let's you write your own low-level stuff like your own payment logic if you don't like the one that is shipped with the node. Or completely abstract the database backend.
Will add more as it comes to mind.
reply
Hey name-bro 👋🏻
I used your submarine swap once or twice. When is a mixer coming? 😄😄
reply
reply
But we are not a mixer service and don't plan to become one.
reply
Do you think we will see Lightning channels on Liquid? User nodes could receive into L-BTC LN channels up to a certain balance, and swap to onchain BTC LN at a later point
reply
Whew... The CLN team is definitely not taking too much care of it (not sure if it's even tested or if there are any public liquid lightning nodes), nor does liquid block space really require it plus work is being done to keep 0-conf viable on liquid. So honestly I wouldn't expect it any time soon. It would need a real use case for it to happen. Like liquid itself: >100 sats/vbyte on mainchain.
reply
It would increase privacy by taking even more transactions offchain and coupled with confidential transactions this would be an even bigger privacy boost. So it would be great to see this.
reply
How do you protect against the governmental attack?
reply
By reducing the attack surface. After careful evaluation we set up an entity in El Salvador, where we can operate legally as-is, and use it for very specific stuff only. But so far things are going well and are hopeful for El Salvador to become a safe haven for Bitcoin-only non-custodial services. We also moved our servers out of the cloud, don't use any service that is connected to the U.S. and generally make sure we stay as agile as we can.
reply
Do you censor any bitcoin addresses?
reply
Good question, incredibly difficult topic. We spent many hours debating this in the last months as we grew. Let me try to be very transparent about the outcome:
What? We will "not facilitate swaps involving any of these bitcoin addresses: https://github.com/0xB10C/ofac-sanctioned-digital-currency-addresses/blob/lists/sanctioned_addresses_XBT.txt", 376 as of today. Not more, but also not less.
Why (Short version)? : Because we can't become a tool that is used for serious crime. If we do, we won't make it. And we really want to make it.
Why (Long version)?: Many of our users use Boltz Swaps to increase privacy for very legit use cases, e.g. when depositing or withdrawing from KYCed services like CEXes or as precaution when e.g. moving to cold storage. We will be blocked by these services, the same way many of these services freeze your account if you deposit from addresses that were involved in a mixer/coinjoin. It would render Boltz useless for many of users, while it would help exactly none because we didn't have a single swap involving an OFAC listed address in the past. And anyways most addresses on this list are emptied or otherwise dormant. Also, as we are driving integrations of our API forward, some partners simply require us to be "OFAC compliant" otherwise they can't integrate. Because they are based in the U.S. or otherwise. So far the rational arguments.
I chose to do the risky thing and be blunt. Would love to hear your point of view!
reply
Great service love the app!
reply
🙏
reply
What would you say is the thing that played a bigger role in being integrated with many non-custodial LN wallets such as Breez and Phonex? Was it the FOSS nature of the service? How easy it's to use? A combination of both and other things?
What would you say is the hardest part of managing a service like this one?
reply
What would you say is the thing that played a bigger role in being integrated with many non-custodial LN wallets such as Breez and Phonex?
Would have loved to integrate with Phoenix, we actually talked to the team but they don't want 3rd party dependencies ("if Boltz goes down, part of the app stops working") which we totally understand. Phoenix is shooting for a very polished UX.
Was it the FOSS nature of the service? How easy it's to use? A combination of both and other things?
I think it's simply that we are the only production-grade non-custodial swap service that there is and additionally is not married to one specific lightning implementation and that has an open API.
What would you say is the hardest part of managing a service like this one?
In our case it's prbly the fact that we are a very small team and bootstrapped. We are proud of this fact but it doesn't make it easier and all of us need to "wear a lot of hats".
reply
How can we as bitcoiners help you guys more? Besides using your services an awful lot?
Do you want more eyes on your code, job applications, research, testing? If someone’s building a novel wallet or app, should they reach out and share use cases?
reply
How can we as bitcoiners help you guys more? Besides using your services an awful lot?
Definitely this :)
Do you want more eyes on your code, job applications, research, testing? If someone’s building a novel wallet or app, should they reach out and share use cases?
Very good question. We currently don't have any job applications open, we are a small team and entirely bootstrapped so hiring someone full-time is not a small commitment for us so usually the candidates actually find us, code with us for quite some time (we are doing bounties) and this then happens naturally when there is a fit. Will probably change as we grow.
We indeed would need loads of help with testing. E.g. we are working on a new cli-based client that completely automates swaps and we'd love to get some more beta testers. If you are interested join reach out to me, Kilian, best via our Discord: https://discord.com/invite/QBvZGcW
We also welcome help to connect with projects where our swaps can be useful as native integration: mobile wallets, merchant POSes swapping to cold storage, dca stacking or channel rebalancing tools - many applications and some we probably don't even think about yet
reply
Thanks for sharing! Have you had any vulnerabilities or downtime with your platform? If so what have you learned from them?
reply
We had one significant vulnerability pretty early on: https://blog.boltz.exchange/p/the-problem-with-free-options-69f9f59a2d48. But it was never user funds at risk. Just ours :/ Nothing in recent years.
Downtimes: many. Scroll through our twitter and you'll see the pain we went through. Mostly caused by either crashes of our LND e.g. https://nitter.net/Boltzhq/status/1666434127321522185 or planned restarts of our LND node to do the necessary db compaction. Most significant down time in recent history was back in May because we were unprepared for the fee hike see https://nitter.net/Boltzhq/status/1656013583124242437.
We have learned from this a ton, worked a lot to prevent both from causing significant down time again in the future (second CLN node as failover see #339248, also huge work went into automating our liquidity management) and things look a lot better now.
reply
Thanks for sharing the transparency! Solid feedback!
reply
Nothing to ask, just saying I like the service and used it many times without issues.
reply
reply
No question. Just hats off for the amazing service.
Thank you for all your work. ⚡️
reply
reply
Why is Liquid->Onchain hard from a technical perspective? Isn't it the same as Liquid->Lightning?
reply
It's hard because we want to make these swaps taproot-native right from the beginning to avoid adding a swap type that will be obsolete just a month or two later. So taproot/musig2 is the big thing @michael1011 is currently working on. Liquid<>mainchain swaps itself are very similar to our submarine swaps.
PS: we'll move our existing submarine swaps to native taproot too ✌️
reply
Why use Liquid over fedimint? Fedimints just seem like 1000x better than liquid
reply
Liquid exists
reply
This. It's the only thing we have that is stable and battle-tested. Explorers, wallets (many more to come), dev tooling, even some exchange integrations. It's all there and ready, one just needs to use it. Goes without saying that many things can be improved and goes without saying we'll closely watch Fedi.
reply
need any FE guys?
reply
As in Front End? Too many acronyms here on SN ;)
reply
Do you plan to sell inbound liquidity?
reply
Become an LSP (https://github.com/BitcoinAndLightningLayerSpecs/lsp)? Potentially. We have it in our backlog but not a prio rn.
reply
No question, just want to say thank you. Did my first swap using Boltz just the other day. Super easy. Thanks!
reply
reply
Did you guys just change your website within the last 40mins? it looks different. Also, unless there's something I'm missing, it doesn't appear to be working right now.
reply
We didn't change anything on the site in the past days and definitely not in the last 40 mins. Can you spot what's different?
Regarding not working: I guess you are using LN -> Liquid swaps. So while I was here bragging about almost never running out of liquidity some big swappers came in and brutally emptied out our liquid wallet. We are refilling should be back in some mins. Just try again in a bit. I should watch my mouth.
reply
Okay. The swap is working now. Can confirm.
reply
reply
Do you support/intend to support Liquid USDT?
reply
Not directly (at least for now we plan to stay Bitcoin-to-Bitcoin) but we are working on an idea of a chained atomic swap with @sideswap_io. So one could go from e.g. Lightning -> Liquid USDT via one user interface, just that it's two chained swaps Lightning -> L-BTC via Boltz & L-BTC -> Liquid USDT via sideswap in the background.
reply
Sounds like a good idea as long as fees are more attractive than doing it manually
reply
Sounds like a good idea as long as fees are more attractive than doing it manually
They'll be exactly the same as if you were to do the swaps manually.
reply
If a swap fails, generally why is that? Lack of liquidity on your side? How does the recovery process work?
reply
Lack of liquidity almost never, we got a lot better in managing our liquidity over the past months :)
It's usually due to constraints on Lightning, depending on the direction:
Chain -> Lightning: usually user doesn't have enough inbound capacity (usually personal nodes) or LSP fails to open channel on the fly for X,Y,Z reason (mobile wallets like Phoenix) or route to user is more expensive than our fee threshold (happens when sending to very popular high volume destinations like CEXes) OR some other mobile wallet or implementation-specific weirdness. But for most weirdness we have workarounds in the code by now. If it fails though, users have to go through a refund process and since this is a pain we are constantly improving things on this front.
Lightning -> Chain: if user doesn't manage to route the required amount to us, no biggie. Nothing happened. If user managed to route and we ran out of liquidity (almost never happens as mentioned above), lightning payment just bounces back. So this direction is less problematic.
reply
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
reply
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?
deleted by author
reply
But why would you guys also charge onchain fees for swapping BTC/LN even though the users is already paying onchain fees to send their sats to Boltz ?
Because Boltz swaps are non-custodial, every seemingly one-way transactions actually consists of two transactions: lockup and claim. See my basic explanation of how atomic swaps work above: #339303. Meaning, for chain to Lightning swaps the user is already paying for sending aka locking the funds like you said but still needs to pay for Boltz claiming the funds. That's why the charged network fees here are roughly half of the other direction.
So Atomic swaps always have a higher chain footprint than custodial swaps, because they require two transactions instead of one. But we are convinced 100% non-custodial is the only way forward, we think Liquid is really handy where network fees are low.
Is RSK dead ? No, they have an ecosystem. Not as big as others of course but projects like https://sovryn.com/ or https://moneyonchain.com/ have adoption.
Will you guys also cough cough supports swapping to whatever incoming drivechain/sidechain in the future ?
We are constantly monitoring and looking very closely before we decide to integrate swaps for a new layer. In general we move rather slow with this. We carefully evaluate adoption, soundness security-wise and verifiable 1:1 mainchain backing is also a requirement.
reply