Composability
- 1. How Composability Works
- 2. Types of Composability
- 3. Money Legos in Practice
- 4. Cascading Failures: A 2025 Example
- 5. Composability and Attacks
- 6. Where to Check
- 7. Why This Matters for Web3
- 8. Atomic Transactions: Why Stacks Work
- 9. Standards That Make It Possible
- 10. Composability Across Rollups
- 11. Frequently Asked Questions
Last Updated: November 19, 2026
Composability refers to the ability of different blockchain-based applications, smart contracts, or protocols to interact and combine seamlessly. This concept is especially crucial in decentralized finance (DeFi), where developers can stack or link various components to create new, more powerful applications, often referred to as “money legos.”
How Composability Works
Composability allows developers to build on top of existing protocols without starting from scratch. For example, a lending protocol can integrate with a decentralized exchange to automatically swap collateral if certain conditions are met. These systems work together via standardized smart contracts and open-source code, enabling innovation at a faster pace.
This works because most DeFi code is public and runs on shared networks. Any contract can call another, usually without asking. Token standards such as ERC-20 give apps a common format. So a new app can accept many tokens, or vault shares, with no custom work.
Types of Composability
Synchronous Composability: Contracts interact in real time within a single blockchain, allowing atomic operations.
Asynchronous Composability: Components interact across different chains or platforms, typically using bridges or messaging layers.
Money Legos in Practice
A common stack looks like this. A user stakes ETH and gets a staking token. That token is posted as collateral on a lending market, which lends a stablecoin against it. The stablecoin then goes into a vault that lends it out again. Each layer uses the output of the one below it.
There are other examples. DEX aggregators split one trade across several exchanges. Flash loans let a trader borrow, swap and repay in one transaction. Uniswap v4 hooks, live since January 31, 2025, let builders plug their own code into a pool.
Cascading Failures: A 2025 Example
The same links that make DeFi flexible can spread losses. On November 4, 2025, Stream Finance said an outside fund manager had disclosed a loss of about $93 million in Stream fund assets, and it suspended withdrawals and deposits. Lending vaults had taken its xUSD token as collateral: Entropy Advisors counted about $15 million of bad xUSD debt in Silo vaults and about $700,000 in a Morpho vault.
Researchers at Yields and More put the linked debt at about $285 million. Elixir’s deUSD stablecoin had lent 68 million USDC to Stream, about 65% of its backing, the same report said. A problem in one product hit users of other products who had never touched it.
Composability and Attacks
Attackers use the same building blocks. In a flash loan attack, an attacker borrows a large sum, uses it to move a price that another app trusts, and pays it back in the same transaction. This only works because separate apps can be joined in one step. Sound price feeds and borrow limits are the main defenses.
Where to Check
Before using a stacked product, users can trace each layer. Which tokens does it hold? Which markets or vaults does it use? Who can change the code? DefiLlama shows balances and past hacks, and project docs usually list what a product plugs into. More layers mean more ways to fail.
Why This Matters for Web3
Composability enhances flexibility, speeds up development, and fosters collaboration in the blockchain space. It turns isolated services into building blocks. The cost is shared risk. Users of a stacked product carry the risks of every layer under it. This entry is for education and is not investment advice.
Atomic Transactions: Why Stacks Work
On a single chain, several app calls can run inside one transaction. The transaction is atomic. Either every step works, or the whole thing is undone as if it never happened. The user only pays the network fee for the failed attempt.
This all-or-nothing rule is what makes complex stacks safe to build. A trade that borrows, swaps and repays in one step cannot get stuck halfway. If the last step fails, the loan is never taken. The same rule is what lets a flash loan attack work, which is why it cuts both ways.
Standards That Make It Possible
- ERC-20: a shared format for tokens, so any app can hold, send or price them.
- ERC-721: a shared format for NFTs, so marketplaces and wallets can list any collection.
- ERC-4626: a standard for yield vaults, adopted in 2022, so other apps can read a vault’s shares and value the same way.
Without such standards, every app would need custom code for every token. Standards turn that work into one shared interface.
Composability Across Rollups
Ethereum now runs many layer 2 networks. Each one is composable inside itself, but apps on two different rollups cannot call each other in one atomic step. Liquidity and users are split between them. Shared sequencers and cross-chain messaging aim to narrow this gap, but each adds new trust assumptions.
Frequently Asked Questions
What does “money legos” mean in DeFi?
“Money legos” is a nickname for composability. Like toy bricks, DeFi protocols can be stacked because their code is public and they share token standards. A staking token can serve as collateral on a lending market, and the borrowed stablecoin can go into a yield vault. Each piece builds on the output of another.
Does composability work across blockchains?
Partly. On one chain, contracts can call each other in a single transaction that either fully works or fully fails. Across chains, apps link through bridges or messaging layers. The steps then happen at different times and can fail on their own, and each bridge adds trust in its operators. That is why cross-chain stacks carry extra risk.
Why is composability risky?
Each layer takes on the risks of the layers below it. If one token loses its peg or one app is hacked, everything built on it can be hit. In November 2025, Stream Finance disclosed a $93 million loss in its fund assets, and the damage spread to lending vaults that had taken its xUSD token as collateral.
What is atomic composability?
It means several smart contract calls run inside one transaction, and the whole set either succeeds or fails together. If any step breaks, every change is reversed. This is possible on a single blockchain, where one transaction can touch many apps at once. Across different chains or rollups, steps happen separately, so one can succeed while another fails.
Sources: Stream Finance post on X (November 4, 2025); Entropy Advisors update on the Arbitrum DAO forum (November 7, 2025); Uniswap blog (January 31, 2025); Ethereum Improvement Proposals (ERC-20, ERC-721, ERC-4626).