Atomic Swap Bridge Development for Remme Chain
Remme provides the distributed public key infrastructure with a high level of security. For the further development and growth of the product along with user experience improvement, the atomic swap solution was needed.
The problem
Like many blockchain-based projects, Remme faced the problem of token turnover between different blockchain ecosystems. As long as Remme token was running on the Ethereum network while the PKI Protocol was implemented on the Hyperledger it faced the problem of interoperability.
As there was no universal solution for token swap on the market then, Remme chain required atomic swap technology integration for providing safe token migration between chosen blockchains.
Solution Blaize proposed
We conducted a review of existing solutions, and together with the Remme team decided to use atomic swap technology. As the main goal, we establish the implementation of a fully automated service that is able to track and verify incoming/outcoming transactions while providing a reliable environment for trustless token migration.
Due to the system’s interaction with a lot of money transfers, there was a need of providing high fault tolerance. Therefore, the service is able to restore the normal work after any connection issues or even shutdowns.
The main challenges of the Atomic Swap development
An atomic swap is a technology that enables safe and decentralized token exchange in a trustless environment. Due to Remme chain specifications and additional custom features of this blockchain, we can underline the following challenges of this atomic swap integration:
- Remme’s ERC-20 tokens have to be transferable to the native blockchain and vice-versa;
- a lack of native interoperability between Hyperledger and Ethereum blockchains makes direct asset transfer impossible;
- the bridge between two blockchains should have had the highest level of performance, security, and reliability.
Blaize contribution
During the development process, we encountered certain difficulties like the imperfection of Hyperledger’s core, and significant differences in consensus that made synchronization between blockchains hard.
Therefore, we implemented a number of non-standard solutions, which ensures a stable and safe operation of the migration service.
Usually, the swap initialization is performed by the first user who calls the transfer. Thus, this user also commits the hash. Yet, this has a low-security level from the application side (so in case the user clears the cache, he loses the money, because he loses the private key also).
The additional difficulty regarding this is that the browser does not check for private key saving and therefore, makes the key loss more probable.
We implemented the solution so that the client does not hash anything. In contrast, he sends the request to the Bridge, Bridge checks for the money available on the account. Then Bot sends the opposite swap transaction for the Client’s approval. The Client receives an ethereum event and approves the swap.
Then, Bridge is able to take the money and give the private key. It allowed native tokens to be transferred into ERC-20 Ethereum tokens and back in a fast and trustless way.
The Bridge does not only send the transaction to the Ethereum, yet also track and check for transaction approval within the network. In case the transaction is locked into the Ethereum mempool, the Bridge will sooner or later succeed and send the transaction. Thus, ensuring higher system’s reliability while shortening the time for transaction management.
Such optimization and further development required an experienced team of blockchain engineers with the competency and deep understanding of both Ethereum and Hyperledger ecosystems. If you think of implementing atomic swap technology for your project or any similar solution for secure token migration contact Blaize for further discussion.