Composability in DeFi is the ability of smart contracts to call each other in one atomic transaction, so you can stack protocols without asking permission. A contract can borrow from Aave, swap on Uniswap, add liquidity on Curve, and stake elsewhere. The whole path completes or it all reverts.
That permissionless stacking is the money-legos idea. Flash loans are the extreme case: borrow any amount without collateral, use it across protocols, repay in the same transaction. Yield aggregators route capital for better returns. Liquidation bots combine price feeds, lending positions, and DEX execution. Builders can reuse existing protocols instead of rewriting markets from scratch.
The same property creates systemic risk. Combined paths produce states no single team tested. Many large exploits were multi-protocol sequences that were fine in isolation and unsafe together. A bug in a popular protocol can cascade. Oracle manipulation in one place hits every protocol that uses that feed. Composability is DeFi's speed advantage and its contagion path.
Composability in DeFi is the property that allows smart contracts to interact with each other enabling complex financial operations to be built by combining simpler protocols like building blocks without requiring permission or custom integration. This permissionless interoperability sparked the 'money legos' metaphor and enabled rapid financial innovation.
Complex protocol interactions produce emergent behaviors that no individual team anticipated or tested. Many major DeFi exploits involved multi-protocol sequences that individually worked correctly but created exploitable states when combined. Public contract APIs mean Aave can take Uniswap LP tokens as collateral. That stacking is composability. It also stacks risk.
DeFi Composability
Click protocols to compose them into a single atomic transaction