What is composability in DeFi? A guide to DeFi composability (2024)

Decentralized finance (DeFi) aims to create a financial ecosystem in which anyone can participate without the need for a central custodian.

The cherry on top for users and developers is that the DeFi ecosystem is open and permissionless, ensuring maximum “composability” of DeFi protocols and smart contracts.

But what does that term mean, “composability”?

This article explains the concept of composability, how DeFi composability works, and its benefits and risks.

What is composability?

Composability in software development refers to the ability to freely combine existing applications or their specific codes or components to build new products.

In DeFi, composability refers to the potential to use codes, smart contracts, application programming interfaces (APIs), and software development kits (SDKs) of existing decentralized applications in endless combinations to create new applications or build new services.

A more straightforward way to understand composability is to think of DeFi protocols as Lego blocks that you can combine to build interesting structures. That means each software component has the ability to connect to every other software component like a block so the output of one application can be the input of another.

We can see the potential of composability in decentralized finance due to the open-source nature of most DeFi protocols. Developers can reuse various applications without reinventing the wheel or fearing intellectual property issues.

Types of composability

Composability exists in three forms: morphological, syntactic, and atomic.

Morphological composability

Morphological composability means the various components, codes, tokens, and functions (the Lego blocks) comprising DeFi applications (dApps) and platforms follow the same overall standards so that they are compatible and interoperable with each other.

Not having morphological composability would be like Lego creating Lego blocks that do not fit perfectly with each other. While each individual block may serve a certain purpose, no one could actually use multiple blocks to build something unique.

Achieving morphological composability can be challenging since there needs to be an industry-wide agreement on these standards. This is why the Ethereum ecosystem (like other blockchains) follows Ethereum Request for Comment (ERC) standards for tokens and smart contracts. Developers on the chain can propose new standards, open them for community discussion, and agree to implement them through voting.

Syntactic composability

Syntactic composability refers to the ability of dApps and decentralized autonomous organizations (DAOs) to effectively integrate with each other to form entirely new systems. This is best achieved in an ecosystem that has effective morphological composability built into it.

What is composability in DeFi? A guide to DeFi composability (1)

Ethereum achieves syntactic composability very well — any smart contract on Ethereum can call any other contract in the entire ecosystem. This allows developers to reuse code from existing decentralized applications and create new dApps without spending too much time coding.

For instance, the decentralized exchange Uniswap already developed an effective token swap. Now, if a developer is creating a cryptocurrency wallet, they can integrate Uniswap’s token swap mechanism or smart contract code into their wallet without having to create it from scratch.

Atomic composability

To understand atomic composability, you must first understand atomicity.

Atomicity in blockchain means combining multiple actions into one transaction that executes only if every action is legitimate. You can leverage this property to split a transaction across multiple crypto exchanges or vote on several DAO proposals without the risk of a partial failure.

Atomic composability is the combination of atomicity and composability — a single transaction involves calls to multiple smart contracts and the transaction goes through only if all of its parts succeed. A flash loan is a good example of a DeFi protocol using atomic composability.

How does composability work in the traditional world?

Composability was a huge part of early Web2. It existed in the form of business models called mash-ups that involved bundling existing products to create new ones based on consumer trends.

Housing Maps was one of the earliest examples of a mash-up. It combined the data from Google Maps and Craigslist’s real estate listings to display apartment and housing listings on a map.

Like other mash-up services that operated during its time, Housing Maps didn’t control or own the data it used and would compete with other mash-ups.

In fact, the more data sets a mash-up had, the more problems it could solve, but its usefulness would depend on whether there was a demand for solving these problems. The most popular mash-ups leveraged this principle to build successful companies.

But by 2010, many centralized platforms started asserting their dominance on the web and shut down access to their APIs, which caused the mash-up business model to fade out.

Gradually, Meta (previously Facebook), Amazon, Apple, Google, and other tech leaders replaced open-source applications (and composability) with a closed ecosystem of their own applications.

The result was walled gardens that left certain companies in control of all operations and reduced the number of alternate applications for users.

Take Meta or Google ads, for instance. Advertisers have no choice but to use these companies’ data management platforms to get user data for targeting and the companies control their ads’ transmission.

Does this mean composability is now non-existent in Web2?

