Cube

What Is DeFi Borrowing?

Learn what DeFi borrowing is, how collateralized crypto loans work, why liquidations and oracles matter, and where DeFi credit markets can fail.

What Is DeFi Borrowing? hero image

Introduction

DeFi borrowing is the on-chain practice of taking a loan from a smart-contract-based credit market, usually by locking up crypto collateral that is worth more than the amount borrowed. It matters because it solves a specific problem that is common in crypto markets: people often want liquidity without giving up exposure to the assets they already hold.

That creates an apparent contradiction. In ordinary finance, borrowing depends heavily on identity, legal enforceability, and off-chain credit assessment. In DeFi, the borrower may be just a blockchain address, and the protocol cannot send collections agents or inspect income statements. So how can a loan be made at all? The core answer is that DeFi replaces personal credit with overcollateralization plus automatic liquidation. If the protocol cannot know who you are or force repayment later, it must structure the position so it can protect itself on-chain at all times.

Once that clicks, much of DeFi borrowing becomes easier to understand. The loan is not primarily secured by trust in the borrower. It is secured by the protocol’s ability to continuously mark collateral to market, limit how much can be borrowed, charge a market-based interest rate, and liquidate unhealthy positions before losses spread to suppliers. Different protocols implement this differently, but the underlying logic is remarkably consistent across systems such as Aave, Compound, Maker, BENQI, Port, and Kava.

Why borrow against crypto instead of selling it?

OptionLiquidity nowExposure retainedTypical costBest when
Sell assetImmediate cashLose asset upsideTrading fees and taxesNeed cash and exit
Borrow (DeFi)Immediate cashKeep asset upsideInterest and collateral lockWant liquidity without selling
Figure 208.1: Sell vs Borrow Crypto

The simplest reason to borrow in DeFi is that selling an asset and borrowing against it are economically different actions. Suppose someone holds ETH and expects it to rise over time, but needs stablecoins today to pay expenses, fund a trade, or deploy capital elsewhere. Selling ETH gives liquidity, but it also ends the ETH exposure. Borrowing against ETH keeps the exposure while creating spendable capital.

This is why DeFi borrowing appears wherever there are volatile assets and active capital markets. A user may want stablecoins without triggering a sale. A trader may want leverage. A market maker may want working capital. A DAO treasury may want to access cash-like assets while keeping governance tokens or yield-bearing collateral. In protocols such as Maker, the borrowed asset is often the system’s own stablecoin; users lock collateral in a Vault and generate Dai. In pooled money markets such as Aave and Compound, users typically deposit collateral into a shared pool and borrow an existing asset supplied by other users.

The important distinction is that DeFi borrowing is not one thing mechanically. There are two broad patterns solving related problems. In pooled lending markets, suppliers deposit assets into a pool and borrowers draw from that pool against collateral. In collateralized debt position systems, users lock collateral and mint a debt asset against it. From the borrower’s perspective both feel like “borrowing,” but the mechanism differs. In one case, the protocol intermediates existing liquidity. In the other, the protocol creates a liability backed by locked collateral.

How do overcollateralized DeFi loans work?

At first principles, every DeFi borrowing system needs to preserve a simple invariant: the protocol must remain solvent even if borrowers disappear. That is the whole game.

Because the borrower is only an address, the protocol cannot depend on promises. It therefore asks for collateral first. If the collateral is worth 100, the protocol may allow borrowing only 50, 70, or 80, depending on the asset and market risk parameters. Compound III describes this using a borrowCollateralFactor, which is the percentage of collateral value that counts toward borrowing capacity. Aave expresses similar constraints through reserve and liquidation parameters. Maker assigns each collateral type its own governance-set risk parameters before it can be used to generate Dai.

That haircut is not arbitrary. It exists because collateral prices move, oracle updates are imperfect, and liquidations take time. If a protocol let users borrow up to the full current value of collateral, even a small adverse price move could leave the system underwater before anyone could react. Overcollateralization creates a buffer. That buffer is the reason anonymous borrowing can work at all.

