Developers Test Cross-Blockchain Protocol for One-Way ERC20-Bitcoin LN Atomic Swaps

Publicado en by Cointele | Publicado en

An R&D lab at crypto startup TenX has tested the use of its cross-blockchain interoperability protocol to transfer ERC20 tokens for Bitcoin using the Lightning Network.

The news was reported on R&D lab CoBlox's blog today, Dec. 12, in reference to the demo on Dec. 7.

As the blog post outlines, the technical challenge was to exchange ERC-20 tokens - which run on the Ethereum platform but are not strictly "Native" since they rely on invoking a smart contract to transfer ownership - for Bitcoin's smallest transactable unit, known as "Satoshi," using the second-layer scalability LN protocol.

Lightning Network is a second-layer solution to Bitcoin's scalability issue, which uses Hashed Timelock Contracts to open payment channels between users that keep the majority of transactions off-chain, turning to the underlying blockchain only to record the net results.

CoBlox's previous Ethereum HTLC, as today's post explains, was significantly simpler as it involved native assets.

CoBlox has outlined their approach to find a solution for an ERC20 case, stating that the developers decided to "Split the HTLC setup into two transactions" - "Contract deployment" and "ERC20 transfer call" - but that they could not combine the two steps.

"The ERC20 transfer function uses msg.sender for authentication. However, calling transfer from a contract deployment sets msg.sender to the address of the yet to be deployed contract which obviously has no tokens!".

"An atomic swap cannot always be expressed through this model of invoices and payments. In LND, which is what we used for our PoC, receiving a payment requires an invoice which requires knowledge of the secret. As a result, we were only able to do ERC20 to Lightning and not the other way around. The invoice used in the swap can be found below."

CoBlox states it is still "Looking at ways" to resolve the limited directionality issue, and has therefore not included the results of its proof-of-concept for ERC20 tokens as part of the open-source release of its COMIT network.

This summer, a study conducted by weekly crypto outlet Diar suggested that the Lightning Network may not be as effective at routing payments as believed, in particular when it comes to larger amounts.

x