P2P Cross Chain Atomic Swap
Project description
Tannhauser Gate Atomic Swap
Video Showcase (YouTube)
Installation
python3 -m venv venv
. venv/bin/activate
pip install TannhauserGate
tannhauser
Depends
Tannhauser Gate depends at Tor, BitcoinCore and LitecoinCore. Please install it first. You will find sample config files here.
Showcase
-
Start the client and connect to Tannhauser Gate:
-
Take a look at the current conditions like rates, minimum/maximum and the minimum bond:
-
Load your wallet. First time users have to initiate a new wallet and fund it:
-
Initiate your atomic swap and choose your direction. In this showcase we swap Bitcoin for Litecoin:
-
Enter the amount you want to swap:
-
After hitting OK you will get an updated summary of your atomic swap with all relevant data:
-
If you feel fine hit "Send". After this you get a success message and the transaction ID:
-
Save your swap:
-
Now you can lean back, grab a coffee and enjoy an automatic atomic swap. The client will check your swap every minute. You have nothing to do - at this point all runs automatically. You can "PAUSE" the check at any time but its not recommended. First we have to wait for the bond confirmation:
-
If confirmed Tannhauser Gate will send the Litecoin amount:
-
Your client check this Litecoin transaction and send the leftover amount to your swap HTLC address after one confirmation:
-
At this point you have send the complete amount you want to swap. Tannhauser Gate will wait for one confirmation:
-
After one confirmation Tannhauser Gate will withdraw the bond and swap amount and the secret will be revealed to the blockchain:
-
The client extract the secret from the transaction and withdraw the Litecoin funds from the HTLC address:
-
A quick balance check shows the newly arrived Litecoin funds:
Transactions:
FAQ:
How to get the secret:
The different results:
All went fine:
Case: The amount is less than agreed or not in time. Result: Swap failed. You lost your Bond. Swap refund is possible:
Case: You dont send the swap amount at all. Result: Swap failed. You lost your Bond. No refund possible:
Case: For any reason Tannhauser dont accept the swap. Result: Swap failed. Bond refund possible:
Configuration
Notes
Tannhauser Gate is a simple POC for an automatic atomic swap service. Tannhauser is still in development mode - so use it at your own risk. For the Litecoin connection Tannhauser uses a customized version of python-bitcoinlib. There is a simple GUI as wrapper for easy handling. The GUI is a little bit guerrilla - but it does the job. So if you are a QT wizard - feel free to make a PR. The GUI uses a different (additional) library for RPC in contrast to the CLI. For some reason the GUI produces a broken pipe error at irregular intervals and I don't have time to look into it at the moment. The main goal of the development is a simple p2p client, where the user can be both maker and taker. Until then you can swap smaller amounts with Tannhauser. For Tannhauser there is a general refund window of 2 hours. Refunds for the user are possible after 1 hour or after 2 hours (Bond).
Donations
I do not accept donations. If you have some sats left donate them to the Torproject or to the EFF.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for TannhauserGate-0.2.9.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d490c056dd834449a5273f33267a2d92405e860d35c58d7d138ccd011f36a90a |
|
MD5 | 1e11a2dcc9368b5c55534248aaf8a691 |
|
BLAKE2b-256 | f4f49fa70b5d34fb5b168a4ab908a1ad062095c559f31716445f30c08ad7d9c7 |
Hashes for TannhauserGate-0.2.9.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e0358e7a4ea566105cdd49f543d7b03ad35b4ac7db2163a1762a69ef304c5b2 |
|
MD5 | 4f82f54b1e09cbc2d82702a1c8ee7925 |
|
BLAKE2b-256 | 9310f790d68d8c9965b117492c4d08534d4712832b83ebd6bff7d3a2cb61f6df |