A useful way to picture this is as a continuously revalued balance sheet. On one side is the borrower’s debt. On the other is the marked-to-market value of posted collateral, discounted by protocol rules. As long as discounted collateral exceeds debt, the position is considered healthy enough. If that condition weakens too far, the protocol stops trusting the borrower to manage the position voluntarily and opens the door to liquidation.

Example: borrowing USDC against ETH; what happens to your position?

Imagine a user deposits ETH into a borrowing protocol and wants to borrow USDC. The protocol first treats the ETH deposit as collateral. It then asks a pricing system what that ETH is worth in dollar terms. But it does not grant full credit for that value. If the collateral rules say that only part of the ETH value can support borrowing, the protocol computes a maximum borrow amount below the headline market value.

Now the user borrows USDC. At that moment, two things are true at once. The user has received liquid capital, and the account has taken on debt that will grow as interest accrues. If ETH rises, the position becomes safer because the collateral side strengthens relative to debt. If ETH falls, the safety cushion shrinks. If USDC is a borrowed stable asset, the nominal debt is easy to track; if the borrowed asset itself is volatile, the position depends on movements in both the collateral and debt assets.

Suppose the user leaves the position open while ETH drops sharply. The protocol does not wait for a due date because many DeFi loans are effectively open-ended, as long as they remain collateralized and interest is paid through balance accrual. Instead, the position’s health is recomputed from current prices. Once it crosses a threshold, outside actors can repay part of the debt and seize some collateral at a discount. That discount is not a side detail. It is the economic incentive that makes liquidators spend gas and capital to keep the system solvent.

Mechanically, this is why DeFi borrowing feels less like a personal loan and more like continuously margined finance. The protocol is not asking whether the borrower is trustworthy. It is checking whether the position is still safely overcollateralized under current market conditions.

Where do borrowed tokens come from in pooled markets vs CDPs?

ModelSource of fundsDebt formMain riskBest for
Pooled marketsSupplier liquidity poolExisting token reservesHigh utilization riskFlexible, variable-rate loans
CDP systemsProtocol mints stablecoinNative minted debtPeg and auction riskMinting stablecoins
Figure 208.2: Pooled Markets vs CDP Borrowing

The source of the borrowed asset shapes the protocol design.

In pooled money markets such as Aave and Compound, suppliers provide liquidity to a shared pool. Aave describes itself as a decentralized, non-custodial liquidity protocol in which suppliers earn interest and borrowers access liquidity by posting collateral that exceeds the borrowed amount. Compound’s earlier design similarly frames each token market as a pool with algorithmic rates and a transparent balance sheet. In these systems, your borrow is someone else’s supplied asset drawn from a common reserve.

That pooling matters because it removes the need to match individual lenders and borrowers. A supplier can usually withdraw without waiting for a specific borrower to repay, as long as the pool still has available cash. The protocol handles the accounting and interest distribution. Compound’s whitepaper emphasizes this fungibility: deposits are aggregated into a resource that provides continuous liquidity rather than bilateral, maturity-matched loans.

In CDP-style systems such as Maker and Kava’s x/cdp module, the protocol instead lets users lock collateral and generate a stable asset against it. Maker states that anyone can generate Dai by locking crypto collateral, while Kava describes CDPs as positions that lock collateral so a pegged asset can be minted up to a fraction of collateral value. The debt asset is therefore native to the system rather than drawn from a supplier pool in the same way.

This difference has consequences. Pool-based borrowing depends heavily on utilization and liquidity management. CDP-style borrowing depends heavily on stablecoin design, debt accounting, and liquidation auctions or related recovery machinery. But both rely on the same deeper structure: collateral valuation, borrowing limits, and forced deleveraging when positions become unsafe.

Why do DeFi borrowing interest rates change?

