638a169a04
The request-response behaviour that is used for sending the transfer proof actually has a functionality for buffering a message if we are currently not connected. However, the request-response behaviour also emits a dial attempt and **drops** all buffered messages if this dial attempt fails. For us, the dial attempt will very likely always fail because Bob is very likely behind NAT and we have to wait for him to reconnect to us. To mitigate this, we build our own buffer within the EventLoop and send transfer proofs as soon as we are connected again. Resolves #348. |
||
---|---|---|
.cargo | ||
.github | ||
monero-harness | ||
monero-rpc | ||
swap | ||
tokio-tar | ||
.gitignore | ||
bors.toml | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE | ||
README.md | ||
rust-toolchain | ||
rustfmt.toml |
XMR to BTC Atomic Swap
This repository hosts an MVP for atomically swapping BTC to XMR. It implements the protocol described in section 3 of this paper.
Quick start
- Download the latest release for your operating system
- Run the binary:
./swap buy-xmr --receive-address <YOUR MONERO ADDRESS>
- Follow the instructions printed to the terminal
Limitations
For now, the MVP is limited to testnet3
on Bitcoin and stagenet
on Monero.
How it works
This repository primarily hosts two components:
- the
swap
CLI - the
asb
service
swap CLI
The swap
CLI acts in the role of Bob and swaps BTC for XMR.
See ./swap --help
for a description of all commands.
The main command is buy-xmr
which automatically connects to an instance of asb
.
asb service
asb
is short for automated swap backend (we are open to suggestions for better names!).
The service acts as the counter-party for the swap
CLI in the role of Alice.
It provides the CLI with a quote and the liquidity necessary for swapping BTC into XMR.
Contact
Feel free to reach out to us in the COMIT-Monero Matrix channel.