Composability still exists in many forms in Web2. When you use PayPal to pay for your Uber ride or your Meta ID to log in to play a game, you’re leveraging the composability of each application.

While this type of composability is beneficial, it comes with a caveat: you have to trust centralized third parties who might use the interaction as an opportunity to collect data on you and seek to profit from it.

How does composability work in DeFi?

Composability in Web3 could look something like this:

A Web3 app consolidates the miles logged on your Peloton and the data from other workouts from different classes to form your on-chain digital fitness identity.

It then connects to other Web3 applications offering personalized training programs to set up a fitness regimen or modify your existing one based on the progress you’ve made.

Although this may sound futuristic, it is possible that this type of composability could affect DeFi’s various components (the “DeFi Money Legos”) and cause them to evolve and expand across industries to create useful real world applications.

But for now, let’s look at a practical example of how composability works in DeFi by understanding flash loans.

Flash loans are uncollateralized loans that enable users to borrow and return funds in the same transaction. They’re commonly used to try to create an instant profit via arbitrage opportunities.

What is composability in DeFi? A guide to DeFi composability (2)

To get started with a flash loan, you first create a set of pre-designated operations on flash loan providers like Aave. Then, you run the transaction to execute the operations and repay the loan.

To understand this, we’ll break down this transaction from January 2020 made by the Arbitrage DAO. They take a flash loan of 3137 DAI from Aave, swap it for SAI on MakerDAO, and swap it back to DAI using Uniswap. Once these operations are complete, they repay the flash loan and are left with a profit of 3 DAI.

Here, the DAO uses three platforms in a single transaction to make a small profit, and these profits can be easily scaled by increasing the size of the transactions.

Examples of highly composable components in DeFi

The DeFi ecosystem has a vast array of components, and anyone can interact with them in different combinations.

Here are examples of some highly composable components in the decentralized finance (DeFi) space that developers can use:

MakerDAO

MakerDAO is the Ethereum-based DeFi protocol that mints DAI — the decentralized stablecoin that attempts to maintain a stable value by being soft-pegged to the US dollar.

What is composability in DeFi? A guide to DeFi composability (3)

DAI is highly composable and works with more than 400 services and apps, including popular ones like Uniswap and Curve.

Compound

Compound (COMP) is a decentralized and permissionless lending and borrowing protocol where anyone can lend and borrow cryptocurrencies.

What is composability in DeFi? A guide to DeFi composability (4)

Compound integrates with exchanges, portfolio managers, and wallets to enable its users to earn interest, secure their funds, and track their earnings and losses easily.

Curve

Curve is an automated market maker (AMM) that only accommodates liquidity pools made of similarly behaving assets like stablecoins or wrapped versions of the same assets such as wrapped Bitcoin (WBTC) and wrapped Ether (wETH).

What is composability in DeFi? A guide to DeFi composability (5)

Curve integrates with protocols like yearn.finance and Synthetix to try to maximize incentives for liquidity providers.

Aave

Aave (AAVE) is a decentralized lending platform primarily based on the Ethereum blockchain, though it also offers markets for Avalanche, Polygon, Optimism, Arbitrum, and more.

What is composability in DeFi? A guide to DeFi composability (6)

Aave can integrate with several types of DeFi platforms, like decentralized exchanges. A good example of Aave’s use of composability is its ability to give users flash loans.

Sushi

Sushi is a Uniswap clone that allows you to swap, earn, lend, and borrow ERC-20 tokens.

What is composability in DeFi? A guide to DeFi composability (7)

Sushi can easily integrate with exchanges and lending platforms across multiple chains.

Yearn

Yearn is a yield aggregator protocol that automatically deposits tokens across different DeFi platforms like Curve, MakerDAO, etc.

What is composability in DeFi? A guide to DeFi composability (8)

Yearn uses a broad range of platforms so their users can attempt to earn maximum yield from lending, trading, and liquidity incentives.

Additional DeFi components

Alchemix

Alchemix is a DeFi platform that auto-repays your loans. It places money into yearn.finance and allows you to take out a loan against the capital you provided.

What is composability in DeFi? A guide to DeFi composability (9)

Once you start earning yield, Alchemix will use it to start repaying the principal and interest of the loan.

HydraDX

HydraDX is a cross-chain token swap solution that enables users to transfer tokens between the Ethereum and Polkadot ecosystems.

