One of the most common comments in Rollups is that they “break composability”. This has been the main point of contention for most members of the majority of the monomer chain. However, “one chain cures all diseases” is impossible. Therefore, a multi-chain ecosystem is the only way out. With that in mind, what are the implications of composability in a largely rollup-based ecosystem?
While the concept of composability seems simple, to explore it in a multi-chain environment requires more nuance.
Composability: The ability of one smart contract to read and write the state of another smart contract.
Simply put, apps are composable when they can interact with other apps. For example, an application that automatically handles Uniswap v3 liquidity positions can be combined with Uniswap, as it can read the current data of the Uniswap liquidity pool and perform adding or removing liquidity positions for its users. If Uniswap and liquidity applications run on the same chain, they can be synthesized simultaneously.
Synchronous composability: Composability between smart contracts that interact in a known finite time.
**Synchronous composability is just a simple interaction between applications that occurs within the time frame of a single block. **For example, flash loans require borrowers to borrow and repay in a single transaction. Since a transaction cannot span multiple blocks, it must happen within a block. Generally, applications that combine with each other on the same chain are done synchronously. All DeFi applications on Ethereum are in sync with each other. However, synchronous composability is not the only type of compositionality.
* Asynchronous composability: * Composability between smart contracts that interact in an unknown and unconstrained time.
Unlike synchronous composability, where interactions between applications must occur within a block, asynchronous composability enables interactions between applications to occur across multiple blocks. While asynchronous interactions can take an infinite amount of time, practically no one wants to wait forever. The timeout problem can be mitigated by stopping the interaction for a predetermined time. Importantly, asynchronous composability enables applications on different chains to interact with each other. But how do they combine if applied on different chains?
bridge
Passing data between different blockchains requires a bridge. While many bridges are simply for bridging tokens between chains, the allure of asynchronous compositionality enables users to interact with applications on different chains without requiring any token bridging. For example, let’s assume that Uniswap v3 and the liquidity app in our first example are running on different chains. When a user trades with a liquidity application on chain A, it will interact with a bridge linked to chain B. The liquidity application will specify to the bridge what application it wants to interact with on the B chain, and what type of interaction it wants to have. In this case, we would say that it created a liquidity position on Uniswap. The bridge then passes the data to Chain B, creates a liquidity position on Uniswap, and returns the results to Chain A, including LP NFTs from Uniswap.
In order for a bridge to achieve asynchronous composability, it needs general data passing capabilities. Generic data includes any arbitrary type of data that a blockchain can deliver, such as application state, proofs of validity, or block headers.
Rollups
Apps that live on the same rollup can be combined in sync with each other. However, applications on different rollups require a bridge for asynchronous composition, which is the same requirement as applications on different monolithic chains. **Since it is impossible to scale all web3 activities with one blockchain, a multi-chain ecosystem with asynchronous composability is the only solution. **The claim that Rollups “destroys” synthesibility is shortsighted because:
-
Applications cannot all run on a single blockchain. Therefore, they must be split across multiple chains.
-
Applications can be combined despite running on different chains.
As such, a multi-chain ecosystem comes with its own set of fundamental problems.
-
Each blockchain needs to start its own set of secure validators.
-
Blockchain needs secure bridging.
In addition to the scalability property that rollups can have, they solve two fundamental problems. Rollups do not require their own set of validators, only a set of sequencers to produce blocks. The base layer provides a secure set of validators. A rollup of a shared settlement layer can create a trust-minimizing bridge between them, as their state transitions can be easily verified by the settlement layer.
Finally, asynchronous composability partially alleviates another fundamental problem of multi-chain ecosystems, namely fragmentation, as applications can draw liquidity from different chains. For example, DEXs that aggregate and route transactions across multiple chains will reduce the price impact on large transactions due to increased access to liquidity — even better for stablecoins and staking derivatives.
Author: Alex Beckett
Translator: Evelyn|W3.hitchhiker
Source: bress_xyz