
The moment you opened this blog, I'm sure you wanna learn about 'Blockchain Bridges' either for 2 reasons: Developing a new Bridge (or) Exploiting a bridge. Regardless of what you choose, It's fundamentally important to understand the basics.
As Naval Ravikant said,
“ When you don’t understand the fundamentals, you resort to memorization which is not real learning. What most people call the learning that happens in schools and colleges is memorization — and it’s a lie. “
Note: Though, I'm going to teach you everything right basics, I'm assuming you know the basic definition of Blockchain and have a simple overview of how it works. - If you don't know, I recommend you to skip this blog and start learning about Blockchain & How it works.
Before everything else, We need to understand why people are always talking about
"Blockchain Trilemma" and what it all means.
Simply answering, It comes down to the idea that an ideal blockchain should have three qualities: Decentralisation, Scalability, and Security.
But, it's very difficult to achieve all three at the same time, without compromising one another.
Now, Let's take them one by one. First, What do you mean by Decentralisation?
Decentralization: In simple terms, the more nodes, the better the security - Heard about 51% attack right? - Though by definition, Blockchains are decentralized, we also need to consider other factors such as the number of miners/validators, number of full nodes(participants), and node geographical distribution.
But as you increase the number of nodes, you need more and more resources for them to reach consensus, and that slows down the network. - Thus decreasing Scalability.
In Simple, if you're working on Decentralisation - like Ethereum - You can achieve Decentralisation & Security at the stake of Scalability.
Next,
Security: As previously said, the more the number of nodes, it is for an attacker to take down the system. Consider a private company having 70% of nodes on a particular blockchain, When an attacker gains access to the private company, he/she can take down the entire blockchain making it useless.
Now, as an example, consider Ethereum where there are thousands of decentralized nodes/validators working on reaching consensus, it's difficult for an individual to take down the entire system. Because if some nodes get attacked, the network will continue to work.
In Simple, If you want your blockchain to achieve higher security, you should work on making it decentralized as much as possible. Thus, compromising Scalability.
Finally, the final aspect
Scalability: It refers to a blockchain's capability of processing high volumes of transactions without its performance drop as the number increases.
Confused? Lemme explain. Let's take Ethereum as an example again, Currently it process 15 TPS(Transactions per second) on average. While Visa, traditional web2 systems - centralized, on average processes 50K TPS.
Have you ever felt any lagging while making bank payments? We never do. It's because of the scalability. We can quickly increase the scalability, by decreasing the number of nodes/validators where we can quickly achieve the consensus (or) by reducing the block time by decreasing the difficulty of reaching consensus. But, we're making a trade-off again with Security & also Decentralisation.
In Simple, If you want to achieve high Scalability, we need to trade off against, Security or Decentralisation - sometimes maybe both.
Do you see the problem now? - Yes, talking about Blockchain Trilemma. Each blockchain is working on different aspects of the trilemma. And we need some solution to connect all the three.
This is when Blockchain Bridges came into existence. It helps us to connect multiple blockchains, allowing us to transfer information and tokens from one end to another.

[Chain A = Ethereum, Chain B = Tron]
Assume, you found a bug in a protocol and they rewarded you with $100,000 tokens on Ethereum. You want to convert them to your native currency like USD, INR, JPY, etc.
The exchange you're using only accepts TRC-20(Tron Network) deposits - because of low fees & high transfer speed - But you're on Ethereum. This is when Bridges helps you to move your funds. (We'll talk about How they work in the later section of this blog.)
Simply, we're using Blockchain Bridges as cross-chain interoperability. And now we're to the next topic.
First, let's understand the types of Bridges. Though there are many variations of it, they mostly fall into two categories:
1) Trusted Bridges
2) Trust-less Bridges
In Trusted Bridges - users need to trust their validators/entity for all their operations such as Data or Funds movement. It will be controlled by the central entity - where the possibility that the entity can steal the user funds and can also reject the transactions still comes into the picture.
Whereas in Trustless Bridges - everything works on Smart-Contracts and the algorithms. Right from the moment of funds, everything is trustless - users don't want to trust anyone other than the smart-contracts.
NOTE: Indeed even in Trustless Bridges, users need to trust the protocols smart-contract as the chances of getting smart-contract hacked are still possible. But in this case, it doesn't rely on the central entity which is considered as much safer.
To Further simply explain it, Assume you book a flight from your place to Bangkok. You're required to do web check-in to get the boarding pass.
Here,
you can do self-online web check-in - consider this a trustless bridge, as the software checks everything itself.
(or) you can reach the Check-In Counter and get yourself the boarding pass. - consider this as Trusted Bridges, as the people sitting at the counter ask for your passport details for further verification.
We broadly classify these Bridges into Two categories again, such as the "Wrapped Asset Model" and the "Liquidity Pool Model".
In these types of Bridges, the protocol releases the native assets on the receiving bridge upon validating the funds on the main bridge.
For Example, the User deposits ETH on the Ethereum Chain via a Cross-Chain Bridge and receives an equivalent amount of BNB on the Binance Chain.
Here, The smart contract on Bridge A(Ethereum Chain) burns these ETH from circulation by sending these to the null address and mints out the respective amount of BNB on Bridge B(Binance Chain).
As the name says, the protocol needs to maintain the liquidity of all the supported tokens on both sides of the Bridges to make it work smoothly.
For Example, User deposits DyDx on the Ethereum Chain, the protocol locks the DyDx on the Ethereum Chain and transfers the same amount of DyDx tokens on the Binance Chain to the user.
Here, the protocol needs to maintain the same amount of liquidity on both sides. If there's an imbalance, there's a high chance either the transaction fails or users lose their money depending upon how the smart contract logic is written.
Issues: Assume on Bridge A, you have 1M DyDx tokens and on Bridge B, you have 500K DyDx tokens. If a user wants to Bridge 1.2M DyDx tokens from Bridge A to Bridge B, as there's not enough liquidity, it fails.
That's it for this blog, and hoping that you learned all the basics about Bridges and their types and working models simply.
In the next Blog(Part 2) we will be covering the topic - How Bridges Work - Technical Deep Dive, going right from clicking on the Transfer on the application to receiving funds in your wallet.
It will be useful for all the Developers and Security Researchers who want to understand the technicality of the underlying Bridges.
Finally, this blog is a sum of various resources and real-life understandings. For further information, always read these blogs:
See you again next time in another awesome blog. Good Luck & WAGMI :)
Read more Blockchain Bridges - Part 2 [ Technical Overview of Bridges ] - Polygon Edition
Author: Gowtham Naidu Ponnana
Security Researcher at TECHFUND