Lending is the largest category in decentralized finance. As of September 2026, lending protocols held about $55 billion in total value locked, according to DefiLlama. Aave alone accounted for around $19 billion, Morpho for about $11 billion, SparkLend for about $5.7 billion and Compound for about $1.6 billion.
The model is simple to describe and hard to get right. Users lend crypto to a pool and earn interest; others borrow from the pool against collateral; smart contracts enforce the terms and liquidate positions that become unsafe. This guide explains how that works, what the leading protocols do differently, and what it takes to build a DeFi lending and borrowing platform of your own.

What Is DeFi Lending?
In a bank, a depositor lends money to the bank, the bank lends it on, and the bank's balance sheet, credit checks and regulators stand between the two. DeFi lending replaces that intermediary with smart contracts. Lenders and borrowers never meet: both interact with a shared pool, and the rules for interest, collateral and liquidation are written in code that anyone can inspect.
Because the protocol does not know who its borrowers are, it cannot rely on credit history. Instead, almost every DeFi loan is overcollateralized: to borrow $1,000 of stablecoins, a user deposits crypto worth more than $1,000. That is the core trade-off. DeFi lending is open to anyone with a wallet, available around the clock and fast, but it mostly serves people who already hold crypto and want liquidity without selling it.
Common reasons to borrow are to raise cash without triggering a sale of the collateral, to take leveraged or hedged positions, or to fund operations in stablecoins while holding ETH or BTC.
How DeFi Lending Works

- Supply. Lenders deposit assets into a pool and receive a token or share that represents their claim plus accrued interest.
- Collateralize and borrow. Borrowers deposit collateral and borrow other assets up to a maximum loan-to-value (LTV) set for each collateral type.
- Interest. Rates are set by an interest rate model based on utilization: the more of a pool is borrowed, the higher the rate for borrowers and lenders.
- Monitoring. Oracles supply prices, and the protocol calculates each position's health factor. Aave, for example, makes a position eligible for liquidation when its health factor drops below 1.
- Liquidation. Independent liquidators repay part or all of an unsafe loan and receive the collateral at a discount. In Aave V4, that bonus follows a Dutch auction: the lower the health factor, the higher the bonus (Aave docs).
- Repay and withdraw. Borrowers repay the loan with interest and reclaim their collateral; lenders withdraw their deposit plus interest.
Many protocols also offer flash loans: uncollateralized loans that must be borrowed and repaid within one transaction. They are useful for arbitrage and refinancing, and they are also a common tool in attacks, which is why price and oracle logic must assume an attacker with unlimited capital for one block. We explain the mechanics in more depth in how DeFi lending works.
DeFi vs CeFi Lending
Centralized crypto lenders take custody of customer assets and lend them at their own discretion. In 2022 two of the largest, Celsius and BlockFi, filed for bankruptcy. DeFi protocols hold funds in contracts whose balances and rules are public, so users can see collateral levels and liquidations in real time.
That does not make DeFi risk-free. It swaps counterparty risk for smart contract, oracle and governance risk, and the losses from those can be just as final.
Lending vs Staking
Both put idle crypto to work, but the source of the return differs. Staking locks a network's native token to help secure a proof-of-stake blockchain, and rewards come from the protocol. Lending supplies assets, including stablecoins, to borrowers, and the return is the interest they pay, which rises and falls with demand for each asset. Lending also carries borrower-side risks, such as bad debt after failed liquidations, that staking does not.
Lending Protocol Designs in 2026
The leading protocols show the main design choices a new platform faces:
- Aave: pooled, multi-asset markets. Users supply many assets into shared pools and borrow any of them. Aave V4, launched on Ethereum on 30 March 2026, adds a hub-and-spoke design: liquidity hubs hold assets centrally, and spokes connect to them with their own collateral types, risk parameters and liquidation rules (Aave).
- Compound III: one borrowable asset per market. Each deployment has a single base asset, such as USDC, that users borrow against a list of collaterals. The design is narrower but easier to reason about.
- Morpho: isolated, permissionless markets. Each market is defined by five immutable parameters: collateral asset, loan asset, liquidation LTV, oracle and interest rate model. Anyone can create one, and risk stays inside it. Vaults on top allocate deposits across markets under curators' risk settings.
- Sky and Spark: stablecoin credit. Sky (formerly MakerDAO) lets users mint its stablecoins against collateral, and Spark lends that liquidity out. This model needs a stablecoin at its core.
Benefits and Risks

