Active participants in Web2 development are likely familiar with the role composability has played in accelerating the dominance of Web2.
The concept of composability revolves around building reusable software components (code, algorithms, etc.) that other developers can easily employ to create diverse applications. Composability is among the fundamental pillars of the open-source movement and a key catalyst behind Web2’s exponential growth.
As a new era of open-source unfolds, Web3, composability becomes even more critical to build decentralized applications. Within the blockchain realm, composability can be defined as the design principle that facilitates inter-relationships between components across standalone networks. So, if a blockchain offers a highly composable infrastructure, developers can select and assemble various standalone components to create better applications and services that meet specific user requirements.
Think of composability as the Lego model, where every individual piece can be connected to every other piece.
The Blockchain Composability Model
Composability is the reason why decentralized exchanges (DEXs), decentralized finance (DeFi) protocols, decentralized applications (dApps), and decentralized autonomous organizations (DAOs) can interact and work with each other.
Put simply, blockchain composability is vital because it allows developers to use prebuilt smart contracts and logic from other projects as building blocks. As a result, developers don’t have to spend time and effort reinventing the wheel or constructing everything from scratch.
There are several types of composability within the blockchain ecosystem. For instance, there’s syntactic composability – every smart contract on a blockchain will be publicly available, and anyone can use them. This means that the smart contract logic only has to be worked out once before being reused by other developers building within the same ecosystem.
Syntactic composability denotes the implementation of several components such that they can be connected to form entirely new systems. There are three core components of syntactic composability: discoverability, autonomy, and modularity. Ethereum is a prime example of how syntactic composability benefits blockchain technology.
There is also atomic composability, which ranks among the key drivers of decentralized finance (DeFi). For instance, Sushiswap launched its platform by reusing the codebase from Uniswap. Sushiswap developers didn’t build everything from scratch and instead deployed the codebase with extra features and functionalities like governance tokens and liquidity mining.
Atomic Composability: The Heart of DeFi and Web3
The term atomic composability consists of two words: atomic (derived from atomicity) and composability.
In blockchain technology, atomicity refers to the idea that a single transaction can contain several actions (transfers, token calls, or requests to other DeFi dApps and DEXs, etc.). All of these actions within the transaction must be correct, or else the transaction request won’t be accepted. The entire transaction will fail if any transaction component is conflicting or incorrect.
Accordingly, atomicity is critical for facilitating complex and safe DeFi transactions instantly. These transactions can be as simple as a token exchange between two parties or as complex as a transaction using multiple DeFi dApps.
Based on this logic, atomic composability is a feature that empowers developers to combine any amount of code and logic from existing dApps and protocols in any shape and form to build larger, more complex products and services. Simultaneously, it ensures that all of these combined components work as a single transaction.
Atomic composability is essential for DeFi to reach its full potential because many different DeFi dApps and protocols integrate numerous dApps to produce unique products, services, and features. A “flash loan,” where a user borrows an asset and pays it back all in the same transaction, is a prime example of an innovation that can only be achieved by atomic composability. If the user fails to do so, the entire transaction fails, and the borrowed assets are transferred back to the lender. This makes it possible to conduct credit-risk-free arbitrage in a highly efficient manner.
But there’s a problem with existing blockchain technology. Since most smart contract chains operate in standalone, siloed environments, atomic composability is primarily limited to dApps and protocols belonging to the same chain or any compatible chain. Because of this siloed approach, developers can’t leverage atomic composability for building highly functional multichain and omnichain products and services.
Emerging blockchain startup Radix approaches this~ dilemma through its product suite consisting of a new consensus mechanism (Cerberus), Radix Engine, smart contract programming language (Scrypto), and Radix Wallet. Unlike existing solutions, Radix’s approach ensures that atomic composability stays intact as the product scales.
It provides developers the infrastructure to quickly build dApps and protocols by mixing and mashing existing code and logic. This allows developers to invest more time in building new features, not redoing components that already offer these functionalities.
Radix’s CEO, Piers Ridyard, spoke about this need in the space in a recent keynote speech, he said: “Cerberus is the world’s first consensus algorithm that does not break atomic composability as it scales. Getting there, involves completely changing the fundamentals of how a decentralized network handles assets and transactions.”
As developers continue experimenting with platforms like Radix to build multi-featured products and services quickly, we will continue seeing more and more use cases of atomic composability across DeFi and Web3.