Rate typePrimary driverPredictabilityWhen cheaperBest for
Variable-ratePool utilizationLow predictabilityWhen liquidity abundantShort-term flexible borrowing
Fixed-rateTerm contracts or bondsHigh predictabilityWhen rates expected to riseBudgeted long-term borrowing
CDP stability feeGovernance policyModerate predictabilityDepends on governance votesStablecoin generation
Figure 208.3: Variable-rate vs Fixed-rate DeFi Loans

Interest in DeFi borrowing is not mainly a moral reward for lending patience. It is the price of scarce on-chain liquidity.

In pooled markets, the key state variable is usually how much of the pool is already lent out. Compound’s whitepaper formalizes this as the utilization ratio, U = borrows / (cash + borrows). When utilization is low, liquidity is abundant and borrowing can be cheap. When utilization is high, spare liquidity is scarce, so borrow rates rise. Those higher rates serve two purposes at once: they discourage additional borrowing and encourage more supply.

This is one of the cleanest ideas in DeFi credit markets because it turns supply and demand into a direct on-chain feedback loop. No loan officer decides the rate. The protocol updates rates from a rule (often a curve) based on current market conditions. Aave’s documentation points users to a liquidity model and interest rate strategy; Compound documents both the utilization framing and index-based accounting that turns principal into current balances over time.

The most important consequence is that borrowing costs are path-dependent. A borrower opening a position at one rate is not guaranteed that same rate forever in a variable-rate market. If many users suddenly borrow the same asset, utilization can spike and rates can become expensive very quickly. Some protocols also support fixed-rate or fixed-term designs. Port Finance, for example, describes both a variable-rate product based on supply and demand and a fixed-rate product using a zero-coupon-bond model. But the foundational DeFi pattern is variable-rate borrowing driven by liquidity conditions.

In CDP-style systems the language changes, but the economic role is similar. Maker charges a stability fee on generated Dai debt, and its documentation notes that this accrues every block rather than being charged only at repayment. That is still borrowing cost; it is just framed through system-specific debt accounting rather than pool utilization in the same way.

How do DeFi protocols account for accruing interest without per-account updates?

A subtle but important part of DeFi borrowing is that debt balances are usually not updated account-by-account every block. That would be too expensive. Instead, protocols use compact accounting methods that let current balances be reconstructed when needed.

Compound III offers a clear example. It stores base-token balances as signed principal values: positive if the user supplied the base asset, negative if the user borrowed it. Those stored principals are then converted into present balances using global supply and borrow indices. In prose, the idea is simple: rather than rewriting every user’s balance every moment, the protocol records a checkpoint and a global growth factor. When someone interacts or queries the position, the current amount is derived from those shared indices.

This matters because it explains why DeFi borrowing scales technically. Interest accrual is real, but the protocol does not need to perform massive per-account state changes continuously. It also explains a common misunderstanding: users often think of debt as a static number until they repay it. In fact, the debt is usually a moving value derived from protocol accounting, current rates, and elapsed time.

Are liquidations a protocol failure or an intended solvency mechanism?

For a new user, liquidation often sounds like the catastrophic edge case. In protocol design, it is closer to a normal operating mechanism.

The protocol’s central promise to suppliers is not that borrowers will always repay voluntarily. It is that unhealthy positions can be forcibly reduced before they impose losses on the pool or the stablecoin system. This is why open liquidations exist. Compound’s whitepaper describes undercollateralized accounts becoming available for purchase at a discount by any Ethereum address. Kava similarly explains that if prices move, collateral can be seized and sold in auctions. Aave’s documentation explicitly treats liquidation as part of the core user-position lifecycle.

The logic is straightforward. If a borrower’s collateral ratio deteriorates below a threshold, the protocol lets an external actor repay some debt and seize collateral worth slightly more than that repayment. The discount is the liquidator’s reward. Without that profit opportunity, no one would spend resources monitoring markets and executing liquidations, especially during volatility.

