Under the Hood of Blockchain Bridges – How Cryptocurrency Transfers Between Blockchains Work
The development of the cryptocurrency market has led to the emergence of over 100 blockchain networks. The Bitcoin blockchain, created in 2009, had several shortcomings. For example, the network's throughput is 3 transactions per second, and waiting for each transfer can take up to 10 minutes. The first network to address Bitcoin's issues was Ethereum by Vitalik Buterin. Since then, the race for speed and throughput has led to the development of blockchains like Avalanche, Polygon, Solana, and others. Each team working on blockchain development makes its own adjustments to the architecture and code. This results in networks becoming incompatible with each other by default, and the market begins to need solutions that will help transfer cryptocurrencies from one network to another.
List of Blockchain Bridges
The total TVL of cross-chain solutions reaches $10 billion, considering only 22 major cross-chain bridges. The market is growing, and so is the number of fraudulent projects posing as blockchain platforms. Let's consider 4 official blockchain bridges for transferring crypto data between networks:
- Sideshift.ai — A blockchain bridge without registration and wallet connection. More than 8 networks are available.
- Portalbridge.com — A platform for transferring NFTs and cryptocurrencies between networks. More than 10 networks are available. Wallet connection is required.
- Allbridge.io — An aggregator of cross-chain exchanges. This allows access to 13 networks.
- Across.to — A cross-chain bridge for working with Ethereum networks - Arbitrum, Optimism.
What is a Cross-Chain Bridge and How Does It Work?
A Cross-Chain Bridge — or multi-chain bridge, is a platform for transferring data between blockchain networks. Due to the structure of smart contracts on blockchains, there arises a compatibility issue between networks. Incompatible smart contract protocols, address formats, consensus algorithms, and governance models prevent Ether (ETH) from being transferred from the Ethereum network to the Solana network. Cross-chain bridges come to the rescue. Cross-chain means cross-blockchains.
It can be simpler. Let's consider how a blockchain bridge works using an analogy from the familiar world, where rubles, dollars, and other fiat currencies are still used in transactions. When paying for a kilogram of bananas with a MasterCard in a Turkish store, you don't have to think about converting rubles into dollars while standing at the checkout. Money is automatically converted through a chain of financial organizations. In the world of blockchain relationships, transferring cryptocurrency from one network to another is handled by multi-chain bridges. Instead of crypto, data, NFTs, or even smart contracts can be involved.
What is a Wrapped Coin?
1 bitcoin on the Bitcoin network is not the same as 1 bitcoin on the Ethereum network. Multi-chain bridges use wrapped tokens, whose value is tied to the original. In the example above, the interchangeable brother of bitcoin from the Ethereum network is wrapped by an Ethereum smart contract – WBTC (Wrapped Bitcoin). WBTC can be borrowed in DeFi protocols, exchanged on DEXs like Uniswap, or held as collateral for lending purposes. The bridge provider ensures the functionality and value of WBTC as it does for BTC. The actual Bitcoin sent to the provider's address is locked. One could even say that it is locked in a smart contract, but the problem is that Bitcoin does not have them unlike BNB on Binance Smart Chain. Therefore, BTC is secured with the bridge or another provider, such as Bitgo. Smart contracts are then used to burn and mint wBTC.
Thus, when the owner of the locked bitcoins wants to retrieve them after using wBTC, the contract function is called, and the managing protocol must burn wBTC and return BTC to circulation. Burning refers to sending tokens to an address that no one can access through private keys.
The attentive reader might guess that there remains a risk of controlling the locked BTC. Therefore, a safe option here would be to purchase wBTC without locking the original BTC.
Another Risk of Wrapped Cryptocurrencies
Cross-chain bridges, like DEXs, operate based on liquidity pools – simply put, special reserves are used to exchange two tokens, which are replenished by other users. Tokens are locked by a smart contract and begin to serve the purpose of exchanges. The benefit for these users lies in potential passive income.
For example, Uniswap pays 0.3% in fees to liquidity pool providers. If these interest rates change sharply, providers will withdraw liquidity from the pools, thus creating a risk of short-term loss of the peg of 1 wBTC = 1 BTC.
Why Are Bridges Needed?
Suppose we have USDT (ERC-20) in our wallet, but payments are accepted only in USDT (TRC-20).
We have two options:
- Sell USDT (ERC-20) for rubles at a standard exchange and pay the exchange commission + transfer fees. Buy USDT (TRC-20) at another exchange. Pay the commission of the second exchange + the fee for the second transfer.
- Transfer USDT (ERC-20) to your favorite top-10 exchange. Pay the transfer fee. From there, immediately withdraw USDT (TRC-20) to the store's account. Pay the transfer fee.
In both cases, you incur costs in the form of additional time spent and money on commissions.
How Do Custodial Exchanges Bypass the Problem of Bridges?
So how can tokens BEP-20 be sent to Binance and then withdrawn as ERC-20? The fact is that when registering, the exchange automatically creates crypto wallets for blockchain protocols. These storage spaces are yours, but they do not belong to you because the private keys for access are held by the exchange. Thus, with each withdrawal or deposit to the account, the exchange chooses which asset to use for this purpose. While enjoying the convenience of easy coin exchanges, exchange users face limitations:
- Need for KYC
- No direct access to wallets
- Delegated management of cryptocurrencies
- Force majeure costs (technical maintenance of the exchange, suspension of deposits/withdrawals)
- Fees
By closing the problem of inter-blockchain bridges for users, crypto exchanges maintain maximum cash flow from clients.
Types of Blockchain Bridges
Cars are categorized by color, engine type, or class. Cross-chain bridges are classified by criteria:
- By trust type
- By method of transferring data between blockchains
By Trust Type
There are two types of bridges: trusted (Trusted Bridges) and trustless (Trustless Bridges).
Simply put, trusted bridges are centralized, while trustless bridges are decentralized. Their differences are:
Trusted (Trust Bridges)
Cryptocurrency was intended as a decentralized financial instrument; however, to sign transactions in transferring cryptocurrency between bridges, the community sometimes has to resort to a centralized form.
This is how trusted bridges work — they are centralized bridges that operate based on a central organization (trust authority) of intermediaries. To convert coins through a cross-chain bridge, user trust in intermediaries for transaction verification and confirmation is implied. Members of the trust authority are motivated to verify transactions. Trust-based bridges are faster and more cost-effective when transferring tens of thousands of dollars in equivalent cryptocurrency.
EXAMPLE:
wBTC is controlled by a decentralized autonomous organization (DAO) consisting of 17 members. Each member holds a key to a multi-signature wallet responsible for the system's security. Voting is conducted on matters of adding or removing members and making changes to the smart contract.
Advantages and Disadvantages of Trusted Bridges
As the number of participants in verifying transactions increases, the likelihood of theft by a verification participant decreases. On the other hand, the more trusted nodes in the middle, the slower the bridge will be for signing transactions. It will take a lot of time to verify the signature from each participant.
In a centralized model, additional guarantees are often built in. For example, if a condition is introduced to lock cryptocurrencies for members of the trust authority, the protocol will have the ability to punish dishonest node operators. If violations are found, the fixed deposit will be used to compensate the affected parties.
Trustless Bridges (Trustless Bridges)
Decentralized means their operation depends on smart contracts. This type of bridge operates entirely on the blockchain, where individual networks contribute to transaction confirmations. Such bridges can provide users with a better sense of security and greater flexibility when moving cryptocurrency.
By Asset Transfer Type
There are three main types:
Atomic Swaps
An atomic swap is a condition that is either fully met or not met at all. Bridges of this type are time-limited due to HTLC. HTLC stands for Hashed Timelock Contract. Simply put, it's a smart contract with a hashable time lock. According to BIP-65, time frames are set at the beginning of the exchange. During this time, the exchange must occur; otherwise, the coins will be returned to the original address.
Lock-and-Mint Cross-Chain Bridges
The mechanism involves locking cryptocurrency on blockchain A and minting (issuing) cryptocurrency on blockchain B.
How to Transfer Cryptocurrency Between Blockchain Networks
Let's consider transferring BNB crypto coins from Binance Smart Chain to Matic in the Polygon network. For this, we will use the cross-chain bridge BSC – Polygon. We will use the multi-chain bridge Sideshift.ai – a simple solution that does not require registration or connecting a Metamask wallet for coin transfers.
How Sideshift Works: The user selects the desired exchange pair, specifies the address for transferring the exchange coin > Sends cryptocurrency to their address > Receives the exchange coin in their specified wallet.
Step 1. On the main page, on the left, select the cryptocurrency you want to send, and on the right, the one you want to receive. Pay attention to the token network under the cryptocurrency. Receiving Address – enter your address in the Polygon network where you want to receive the assets.
Click “Shift”.
Step 2. In the next step, transfer cryptocurrency to the address provided by the bridge for exchange. Pay attention to the minimum and maximum payment. After receiving the assets in your wallet, the bridge will automatically transfer the cryptocurrency to the wallet you specified in the previous step.
Step 3. Wait for the cryptocurrency transfer. The transfer process can be tracked in the network explorer.