Money legos are the reusable pieces of decentralized finance: a swap, a loan, a vault share or a price feed that another app can plug in because the contracts are public. Stacking those pieces is called composability. It is why a new DeFi product can go live by calling Aave, Uniswap or a vault standard instead of rebuilding a bank from scratch. The same stacking is the risk. Every block you add is another contract, oracle, admin key or exit rule your funds now depend on.
Money legos, defined. A money lego is one DeFi building block with a job other software can call, such as “swap these tokens,” “borrow against this collateral” or “deposit and mint a vault share.” Money legos are those blocks used together. The dependency risk is simple: if one block breaks, pauses or loses its peg, every strategy stacked on it can break with it.
New to the wider system? Start with the DeFi overview, then come back here for how the pieces fit. The DeFi category collects the rest of the guides. This page explains mechanics and failure modes. It does not quote live yields, and a stacked strategy can lose principal.
What are money legos?
People reached for the Lego metaphor because the pieces were designed to connect. On a public blockchain, a smart contract can hold tokens and expose functions. Another contract can call those functions without signing a partnership, opening an account or asking a bank for permission. The “studs” that make the bricks fit are shared standards: an ERC-20 token that any app can transfer, and an ERC-4626 vault share with the same deposit, mint, withdraw and redeem shape.
A single money lego is usually small:
- A token with a balance and a transfer function.
- A pool that swaps one token for another.
- A lending market that accepts collateral and issues debt.
- A vault that accepts a deposit and returns a receipt token.
- An oracle that reports a price other contracts trust.
- A flash loan that lends only for the length of one transaction, and reverts if it is not repaid.
Developers stack them into a product. Users meet the stack through a website that bundles the steps. The website can feel like one app. Underneath, your position may depend on four or five independent systems, each with its own upgrade keys and its own way of failing.
That is a change from the 2020–2022 version of this idea, when a typical article listed Aave, Compound, Yearn, Curve and Synthetix and stopped there. Those protocols still matter as history, and some are still live infrastructure. They are no longer the whole set. By 2026 the common stacks also include isolated lending markets, curator vaults, intent-based trading and yield tokens that wrap something else. The nickname stayed. The bricks got more layers.
What composability means
Composability is the ability to combine those independent pieces into one workflow. Three levels are worth separating, because people use the word for all of them.
Token composability. If a token follows a common interface, a lending market, a pool and a wallet can all hold it. Wrapped assets, liquid-staking tokens and vault shares spread for this reason. The token standard does not check whether the issuer, the bridge or the underlying asset is sound. It only makes the token easy to pass around.
Atomic composability. Inside one execution environment, several calls can sit in a single transaction. Ethereum mainnet is one environment. A single rollup, such as one Arbitrum or Base chain, is another. If the swap fails, the borrow fails, or the contract rejects the price, the whole transaction reverts and the earlier steps do not stick. That all-or-nothing property is the feature developers mean when they say money legos “just work.”
Asynchronous composability. A workflow that starts on one chain and finishes on another is a sequence of separate transactions. A bridge, a message, or a filler has to carry the result across. Those steps can succeed on the first chain and fail on the second. Waiting, relayers, message verification, challenge windows and bridge liquidity are part of the product even when the interface hides them.
Atomic success is also easy to over-read. A transaction that reverts has protected you from a half-finished set of calls. A transaction that succeeds has only proved that the contracts accepted the calls at that moment. You can still be liquidated an hour later, sit in a vault whose assets are borrowed out, or hold a receipt token that no longer matches the asset you thought you owned.
What a stack looks like in one transaction
A developer can write a contract that orders the legos. In one Ethereum transaction the contract might:
- Post collateral to a lending market and borrow a stablecoin.
- Swap part of the borrowed stablecoin through a pool.
- Deposit the rest into a vault that issues a receipt token.
- Repay the flash-loan portion, if one was used, before the transaction ends.
If step 2 cannot meet the minimum amount the contract demanded, steps 1 and 3 revert with it. The user does not end the transaction half-borrowed and unswapped. That is the practical meaning of atomic composability, and it is why flash loans exist: Aave and other lending markets will lend without collateral for the length of a transaction, because the loan is repaid or the entire transaction disappears.
This is also where older explainers went wrong. A 2022 walkthrough often told the reader to borrow on Aave, “stake” on Curve, trade on Uniswap, pull the funds and “take profit.” Curve liquidity is not staking. The order of those steps can be coded. Profit is not a property of the stack. Slippage, borrow interest, vault losses, a collateral price move and a failed exit can all leave the position worth less than it started, including after a transaction that “succeeded.”
Use the sequence as a map of dependencies, not as a trade. Before anyone builds it, the map should name every contract the wallet will call, every token it will hold, and who can pause or upgrade those contracts tomorrow.
From Aave’s shared pool to Morpho’s markets and vaults
Aave is still the clearest lending lego for most readers. Suppliers put an asset into a shared market. Borrowers post other assets as collateral. Interest moves with utilization: when more of the pool is borrowed, suppliers earn more and withdrawals get tighter. Each listed asset has a price feed, and governance sets the risk parameters for that market. That shared pool is why Aave became a base block other apps integrated. Our Aave guide covers the protocol itself.
Morpho shows how a lego can change jobs. Morpho’s own forum history is the clean version. In June 2022 Morpho launched as an optimizer on top of Aave and Compound: it matched lenders and borrowers peer to peer and used the underlying pools as a backstop, so the user was still inside Aave or Compound’s risk system. At the start of 2024 Morpho shipped its own base layer, often called Morpho Blue and later Morpho V1: permissionless, isolated markets with the risk decisions pushed out to separate vaults. MetaMorpho, now described as Morpho Vaults, lets a curator allocate one deposit asset across those markets, with supply caps and roles the depositor has to inspect.
Treat the optimizer as the historical layer. Morpho’s forum set 7 September 2025 as the date the Association would remove front-end support for the Aave V2, Aave V3 and Compound V2 optimizers and replace it with a migration path to Morpho V1. On 17 December 2025 the Association reported that the Aave V2 and Compound V2 optimizer deprecation had been executed, and that those contracts would stay unpaused so remaining users could exit. A 2022 line that says “Morpho improves your Aave rate” describes that older layer.
The 2026 version of the same idea is different, and the dependency list changes with it:
- Depositing to Aave depends on Aave’s contracts, the asset, the oracle and Aave governance.
- Depositing to a Morpho vault depends on Morpho’s market contracts, the curator, the allocator and guardian roles, each collateral the vault is allowed to touch, and each oracle those markets use.
- “Morpho” on its own is not a risk rating. Two vaults on the same protocol can lend against completely different collateral.
Morpho’s public writing calls this an aggregated stack: a thin, shared market primitive, with curation layered on top so liquidity can meet in the primitive while risk stays in the vault. That is still composability. It is a different shape from Aave’s one big pool, and it asks the user to read a vault rather than a brand.
From Uniswap pools to aggregators and intents
Uniswap-style pools remain the swap lego. A pool holds two or more assets, a trader calls a router, and the pool’s balances set the price. Other apps compose on that by calling the router from their own contract. The Uniswap tutorial walks through swaps and liquidity from the user’s side.
Two newer layers sit on top of those pools.
Aggregators ask many pools, and sometimes many protocols, which route fills an order. The user still requests a swap. The app inserts the route. The money legos are the pools underneath. The new dependency is the router and any approval it holds.
Intents change the request. Instead of naming the pools, the user signs the outcome they will accept: at least this much of token B for this much of token A, before this deadline. Someone else figures out the route.
UniswapX is Uniswap’s version. Its docs describe an auction-based protocol: the swapper signs an order, fillers compete to settle it, and fillers can use on-chain pools or their own inventory. Uniswap says the swapper does not pay gas for the fill and pays nothing if the fill fails. The signature still authorizes a token transfer through Permit2 if the order is filled inside the user’s price limit. A filler, a reactor contract and that approval are now part of the stack.
CoW Protocol batches signed intents and runs an auction among solvers. The solver that produces the most surplus for the batch settles it on-chain. The settlement contract checks the user’s limit price and amount. Solvers can match traders directly when two orders cross, or reach out to pools. The user depends on the vault relayer approval, the settlement contract and the solver competition, even though the interface looks like a normal swap.
Across chains, Uniswap Labs and Across proposed ERC-7683 so cross-chain intents can share an order format and a settlement interface. A shared format lets fillers compete across apps. It does not collapse two chains into one atomic transaction. The destination fill can still fail, arrive later, or depend on the messaging system the filler used.
The user-facing lesson: an aggregator or an intent system can improve the price and hide the route. Hiding the route does not remove the pools, the filler, the approval or the chance that the quote and the settlement differ. Read the token approval and the minimum you will accept before you sign.
Stablecoin yield stacking
Stablecoin yield is where money legos stop being an abstract developer idea and become a position in a wallet. The base block is usually dull, which is a virtue: supply USDC or a similar stablecoin to a lending market or a savings vault, and receive a receipt. On Aave that receipt is an aToken. On many newer vaults it is an ERC-4626 share. The receipt is itself a lego. Another protocol can hold it, lend against it, or split it.
Common stacks, described without a rate:
- One block. Supply a stablecoin to a single lending market. You depend on that market, that stablecoin’s issuer, and the oracle if borrowers use other collateral.
- Vault on a market. A curator vault deposits your stablecoin into several lending markets. You add the curator and every market on the allowlist.
- Yield split. Pendle can split a yield-bearing token into a principal token and a yield token. The principal token is bought below the amount of underlying it can be redeemed for at maturity, which is how a fixed rate appears. The fixed rate is denominated in the underlying asset. If that asset depegs or cannot be redeemed, the “fixed” position loses value with it. Maturity, the secondary market and Pendle’s contracts are extra blocks.
- A loop. Deposit the stablecoin, borrow more of it against the receipt, and deposit again. Each loop adds exposure to the same oracle, the same collateral rule and the same withdrawal liquidity. The position gets larger relative to your starting capital. A loss in the base asset or a jump in utilization hurts a looped position more than a plain deposit.
None of these is a recommended allocation, and this article deliberately does not print APYs. Advertised rates move with utilization, incentives and governance, and a number copied into a composability guide would be stale the week it was published. For a dated, risk-adjusted comparison of Aave, Fluid, Spark, Sky, Morpho, Pendle, Ethena and Curve, use the stablecoin yields guide. Its current snapshot is 15 October 2026. Check the live market before you deposit, because those rates move.
If you cannot say, in one sentence, who pays the yield and which contracts sit between you and the original stablecoin, the stack is ahead of the homework.
When one block breaks: 2022 to 2026
Composability failures are not one bug with one logo. Three public cases show three different ways a shared block spreads damage. Figures below are the ones those sources published. They are incident history, not a current market snapshot.
May 2022: TerraUSD was treated as a normal stablecoin lego. UST was plugged into Anchor, Curve pools and bridges as if a peg and a high deposit rate were durable building materials. Chainalysis wrote that Anchor paid 19.5% APY on deposited UST for most of its life, and that only about one-half to one-sixth of that UST was lent to borrowers at a time. When large holders pulled UST and Curve liquidity thinned, the peg broke, Anchor saw a run, and LUNA was issued against the unwind. A Federal Reserve discussion paper put the combined UST and LUNA collapse at about $50 billion of market value inside a week, and described the damage traveling to other networks through bridges that had issued wrapped UST and LUNA for use in outside apps. Protocols that had accepted UST as collateral or liquidity inherited a peg failure they did not design.
30 July 2023: a shared compiler bug hit Curve pools, then the loans backed by CRV. Vyper versions 0.2.15, 0.2.16 and 0.3.0 shipped a broken reentrancy lock. Curve pools compiled with those versions could be drained. Chainalysis reported approximately $70 million taken from pools including JPEG’d’s pETH, Alchemix’s alETH, Metronome’s sETH and Curve’s CRV/ETH pool. White-hat and MEV activity touched some of those funds afterward, so a net-loss figure depends on the date. The composability problem showed up in lending. CRV was collateral. On 1 August 2023, Chaos Labs told Aave governance that the position in focus was a loan exceeding $60 million of USDT. Later that day Gauntlet published a snapshot of the same account: 267.4 million CRV backing 54.2 million borrowed USDT, an effective liquidation price of $0.368, and thin on-chain CRV liquidity. A bug in pool contracts had become a bad-debt risk for a lender, because the collateral was Curve’s own token.
3 November 2025: Balancer’s composable stable pools. Balancer’s postmortem says V2 Composable Stable Pools were exploited that morning, with an estimated $94.8 million taken. The immediate bug was rounding in the exact-out swap path: the output amount was scaled and rounded down in a way that undercharged the input. The pool feature that made the attack practical was the composability feature. These pools hold their own pool token as one of the assets, so a batch swap can join or exit in the same way it swaps, including a flash-swap style borrow of the pool token that must be repaid by the end of the batch. The attacker drained a pool into a low-liquidity state, then repeated tiny swaps so the rounding error compounded, and repaid the internal borrow with the pool left short. Balancer wrote that pools which were not using the yield-token rate providers and the composable pool-token design were not on this path. Other researchers put a higher number on the incident once forks were included. The teaching point does not need the larger figure: a feature built so pool tokens could plug into the rest of DeFi widened the attack.
The pattern across the three years is consistent. The block that other apps trusted — a stablecoin, a compiler, a pool token — failed, and the apps that had integrated it had already accepted that failure mode.
Layer 2 composability has extra caveats
Rollups made the bricks cheaper to click together. They did not copy Ethereum’s single shared ledger.
Inside one rollup, atomic composability still holds. A contract on Base can call another contract on Base in one transaction, and the transaction can revert as a unit. For a strategy that never leaves that rollup, the money-lego experience is close to mainnet, with its own sequencer, gas token and contract addresses.
Across rollups, it does not. A Base transaction cannot force an Arbitrum or Ethereum mainnet call to succeed or revert with it. Crossing requires a bridge, a message, or an intent filler who already holds inventory on the destination. Those helpers can be fast. They add their own solvency, messaging and liquidity assumptions. ERC-7683 standardizes the order. It does not remove the gap.
The canonical exit is slow on optimistic rollups. Arbitrum’s docs say a withdrawal through the official bridge takes roughly a week. The dispute window alone is 45,818 Ethereum blocks, about 6.4 days, and batch posting plus assertion timing sit on either side. The delay exists so a fraudulent rollup assertion can be challenged before the withdrawal is paid on Ethereum. Arbitrum also says third-party “fast bridges” skip the wait and are run by someone else. Using one replaces a waiting period with a new counterparty.
The same ticker is not the same balance. USDC on Ethereum, USDC on Base and a bridged dollar token on another rollup are different contracts with different issuers or bridge assumptions. A vault that accepts “USDC” may accept a specific address on a specific chain. Depositing the lookalike is a composability mistake, not a pricing mistake.
A sequencer can halt one rollup while the others continue. An L2 can stop producing blocks, delay inclusion or reorder transactions during an outage. A stack that must rebalance between mainnet and that rollup can get stuck on the side that is still moving. Soft confirmation from a sequencer is also earlier than Ethereum finality. A state that looks settled on the rollup can still be waiting on the parent chain.
Liquidity is fragmented. A market that is deep on Ethereum can be thin on the rollup where the interface sent you. The composable calls still succeed. The price and the exit size are worse. Cheaper gas makes it easier to build a stack that is too large for the pool it sits in.
Shared sequencers and real-time proving are active research topics for synchronous cross-rollup calls. Until the chain you are using documents that property for the specific networks in your route, assume two chains means two transactions.
How to read a stack before you use it
Name the blocks in order, from the asset you deposit to the receipt in your wallet. For each block, write the failure that would actually hurt.
- Chain and token address. Confirm the network in the wallet and the contract address from the project’s own docs. A matching ticker on the wrong chain is a different asset.
- Who can upgrade, pause or liquidate. A proxy admin, a governor, a curator, a guardian or an issuer freeze can change the position after you deposit.
- Oracle and collateral. If any loan depends on a price, find the feed and the liquidation rule. A vault that lends against several collaterals has several of these.
- Exit, not TVL. A large market can still have the assets borrowed, queued or bridged. Ask how you get the original token back, and how long that takes.
- Approvals. Prefer a limited allowance over an unlimited one, and revoke it when the position is closed. The approval is a lego you left connected.
- What “success” will not save you from. Atomic revert protects a broken transaction. It does not protect a later depeg, a governance change or a halt on another chain.
- Whether you can explain the yield. If the extra return comes from a loop, a reward token, another chain or a curator’s allowlist, the extra return is the price of those dependencies.
Then compare the stack with the simplest version of the same job. For dollar yield, that comparison is the point of the stablecoin yields guide: a single, legible lending market against vaults and structured products that stack more blocks. For the rest of the map — exchanges, stablecoins, staking, derivatives — the DeFi overview is the hub, and the DeFi category is the shelf.
Key takeaway
Money legos are real, and they are ordinary. A money lego is a public financial function other apps can call. Money legos, plural, are what you get when those functions are stacked: faster products, more routes, and a dependency chain that fails together. Atomic composability on one chain is the strong version. Cross-chain and cross-rollup routes are coordinated, not atomic. Aave’s shared pools, Morpho’s vaults, Uniswap’s pools and the intent systems around them are the current bricks. None of them pays you for stacking. They charge you, in risk, for every block you cannot explain.
Frequently asked questions
What are money legos?
Money legos are DeFi building blocks that fit together because smart contracts can call each other. A swap, a loan, a vault share and a price feed are typical blocks. Developers stack them into new products, and users inherit every dependency in the stack.
What is a money lego?
A money lego is a single one of those blocks: one job, exposed by a contract, that another app can reuse. A lending market is a money lego. The vault that deposits into several lending markets is a second money lego stacked on the first.
What is composability in DeFi?
Composability is the ability to combine those blocks into one workflow. On a single chain or rollup, the calls can be atomic, so they all settle or all revert. Across chains, the steps are separate and can fail independently.
Are money legos the same as yield farming?
No. Yield farming is one way people use the blocks, usually by depositing assets to earn fees, interest or reward tokens. Money legos are the underlying pieces. A stack can be a simple swap with no yield at all.
Do money legos work on layer 2 networks?
They work inside one layer 2, where contracts share an execution environment. They do not work atomically across layer 2s or back to Ethereum. Official optimistic-rollup withdrawals, including Arbitrum’s bridge, take roughly a week. Faster bridges add a third party.
Why can money legos increase risk?
Each block adds a contract, a token, an oracle, an admin key or an exit rule. A failure in a shared block spreads to every product that integrated it. TerraUSD in 2022, the Curve Vyper exploit in 2023 and Balancer’s composable stable pools in 2025 are public examples.
Is Morpho still a layer on top of Aave?
That was the 2022 optimizer, which sat on Aave and Compound. Morpho later shipped its own isolated markets and curator vaults. In December 2025 Morpho reported that the Aave V2 and Compound V2 optimizer instances had been deprecated, with exits left open. A current Morpho vault deposit is a Morpho position.
Can you stack stablecoin yields safely?
You can stack them, and each added vault, loop, bridge or maturity adds a way to lose principal. No stack is safe by default. Compare the simple lending market with the stacked version, and use the stablecoin yields guide for a dated snapshot rather than a promised rate.
Sources
- EIP-4626: Tokenized Vault Standard
- Morpho: completing the deprecation of the optimizers and the December 2025 V2 optimizer update
- Morpho on the aggregated stack and MetaMorpho vaults
- UniswapX overview
- CoW Protocol: flow of an order
- ERC-7683 cross-chain intents
- Chainalysis on the TerraUSD collapse and the Federal Reserve discussion paper on interconnected DeFi
- Chainalysis on the July 2023 Curve pool exploits and the Aave governance update, including Gauntlet’s 1 August 2023 position snapshot
- Balancer’s 3 November 2025 postmortem
- Arbitrum bridge withdrawal timing
Incident figures are quoted from those sources and can differ across write-ups once recoveries or forks are included. Protocol designs keep moving. Re-check the project’s own docs before you treat a stack on this page as the live system.
Share
Found this useful?
Share it with someone who'd want to read it.
Related

DeFi Explained: How Decentralized Finance Works in 2026
DeFi uses smart contracts for trading, lending, stablecoins, staking, derivatives and onchain asset management. Learn how it works in 2026, where decentralization stops and which risks matter.

Konomi Network ($KONO): bringing money markets to Polkadot
Utilizing Substrate as a development blueprint, Konomi Network aims to develop a fully interoperable service product that allows users to…

Shadows Network ($DOWS): new hub for synthetic assets?
Shadows Network ($DOWS) aims to be a hub for people to issue, trade, lend and borrow synthetic assets.
