Update docs/liquid/liquid-part3.md
This commit is contained in:
parent
8fbd660964
commit
aa022e1375
@ -26,11 +26,11 @@ Liquid would make a great solution for this case. They could simple direct their
|
||||
|
||||
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.
|
||||
We could build some type of typical web-stack of NodeJS / SQL that would accept Asset A and then issue Asset B once received...however as we said our StackerNews crew is smart and therefore prefers to do *less hard work*. Moreover all of the above lends itself to risk of fraud and counterparty default.
|
||||
|
||||
Luckily, due to the additional OPCODEs in Liquid, Atomic Swaps are supported[^2]. In fact, [Blockstream has a tool](https://github.com/Blockstream/liquid-swap) to simplify using it[^3].
|
||||
|
||||
To do a swap we will need another wallet, as you can't swap between the same wallet (techically you can use the *same node* and use 2 different wallets on that node[^4]). 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.
|
||||
To do a swap we will need another wallet, as you can't swap between the same wallet (techically you can use the *same node* and use 2 different wallets on that node[^4]). In my case, I have 2 nodes each running their own `elementsd` server (Umbrel and my desktop). So I will use those, but you can use a single node by setting up mutliple wallets and using distinct URL connect strings for each.
|
||||
|
||||
Before we start, let's look at state of our 2 wallets:
|
||||
|
||||
@ -49,7 +49,7 @@ Before we start, let's look at state of our 2 wallets:
|
||||
```
|
||||
|
||||
The Blockstream Liquid Swap tool mentioned previously works both in CLI and GUI mode. So for this example we will use CLI for Node1 and GUI for Node 2.
|
||||
The swap offer (proposal) is StackerNews Airline (Node 1) is willing to accept a SND token and return to the client 2,300 sats (approx $1 USD currently). So Node1 makes the following proposal:
|
||||
The swap offer proposal is: StackerNews Airline (Node 1) is willing to accept a SND token and return to the client 2,300 sats (approx $1 USD currently). So Node1 makes the following proposal:
|
||||
|
||||
```
|
||||
# Node 1 - StackerNews Airline, Inc.
|
||||
@ -101,7 +101,7 @@ Now lets review the state our wallets post swap:
|
||||
|Post-Swap: L-BTC| 129180 sat | 12656 sat |
|
||||
|TOTAL FEES PAID| 251 sat | 291 sat |
|
||||
|
||||
(NOTE: Obviously the workflow here is a little clunky with the back-and-forth Propsal/Accept/Finalize routine, but I wanted the steps to be transparent. In a production case this would be built into the service and client app.)
|
||||
(NOTE: Obviously the workflow here is a little clunky with the back-and-forth Propsal/Accept/Finalize routine, but I wanted the steps to be transparent. In a production case this would be built into the service and client app such that the proposal and acceptance strings were automiatically transferred between the parties.)
|
||||
|
||||
## Securities / Transfer Restricted / etc
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user