For users and builders, DeFi lending offers:
- Open access. Anyone with a wallet can lend or borrow, with no application or credit check.
- Speed. Loans are issued in one transaction, around the clock.
- Transparency. Deposits, loans, rates and liquidations are visible on-chain.
- Composability. Deposit tokens and loans can be used by other protocols, from DEXs to yield vaults.
The risks are just as specific:
- Smart contract bugs in the protocol or any integrated contract.
- Oracle failures or manipulation that trigger wrong liquidations or allow bad loans.
- Liquidation cascades and bad debt when collateral prices fall faster than liquidators can act.
- Governance and admin-key risk if parameters can be changed without a timelock.
- Capital inefficiency. Overcollateralization excludes borrowers who need credit rather than leveraged exposure. Undercollateralized lending requires off-chain identity and credit scoring, which reintroduces a trusted party.
How to Build a DeFi Lending Platform
- Choose the model. Pooled, isolated or stablecoin-based, permissionless or permissioned. Permissioned pools with KYC are the usual route for institutional credit and tokenized real-world assets.
- Design the risk framework. Collateral list, LTV and liquidation thresholds, supply and borrow caps, interest rate curves, oracle sources and fallback rules. Stress-test them in simulations against historical crashes before writing code.
- Build the smart contracts. Pool and accounting logic, interest rate models, oracle adapters, the liquidation module, governance with a timelock, and an emergency pause. Our smart contract development team keeps each module small enough to audit.
- Build the off-chain layer. Liquidation and keeper bots, an indexer, risk dashboards with alerts, and a front end that shows health factors and liquidation prices clearly.
- Secure it. Unit, fuzz and invariant testing, at least one independent smart contract audit, a bug bounty, and launch caps that grow with time.
- Check the legal position. In the EU, MiCA does not apply to services provided in a fully decentralized manner without any intermediary, a narrow exemption that rarely covers the company operating a front end or holding admin keys. Take advice for each market.
- Launch and bootstrap liquidity. Seed the first markets, list with DEX aggregators and wallets, and monitor utilization and bad debt daily.
How 4IRE Can Help
4IRE builds DeFi protocols from risk design to audited contracts and monitoring. Whether you are forking an established lending design, launching isolated markets or adding permissioned credit for institutions, our team can take it from discovery to mainnet.
Build Your Lending Protocol with 4IRE
From risk parameters and oracle design to audited contracts and liquidation bots, our team builds DeFi lending platforms end to end. Schedule a free consultation.
FAQ on Building a DeFi Lending and Borrowing Platform
It removes the custody risk of a centralized lender, but it is not risk-free. Users are exposed to smart contract bugs, oracle failures, liquidations when collateral prices fall, and governance decisions. Audits, conservative parameters and on-chain monitoring reduce these risks.
Your health factor falls. Once it drops below the protocol's threshold, which is 1 on Aave, liquidators can repay part or all of your loan and take your collateral at a discount. Adding collateral or repaying part of the loan in time avoids liquidation.
Most keep part of the interest paid by borrowers, often called a reserve factor, and some charge fees on flash loans or liquidations. The rest of the interest goes to lenders.
Only with extra trust. Flash loans are uncollateralized but must be repaid in the same transaction. Undercollateralized credit lines need identity checks and credit assessment, so they usually run in permissioned pools.