This design is elegant, but not magical. It depends on liquidators existing, on collateral being saleable, and on the discount being enough to compensate execution risk. Research on DeFi lending stresses that if liquidations become unprofitable (for example in thin or fast-crashing markets) loans can remain undercollateralized despite the formal liquidation mechanism. So liquidation is a defense, but its effectiveness depends on market conditions.

What role do price oracles play in DeFi borrowing and why do they matter?

A DeFi borrowing protocol does not merely need prices. It needs actionable prices that can safely trigger credit decisions.

That makes oracles central. If the protocol misprices collateral, it may allow too much borrowing, trigger wrongful liquidations, or fail to liquidate in time. Maker’s oracle architecture shows how seriously mature systems take this dependency. Its Oracle Module feeds per-collateral price data into the core accounting system, using whitelisted reporters, median aggregation, and an Oracle Security Module that delays adoption of new prices. That delay intentionally trades freshness for safety.

This tradeoff is everywhere in DeFi borrowing. Faster prices respond to real markets more quickly, which helps risk management in volatile conditions. But prices that are too directly tied to manipulable on-chain markets can be distorted in the same transaction as a borrow, liquidation, or collateral update. Slower or more filtered prices reduce some manipulation risks but can become stale. Chainlink and Pyth both provide widely used data infrastructure, but integrating a feed safely is still the protocol’s job. The oracle is not just a plug-in number source; it is part of the credit model.

This is also where several famous failures came from. The bZx incidents illustrated how flash loans and weak pricing sources could be combined to manipulate collateral values atomically. Research surveys on DeFi have highlighted that naive reliance on instantaneous on-chain prices is fundamentally dangerous for collateralized borrowing. The system is only as sound as the mechanism by which it decides what collateral is worth right now.

What failures are most likely during a DeFi market crash?

The most important misconception about DeFi borrowing is that overcollateralization alone makes it safe. It does not. It makes the system possible. Safety depends on several additional assumptions continuing to hold during bad conditions.

The first assumption is that collateral can actually be liquidated near its modeled value. If the asset is too illiquid, the protocol may mark it at a price that cannot be realized in size. The second assumption is that price feeds remain accurate and live. Oracle manipulation, stale updates, or governance misconfiguration can all damage the system. The third assumption is that contract logic correctly enforces the intended invariants.

The Euler exploit is a useful reminder of that last point. Euler was a non-custodial lending and borrowing protocol with extensive security efforts, yet a missing health check in donateToReserves() created a path for the attacker to deliberately make a position liquidatable and then profit from self-liquidation. The lesson is not merely “bugs happen.” It is that borrowing protocols are security-critical systems where tiny deviations from collateral-health logic can become system-wide losses.

Composability makes this harder. DeFi protocols do not live alone. Flash loans can supply enormous temporary capital, other protocols can be used to manipulate prices or route collateral, and MEV dynamics can alter liquidation outcomes. A research survey on DeFi describes these as composability risks: the same modularity that makes DeFi powerful also creates attack surfaces across protocol boundaries.

Why are DeFi loans typically overcollateralized instead of unsecured?

A natural question is why DeFi does not simply offer ordinary undercollateralized consumer or business loans. The short answer is that anonymous, permissionless blockchains are bad environments for enforcing unsecured debt.

If a borrower can disappear behind a new address, the protocol needs a repayment guarantee that exists entirely on-chain. Overcollateralization provides that guarantee in a limited but workable form. The protocol is not making a claim about a person’s future earnings. It is letting an address transform one on-chain asset into temporary liquidity, under conditions that can be automatically unwound.

This is a major reason DeFi borrowing can feel inefficient. You may have to lock 150 dollars of collateral to borrow 100 dollars of stablecoins. That is poor capital efficiency compared with traditional secured lending against high-quality collateral, and far poorer than unsecured credit. But the inefficiency is the price of permissionlessness. Without identity, courts, and conventional underwriting, the system buys safety by demanding a visible buffer.

