WeOwn Blockchain Bridge in a Nutshell

General concept

There are different approaches to how Blockchain bridges can be implemented. In case of the WeOwn Blockchain bridge, smart contracts ensure tokens are locked on the WeOwn blockchain. When tokens are sent from a target blockchain to WeOwn’s, those tokens are burnt. This mechanism prevents the problem of “double spending”, where the same amount of tokens is mistakenly generated simultaneously on both blockchains which would also increase the overall supply.

Let’s play through a scenario in order to illustrate the general concept of the WeOwn Blockchain Bridge:

There are 10,000 tokens on the WeOwn blockchain in total. Sarah now uses the bridge to transfer 1,000 tokens to the wrapped CHX token on Ethereum (wCHX). After she has mapped her  WeOwn wallet with her Ethereum target address and initiated the transfer, 1,000 CHX tokens will be locked on the WeOwn Blockchain, while 1,000 wCHX on Ethereum will be minted. This process works identically in the other direction. This way, the total token supply across both blockchains always stays the same.

 

Blockchain Bridge – Process flow

In order to make the bridge functionality as user-friendly as possible, we have added another Quick Action to the WeOwn Wallet.

Users are guided through the entire process, which essentially consists of the following steps:

  • 1. Confirm legal disclaimer
  • 2. Pick blockchain to bridge
  • 3. Map addresses
  • 4. Setup transaction
    • Choose source and target blockchain
    • Enter amount
    • Review calculated fees
    • Initiate transaction
    • Confirm transaction

This is how the simple yet powerful bridge/transaction user interface looks:

However, before a transaction can be carried out, the corresponding addresses must be connected on the respective blockchain.

 

 

 

The WeOwn Bridge at its Core

The essential components of the WeOwn Blockchain are shown in the following diagram:

The WeOwn Bridge consists of the following 3 main components:

  1. Sync engine – background service that listens for transactions on all 3 blockchains and when an appropriate transaction is found, it submits the transaction to the corresponding blockchain.
  2. Wallet feature – UI though which user submits the initial transaction (the one which the sync engine is waiting for).
  3. Bridge API – used to feed wallet with prices, rates and fees info for display purposes.

To illustrate the process, let’s simply play out two scenarios:

  1. WeOwn Blockchain > Ethereum/Binance Smart Chain

So, Alice wants to wrap 1,000 CHX to wCHX (on Ethereum). Therefore she will use the Wallet feature to express her intention. Behind the scene, the wallet will transfer 1,000 CHX to the address on the target blockchain.  The Sync engine will detect this transfer and will call the Wrap function in the Ethereum smart contract. This function will mint 1,000 wCHX and transfer it to Alice’s Ethereum address. The equivalent amount of 1,000 CHX on the WeOwn Blockchain is locked up / reserved and will not be used for anything else.

  1. Ethereum/Binance Smart Chain > WeOwn Blockchain

The other way around, Bob will use the WeOwn wallet to express that he wants to unwrap 1,000 wCHX existing on Ethereum. Behind the scene, the wallet will use user’s MetaMask to transfer 1,000 wCHX to the smart contract’s address. The Sync engine will detect this transaction and the sync engine will burn 1,000 wCHX existing on the smart contract’s address. At the same time, the sync engine will transfer 1,000 CHX from the dedicated WeOwn address to Bob’s CHX address.

 

Where can I find further information?

If you are interested in the technical details of this process, you can find more information on Github . Once there, you can also find the code for the smart contracts if you really want to understand the bridge mechanism down to the last detail.

If you want to transfer your tokens to other blockchains yourself, please read through the step-by-step instructions.

General technical information about the WeOwn Blockchain (architecture, consensus mechanism, validators and the general concept) can be found here. Please also check out the Blog section on the WeOwn website for more information about the WeOwn Blockchain and platform ecosystem.