Bitcoin–Monero Cross-chain Atomic Swap
Go to file
bors[bot] 0032e820af
Merge #512
512: Bump libp2p from 0.37.1 to 0.38.0 r=thomaseizinger a=dependabot[bot]

Bumps [libp2p](https://github.com/libp2p/rust-libp2p) from 0.37.1 to 0.38.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/libp2p/rust-libp2p/releases">libp2p's releases</a>.</em></p>
<blockquote>
<h2>v0.38.0</h2>
<p>See individual <a href="https://github.com/libp2p/rust-libp2p/blob/HEAD/CHANGELOG.md">changelogs</a> for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/libp2p/rust-libp2p/blob/master/CHANGELOG.md">libp2p's changelog</a>.</em></p>
<blockquote>
<h2>Version 0.38.0 [2021-05-17]</h2>
<ul>
<li>Update individual crates.
<ul>
<li><code>libp2p-core</code></li>
<li><code>libp2p-gossipsub</code></li>
<li><code>libp2p-noise</code></li>
<li><code>libp2p-pnet</code></li>
<li><code>libp2p-wasm-ext</code></li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="0b7ee3fa92"><code>0b7ee3f</code></a> *: Prepare v0.38.0 (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2072">#2072</a>)</li>
<li><a href="c5bcada2c2"><code>c5bcada</code></a> protocols/gossipsub: Rework connection keep-alive (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2043">#2043</a>)</li>
<li><a href="9c5dd84099"><code>9c5dd84</code></a> build(deps): Update snow requirement from 0.7.1 to 0.8.0 (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2068">#2068</a>)</li>
<li><a href="1fdac073fc"><code>1fdac07</code></a> build(deps): Bump actions-rs/toolchain from 1 to 1.0.7 (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2069">#2069</a>)</li>
<li><a href="10fcc1c485"><code>10fcc1c</code></a> build(deps): Bump actions-rs/cargo from 1 to 1.0.3 (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2070">#2070</a>)</li>
<li><a href="82c8b1a4b3"><code>82c8b1a</code></a> build(deps): Bump actions/checkout from 2 to 2.3.4 (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2071">#2071</a>)</li>
<li><a href="43a8ad8fc2"><code>43a8ad8</code></a> protocols/relay/examples: Add client server instructions (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2060">#2060</a>)</li>
<li><a href="8988ac247e"><code>8988ac2</code></a> protocols/mdns: Fix discovered event emission. (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2065">#2065</a>)</li>
<li><a href="5c541a16f1"><code>5c541a1</code></a> build(deps): update salsa20 requirement from 0.7 to 0.8 (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2062">#2062</a>)</li>
<li><a href="d931f36428"><code>d931f36</code></a> transport/wasm-ext: Support dialing <code>Multiaddr</code> with <code>/p2p</code> protocol (<a href="https://github-redirect.dependabot.com/libp2p/rust-libp2p/issues/2058">#2058</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/libp2p/rust-libp2p/compare/v0.37.1...v0.38.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=libp2p&package-manager=cargo&previous-version=0.37.1&new-version=0.38.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-21 01:48:01 +00:00
.cargo .cargo/config.toml for specifying linker 2021-03-15 14:36:05 +11:00
.github Merge #495 2021-05-16 16:43:28 +00:00
docs/asb Apply suggestions from code review 2021-05-04 08:47:33 +10:00
monero-harness Update metadata and remove outdated config files / READMEs 2021-05-17 11:03:43 +10:00
monero-rpc Update metadata and remove outdated config files / READMEs 2021-05-17 11:03:43 +10:00
monero-wallet Introduce monero-wallet crate 2021-04-30 10:28:46 +10:00
swap Merge #512 2021-05-21 01:48:01 +00:00
.gitignore Push cargo lock to git as we are building a binary 2020-12-01 09:31:41 +11:00
bors.toml Move recovery commands in dedicated module 2021-05-07 16:21:02 +10:00
Cargo.lock Bump libp2p from 0.37.1 to 0.38.0 2021-05-18 06:33:38 +00:00
Cargo.toml Use tokio-tar from crates.io 2021-05-18 12:52:17 +10:00
CHANGELOG.md Mainnet changelog entry 2021-05-20 13:03:33 +10:00
dprint.json Remove tokio-tar from workspace in favor of git dependency 2021-05-17 11:04:20 +10:00
LICENSE Change license to GPLv3 2020-10-12 17:13:25 +11:00
README.md dnsaddr instead of dns4 2021-04-19 22:48:08 +10:00
rust-toolchain Add asb to release including ARM build 2021-03-15 09:58:18 +11:00
rustfmt.toml Change imports_granularity to module 2021-03-04 14:48:13 +11:00

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.

More information about the protocol in this presentation and this blog post.

Quick start - CLI

  1. Download the latest swap binary release for your operating system
  2. Run the binary specifying the monero address where you wish to receive monero and the connection details of the seller: ./swap buy-xmr --receive-address <YOUR MONERO ADDRESS> --seller-peer-id <SELLERS PEER ID> --seller-addr <SELLERS MULTIADDRESS> You can generate a receive address using your monero wallet. The seller will provide you their peer id and multiaddress. We are running an asb instance on testnet. You can swap with to get familiar with the swap CLI. Our peer id is 12D3KooWCdMKjesXMJz1SiZ7HgotrxuqhQJbP5sgBm2BwP1cqThi and our multiaddress is /dnsaddr/xmr-btc-asb.coblox.tech
  3. 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:

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.

For details on how to run the ASB please refer to the ASB docs.

Contact

Feel free to reach out to us in the COMIT-Monero Matrix channel.