Some protocols extend this basic model. Aave documents credit delegation, where one party supplies borrowing capacity and another uses it under agreed terms. Flash loans go further in a different direction: they are effectively uncollateralized, but only because atomic execution guarantees either full repayment within the transaction or full reversion. Those are meaningful innovations, yet they do not overturn the core foundation that durable, open-ended DeFi borrowing is usually collateral-backed.

How does DeFi borrowing differ across blockchains and implementations?

Although Ethereum popularized many borrowing designs, the concept is not specific to one chain.

On Solana, Port Finance presents a non-custodial money market with variable-rate lending, cross-collateral borrowing, and flash loans, and also describes a fixed-rate product using a zero-coupon-bond structure. On Avalanche, BENQI offers overcollateralized borrowing markets and separates highly liquid core markets from other ecosystem markets with specialized risk management. In the Cosmos ecosystem, Kava’s x/cdp module manages collateralized debt positions that mint stable assets and liquidate through auctions.

These examples differ in execution environment, account model, performance characteristics, and implementation details. But the recurring pattern is the same: lock collateral, value it via an oracle, grant limited borrowing power, accrue debt, and liquidate when the safety buffer falls too far. That recurrence is a good sign that the concept is fundamental rather than accidental.

A note on custody and settlement design

Borrowing protocols are usually described as non-custodial because the core lending and borrowing rules are enforced by smart contracts rather than a centralized lender taking discretionary control of accounts. But non-custodial does not mean there are no key-management challenges anywhere in the broader DeFi stack. In adjacent systems that require coordinated authorization (especially around settlement) threshold cryptography is often used to avoid concentrating key risk. For example, Cube Exchange uses a 2-of-3 threshold signature scheme for decentralized settlement: the user, Cube Exchange, and an independent Guardian Network each hold one key share, no full private key is ever assembled in one place, and any two shares are required to authorize a settlement. That is not the borrowing mechanism itself, but it illustrates a related design principle: avoid single points of trust when moving value.

What risks and exposures am I taking when I open a DeFi borrowing position?

From the user’s point of view, opening a DeFi borrow is not just “taking a loan.” It is choosing a bundle of exposures.

The borrower is exposed to the collateral asset’s price, the borrowed asset’s price if it is not a stablecoin, the interest-rate path, the oracle design, the liquidation threshold, smart-contract risk, and sometimes governance decisions that can change parameters. Maker’s collateral types require governance approval and specific risk settings. Compound III imposes limits such as supplyCap and baseBorrowMin. Aave emphasizes that behavior and parameters can differ by version and chain. BENQI isolates some risks across markets rather than applying one uniform model. These are not implementation decorations; they shape the economic reality of the borrow.

So the right mental model is not “I deposited token A and borrowed token B.” It is “I entered a continuously repriced, rule-bound financial position whose safety depends on code, data, liquidity, and incentives.” For experienced users, that is the appeal: the rules are explicit and on-chain. For inexperienced users, it is the danger: the rules may be legible, but they are not forgiving.

Conclusion

DeFi borrowing exists because crypto holders often want liquidity without selling their assets, and blockchains need a way to provide that liquidity without relying on identity or legal enforcement. The solution is to replace trust in the borrower with trust in a mechanism: overcollateralization, oracle-based valuation, variable pricing of liquidity, and liquidation incentives.

If there is one idea to remember, it is this: **a DeFi loan is really a collateralized position that the protocol can continuously reprice and, if necessary, unwind.

** Everything else follows from that need to keep an anonymous credit market solvent on-chain.

  • interest rates
  • health factors
  • flash loans
  • liquidation auctions
  • oracle design

