DeFi Composability Imports Other People's Trust Boundaries
Composability is not just contracts calling contracts. It is your protocol accepting another system's permissions, pricing, and failure modes as its own.
Establish the problem with technical depth
DeFi people still describe composability with the language of product design. Lego bricks. Reusable primitives. Faster innovation. That framing hides the part attackers actually care about.
Composability is how local trust decisions become system-wide loss events.
The cleanest example is Nomad's August 2022 bridge failure. Nomad later said the bridge was hacked for more than $186 million on August 1, 2022. In its root cause analysis, the team said an implementation bug in the Replica contract let forged messages pass authentication. That is not just a bridge bug. It is a composability bug in the deeper sense: every contract downstream that trusted Replica for inbound truth inherited the same failure the moment the authentication boundary broke.
Then there is LI.FI's July 16, 2024 incident. LI.FI said a newly added facet let an attacker exploit wallets that had granted infinite approvals, with around $11.6 million stolen across 153 wallets. The technical detail matters more than the headline. A missing validation check in a routing layer turned a convenience integration into a generalized asset-drain path. Teams often talk about aggregators as UX infrastructure. Attackers treat them as authority concentrators.
Those two incidents look different on the surface. One is cross-chain message authentication. One is routing and token approvals. The shared lesson is harsher than "integrations are risky." Composability keeps importing authority from outside your repository. Messages, approvals, oracle outputs, pool prices, governance balances, bridge finality, and adapter behavior all become part of your protocol's security model once your code acts on them.
That matters to founders and investors because growth-by-integration can increase attack surface faster than it increases defensibility. A protocol that adds more bridges, more adapters, more collateral types, and more external execution routes is also adding more ways for somebody else's bad assumption to become its loss event. It matters even more to CTOs and Solidity engineers because the system users fund is not the architecture diagram. It is the live bundle of contracts, approvals, routes, markets, and operators that can still move value tonight.
The mechanism, the mistake, the misunderstanding
Composability creates security risk because it turns foreign truth into local authority.
That can happen in several ways. A bridge can tell your contract that an action already happened somewhere else. A router can move user funds through external targets. An oracle or thin venue can tell your lending logic what collateral is worth. A governance token can tell treasury logic who is allowed to decide. In every case, your code is only as safe as the assumptions behind the external signal it accepts.
The dangerous pattern often looks harmless:
function route(address target, bytes calldata data) external {
require(allowlisted[target], "unsupported target");
(bool ok, ) = target.call(data);
require(ok, "call failed");
}
There is nothing obviously absurd here. In fact, this is close to how modern DeFi products become usable: they route, aggregate, delegate, and compose. But the whole safety story now depends on what target is allowed to be, what data is allowed to do, how approvals were granted, what changed in the latest upgrade, and whether the caller can make the system honor an external action that your team never intended to trust. The moment one of those checks is missing or stale, the router stops being product plumbing and starts being an attack surface.
That is why the LI.FI postmortem is so instructive. The exploit did not come from some mystical property of cross-chain UX. It came from a missing validation check around arbitrary calls in a newly deployed facet. The integration layer was the security boundary.
Nomad makes the same point about authentication. Once downstream contracts rely on a messaging layer to certify inbound state, any flaw in that layer is not isolated infrastructure debt. It is direct application risk.
The usual mistake is classification. Teams say "bridge exploit," "oracle exploit," "flash loan attack," or "aggregator incident" and think they have explained the failure. Usually they have only named the visible route. The better question is simpler: which external truth did the protocol accept, and what should have constrained that truth before money moved?
The misunderstanding underneath all of this is that composability only expands functionality. It does not. It expands dependency power. Every new integration is a decision to inherit another team's upgrade process, access controls, operational discipline, liquidity profile, and worst day. If you cannot explain what authority an integration imports, you do not yet understand what the feature costs.
What good looks like
Good composability security starts with naming imported authority precisely.
A serious team should be able to enumerate every external component that can do one of five things: move assets, define price, authenticate state, execute arbitrary calls, or change privileged control. That map should include bridges, routers, oracle venues, governance modules, relayers, off-chain signers, adapters, and any token standard with non-trivial callback behavior. If a dependency can make your system honor bad truth, it belongs on the same threat model as your own contracts.
After that, the goal is to reduce blast radius rather than pretend integrations can be made risk-free. Approval scope should be minimized. Adapters should be allowlisted tightly. New collateral or bridge routes should launch with caps before they launch with ambition. Privileged integration changes should sit behind time delays and separated roles, which is why OpenZeppelin's governance tooling emphasizes timelocks and its access-control docs emphasize explicit permissions. The point is to stop one bad dependency decision from becoming immediate treasury finality.
Testing also has to move up a level. Happy-path unit tests are not enough for composable systems because attackers do not respect module boundaries. Foundry's invariant testing is useful here because it checks properties that must remain true across many call sequences, not just one intended flow. Foundry's fork testing matters for the same reason: it lets teams test against live chain state, live liquidity shape, and live integration behavior instead of against polite mocks that never misbehave.
Operationally, every integration change should be treated as a security change. New router facet? Security review. New bridge adapter? Security review. New oracle fallback? Security review. New collateral venue with thin liquidity? Security review. The question is whether the change gives any outside system a new way to influence what your protocol believes.
For founders and investors, good looks like asking sharper diligence questions. What is the maximum loss this integration can cause if it lies, fails, or gets upgraded badly? Who can pause it? Who can replace it? How quickly can approvals be revoked? Which dependency is still trusted because the team has not had time to constrain it properly? Those questions are more valuable than a slide that lists fifteen integrations and calls that "ecosystem traction."
ChainShield's angle
ChainShield's view is that composability should be described as imported trust, not as reusable code.
That wording change sounds small. It is not. Once a team starts talking about imported trust, the review target changes immediately. The team stops asking only whether its own Solidity is clean and starts asking which external truths can still mutate balances, permissions, or solvency. That is a much closer match to how real losses happen.
This is also why we think the market still underrates integration discipline. Plenty of teams know how to audit a contract in isolation. Fewer know how to prove that a new route, a new dependency, or a new pricing input did not quietly widen authority somewhere the original review never modeled. In live DeFi, that is often the difference between a feature launch and an incident report.
Composability remains one of DeFi's real advantages. But it is not free leverage. It is borrowed trust with onchain settlement. The teams worth backing are the ones that know whose trust they imported, how far it reaches, and what breaks if that trust goes bad.
ChainShield Discovery Runs are designed to identify high-risk issues quickly, validate what matters, and give engineering teams a faster path to remediation.
Request Security Quote