What is composability in DeFi? A guide to DeFi composability (10)

HydraDX allows users to trade many assets in a single pool, establishing a comprehensive ecosystem for things like liquidity and yield farming.

Risks associated with DeFi composability

DeFi’s composability is often seen as a double-edged sword as it can create endless combinations with its various components but also open the door to more risks.

For starters, while composability facilitates sophisticated transactions, it also increases the number of interactions with external, untrusted code. This is potentially dangerous as the exploitation of a vulnerability within a single smart contract can have a devastating impact on multiple DeFi protocols in the space and your cryptocurrencies.

Take the 2021 yearn.finance’s DAI vault attack, for instance. The protocol suffered an exploit on one of its DAI lending pools, causing a loss of $11.1 million.

According to an Ethereum address that was presumed to be associated with the exploit, an Aave flash loan triggered the attack. The attacker’s strategy was to deposit DAI into Curve’s 3Pool which held DAI, USDC, and USDT, to manipulate DAI’s price, as the 3Pool was responsible for calculating the value of the stablecoins.

After cashing out the funds, the attacker withdrew the contract and repeated the same process a few times to drain the funds from the vault.

In short, the attacker exploited a vulnerability on Curve to drain funds from yearn.finance’s DAI vault.

Begin your DeFi journey with MoonPay

DeFi can help you earn interest and grow your crypto portfolio. To get started, simply buy cryptocurrency via MoonPay using your credit card or any other preferred payment method.

MoonPay's widget offers a fast and easy way to buy Bitcoin, Ethereum, and more than 50 other cryptocurrencies.

MoonPay also makes it easy to sell crypto when you decide it's time to cash out, including several tokens mentioned in this article like ETH, USDT, and USDC. Simply enter the amount of the token you'd like to sell and enter the details where you want to receive your funds.

What is composability in DeFi? A guide to DeFi composability (2024)

FAQs

What is composability in DeFi? A guide to DeFi composability? ›

Composability in DeFi refers to the ability of different protocols and applications to seamlessly connect and interact with each other. It allows users to combine various building blocks of DeFi, creating a powerful ecosystem of interconnected financial services.

What is composability in DeFi? ›

In decentralized finance (DeFi), composability refers to the capacity of different protocols and applications to seamlessly interact with each other.

What is the meaning of composability? ›

Composability refers to the ability for different components or elements to be combined or connected in various ways to create larger, more complex systems or structures. It's a concept often used in the context of software development, computer systems, and engineering, but it applies to other fields as well.

What does composability mean in blockchain? ›

Composability in blockchain refers to the capability of combining and interconnecting different blockchain protocols, smart contracts, and decentralized applications (dApps) to create new systems or outputs.

What is composability of money? ›

In decentralized finance (DeFi), composability refers to the ability of various apps and protocols to seamlessly communicate with each other, allowing their building blocks to be combined and integrated to create new functionalities or financial services.

What is composability function? ›

A Composable is a function that returns a Promise<Result<T>> where T is any type you want to return. Values of the type Result will represent either a failure (which carries a list of errors) or a success, where the computation has returned a value within the type T .

What is composability in programming? ›

In the realm of software development, software composability pertains to the design of software components or modules in a manner that enables them to be combined, mixed and matched so that fresh applications or functionalities can be forged.

Why is composability important? ›

A composable enterprise can break down software or hardware systems into smaller building blocks that can be easily modified, updated, or replaced to meet specific business needs. This approach creates a fluid work environment that champions individual components without having to overhaul an entire system.

What is composability in tech? ›

Composability is a design approach that improves application development. It reuses and assembles existing components depending on your business and user's unique needs, making your system more adaptable, agile and reliable. The concept of composable infrastructure is like Lego blocks.

What is data composability? ›

Data composability represents a paradigm shift in data management by emphasizing integrating data-centric applications directly on a cloud data warehouse architecture. This approach contrasts traditional data strategies prioritizing data centralization over application-driven value.

What is composability vs interoperability? ›

Interoperability contends with the software and implementation details of interoperations; this includes exchange of data elements via interfaces, the use of middleware, mapping to common information exchange models, etc. Finally, composability contends with the alignment of issues on the modelling level.

What is the difference between composability and modularity? ›