Evaluate a DeFi lending market by checking its collateral rules, oracle design, liquidation mechanics, liquidity depth, and governance history before you use it or buy related tokens. After that review, you can use Cube Exchange to research token docs and, if you decide to trade, execute orders with explicit price control.

  1. Open the protocol docs and record the collateralization metrics: loan-to-value (LTV) or borrowCollateralFactor, liquidation threshold, and liquidation incentive/penalty.
  2. Inspect the oracle setup: list the feed providers (Chainlink, Pyth, or on-chain AMM reference), aggregation method, and maximum update delay or security module.
  3. Measure market liquidity: check DEX/CEX order-book depth, 1h and 24h volumes, and how large liquidations would impact execution price for the collateral and borrowed asset.
  4. Audit operational risk: verify recent security audits, active bug bounties, supply/borrow caps, and recent governance votes that changed risk parameters.
  5. If you trade the token on Cube Exchange, fund your account, place a limit order (for price control) or market order (for immediacy), size the position to limit liquidation exposure, and set a stop-loss to enforce your risk limits.

Frequently Asked Questions

Why do DeFi protocols insist on overcollateralization for loans?
+
Because borrowers are anonymous addresses and protocols cannot enforce off-chain promises, loans are secured by on-chain collateral plus a haircut so that collateral still exceeds debt after price moves, oracle delays, and liquidation frictions—this overcollateralization is the on-chain substitute for credit enforcement.
How do liquidations protect lenders, and does a liquidation mean the protocol failed?
+
Liquidations let third parties repay some debt and seize collateral at a discount so the protocol’s capital providers are protected; they are an intended, routine solvency mechanism rather than a bug, but their effectiveness depends on liquidators existing, collateral being tradeable, and the discount compensating execution risk.
Where do the tokens I borrow actually come from in different DeFi lending designs?
+
In pooled money markets (e.g., Aave, Compound) borrowed assets come from a shared supplier pool, while in CDP-style systems (e.g., Maker, Kava) users lock collateral and the protocol mints a native debt asset (stablecoin) against it; the user experience feels similar but the funding source and risk plumbing differ.
How are borrowing interest rates determined and why can they change after I open a loan?
+
Rates in pooled markets are typically variable and set by utilization (borrows divided by cash+borrows): low utilization means cheap borrowing, high utilization raises rates to rebalance supply and demand, while CDP systems charge a stability fee that accrues over time; some protocols also offer fixed-rate products but the common pattern is utilization-driven variable pricing.
What role do price oracles play in DeFi borrowing, and what can go wrong with them?
+
Oracles provide the actionable prices the protocol uses to value collateral and trigger credit decisions; if oracle feeds are stale, manipulable, or misconfigured the protocol can allow overborrowing, cause wrongful liquidations, or fail to liquidate in time, which has been central to several high‑profile incidents and is why protocols design oracle modules and delays carefully.
How does a DeFi protocol track growing debt without updating every account all the time?
+
Protocols avoid continuously rewriting every account by recording a stored principal and global supply/borrow indices; current balances are reconstructed from those indices on interaction, which makes interest accrual scalable without per-account updates every block (as described in Compound’s accounting model).
If loans are overcollateralized, what usually breaks first during a market crash?
+
Overcollateralization can still fail under stress because liquidation markets may be illiquid or unprofitable, oracles can be manipulated or stale, smart‑contract bugs can break health checks, and composability (flash loans, cross‑protocol interactions, MEV) can create complex attack paths that outpace the liquidation machinery.
Can I get an unsecured (uncollateralized) loan in DeFi like a bank credit line?
+
Not for open‑ended credit: permissionless chains generally do not offer unsecured, lasting loans; exceptions include credit delegation (where a supplier delegates borrowing power to a counterparty) and flash loans, which are effectively uncollateralized only because the loan must be repaid within the same atomic transaction or the whole execution reverts.
What specific risks and exposures am I taking on when I open a DeFi borrowing position?
+
When you borrow you are exposed not just to the asset you pledged, but also to the borrowed asset’s price (if volatile), the interest‑rate path, the oracle design and timeliness, liquidation thresholds and penalties, smart-contract bugs, and governance actions that can change parameters—so a borrow is a bundled, continuously repriced position rather than a simple cash loan.

Your Trades, Your Crypto