0 sats \ 0 replies \ @aftermath OP 12 Apr 2023 \ parent \ on: Submarine Swaps Guide bitcoin
I haven't verified the source code of all these solutions, and some do not even have it open so I can't say they are all using the same logic, but given the properties of the contract it wouldn't make much sense to do it differently.
Regarding the speed of the swap, what some services do is to accept 0 confirmation transactions, that is, you send via lightning and they send you on-chain but the UI shows a successful message immediately and does not wait for the transaction they sent to confirm.
Boltz offers this option when swapping out, Muun offers turbo channels and WoS is likely to be using something similar.
And for swap ins, the user does not create the contract but the service does, and they set the miner fee as well so it's likely that they accept 0 confirmation transactions because they make sure the fee is high enough to be confirmed within the contract time (and they can bump it up if fees increase suddenly).