DeFi Composability
Protocols that plug into each other like Lego, so one transaction can lend, swap and stake.
Basically
DeFi composability lets you combine different financial apps to build more complex tools. People often call these apps 'money legos'.
Key Takeaways
- DeFi composability lets protocols interact without permission. Any smart contract can call another on the same chain, so developers can stack lending, trading and liquidity protocols into unified workflows without approval from the original creators.
- Composability is DeFi's core structural advantage over traditional finance. You can execute multi-step financial operations atomically in a single transaction, which siloed banking systems cannot do.
- The connections that enable composability also increase risk. Oracle manipulation, cascading liquidations and smart contract vulnerabilities can spread through every integrated protocol.
What Is DeFi Composability?
DeFi composability lets decentralised finance protocols work together and integrate without permission. Developers and users can combine existing financial primitives into new applications. The 'money legos' metaphor compares protocols to physical Lego bricks with standardised connectors: their standardised interfaces, including token standards, function signatures and shared state, let you snap them together into structures their original creators never anticipated.
Traditional finance needs bilateral agreements, API integrations, compliance reviews and months of negotiation to connect two financial services. In DeFi, any developer can read another protocol's smart contract, call its public functions and build on top of it within hours. Permissionless interoperability makes composability possible and is often cited as DeFi's defining advantage over conventional financial infrastructure.
How It Works
Composability relies on three technical properties. Public blockchains provide these properties by default.
A Composability Chain in Practice
Consider a multi-step workflow that shows how protocols compose. You want to maximise the yield on your ETH holdings.
Each step builds on the output of the previous one. Receipt tokens, stablecoins and LP tokens serve as connectors between protocols. If any protocol in the chain changes its interface or fails, the entire stack is affected.
Atomic Composability
Atomic composability is the most powerful form of composability: it lets you execute multiple protocol interactions within a single transaction that either fully succeeds or fully reverts. Flash loans are the canonical example, letting you borrow millions of dollars, execute arbitrage across multiple DEXs and repay the loan in one transaction. If the arbitrage fails to be profitable, the entire transaction reverts and the loan is never taken.
Yield Optimisation
Yield aggregators like Yearn Finance compose lending, borrowing and liquidity protocols to move user funds automatically into the highest-yielding strategies. These aggregators continuously rebalance across protocols, compounding rewards and optimising capital allocation without manual intervention.
Leveraged Positions
You can create leveraged exposure by looping through lending protocols: deposit collateral, borrow against it, swap borrowed assets back to the collateral type, redeposit and repeat. Each loop increases exposure. The entire chain relies on composability between the lending protocol and the DEX.
Collateral Swaps
Composability lets you swap collateral types in a lending protocol without closing your position. Instead of repaying a loan, withdrawing collateral, swapping, redepositing and re-borrowing, you can execute the operation atomically through composed contract calls.
Cross-Protocol Liquidations
Liquidation bots compose flash loans with DEX swaps to liquidate undercollateralised positions. The bot borrows funds via flash loan, repays the borrower's debt, seizes discounted collateral, sells it on a DEX and repays the flash loan, all in one transaction with zero capital requirements.
Why It Matters
Composability separates DeFi from simply being 'traditional finance on a blockchain'. Without it, each protocol would be an isolated application with its own liquidity and user base. With it, the entire ecosystem functions as an interconnected financial system where total value locked in one protocol amplifies the utility of every other protocol.
As of early 2026, DeFi protocols collectively hold approximately $130 to $140 billion in TVL across all chains, with Ethereum hosting roughly 68% of that value. The top lending and staking protocols each exceed $25 billion in deposits, making this capital simultaneously available as building blocks for other applications. The shared liquidity layer is a direct result of composability.
Builders evaluating payment and wallet infrastructure can use composability to determine how much utility users can extract from the assets they hold. Spark and other Layer 2 solutions are expanding this principle to Bitcoin, where composability has historically been limited by the UTXO model and Bitcoin Script's intentional constraints.
Composability on Bitcoin Layer 2s
Ethereum's account-based model and Turing-complete smart contracts made composability natural from the start. Bitcoin faces a different challenge: its UTXO model and deliberately limited scripting language prioritise security and predictability over programmability. Composability on Bitcoin therefore requires Layer 2 solutions that add execution environments while anchoring security to the base chain.
Several Bitcoin L2 approaches address this challenge. They do so in different ways.
Liquidity fragmentation is a key challenge across Bitcoin L2s: each L2 creates its own isolated pool of BTC liquidity, reducing the composability benefits that come from shared state on a single chain. Cross-L2 interoperability through atomic swaps and Lightning Network routing offers a path towards bridging these silos, though the experience is not yet comparable to composability within a single Ethereum-like execution environment. See the Bitcoin Layer 2 comparison for more detail.
Cascading Failures
Deeply interconnected protocols allow a failure in one to cascade through the entire stack. The May 2022 Terra/UST collapse showed this at scale: the depegging of UST and crash of LUNA triggered over $200 billion in losses across the broader crypto market, causing the insolvency of Celsius, Three Arrows Capital and Voyager Digital. None of those entities created UST, but their composable exposure to it proved fatal.
Oracle Manipulation
Composable protocols often depend on shared price oracles, so an attacker who manipulates a single price feed can exploit every protocol that depends on it. In 2025, KiloEx lost $7.5 million through a cross-chain oracle manipulation attack. Flash loan attacks that manipulate DEX-based price oracles accounted for over 83% of eligible DeFi exploits in 2024, according to security auditing firms.
Smart Contract Risk Amplification
Every protocol in a composability chain is a potential failure point. A vulnerability in a widely used token contract, lending pool or AMM affects not just that protocol but every application built on top of it. The March 2023 Euler Finance exploit ($197 million) and the September 2025 Bunni exploit ($8.4 million, targeting liquidity accounting in a protocol built on Uniswap v4) show how deeply nested dependencies amplify the impact of a single vulnerability.
Dependency and Upgrade Risk
Composable applications inherit the upgrade risk of every protocol they depend on. If a lending protocol changes its interest rate model, a yield aggregator built on top of it may behave unexpectedly; if a DEX upgrades its router contract, every protocol that calls the old address breaks. Invisible dependency chains mean that a change in one protocol requires coordinated updates across the ecosystem, and managing slippage and execution risk across multiple composed protocols adds operational complexity.
Cross-Chain Composability Standards
Composability has traditionally been limited to protocols on the same chain. Cross-chain composability, the ability to compose protocols across different blockchains, remains an active area of development. Recent standardisation efforts include the following.
These standards aim to make cross-chain interactions work as smoothly as same-chain composability. True atomic composability across independent consensus systems remains an open research problem. You can read the BtcFi overview for more on Bitcoin-specific DeFi infrastructure.
Nuri provides this glossary entry for information only, not as financial or investment advice. Always do your own research before using any protocol or technology.