veda.ng
Back to Glossary

Composability

Composability in DeFi is the property that allows smart contracts to interact with each other seamlessly, enabling complex financial operations to be built by combining simpler protocols like building blocks without requiring permission or custom integration. A contract can call another contract atomically: borrow from Aave, swap on Uniswap, provide liquidity on Curve, stake somewhere else, all in a single transaction that either completes entirely or reverts entirely. This permissionless interoperability sparked the 'money legos' metaphor and enabled rapid financial innovation. Flash loans exemplify composability's power: borrow any amount without collateral, use it across multiple protocols, and repay within the same transaction. Yield aggregators automatically route capital across protocols seeking optimal returns. Liquidation bots protect lending protocols by combining price feeds, lending positions, and DEX execution. The innovation rate accelerated because builders could combine existing protocols rather than building everything from scratch. However, composability creates systemic risks. 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. A bug in one popular protocol can cascade across the ecosystem. Oracle manipulation in one protocol affects all protocols using that oracle. Composability is DeFi's greatest strength and its greatest source of systemic risk, the same property enabling innovation enables novel attack vectors.