BTC Lightning to ERC20 Atomic Swap
TenX showed a live demo where of their Comit protocol where they swapped a non-native asset to an asset on a layer-2 network on both mainnets. In particular, they swapped 10 PAY tokens on Ethereum for 71240 Satoshi on the Lightning Network using COMIT. COMIT stands for “Cryptographically-secure Off-chain Multi-asset Instant Transaction network.”
The company bills COMIT as the Internet of Transactions, a universal protocol for uniting the transactions across different blockchain ecosystems. They compare it to the early days of the Internet, where a bunch of siloed, incompatible networks ruled the world. Before the World Wide Web, they couldn’t talk to each other. COMIT is an open protocol facilitating trustless cross-blockchain applications. The simplest use case one can imagine is an atomic swap between two currencies.
With this tech, in the future you will be able to buy digitally tokenized ‘stuff’ with Bitcoins on LN trustlessly. Those tokens could represent anything from company shares, to car share minutes, internet access, to ownership of digital media (like a movie rental), etc. All without a third party taking a cut. In the near future this will generate huge productivity gains for the economy and people using it.
How to use it?
CoBlox team urges developers not to run COMIT on any mainnet as it is highly experimental project at the moment.
For the motivated developer a good starting point is to have a look at our end-2-end tests. You can find the code for swapping between BTC-ETH and BTC-ER20 there. We tried hard to build an amazing API for the comit-node and we are still working on it so please be patient in terms of documentation 🙂 Please have a look in the repository for now, examples can be found there.
If you haven’t noticed, COMIT is amazing and its usability is enormous. We will keep improving and extending COMIT, add more features and add support for more currencies. If you are interested, please feel free to follow our GitHub repository. Additionally, we will provide more information about crucial design decisions, our roadmap and how-tos for adding additional blockchains in future blog posts.