What Is DeFi Composability? Money Legos Explained
What is DeFi composability? How protocols interlock like money legos — and the systemic contagion risk that creates.
DeFi composability refers to the ability of different protocols to plug into and build on top of each other, since most DeFi contracts are permissionless and publicly readable, letting a new protocol integrate an existing one's functionality directly rather than rebuilding it from scratch. This property is often nicknamed "money legos" — individual pieces (a lending market, a DEX, a stablecoin) can be snapped together into more complex financial products, but composability also means risk can propagate between protocols that were never designed to depend on each other.
What makes DeFi composable
Traditional finance systems are largely closed: a bank's internal systems don't let an outside developer plug directly into its lending logic or its liquidity. DeFi protocols, by contrast, are typically deployed as open smart contracts that anyone can call, read, and build on top of, without needing permission from the original protocol's team. A new vault strategy can call a lending market's deposit function, borrow from it, swap the proceeds on a DEX, and deposit the result into a different yield strategy — all within contracts the vault's own developers didn't need to build themselves.
Everyday examples of composability
- A yield vault (as described in our DeFi vault strategies guide) that automatically deposits into a lending market, borrows against the position, and swaps the proceeds — combining at least two or three separate protocols in a single automated strategy.
- A liquid staking token, discussed in our liquid staking explainer, being accepted as collateral in a completely separate lending market, letting staked value be reused elsewhere without unstaking.
- A DEX aggregator routing a single trade across several independent liquidity pools, treating each as an interchangeable building block.
- Flash loans themselves are only possible because of composability — borrowing, acting, and repaying within one transaction requires being able to call multiple protocols atomically.
The systemic risk side of composability
The same interconnection that makes composability powerful also means a failure in one protocol can cascade into others that depend on it, sometimes in ways neither protocol's own team fully anticipated:
- Collateral contagion — if a widely-used collateral asset (like a popular liquid staking token or a stablecoin) depegs or is exploited, every lending market and vault that accepted it as collateral is exposed simultaneously, even if those protocols themselves have no direct connection to each other beyond sharing that collateral type.
- Oracle dependency chains — if many protocols rely on the same price oracle or the same underlying liquidity pool for pricing, a single point of manipulation (as in a flash loan attack) can potentially affect multiple protocols at once.
- Unintended interactions — a protocol's contracts might behave safely in isolation but become exploitable when combined with another protocol's contracts in ways that weren't tested together, since audits (as discussed in our audits explainer) typically evaluate a protocol on its own, not every possible combination with every other protocol it might interact with.
Composability's tradeoffs
| Benefit | Corresponding risk |
|---|---|
| Faster innovation — build on existing pieces instead of from scratch | Inherited risk from every underlying piece used |
| Capital efficiency — reuse the same value across multiple protocols | Contagion — one failure can affect many dependent protocols |
| Permissionless integration, no gatekeeping | Untested combinations can expose unexpected vulnerabilities |
| Rich, flexible product design | Harder to fully audit an entire dependency chain |
Why this matters when evaluating any single protocol
Understanding a protocol in isolation is no longer enough for a full risk picture — it's also worth asking what that protocol depends on: which oracles, which collateral assets, which other protocols its vaults or integrations route through. A protocol with excellent code but heavy reliance on a single external collateral asset or oracle inherits that dependency's risk profile, regardless of how solid its own contracts are. This is an important addition to the broader checklist in our guide on evaluating DeFi protocol risk.
Can composability risk be managed?
Some mitigations exist, though none eliminate the risk entirely: diversified oracle sources, conservative collateral parameters (like the isolation mode discussed in Aave V3's design), and circuit-breaker mechanisms that pause a protocol during anomalous conditions all reduce, but don't remove, the possibility that a shock somewhere in the dependency chain propagates further than expected.
Bottom line
DeFi composability is what makes the ecosystem's rapid innovation possible — protocols building on each other like interoperable pieces rather than each starting from zero — but that same interconnection creates systemic risk that spreads along dependency chains few users, and sometimes few protocol teams, fully map out in advance. Evaluating a protocol increasingly means evaluating what it depends on, not just its own code.
Related articles
This article is for educational purposes only and is not financial advice. DeFi involves significant risk, including total loss of funds. Always do your own research.