Update docs/liquid/liquid-part3.md

This commit is contained in:
b0xxer 2024-02-02 15:11:59 -06:00
parent de6e8ff489
commit 67c395d2a8

View File

@ -24,13 +24,11 @@ Liquid would make a great solution for this case. They could simple direct their
## Atomic Swaps
Atomic Swaps allow two parties to exchange different tokens without the need for a 3rd party, eliminating most of the risk of fraud and counterparty default.
In this case, our Customer has earned 1 SND token (which for our purposes is our pretend airline mile token) via previous purchases and he wants to exchange that for L-BTC. How do we do that?
In this case, let's suppose our Customer has earned 1 SND token (which for our purposes is our pretend airline mile token) and now he wants to exchange that for L-BTC. How do we do that?
We could build some type of webservice that had SQL databases and nodejs files that accept Asset A and then issued Asset B once received...however as we said our StackerNews crew is smart and therefore prefers to do *less hardwork*. Moreover all of the above lends itself to risk of fraud and counterparty default.
Luckily, due to the additional OPCODEs in Liquid, atomic swaps between assets are possible. In fact, Blockstream has a tool to simplify using it.
Luckily, due to the additional OPCODEs in Liquid, Atomic Swaps are supported[^2]. In fact, Blockstream has a tool to simplify using it.
Obviously to do a swap, we will need another wallet, as you can't swap between the same wallet (you can use the *same node* but use *different wallets*. You can refer to individual wallets in the swap-tool URL connect string by using the `http://user:password@localhost:7041/wallet/walletname` path). In my case, I have 2 nodes each running their own `elementsd` server (Umbrel and my desktop). So I will use those, but point is this can be done one a single node by setting up mutliple wallets and using distinct URL connect strings.
@ -139,3 +137,5 @@ Yes, probably one of the best ways to do that is to use it as a *staging area* f
[^1]: BlockStream Green, AQUA, Anser (web wallet), Specter, Marina (web wallet)
[^2]: Atomic Swaps allow parties to exchange different tokens directly without the need for a 3rd party, eliminating most of the risk of fraud and counterparty default.In fact, Blockstream has a tool to simplify using it.