What are cross-chain atomic swaps?

A cross-chain atomic swap provides the ability to swap coins between two different blockchains, such as BTG and BTC.

This means holders can trustlessly trade directly with each other. (Trustlessly means they don’t need to trust each other to make the trade.)

An example, using imaginary coins:

If Adam has 1 KiloCoin and Becky has 10 DeciCoin, and they agree that 1 KiloCoin and 10 DeciCoin are equal in value, and they want to trade, a cross-chain atomic swap would look like this:

Adam gives 1 KiloCoin to Becky on the KiloCoin chain, in a special “swap contract.”

Becky gives 10 DeciCoin to Adam on the DeciCoin chain, in a special “swap contract.”

The contracts don’t “release” the coins to Adam and Becky unless they see that both transfers on both blockchains are ready and irreversible; otherwise, they’ll both revert.

This makes the coin swap “atomic” - which just means all-or-none. An atomic swap will either be complete for both sides at once, or it won’t happen at all - it can’t execute “halfway.”

Without an atomic swap, either Adam or Becky would need to send their coins first… and whoever sends first is at risk of being cheated if the other party doesn’t send the promised coins.

6 Likes

Korean version

크로스체인 아토믹스왑은 BTG 와 BTC 같은 서로 다른 두 블록 체인간에 코인을 교환 할 수있는 기능을 제공합니다.
이것은 코인 소유자들이 서로에 대한 믿음없이 직접 거래 할 수 있음을 의미합니다. (믿음이 없다는 것은 거래를하기 위해 서로를 신뢰할 필요가 없음을 의미합니다.)

가상 코인으로의 예를 들어보겠습니다:

Adam이 KiloCoin을 1 개, Becky가 DeciCoin을 10 개를 가지고 있으며, 1 KiloCoin과 10 DeciCoin의 가치가 동일한 상태에서 서로 거래를 원한다고 가정해 봅시다. 이때 크로스체인 아토믹스왑은 다음과 같습니다.

Adam은 KiloCoin 체인상에서 Becky에게 특별한 "스왑계약"을 통해 1 KiloCoin을 제공합니다.

Becky는 DeciCoin 체인상에서 Adam에게 특별한 "스왑계약"으로 DeciCoin 10 개를 제공합니다.

두 블록체인 모두 양도가 가능하고 돌이킬 수 없다는 것을 알지 못한다면, 계약은 Adam과 Becky에게 코인을 "릴리즈"하지 않습니다; 그렇지 않으면 둘 다 원상복구됩니다.

이것은 코인 교환을 "(원자성)아토믹"으로 만듭니다. 이것은 전부 혹은 전혀없음을 의미합니다. 아토믹 스왑은 한 번에 양쪽 모두를 위해 완료되거나 전혀 일어나지 않을 것입니다 - 그것은 “중도” 라는게 없습니다.

아토믹 스왑이 없다면 Adam이나 Becky 중 누군가 먼저 코인을 보내야합니다. 상대방이 약속 된 코인을 보내지 않으면 더 먼저 보내는 사람은 속임수를 당할 위험이 있습니다.

2 Likes

Spanish version / Versión en Español

Atomic swaps o intercambio atómico proporciona la capacidad de intercambiar crypto monedas entre dos cadenas de bloques diferentes, como BTG y BTC.

Esto significa que los titulares pueden comerciar sin confianza directamente entre ellos. (Inofensivamente significa que no necesitan confiar el uno en el otro para realizar el intercambio).

Un ejemplo, usando monedas imaginarias:

Si Adam tiene 1 KiloCoin y Becky tiene 10 DeciCoin, y están de acuerdo en que 1 KiloCoin y 10 DeciCoin tienen el mismo valor, y quieren cambiar, un intercambio atómico de cadena cruzada se vería así:

Adam le otorga 1 KiloCoin a Becky en la cadena KiloCoin, en un “contrato de intercambio” especial.

Becky da 10 DeciCoin a Adam en la cadena DeciCoin, en un “contrato de intercambio” especial.

Los contratos no “liberan” las monedas a Adam y Becky a menos que vean que ambas transferencias en ambas cadenas están listas e irreversibles; de lo contrario, ambos revertirán.

Esto hace que el cambio de moneda sea “atómico”, lo que significa todo o nada. Un intercambio atómico será completo para ambos lados a la vez, o no sucederá en absoluto; no puede ejecutarse “a medio camino”.

Sin un intercambio atómico, Adam o Becky tendrían que enviar sus monedas primero … y quien envíe primero corre el riesgo de ser engañado si la otra parte no envía las monedas prometidas.

2 Likes

正體中文版本 Traditional Chinese Version

跨鏈原子互換(cross-chain atomic swap)使兩個不同的區塊鏈(例如BTG和BTC)之間擁有交換其幣的能力。

這意味著其幣持有人無需信任地直接交易。 (他們不需要相互信任也可完成交易。)

一個使用虛擬貨幣的例子:

如果Adam擁有1個KiloCoin,而Becky擁有10個DeciCoin,而且他們同意1個KiloCoin和10個DeciCoin是等價的,並想進行交易,那麼跨鏈原子互換看起來會是這樣的:

在一個特殊的「掉期合約」中,Adam在KiloCoin鏈上給予Becky 1 個KiloCoin。

在另一個特殊的「掉期合約」中,Becky在DeciCoin鏈上給予Adam 10 個DeciCoin。

除非兩張合約均發現兩個區塊鏈上的轉移都已準備好並且不可逆轉,否則它們不會將其幣分別「釋放」給Adam和Becky(回復)。

這使其幣互換如「原子」一 全部或無。原子交換要麼雙方同時完成,要麼根本不會發生 一 它不能在「半路」執行。

如果沒有原子交換,Adam或Becky其中一方需先行傳送其幣…如果對方沒有傳送已承諾的幣,那先傳送的人就有被騙的風險。

3 Likes

Thx, Sam - we appreciate the translation work & your contribution.