Samourai wallet starts P2P exchange from Bitcoin against Monero
Orange-Samurai. Image by Toshiyuki imai via Flickr, com. License: Creative Commons
After Monero (XMR) disappears from more and more exchanges, the Bitcoin wallet Samourai opens the cross-blockchain P2P trade. Some of the latest cryptographic achievements flow into it.
a:hover imgbox-shadow:0 0 20px 5px rgba(255,0,0,0.6);
It has been emerging for a long time, but has been becoming more and more apparent lately: Privacycoins like Monero (XMR) have no future on the traditional stock exchanges.
Sooner or later, most stock exchanges will take privacycoins out of retail. You do not do this out of malice or ideology. Rather, it is impossible or at least extremely time -consuming to bring privacycoins into harmony with the requirements that demand the supervisors worldwide, such as the Travel Rule.
This forces the Monero Community to prevent preventively into the underground. The fire sample, which the Bitcoin scene fears from the beginning, is equally long as it comes to Monero: is a cryptocurrency viable when it is in fact prohibited? If there is no financial institution in the world?
a:hover imgbox-shadow:0 0 20px 5px rgba(255,0,0,0.6);
Because Monero now enters into the phase that many bitcoiners have prepared, the community of Bitcoinern gives a help that feels strongest to the ideals of the Cypherpunks. Samourai, a Bitcoin wallet that strengthens the privacy of its users with the whirlpool mixing process, integrates a marketplace for the P2P change from Bitcoin against Monero. This leaves Samourai the “Bitcoin-Only” warehouse.
HTLCs, as with Lightning
These so -called “atomic swaps” are now in Beta Live after the developers have worked on them for about half a year. You allow the change without a third party or trust between the participants. In principle, do the same with the exchange as Bitcoin with transactions.
a:hover imgbox-shadow:0 0 20px 5px rgba(255,0,0,0.6);
In itself, such atomic swaps with Bitcoin have been known for a long time and have long been realized for trading with Litecoin. They are based on “Hash Time-Lock Contracts” (HTLC), as used to use the Lightning network at Bitcoin. Bitcoins that are sent to HTLCs can be triggered by two conditions: by proving a secret or after the end of a certain time.
With an HTLC-based exchange, the following happens: Both parties put the agreed sums in an HTLC. Then one party of others sends the secret that it needs to solve the coins from the HTLC. The transaction through which this happens is so constructed that it reveals the secret with which the other coins can be paid out. Therefore, the change is called “atomic”: it is effectively completed with a single action.
a:hover imgbox-shadow:0 0 20px 5px rgba(255,0,0,0.6);
If the swap fails, it can be reversed after a certain time.
How to replace the HTLCs at Monero
The problem now, however, that Monero does not support scripts and therefore no HTLCs. One can only send Monero by submitting a private key. An atomic swap, as described, is not possible.
Thanks to some progress, the developers were able to replace HTLCs. You describe it in a white paper that builds on a Paper “Bitcoin-Monero Cross-Chain Atomic Swaps” by Joel Gugger. The technical details are extremely complicated. In a way, the spearhead of cryptographic high-tech is put into position.
a:hover imgbox-shadow:0 0 20px 5px rgba(255,0,0,0.6);
It runs very roughly: You split the private key for Monero in two parts. One of the parts is revealed when the exchange is completed with the help of “one-time verifiably encrypted signatures” (short: one-time ves). One-time ves are a cryptographic innovation that allows you to reveal more information by signature. In principle, it is deliberately broken signatures, which can be useful for some applications. Lloyd Fournier only described it in a paper in 2019.
In addition, so-called “discrete logarithms” help to prove through a zero knowledge-proof that the two parts of the keys fit together. This is particularly interesting because they are selected as points from different elliptical curves, at Bitcoin from SecP256K1, at Monero from Edward25519.
a:hover imgbox-shadow:0 0 20px 5px rgba(255,0,0,0.6);
Overall, it is a hideous complicated but magnificent construction that pulls all the registers of cryptographic magic. I don’t understand them well enough to describe them here. It is important that the procedure is obviously working: With a sequence of transactions you can exchange Bitcoin for Monero and the other way around.
The script of a swap
The process is, for example, the following: If someone wants to buy Monero, he first sends a so -called “lock transaction”. This is a modified HTLC that Gugger describes as a “swaplock”: you can trigger the bitcoins through a secret or transfer it back after 72 hours.
a:hover imgbox-shadow:0 0 20px 5px rgba(255,0,0,0.6);
As soon as this transaction is confirmed, the seller sends his lock transaction, which makes something similar with the Monero: the XMR land on an address, the private key of which is split into two parts. The buyer, the other of the seller. The discrete logarithm serves as proof that the two parts result in the correct key.
When this transaction has reached 10 confirmations, the buyer sends the seller a signature through which he can pay the bitcoins. The transaction with which this happens reveals the key that the buyer needs to solve the frozen monero via a one-time ves.
a:hover imgbox-shadow:0 0 20px 5px rgba(255,0,0,0.6);
As a backup there is still a refund transaction: This can be broken off the swap if the Bitcoin Lock transaction has received 72 confirmations. The refund transaction initially leads the bitcoins back to the buyer, but also reveals the key that the Seller needs to free his coins from the lock transaction.
Both execution and demolition of the trades are “atomic”: with a transaction, they release the coins on both blockchains.
Not for inexperienced users
Such a atomic swap between Bitcoin and Monero is more or less the sacred grail of privacy. In fact, he makes it impossible to prevent Monero from getting into circulation. As long as there is bitcoins to buy on crypto exchanges, everyone who wants or has to, also, also to Monero and thus to the cryptocurrency with the highest privacy standards.
a:hover imgbox-shadow:0 0 20px 5px rgba(255,0,0,0.6);
In principle, the Samourai team has brought all regulatory endeavors to prevent anonymous crypto transactions with software.
Nikita Zhavoronkov from Blockexplorer Blockchair is already raving: “I would not be surprised if the liquidity of the XMR-BTC-atomic swaps in a few months would leave Lightning+Liquid behind […] P2P> Bankstream.“Although the Tweet, the Tweet, speaks, the dislike against Lightning and Blockstream, which is cultivated by Nikita. However, his forecast hardly devalues this.
a:hover imgbox-shadow:0 0 20px 5px rgba(255,0,0,0.6);
However, the swap is still in a beta version. It is technically not easy and probably only suitable for advanced users. And that’s probably a good thing, because an unsuspecting use of the swaps can also become a own goal.
In itself, the change in Monero for bitcoiner is a very sharp knife to cut through the chain of transactions, which is a traitual trace of the Bitcoins. But the relaxation is the relaxation. Finally, you have to exchange the anonymous – and thus cleanly clean – Monero for Bitcoins: against Bitcoins, which by definition pulls a chain of old transactions behind you. If you deposit these bitcoins on a stock exchange, there can be a bad awakening because suddenly you are connected to criminal machinations that you never had to do with anything, but that stick to the bitcoins like old dirt.
a:hover imgbox-shadow:0 0 20px 5px rgba(255,0,0,0.6);
So the Atomic Swaps are one of the most powerful methods to improve their privacy. But they are also one of the most dangerous for careless users.
