Home / Wiki / C / Composability

Composability

Cryptocurrency and Digital AssetsUpdated 05 Nov 2026

Composability is the ability of software components to be combined freely into new systems. In crypto it means that smart contracts and decentralised applications on a public blockchain can call each other, reuse each other's tokens and stack on top of one another without asking anyone's permission. A lending protocol can accept another protocol's token as collateral, and a trading app can route orders through several exchanges in a single transaction.

The idea is closely tied to decentralised finance (DeFi), where it is often described with the phrase "money legos". It depends on three features of public chains: shared state that every contract can read, open-source code, and common token standards such as ERC-20.

01

Composability in plain terms

Think of a set of plastic building bricks. Every brick, whoever made it, has the same studs on top and holes underneath, so any brick fits any other. You can build a house, take part of it and turn it into a car, or add someone else's wheels.

On a blockchain, each app is a brick with standard connectors. A token made by one team works in a wallet built by a second team and an exchange built by a third. Nobody needs to sign a partnership deal first. The benefit is that new products can be assembled quickly. The risk is that a cracked brick near the bottom can bring down everything built on it.

02

How composability works

On the Ethereum blockchain and similar networks, every contract lives in one shared environment, the Ethereum Virtual Machine (EVM), and can call any other contract's public functions. Three properties make that useful:

  • Standard interfaces. Token standards define the same functions (transfer, balance, approve) for every token, so applications can handle tokens they have never seen before.
  • Permissionless access. Any developer can call a deployed contract. There is no API key or contract to sign, unlike most APIs in traditional finance.
  • Atomic execution. Several calls inside one transaction either all succeed or all revert, a property described in atomic. This "synchronous" composability lets a user borrow, swap and repay in one step.
03

Examples in DeFi

04

Risks of composability

  • Contagion. If one protocol fails, every protocol that holds its token or relies on its prices can be hit. Dependencies are often several layers deep and hard to see.
  • Price manipulation. Attackers use flash loans to borrow large sums, move a thinly traded market, and exploit a protocol that reads that market as a price source. In February 2020 two attacks on the bZx lending platform used this pattern, and it has been repeated many times since. Robust oracles are the usual defence.
  • Unexpected interactions. Contracts audited separately can behave badly together, for example through reentrancy, where one contract calls back into another before its state has been updated.
  • Ordering attacks. Multi-step transactions visible in the mempool can be targeted by front-running.
05

Composability across chains and layers

Full synchronous composability exists only within one chain. Once applications are spread across Layer 2 rollups, separate chains or shards, calls between them become asynchronous: a message is sent and the answer arrives later, so an atomic borrow-swap-repay is no longer possible. This is a major trade-off in scaling design, and a reason for projects such as Optimism's Superchain and other attempts at blockchain interoperability to restore cross-chain composability.

The concept also matters outside crypto. Supporters of programmable money and tokenised bank deposits argue that standard, combinable building blocks could let financial products be assembled the way software is today, while regulators note that the same linkages make risks harder to contain.

Last updated 05 Nov 2026