Modular systems consist of subcomponents with well-defined interfaces and functions that can be consumed independently of each other. Composability is the degree to which these subcomponents can be combined to form more complex systems.

What are composable components? ›

Composability is the art of building systems in a modular and flexible way. It emphasizes creating components that are not only reusable but can seamlessly fit together, forming a cohesive and adaptable architecture.

What is composability in banking? ›

Composable banking: a definition

This approach makes it easier to create new products and services and to adapt to changing market conditions and customer needs. With composable banking, financial institutions can quickly and easily create new offerings without extensive development or IT resources.

What do money Legos refer to in DeFi? ›

Money Legos are composability concepts that describe the ability of different decentralized finance (DeFi) protocols to interact and function together in a variety of ways.

What is an example of dead money? ›

Table of contents. Dead money is a slang term for investments with no growth and minimal return. In general, savings kept at home or in interestless accounts can also be considered dead money. Investors occasionally tend to hold such investments in anticipation that they will revive and become profitable.

What is composability of tokens? ›

A composable token is a basic extension to any non-fungible token that adds the ability to own other fungible (ERC-721) or non-fungible (ERC-20) tokens. The title of a composable token is the owner's name. The owner of a composable token is referred to as its root.

What is composability in design systems? ›

Composability means reusability and adaptability

Component slots simplify the reuse of components across large-scale websites, ensuring consistency while allowing for necessary adjustments. Traditionally, you might need separate card-style components for different content types—like a news card and a product card.

Top Articles
Top Varo Alternatives, Competitors
IRONMAN U Certification
Cpmc Mission Bernal Campus & Orthopedic Institute Photos
O'reilly's Auto Parts Closest To My Location
What is Mercantilism?
Booknet.com Contract Marriage 2
Erika Kullberg Wikipedia
How do you mix essential oils with carrier oils?
Osrs But Damage
Bustle Daily Horoscope
Aries Auhsd
Herbalism Guide Tbc
Notisabelrenu
Wgu Admissions Login
boohoo group plc Stock (BOO) - Quote London S.E.- MarketScreener
Tnt Forum Activeboard
"Une héroïne" : les funérailles de Rebecca Cheptegei, athlète olympique immolée par son compagnon | TF1 INFO
Abortion Bans Have Delayed Emergency Medical Care. In Georgia, Experts Say This Mother’s Death Was Preventable.
Gina Wilson All Things Algebra Unit 2 Homework 8
Dtlr Duke St
Thick Ebony Trans
Weldmotor Vehicle.com
Top 20 scariest Roblox games
The Creator Showtimes Near Baxter Avenue Theatres
Osrs Important Letter
Red Sox Starting Pitcher Tonight
The Menu Showtimes Near Amc Classic Pekin 14
47 Orchid Varieties: Different Types of Orchids (With Pictures)
Pitco Foods San Leandro
The Legacy 3: The Tree of Might – Walkthrough
What Time Is First Light Tomorrow Morning
8005607994
About :: Town Of Saugerties
Gvod 6014
Flags Half Staff Today Wisconsin
Tryst Houston Tx
Oppenheimer Showtimes Near B&B Theatres Liberty Cinema 12
Gopher Hockey Forum
Arcane Bloodline Pathfinder
Ethan Cutkosky co*ck
Fatal Accident In Nashville Tn Today
Walmart Careers Stocker
Lesly Center Tiraj Rapid
Jackerman Mothers Warmth Part 3
Congruent Triangles Coloring Activity Dinosaur Answer Key
Every Type of Sentinel in the Marvel Universe
Samantha Lyne Wikipedia
Hampton Inn Corbin Ky Bed Bugs
Worlds Hardest Game Tyrone
Stone Eater Bike Park
Latest Posts
Article information

Author: Rob Wisoky

Last Updated:

Views: 6004

Rating: 4.8 / 5 (68 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Rob Wisoky

Birthday: 1994-09-30

Address: 5789 Michel Vista, West Domenic, OR 80464-9452

Phone: +97313824072371

Job: Education Orchestrator

Hobby: Lockpicking, Crocheting, Baton twirling, Video gaming, Jogging, Whittling, Model building

Introduction: My name is Rob Wisoky, I am a smiling, helpful, encouraging, zealous, energetic, faithful, fantastic person who loves writing and wants to share my knowledge and understanding with you.