Bitcoin–Monero Cross-chain Atomic Swap
Go to file
bors[bot] b2e1c84bd6
Merge #1201 #1203
1201: build(deps): bump tokio-util from 0.7.2 to 0.7.3 r=delta1 a=dependabot[bot]

Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.7.2 to 0.7.3.
<details>
<summary>Commits</summary>
<ul>
<li><a href="14c77bc434"><code>14c77bc</code></a> chore: prepare tokio-util 0.7.3 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4744">#4744</a>)</li>
<li><a href="0241f1c54d"><code>0241f1c</code></a> chore: fix changelog typo (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4740">#4740</a>)</li>
<li><a href="674d77d4ef"><code>674d77d</code></a> chore: prepare Tokio v1.19.0 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4738">#4738</a>)</li>
<li><a href="42b4c27b88"><code>42b4c27</code></a> net: add <code>take_error</code> to <code>TcpSocket</code> and <code>TcpStream</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4739">#4739</a>)</li>
<li><a href="0d4d3c34f1"><code>0d4d3c3</code></a> sync: replace non-binding <code>if let</code> statements (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4735">#4735</a>)</li>
<li><a href="4941fbf7c4"><code>4941fbf</code></a> tokio: add 1.18.x as LTS release (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4733">#4733</a>)</li>
<li><a href="cc6c2f40cb"><code>cc6c2f4</code></a> tokio: check page capacity before obtaining base pointer (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4731">#4731</a>)</li>
<li><a href="925314ba43"><code>925314b</code></a> doc: clarify semantics of tasks outliving block_on (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4729">#4729</a>)</li>
<li><a href="f948cd7b33"><code>f948cd7</code></a> chore: fix clippy warnings (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4727">#4727</a>)</li>
<li><a href="83d0e7f8b3"><code>83d0e7f</code></a> runtime: add <code>is_finished</code> method for <code>JoinHandle</code> and <code>AbortHandle</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4709">#4709</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.2...tokio-util-0.7.3">compare view</a></li>
</ul>
</details>
<br />


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

You can trigger a rebase of this PR 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>

1203: build(deps): bump tokio from 1.16.1 to 1.19.2 r=delta1 a=dependabot[bot]

Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.16.1 to 1.19.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/tokio-rs/tokio/releases">tokio's releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.19.2</h2>
<h1>1.19.2 (June 6, 2022)</h1>
<p>This release fixes another bug in <code>Notified::enable</code>. (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4751">#4751</a>)</p>
<p><a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4751">#4751</a>: <a href="https://github-redirect.dependabot.com/tokio-rs/tokio/pull/4751">tokio-rs/tokio#4751</a></p>
<h2>Tokio v1.19.1</h2>
<h1>1.19.1 (June 5, 2022)</h1>
<p>This release fixes a bug in <code>Notified::enable</code>. (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4747">#4747</a>)</p>
<p><a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4747">#4747</a>: <a href="https://github-redirect.dependabot.com/tokio-rs/tokio/pull/4747">tokio-rs/tokio#4747</a></p>
<h2>Tokio v1.19.0</h2>
<h1>1.19.0 (June 3, 2022)</h1>
<h3>Added</h3>
<ul>
<li>runtime: add <code>is_finished</code> method for <code>JoinHandle</code> and <code>AbortHandle</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4709">#4709</a>)</li>
<li>runtime: make global queue and event polling intervals configurable (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4671">#4671</a>)</li>
<li>sync: add <code>Notified::enable</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4705">#4705</a>)</li>
<li>sync: add <code>watch::Sender::send_if_modified</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4591">#4591</a>)</li>
<li>sync: add resubscribe method to broadcast::Receiver (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4607">#4607</a>)</li>
<li>net: add <code>take_error</code> to <code>TcpSocket</code> and <code>TcpStream</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4739">#4739</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>io: refactor out usage of Weak in the io handle (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4656">#4656</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>macros: avoid starvation in <code>join!</code> and <code>try_join!</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4624">#4624</a>)</li>
</ul>
<h3>Documented</h3>
<ul>
<li>runtime: clarify semantics of tasks outliving <code>block_on</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4729">#4729</a>)</li>
<li>time: fix example for <code>MissedTickBehavior::Burst</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4713">#4713</a>)</li>
</ul>
<h3>Unstable</h3>
<ul>
<li>metrics: correctly update atomics in <code>IoDriverMetrics</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4725">#4725</a>)</li>
<li>metrics: fix compilation with unstable, process, and rt, but without net (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4682">#4682</a>)</li>
<li>task: add <code>#[track_caller]</code> to <code>JoinSet</code>/<code>JoinMap</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4697">#4697</a>)</li>
<li>task: add <code>Builder::{spawn_on, spawn_local_on, spawn_blocking_on}</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4683">#4683</a>)</li>
<li>task: add <code>consume_budget</code> for cooperative scheduling (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4498">#4498</a>)</li>
<li>task: add <code>join_set::Builder</code> for configuring <code>JoinSet</code> tasks (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4687">#4687</a>)</li>
<li>task: update return value of <code>JoinSet::join_one</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4726">#4726</a>)</li>
</ul>
<p><a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4498">#4498</a>: <a href="https://github-redirect.dependabot.com/tokio-rs/tokio/pull/4498">tokio-rs/tokio#4498</a>
<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4591">#4591</a>: <a href="https://github-redirect.dependabot.com/tokio-rs/tokio/pull/4591">tokio-rs/tokio#4591</a>
<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4607">#4607</a>: <a href="https://github-redirect.dependabot.com/tokio-rs/tokio/pull/4607">tokio-rs/tokio#4607</a>
<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4624">#4624</a>: <a href="https://github-redirect.dependabot.com/tokio-rs/tokio/pull/4624">tokio-rs/tokio#4624</a>
<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4656">#4656</a>: <a href="https://github-redirect.dependabot.com/tokio-rs/tokio/pull/4656">tokio-rs/tokio#4656</a>
<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4671">#4671</a>: <a href="https://github-redirect.dependabot.com/tokio-rs/tokio/pull/4671">tokio-rs/tokio#4671</a>
<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4682">#4682</a>: <a href="https://github-redirect.dependabot.com/tokio-rs/tokio/pull/4682">tokio-rs/tokio#4682</a>
<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4683">#4683</a>: <a href="https://github-redirect.dependabot.com/tokio-rs/tokio/pull/4683">tokio-rs/tokio#4683</a>
<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4687">#4687</a>: <a href="https://github-redirect.dependabot.com/tokio-rs/tokio/pull/4687">tokio-rs/tokio#4687</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="340c4dc3b2"><code>340c4dc</code></a> chore: prepare Tokio v1.19.2 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4754">#4754</a>)</li>
<li><a href="7011a68343"><code>7011a68</code></a> time: add <code>StreamExt::chunks_timeout</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4695">#4695</a>)</li>
<li><a href="c7280167db"><code>c728016</code></a> sync: fix <code>will_wake</code> usage in <code>Notify</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4751">#4751</a>)</li>
<li><a href="bac7984417"><code>bac7984</code></a> chore: prepare Tokio v1.19.1 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4750">#4750</a>)</li>
<li><a href="a7e7eca893"><code>a7e7eca</code></a> sync: fix panic in <code>Notified::enable</code> (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4747">#4747</a>)</li>
<li><a href="89ccf2ad2b"><code>89ccf2a</code></a> chore: prepare tokio-stream 0.1.9 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4743">#4743</a>)</li>
<li><a href="3f8a690c01"><code>3f8a690</code></a> chore: prepare tokio-macros 1.8.0 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4742">#4742</a>)</li>
<li><a href="14c77bc434"><code>14c77bc</code></a> chore: prepare tokio-util 0.7.3 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4744">#4744</a>)</li>
<li><a href="0241f1c54d"><code>0241f1c</code></a> chore: fix changelog typo (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4740">#4740</a>)</li>
<li><a href="674d77d4ef"><code>674d77d</code></a> chore: prepare Tokio v1.19.0 (<a href="https://github-redirect.dependabot.com/tokio-rs/tokio/issues/4738">#4738</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/tokio-rs/tokio/compare/tokio-1.16.1...tokio-1.19.2">compare view</a></li>
</ul>
</details>
<br />


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

You can trigger a rebase of this PR 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>
2022-11-14 11:37:12 +00:00
.cargo .cargo/config.toml for specifying linker 2021-03-15 14:36:05 +11:00
.github build(deps): bump Swatinem/rust-cache from 2.0.2 to 2.2.0 2022-11-10 11:01:58 +00:00
docs Change example rendezvous node to /dns4/discover.unstoppableswap.net/tcp/8888/p2p/12D3Ko... 2022-04-22 14:51:37 +02:00
monero-harness build(deps): upgrade bdk, ecdsa_fun, sigma_fun, sha2, bitcoin-harness, serde 2022-09-12 12:03:24 +02:00
monero-rpc Update dependencies and rust-toolchain to 1.59 2022-03-12 13:05:36 +02:00
monero-wallet Update dependencies and rust-toolchain to 1.59 2022-03-12 13:05:36 +02:00
swap Add monero-wallet-rpc DOWNLOAD_URL for M1, M2 Mac 2022-11-12 15:31:53 +01:00
utils/gpg_keys docs: add gpg key readme and delta1.asc 2022-08-11 13:05:21 +02:00
.gitignore fix: change logs to UTC due to bug in time crate 2022-07-26 14:16:41 +02:00
bors.toml Remove flaky test 2021-10-07 10:00:17 +11:00
Cargo.lock build(deps): bump tokio from 1.16.1 to 1.19.2 2022-11-08 17:29:26 +00:00
Cargo.toml Update secp256kfun and rand to latest version 2021-05-25 15:35:13 +10:00
CHANGELOG.md Prepare release 0.11.0 2022-08-11 12:42:06 +00:00
CONTRIBUTING.md Create CONTRIBUTING.md 2021-06-29 10:58:00 +10:00
dprint.json Upgrade libp2p and stabilized the version 2022-04-22 15:53:55 +02:00
LICENSE Change license to GPLv3 2020-10-12 17:13:25 +11:00
README.md chore: bump rust toolchain to 1.62 2022-10-19 15:02:38 +02:00
rust-toolchain.toml chore: bump rust toolchain to 1.62 2022-10-19 15:02:38 +02: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.

Currently, swaps are only offered in one direction with the swap CLI on the buying side (send BTC, receive XMR). We are working on implementing a protocol where XMR moves first, but are currently blocked by advances on Monero itself. You can read this blogpost for more information.

Quick Start

  1. Download the latest swap binary release for your operating system.
  2. Find a seller to swap with:
./swap --testnet list-sellers
  1. Swap with a seller:
./swap --testnet buy-xmr --receive-address <YOUR MONERO ADDRESS> --change-address <YOUR BITCOIN CHANGE ADDRESS> --seller <SELLER MULTIADDRESS>

For more detailed documentation on the CLI, see this README.

Becoming a Market Maker

Swapping of course needs two parties - and the CLI is only one of them: The taker that occasionally starts a swap with a market maker.

If you are interested in becoming a market maker you will want to run the second binary provided in this repository: asb - the Automated Swap Backend. Detailed documentation for the asb can be found in this README.

Safety

This software is using cryptography that has not been formally audited. While we do our best to make it safe, it is up to the user to evaluate whether or not it is safe to use for their purposes. Please also see section 15 and 16 of the license.

Keep in mind that swaps are complex protocols, it is recommended to not do anything fancy when moving coins in and out. It is not recommended to bump fees when swapping because it can have unpredictable side effects.

Contributing

We are encourage community contributions whether it be a bug fix or an improvement to the documentation. Please have a look at the contribution guidelines.

Rust Version Support

Please note that only the latest stable Rust toolchain is supported. All stable toolchains since 1.62 should work.

Contact

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