Why do layer 2 and multiple blockchains exist?
We saw gas prices go up in 2020 due to the increased demand for Ethereum transactions. The main Ethereum chain can only handle 30 transactions per second, which is not enough to keep up with the demand. This makes the transactions more difficult and time-consuming. The proof-of-work model consumes a lot of energy for mining, so we need an upgrade for this issue without compromising decentralization and security. So, we need alternate chains or enhanced mainchains so the intensity in the mainnet will decrease and the transactions will be more feasible. so we started to move on to scale the Ethereum network.
To understand their importance, consider two cities with a very intense population in which people travel regularly but daily, it is quite controllable but also with heavy Traffic, but on weekdays the Traffic will become even teeming so to avoid that government decides to construct alternate ways like constructing railways and other roads to avoid heavy traffic.
The same logic can be applied to asset and data transfers. We want to be able to transfer assets and data seamlessly without heavy traffic, which can be expensive and time-consuming. To avoid this issue, we can use different chains.
The main reason is to scale up the blockchain technology as the number of users grows exponentially; we need to scale up the network without sacrificing decentralization and security. The solution is to create a layer 2 solution or create efficient chains so it can handle the scaling problems. Reasons they exist include:
- High fees for the transaction
- Busy network, which makes Ethereum-based transactions expensive.
- Low transaction throughput (the Ethereum network can handle 30 transactions per second).
- The transactions are slow compared to centralized ones.
Making changes in the Ethereum mainnet will be difficult because it requires specialized nodes to decrease security issues and decentralization. We need an off-chain solution for scalability, which can be done in a layer 2 solution that uses Ethereum's mainnet consensus for security, or by creating new chains that derive security from the mainnet, such as sidechains, validiums, or plasma chains. Even though Ethereum 2.0 have some solutions like sharding and using the Proof-of-stake model, it cannot handle as the user's growth is exponentially growing.
Transferring assets accross chains
We now understand the reasoning behind having multiple chains, but why do we need to transfer our assets from one chain to another?
- Transaction fees - The transaction fees are very low in the layer2 network compared to Ethereum main network. Hence, we transfer our assets from Ethereum to layer2 networks to enjoy low transaction fees.
- Transaction speed - Ethereum's transaction speed is very slow compared to other networks. It can process only 30 transactions per second. This is a very low transaction throughput. So, we switch to other networks for fast transactions.
- Better Returns - we will transfer assets to blockchains with high-interest rates or liquidity for trading.
- Capital utility/efficiency - Able to use all assets from all blockchains in one transaction.
Since we cannot have original crypto in other blockchains, for example, in the Ethereum blockchain, the bitcoin we are trading is not a real bitcoin. Instead, it is the wrapped bitcoin that makes it possible to use bitcoin in other blockchains as well.
The wrapped coin is a representation of a cryptocurrency from another blockchain. It is worth the same as the original coin in the native chain, but it can be used in other blockchains. It can be redeemed as original crypto in the native blockchain.
The main purpose of wrapped tokens is to facilitate communication and transactions between different blockchains. This is especially useful for Defi platforms that want to expand their reach by cross-linking with other networks. For example, most Defi applications are built on the Ethereum blockchain, but the bitcoin market has more capital. Defi protocols on the Ethereum network can use Bitcoin, which could lead to a significant increase in capital. Wrapped tokens make this possible..
Bridges in crypto play an important role in connecting different blockchains together. This is valuable because it allows for communication and data sharing between otherwise siloed networks. Each blockchain has its own set of governing rules, protocols, and mechanisms (ex. Proof-of-work, Proof-of-stake, etc.) that can differ from others, making native assets and data incompatible. By using a bridge, however, this data can be passed between blockchains and accessed by users on both sides. Thus, bridges are essential for interoperability in the crypto ecosystem and are necessary to make different blockchain networks compatible.
Without these bridges, two blockchains cannot interact with each other, so we cannot transfer our assets and data from one chain to another.
Let's explore how blockchain bridging works. We'll choose a bridging protocol to transfer our assets. Then, the bridge contract in the source chain will lock our assets so that the supply remains constant.
The bridge contract will then mint an equivalent amount of wrapped tokens of the assets to the bridge contract in the destination network. The contract in the destination network will verify and send the wrapped assets to our account.
These wrapped assets can then be used for Defi protocols which have the same value as the original coin in the native network. So we can exchange the wrapped assets for other tokens or coins, or else we can get back our coin, for which we need to reverse the process in which the wrapped assets are pegged for the original coin in the equivalent amount.
Polygon's pos bridge is a great example of how one can transfer 10k Eth from Ethereum to Polygon's network. So, first the contract will take your assets and lock them in the Ethereum blockchain. This effectively isolates them from circulation. Next, the contract will issue or mint equivalent WETH tokens in the Polygon network. So, if you want your Eth back in Ethereum, you can bridge the WETH from Polygon to the Ethereum mainnet. After that, the locked Eth will be released in the equivalent value of WETH provided. Finally, the Weth will be burnt or destroyed.. This is one type of transfer there are other types also.
Three ways in which Bridges transfers assets
- Lock and mint: In this method, the assets are locked in the source blockchain and minted (creation of tokens) in the destination chain. The locked assets can't be used after bridging. This is the method that we saw above.
- Burn and mint: In this method, assets are burnt (destroyed) in the source blockchain and minted or created in the destination blockchain. Example Hop, across. In this method, instead of locking the original assets, it is completely destroyed this will happens in the case of token transfers as tokens don’t have a native blockchain.
- Atomic swaps: In this method, assets are swapped from source chain to destination chain using smart contracts, which removes the trust issues ad involvement of third-party. Example connext. Unlike locking or burning, the assets are swapped with the help of smart contracts.
We will take a real-life example to understand how bridges work.
You are in the country as you want to move to country b only through a bridge there is no other connection so you can transfer your money in three ways.
- The first way is to lock or freeze your assets here, and you can get the same value of assets in country b, which the third party will verify.
- The second way is to burn or destroy your assets and get the same value of assets in the country b.
- The third way is you can swap your assets in country b using specific contracts which is immutable.
This is how blockchain bridges work it connects different chains, and assets are transferred in either of three ways. Bridges are also classified by the blockchains they connect; for example, there are L1- L1 bridges (Layer 1 to Layer 1) similarly L1-L2, and so on.
Disadvantage of Bridges
Bridges can be extremely beneficial for transferring assets from one chain to another. Trusted bridges, like the Polygon PoS bridge, as well as trustless bridges, like Connext and Hop, both have their risks and issues. However, bridges are still in the development stage, and it takes time to develop an efficient model for interoperation between different chains.
Disadvantages of Bridges:
- Smart contract risks-This issues can occur in both trusted and trustless bridges as both depend on smart contracts. If there is a bug in a smart contract, there is a possibility of hacking assets, for example, Solana’s warm hole bridge. Source: link.
- Systematic Financial risks - Most of the Bridges use wrapped assets to mint canonical versions of original assets in the new chain. This exposes the bridge to systematic risks as there is the possibility of wrapped tokens getting exploited.
- Trust issues - Some bridges use the third party as verifiers for the transfer of the assets, that require users to rely on the assumption that validators will not collude to steal our funds. This will include being rug pulled, censorship, and other suspicious activities.
- Nascent stage - The bridges are in the nascent stages of development, so there are a lot of unsolved questions, like how bridges will perform in different market conditions.
AAVE Portals and how it simplifies the things
Portal's feature seamlessly allows assets to flow between Aave markets on different networks. Aave allows specific whitelist entities or specific bridges to burn atokens (atokens are nothing but AAVE’s token, which refers to a particular token as aDai refers to Dai ) in the source network and instantly minting them on the destination network. The underlying assets are then transferred to the destination network in a deferred manner(postponed manner) by passing it to the pool after it has been moved through the bridge.
Portals are authorized for only approved bridges by Aave Governance. The assets are moved under smart contracts, making the transactions highly secure. Transactions with this system are quick and easy, so users will be able to save time. Many people will be attracted to the Aave portal because of its features, which will in turn increase the amount of capital in Aave markets. This also encourages other alt chains to use them as they have different kinds of features.
Aave's new portal feature will help users overcome the difficulties of current bridging protocols, like liquidity fragmentation and non-optimal bridging experience. By reducing liquidity limitations of l2-l2 bridges, the portal will allow for a seamless experience for users.
Aave portals make it easy to transfer funds between different protocols by creating aTokens that are instantly minted on the destination network. Aave's unique pooling system is trustless and secure. The assets are transferred to the Aave pool on the destination chain after the burning and minting of aTokens.
Aave portals can also contribute significant growth to rollups (scaling solution for Ethereum), so the user experience of the network also increases. It acts as a gateway for some alt Evm L1 (alternate chains) which are heavily connected to centralized finance. However, Cefi's are slow to support a multiverse of chains. They are not supporting alternative networks, which complicates onboarding new users as it can be costly and difficult to reach alternatives. So having portals on these networks reduces the difficulties by providing security and fast transactions, making alt Evm L1 attractive and easier to access.
How AAVE Portals work
In order to bridge assets from one chain to another, the user first submits a bridge transaction to a verified bridging protocol (such as Connext). As soon as the transaction is mined, the user has access to the funds on the destination chain.
Behind the scenes, the bridging protocol mints unbacked aTokens on the destination chain to the intermediate contract, and in turn withdraws and transfers the underlying asset to the user immediately. The bridge contract on L2 then supplies the underlying asset and fee to the Aave pool to back the previously minted unbacked aTokens.
Later, once the funds are available on L2, a bridge contract on L2 (for example, with BRIDGE permissions on Aave V3) can provide the underlying asset and fee to the Aave pool in order to back the previously minted unbacked aTokens.
Note: Only approved bridges use this portal feature, so there is no risk of withdrawing funds from Aave v3. Also, Aave portals are just a feature to transfer assets efficiently, but we need bridging protocols to transfer our assets; there are no other core protocols for directly using Aave portals from the user end.
Let's say you want to transfer 50k Dai from Ethereum (L1) to Arbitrum (L2). You'd make a transaction request in Hop, and your assets would get deposited in Hop's liquidity pool. Then, Aave V3 would instantly withdraw the assets to your account in Arbitrum. On top of that, it would mint unbacked atokens according to the asset transfer. The transaction fee would depend on the bridging protocol you're using.
The "bridge" is used to store assets supplied by multiple users in a pool, and then to batch them together. The "hop" will use tokens to withdraw the assets from the pool, and then use its own bridging protocol to transfer the assets from Ethereum to Arbitrum. The bridge contract in Arbitrum will back the minted unbacked tokens, and reduce the fee for using Aave v3 portals.
This is how portals enable seamless transactions between markets in different networks. Also, the bridges are approved, and assets are transferred under smart contracts Hence the transactions are secure.
Bridges are essential for moving assets between different chains. They come in different types, based on how they transfer assets, what they can do, and whether or not they hold custody of the assets. Each type of bridge has its own advantages and disadvantages.
Aave portals make life easier by providing fast, secure asset transfers. The portal's features also make it more capital-efficient, as people are attracted to the bridges that use them because of the instant transactions and security.