Skip to content
Blockchain Certification

The World’s 1st ERC-20 and Bitcoin Atomic Swap Has Taken Location


At the December 7, 2018, TenX Summit, a team of builders showcased an industry initially: an atomic swap amongst a non-native asset, TenX’s Pay back token, and a indigenous asset, bitcoin.

By non-indigenous, the crew is referring to an asset/coin that is not the base forex for the community. For Ethereum, for illustration, the indigenous asset is ether, while any token that is designed on the protocol is regarded a non-native asset.

CoBloX, a TenX research and development lab, is responsible for the achievement. Demonstrating their perform to a tightly packed viewers of summit goers, the workforce applied the Lightning Community and their proprietary software COMIT to swap 10 Spend for 71,240 satoshis. The group posted a blog publish on December 12, 2018, to affirm the information and satify what it calls “the gossip factory” of he-explained-she-mentioned subsequent the summit.

In the post, the staff delves into their process, outlining outright that this swap was not as easy as the initially-at any time ether and bitcoin atomic swap they tested almost 6 months ago. While this swap’s hashed time lock deal (HTLC) only essential a one use sensible agreement, the Fork out to bitcoin swap took an further action.

Rationale remaining, the Shell out token itself is managed with an additional intelligent agreement identified as the transfer possession functionality. Mainly because of this, the HTLC experienced to be divided into two transactions: a person to deploy the swap deal and another as a transfer phone for the Pay out tokens.

“Unfortunately, we couldn’t determine out how to mix these two actions. The ERC20 transfer operate utilizes msg.sender for authentication. Having said that, calling transfer from a deal deployment sets msg.sender to the deal with of the yet-to-be-deployed agreement which obviously has no tokens,” the blog publish reads.

Obtaining used the Lightning Network Daemon (LND) implementation for the swap, the workforce carries on to demonstrate in the site put up that the swap is a just one-way ticket. They could only execute the trade by starting up with the ERC-20 token and heading by Lightning — not the other way about.

“An atomic swap can not usually be expressed by this design of invoices and payments. In LND, which is what we utilized for our PoC, receiving a payment involves an bill which demands know-how of the magic formula. As a result, we were only in a position to do ERC20 to Lightning and not the other way all around.”

The specialized milestone is the newest in CoBloX’s technological successes. As outlined formerly, the group also concluded the world’s first ether and bitcoin swap. The young lab’s GitHub also functions a few of Rust clients for a Bitcoin Main interface and a JsonRPC API plug-in, as perfectly as a resource for testing blockchain certification programs.

COMIT, the software applied in the ERC-20 swap, is also open up-supply. With a aim on blockchain certification interoperability, COMIT is intended to act as a bridge between networks to facilitate cross-chain asset swaps. In addition to the function that has been carried out with Ethereum and its ERC-20 tokens, the group programs to grow its use with more characteristics and currencies down the highway.