back

money legos: what makes decentralized finance compelling

Blockchains became interesting because they made money programmable.

That sentence gets repeated often, but it is worth taking seriously. The important shift is not just that people can send tokens to each other without a bank. The deeper shift is that capital can become a variable inside software.

Once capital can be represented directly in code, financial systems stop being only institutions and start becoming protocols. A smart contract can hold assets, move assets, price assets, lend assets, lock assets, split assets, create claims on assets, and settle those claims automatically.

That is the core idea behind decentralized finance.

Before DeFi:

   capital lives inside institutions
   users interact through banks, brokers, exchanges, and clearing systems


After DeFi:

   capital lives inside smart contracts
   users interact with programmable financial protocols

The compelling part is not any single application. It is the fact that these applications can connect to each other.

A lending protocol can accept an asset created by a staking protocol. An exchange can route through liquidity from several AMMs. A yield vault can deposit into lending markets, LP positions, and staking contracts. A derivatives protocol can use oracle prices, stablecoins, liquidity pools, and collateral vaults created by other protocols.

This is why DeFi is often described as money legos.

Each protocol is a building block. The output of one protocol can become the input to another.

capital as a variable

In normal software, variables represent data.

user_balance = 100
asset_price = 2500
position_size = 5

In DeFi, those variables are not only numbers in a database. They can represent actual claims on capital.

A token balance can represent dollars. Another token can represent a share of a liquidity pool. Another can represent staked ETH. Another can represent debt. Another can represent the right to a future payoff. Another can represent the outcome of an event.

USDC
   claim on dollars

stETH
   claim on staked ETH

LP token
   claim on assets inside a liquidity pool

aToken or cToken
   claim on supplied lending capital

perp position
   claim on leveraged price exposure

prediction market share
   claim on an outcome payoff

Once these claims are represented as tokens, they can move through other contracts.

That is the key difference.

In traditional finance, integrations require business development, legal agreements, clearing relationships, broker access, custody arrangements, and private APIs. In DeFi, a contract can often integrate another protocol by calling its public interface.

Protocol A creates an asset
        ↓
Protocol B accepts it as collateral
        ↓
Protocol C builds leverage on top
        ↓
Protocol D packages the position into a vault

This is what makes DeFi feel different from financial technology built only around apps. The apps are not the primitive. The contracts are.

the first money legos

The earliest DeFi primitives were simple but powerful.

The most important categories were:

1. Tokens
2. Automated market makers
3. Lending protocols
4. Stablecoins
5. Liquid staking
6. Derivatives
7. Vaults
8. Prediction markets

Each one created a new way to represent or transform capital.

tokens

Tokens are the base layer.

A token is a programmable asset. It can represent money, ownership, access, collateral, debt, liquidity, governance power, or a claim on some future payoff.

Token
   ↓
transferable balance
   ↓
smart contract readable
   ↓
composable with other protocols

This sounds basic, but it is the foundation for everything else.

If money can be represented as a token, then money can be used by any contract that understands that token standard. A smart contract does not need a bank account. It can simply hold USDC, ETH, WBTC, or any other on chain asset.

That makes financial applications much easier to compose.

automated market makers

Automated market makers are one of the clearest examples of programmable finance.

An AMM is a smart contract that holds two or more assets and lets users trade against the pool. Instead of relying on a centralized exchange or a traditional market maker, the contract itself quotes prices using a formula.

liquidity providers
        ↓
   deposit assets
        ↓
┌───────────────────┐
│ AMM pool          │
│                   │
│ token A reserve   │
│ token B reserve   │
└─────────┬─────────┘
          ↓
       traders

The important innovation was not only that AMMs enabled swapping. It was that liquidity became programmable and permissionless.

Anyone could create a market. Anyone could supply liquidity. Anyone could trade against the pool. Other protocols could route through it.

This created a base layer for on chain exchange.

New token
   ↓
AMM pool
   ↓
tradable asset
   ↓
usable by other protocols

Without AMMs, DeFi would have struggled to bootstrap liquidity for long tail assets.

concentrated liquidity

Concentrated liquidity AMMs improved the basic AMM model by letting liquidity providers choose the price ranges where their capital is active.

Instead of spreading capital across every possible price, LPs can place capital near the current market price.

Basic AMM:

0 ─────────────────────────────── ∞
capital spread everywhere


Concentrated liquidity:

0 ─────────────[ active range ]─── ∞
                capital here

This makes AMMs more capital efficient. It also makes LPing more like market making.

The interesting part is that the LP position itself becomes a more complex financial object. It is not just a deposit into a pool. It is exposure to a price range, fee flow, and inventory rebalancing.

That creates more legos.

Concentrated LP position
        ↓
can be managed by a vault
        ↓
can be tokenized
        ↓
can be used in structured strategies

