May 25, 2022

Connext №2. Bridges and how they are work. [ENG Version]

[<-Connext №1] [RUS Version] [Menu] [ENG Version] [Connext №3->]


In the previous article, we took a general look at the Connext project and their Connext Bridge application and analyzed the problems they solve.

To understand how Connext and Connext Bridge work, we need some theory. Namely, we need to understand how bridges work, because without this base it will be quite difficult to understand all the mechanics.

Let's not hesitate and get started.

Table of contents

Introduction

Let's say, I am a citizen of Moscow, want to travel and go on a trip to London, for example, to see Big Ben and visit 221b Baker Street, hoping to see the spirit of Sherlock Holmes there.

After packing, I suddenly remember that I can't even pay the bus pass with my rubles in wallet and I will need pound sterling in London.

But at this moment I have no problem exchanging rubles for pounds, because I can go to any bank, where a friendly cashier will easily exchange currency for me.

But what if I, for example, want to exchange BNB to ETH or transfer BNB from Binance Smart Chain to the Ethereum ecosystem?

Blockchain bridges, which we'll talk about next, will help us do that.

What is a bridge?

Blockchain bridge - it's a connection that allows you to move tokens or data from one network (chain) to another to interact with the decentralized applications of another chain.

But it is worth noting that when we move an asset from one chain to another, we are not moving the coin itself, but its derivative, the token.

Memorize:

  • Coin - is built on its own blockchain (ETH, BTC);
  • Token - a coin built on another blockchain network (WETH, WBTC)

What are bridges for?

Many may have wondered: "Why transfer a coin from the main network to a third-party network at all?"

Well, there are several reasons for that:

  1. High commissions. At the time of writing this article, one ETH transfer on Ethereum costs ~$3. That doesn't sound like much, right? But at the same time at Polygon you will have to pay only $0.005 per transfer, while our $3 is enough for 600 transactions.
  2. Innovation. As you may have noticed, each blockchain ecosystem is self-contained and initially has no features to interact with other blockchains (except for the Polkadot/Kusama and Cosmos ecosystems). And because they are closed, they cannot adopt innovations from other blockchains, such as dApps.

But with blockchain bridges is like the beginning of a team game, where everyone helps each other in solving common problems and in innovation.

How do bridges work?

It is worth specifying that there are two types of bridges, which have different principles of operation:

1. Centralized bridge. You can imagine such a bridge in the form of liquidity pools. Let's take USDC as an example. USDC has two pools, one in L2 Optimism and one in Polygon Matic.
When we deposit USDC(OP) in a pool, the liquidity provider (to simplify the scheme, it also acts as a centralized body) requests USDC(ETH) tokens from the corresponding pool and passes them to us for a small fee.

2. Smart contracts. With smart contracts, in my opinion, everything is much simpler. We send our USDC tokens, for example, to a smart contract on the Ethereum network. With all sorts of interactions, our smart contract sends a signal to another chain, in our case Optimism, and binds them.
Once our funds are sent, they are frozen/burned in the Ethereum network and transferred to us as a copy of the coin in the Optimism network, which is tied to the value of the underlying asset in the Ethereum network.

That's how transactions happen, funds are "blocked" in one network and a copy is transered to another network.

Disadvantages of bridges

It would seem that what could be the disadvantages of such a beautiful creation? As it turned out quite obvious:

  1. Trust. As we have already found out, there are two kinds of bridges, and in the case of the first kind, trust plays a huge role. Every project assures that it is honest and will never cheat his client. But in practice we see how many dishonest people just take your money for themselves.
    Therefore, it is worth very carefully choose the bridge we use.
  2. Transaction duration. Although the bridge technology is very convenient, it is not perfect. Unfortunately, we cannot transfer from one network to another in seconds. It usually takes a few hours and can take days.
  3. Scalability. Bridges, for the most part, use their own set of validators to validate transactions, which slows down expansion considerably because they have to be created individually for each pair of networks.

Unfortunately, there is no such thing as perfect, at least not the first time around, so we have to accept the minuses and work on fixing them, what the Connext Bridge project actually does.

  • It is Connext Bridge that allows you not to worry about your funds. Users are guaranteed the security of their funds thanks to the NXTP protocol.
  • It is Connext Bridge that allows us to make transfers from one network to another, in the shortest possible time. This is ensured by transfers in local networks of liquidity.
  • It is Connext Bridge that can easily connect blockchains to its network and quickly scale to other ecosystems.

It seems clear and simple. But we still need to know who routers are and what role they play in this whole system, so:

To be continued...


Prepared by blinkfeed#8312