BR Academy
0%
Module 1: What Is DeFi and Why It Matters·Lesson 3 of 30·9 min

Money Legos: How DeFi Protocols Compose

One of the most distinctive — and most powerful — properties of DeFi is "composability," often described with the nickname "money legos." The idea is simple: because every DeFi protocol exposes open, permissionless functions on a public blockchain, any other protocol (or any individual developer) can call those functions and build on top of them, without needing permission from the original team, a business partnership, or an API key. A lending protocol doesn't need to know or approve of the yield aggregator that plugs into it; a DEX doesn't need a meeting with the wallet app that routes trades through it. The functions are simply there, like a public API that never requires onboarding.

This is fundamentally different from traditional finance, where integrating two financial products — say, linking your brokerage account to an automated rebalancing service — typically requires formal partnerships, compliance reviews, and custom-built integrations that take months. In DeFi, because the "interface" is just a smart contract's public functions, a developer can combine five different protocols into a single new product over a weekend. This is why DeFi has grown so many layered, interconnected strategies so quickly: each new protocol doesn't have to reinvent the plumbing — it builds on top of swaps, lending, and price feeds that already exist.

The flip side, and the reason this lesson matters for your personal risk management, is that composability compounds risk as well as opportunity. If you use a strategy that chains together three protocols, you're not just exposed to one protocol's potential bug or failure — you're exposed to all three, plus the ways they interact with each other, which may not have been tested by any single team. A perfectly secure lending protocol can still lose your funds if the price oracle it depends on (often itself a separate, composed protocol) is manipulated. Understanding composability means understanding that your real risk surface in a "stacked" strategy is the sum of every layer you're touching, not just the one you interact with directly.

Worked Example

Consider a realistic three-step "lego stack" that a DeFi user might build without ever leaving their wallet app. Step one: the user swaps 1 ETH for a stablecoin on a decentralized exchange — this uses the AMM mechanics you'll learn about in Module 3. Step two: the user deposits that stablecoin into a lending protocol, which issues them a receipt token (an interest-bearing token representing their deposit plus accruing interest) — this uses the lending mechanics from Module 5. Step three: instead of just holding that receipt token, the user deposits it into a yield aggregator, a protocol whose entire purpose is to automatically move funds between different lending protocols to always capture the highest available interest rate, rebalancing on the user's behalf without any further action required.

None of these three protocols — the DEX, the lending protocol, and the yield aggregator — were built by the same team, require any business relationship with each other, or were even aware of each other's roadmap when they were designed. Each one simply exposes a standard, well-documented interface (for example, most lending protocols issue a standard type of receipt token that other protocols know how to read), and the aggregator's developers simply wrote code that calls those existing functions. The user ends up with a fully automated, compounding yield strategy assembled from three independent, permissionless pieces — the "money legos" in action.

Exercise

On paper, trace your own simple three-step lego stack. Pick a starting asset (for example, a stablecoin you already hold or plan to acquire), choose a swap step if your starting asset needs converting, and choose a yield step (lending, liquidity provision, or a yield aggregator) as your final destination. For each of the three steps, name the category of real-world protocol involved — you don't need the exact brand name yet, just whether it's a DEX, a lending protocol, or an aggregator.

Now, for each additional layer you add to the stack, write down one new risk that gets introduced at that layer specifically — for example, the swap step adds slippage risk, the lending step adds smart-contract and liquidation risk, and the aggregator step adds the risk that the aggregator's own rebalancing logic could contain a bug or be exploited. This exercise should leave you with a short list connecting "more convenience and higher automated yield" directly to "more compounding risk," which is the central trade-off of composability you'll need to weigh when choosing your own strategy in the Module 7 capstone.

Recap

  • Composability ("money legos") lets DeFi protocols plug into each other permissionlessly, enabling fast, powerful, automated strategies no single team designed.
  • Each additional layer in a stacked strategy adds its own risk, and those risks compound rather than cancel out.
  • Your three-step lego stack exercise is a risk-mapping tool you'll reuse when evaluating any multi-protocol strategy later in this course.

Resources