The more expressive the primitive, the more other protocols can build around it.

lending protocols

Lending protocols are another foundational money lego.

Users deposit assets into a smart contract. Borrowers borrow against collateral. Interest rates adjust based on supply and demand.

lenders
   ↓ deposit
┌───────────────────┐
│ lending pool      │
└─────────┬─────────┘
          ↓ borrow
      borrowers

The simple version is:

Supplier deposits USDC
        ↓
Receives a yield bearing token
        ↓
Borrower deposits ETH collateral
        ↓
Borrower borrows USDC

The composability comes from the receipt token. If a user deposits USDC into a lending protocol, they may receive a token representing their claim on the pool. That token can then be used elsewhere.

USDC
   ↓ deposit into lending protocol
aUSDC
   ↓ use as collateral
borrow ETH
   ↓ swap ETH
enter another position

This is powerful, but also dangerous. Composability can create leverage chains. A user can borrow against an asset, use the borrowed asset in another protocol, then use that position somewhere else.

collateral
   ↓
borrow
   ↓
swap
   ↓
LP
   ↓
borrow again

Money legos increase expressiveness. They also increase systemic risk.

stablecoins

Stablecoins are the unit of account layer for DeFi.

Without stablecoins, most DeFi activity would be priced directly in volatile crypto assets. Stablecoins make it possible to denominate trades, loans, derivatives, and yields in dollar like units.

Stablecoin
   ↓
quote currency
   ↓
collateral asset
   ↓
settlement asset
   ↓
unit of account

USDC, USDT, DAI, and other stablecoins make DeFi more usable because they provide a relatively stable asset that contracts can hold and transfer.

They also become building blocks.

A derivatives protocol can settle in USDC. A lending protocol can lend USDC. A prediction market can pay out in USDC. A yield vault can optimize stablecoin returns. An AMM can pair assets against stablecoins.

Stablecoin
   ├─ lending markets
   ├─ AMM pools
   ├─ perps collateral
   ├─ prediction market payouts
   ├─ payment rails
   └─ yield vaults

Stablecoins are one of the clearest examples of why DeFi works better when assets are composable. Once a dollar like token exists on chain, every protocol can use it.

liquid staking

Staking created another important primitive.

A user stakes ETH to help secure the network. In return, they earn staking yield. But if the ETH is locked, it becomes less useful elsewhere.

Liquid staking solves this by issuing a tokenized claim on staked ETH.

ETH
   ↓ stake
staked ETH position
   ↓ tokenize
liquid staking token

The liquid staking token can then move through DeFi.

stETH
   ├─ trade in AMMs
   ├─ use as collateral
   ├─ deposit into vaults
   ├─ pair with ETH
   └─ build leveraged staking strategies

This is a classic money lego pattern.

A base yield source becomes a token. The token becomes collateral. Collateral enables leverage. Leverage creates strategies. Strategies become vaults. Vaults become assets that other protocols can accept.

staking yield
   ↓
liquid staking token
   ↓
collateral
   ↓
leverage
   ↓
vault strategy
   ↓
new tokenized position

One primitive creates a whole design space.

derivatives

Derivatives are contracts whose value depends on something else.

In DeFi, this includes perpetual futures, options, structured products, volatility products, and synthetic assets.

Underlying asset
   ↓
derivative contract
   ↓
price exposure without holding the underlying

Perpetuals are one of the most popular examples. A user can get leveraged long or short exposure to an asset without buying or selling the spot asset.

User deposits collateral
        ↓
opens long ETH perp
        ↓
position tracks ETH price
        ↓
PnL settled in collateral

Options create another payoff structure.

Call option:
   right to buy asset at strike price

Put option:
   right to sell asset at strike price

Prediction markets are closely related in structure. A prediction market share is a tokenized claim on an event outcome.

YES share:
   pays 1 if event happens
   pays 0 if event does not happen

NO share:
   pays 1 if event does not happen
   pays 0 if event happens

These instruments are compelling because they let users express views in programmable form.

I think ETH will go up
   → long perp

I think volatility is underpriced
   → buy option

I think a candidate will win
   → buy YES shares

I think an asset will outperform a basket
   → structured market

Once derivatives are on chain, they can become inputs to other protocols. A vault can hold options. A lending protocol can accept certain positions as collateral. An AMM can trade outcome tokens. A structured product can combine spot, lending, and derivatives exposure.

derivative position
   ↓
tokenized claim
   ↓
tradable
   ↓
collateralizable
   ↓
composable

That is the money lego idea again.

vaults

Vaults package strategies into a single asset.

A user deposits into a vault. The vault executes some strategy. The user receives a token representing their share.

user capital
   ↓
┌────────────────────┐
│ strategy vault     │
│                    │
│ lend               │
│ LP                 │
│ hedge              │
│ rebalance          │
└─────────┬──────────┘
          ↓
   vault share token

Vaults are powerful because they turn active strategies into passive user experiences.

A vault might:

provide concentrated liquidity
rebalance LP ranges
lend stablecoins
loop collateral and debt
market make between assets
sell options
underwrite insurance
write prediction market exposure

The user does not need to manually execute every step. The vault abstracts the strategy.

The vault share token can also become composable.

Deposit USDC into vault
        ↓
receive vault token
        ↓
use vault token elsewhere

This is how DeFi keeps layering. Strategies become assets. Assets become collateral. Collateral enables more strategies.

prediction markets

Prediction markets are one of the more recent popular examples of programmable finance.

A prediction market turns an event into a tradable asset.

Event:
   Will X happen by date Y?

Tokens:
   YES
   NO

Each token has a payoff based on the outcome.

If event happens:
   YES pays 1
   NO pays 0

If event does not happen:
   YES pays 0
   NO pays 1

This creates a market price for belief.

If YES trades at 60 cents, the market is roughly saying the event has a 60 percent implied probability, ignoring fees and market frictions.

The interesting part is that prediction markets turn information into financial infrastructure. Once outcomes are tokenized, they can be traded, bundled, hedged, indexed, or used inside more complex products.

single prediction market
        ↓
parlays
        ↓
indexes
        ↓
structured products
        ↓
hedging markets
        ↓
information finance

Prediction markets show how far the money lego idea can go. It is not only traditional assets that can become programmable. Events themselves can become financial primitives.

why composability matters

The strongest argument for DeFi is not that every individual protocol is better than its centralized equivalent.

A centralized exchange can be faster than an on chain exchange. A bank can offer a simpler lending experience. A broker can hide complexity better than a wallet. A traditional derivatives venue can have deeper liquidity.

The compelling part of DeFi is composability.

A smart contract can plug into another smart contract. A new protocol does not need permission from an incumbent to integrate an asset, route through a market, use a stablecoin, or build on top of a lending pool.

Protocol 1:
   creates asset A

Protocol 2:
   uses asset A as collateral

Protocol 3:
   creates leverage on asset A

Protocol 4:
   packages strategy into token B

Protocol 5:
   accepts token B in another market

This is hard to replicate in traditional finance because the system is fragmented across institutions, legal agreements, private databases, settlement systems, and permissioned access.

In DeFi, composability is the default because contracts share the same execution environment.

Shared state
   +
public contracts
   +
token standards
   +
permissionless deployment
   =
money legos

That is what makes the system interesting.

the downside of money legos

Composability also creates risk.

If protocols are connected, failures can travel.

Oracle failure
   ↓
wrong prices
   ↓
bad liquidations
   ↓
insolvent lending market
   ↓
losses for vaults using that market

Or:

Stablecoin depeg
   ↓
collateral value falls
   ↓
positions liquidated
   ↓
liquidity dries up
   ↓
related protocols affected

Money legos are powerful because they connect. They are dangerous for the same reason.

The main risks are:

smart contract bugs
oracle failures
liquidity cascades
governance attacks
bridge risk
collateral risk
leverage loops
composability assumptions

A protocol may be safe in isolation but risky when used as part of a larger chain.

Asset seems safe
   ↓
accepted as collateral
   ↓
used in leveraged vaults
   ↓
deployed across lending markets
   ↓
small failure becomes systemic

This does not make DeFi bad. It means DeFi needs better risk systems, audits, monitoring, circuit breakers, oracle design, and conservative collateral policies.

Programmable finance increases what can be built. It also increases what can break.

why DeFi is still compelling

DeFi is compelling because it turns finance into an open design space.

In traditional finance, building a new financial product requires access to institutions. In DeFi, a developer can write contracts that hold assets, define payoffs, route trades, issue shares, and settle outcomes.

That does not mean every product should exist. It does not mean every protocol is safe. It does not mean decentralization automatically makes something better.

But it does mean experimentation becomes much cheaper.

Traditional finance:

   idea
    ↓
   legal structure
    ↓
   banking relationships
    ↓
   exchange or broker integration
    ↓
   clearing and settlement
    ↓
   distribution


DeFi:

   idea
    ↓
   smart contract
    ↓
   liquidity
    ↓
   users
    ↓
   composability with other protocols

The second path is not easy, but it is more open.

That openness creates strange and powerful products: AMMs, lending markets, liquid staking tokens, perpetuals, options vaults, stablecoins, prediction markets, structured products, automated strategies, and more.

The real magic is that these products do not have to remain separate.

stablecoin
   ↓
lending protocol
   ↓
borrowed asset
   ↓
AMM
   ↓
LP token
   ↓
vault
   ↓
collateral
   ↓
derivative

This is what money legos means. Capital becomes programmable. Financial positions become tokens. Tokens become inputs. Protocols become modules.