OKX Blockchain 60 Lectures | DeFi Chapter, Episode 2: How Does Lending Work in DeFi?

OKX Blockchain 60 Lectures | DeFi Chapter, Episode 2: How Does Lending Work in DeFi?

OKX Tutorial Team

OKX Blockchain 60 Lectures | DeFi Chapter, Episode 2: How Does Lending Work in DeFi?

DAI+0.00%

Hello everyone, I'm Xiao K. Today we'll be covering: "How Does Lending Work in DeFi?"


In the last episode, we explained that DeFi is the umbrella term for decentralized finance, which encompasses many areas such as lending, payments, insurance, and more. Today, we'll walk you through the most important area in DeFi — collateralized lending — and how it works.

As we all know, in the traditional lending market, if we want to borrow a loan from a bank, we need certain tangible assets as collateral. The bank then evaluates and reviews the assets before finally disbursing the loan. In the world of DeFi, the lending process works the same way, except the bank's role is removed and replaced by smart contract programs written in code.

format,webp

Below, we'll use the leading project in the current market, MakerDAO, as an example to walk you through DeFi's collateralized lending process in detail:

Before we begin, we need to understand two key concepts. The first is DAI — think of DAI as the US dollar of the cryptocurrency world, as it can be exchanged 1:1 with the US dollar.

The second concept is MKR. MKR is the cryptocurrency issued by the MakerDAO project. It serves two purposes: one is for voting in community governance. Since the platform is decentralized, every MKR holder can participate in the platform's development and vote on any proposed rule changes. The other purpose is to serve as an interest token — if you borrow from the MakerDAO platform, you need to pay a certain amount of MKR as loan interest.

format,webp

With these two concepts in mind, let's get into the main topic. Inside MakerDAO's smart contracts, there are two pools: one is called the Ether Pool, and the other is called the Collateralized Debt Position (CDP).

Step 1: If you want to lend or borrow on DeFi, you need to pledge a certain amount of digital assets as collateral (such as ETH, WBTC, USDC, and other cryptocurrencies issued on Ethereum). You deposit your ETH and other collateral assets into the first pool, the Ether Pool. The smart contract then evaluates your digital assets and returns a corresponding amount of PETH as a collateral receipt.

format,webp

Step 2: Take the PETH receipt and deposit it into the second pool, the Collateralized Debt Position, to initiate a loan. During this process, the collateralized debt position generates a corresponding proportion of debt while locking up your previously deposited digital assets. Once the smart contract completes its review, it immediately releases the corresponding loan — DAI stablecoin — which you can then exchange for fiat currency in the market and spend as you wish.

When you're done using the funds and want to redeem your digital assets — entering Step 3 — you need to purchase a certain amount of MKR on the market to cover the borrowing interest. Deposit that, along with the DAI you borrowed, back into the Collateralized Debt Position pool. The collateral locked in the CDP will then be released. Finally, send a trading transaction through the smart contract to retrieve your previously deposited digital assets, such as ETH. This completes the entire lending process.

format,webp

Of course, if at any point you have borrowed DAI but genuinely cannot repay, you don't need to worry about repayment. The smart contract will automatically auction your Ethereum on the market to complete the asset liquidation.

Overall, DeFi lending has its unique advantages compared to traditional lending. Actions such as asset valuation, lending review, and loan disbursement are all executed by code, making the process fairer, more secure, and saving a great deal of time. DeFi lending is currently growing at a rapid pace — from the early millions-of-dollars scale to today's multi-billion-dollar market cap. Hopefully, the future will bring even greater surprises.

Special thanks to Liu Changyong for his assistance and guidance on this episode.

Sina Weibo: @昌用老师

– END –

Disclaimer

This article may contain information about products not applicable in your region. This article is only committed to providing general information and is not responsible for any factual errors or omissions. This article represents only the author's personal views and does not constitute the views of OKX. This article is not intended to provide any advice, including but not limited to: (i) investment advice or investment recommendations; (ii) offers or solicitations to buy, sell, or hold digital assets; or (iii) financial, accounting, legal, or tax advice. Holdings in digital assets (including stablecoins) involve a high degree of risk and may be subject to significant price fluctuations, or may even become worthless. You should carefully consider whether trading or holding digital assets is appropriate for you based on your financial situation. For questions about your specific circumstances, please consult your legal/tax/investment professional. The information contained in this article (including market data and statistical information, where applicable) is for general reference purposes only. Although we have taken all reasonable precautions in preparing such data and charts, we assume no liability for any factual errors or omissions expressed herein. © 2025 OKX. This article may be reproduced or distributed in its entirety, or excerpts of 100 words or less may be used, provided that such use is non-commercial in nature. Any reproduction or distribution of the full article must prominently state: "This article is copyrighted © 2025 OKX, used with permission." Permitted excerpts must cite the article title and include attribution, e.g., "Article title, [author name (if applicable)], © 2025 OKX". Some content may be generated or assisted by artificial intelligence (AI) tools. Derivative works and other uses of this article are not permitted.

Show More

Recommended Reading

thumbnail:ok-blockchain-lecture-60-episode-43-cn

OKX Blockchain 60 Lectures | Episode 43: The Rise of the Mining Industry (Part 2) — The Rise of Bitmain

Hello everyone, I'm Xiao K. Today we'll be covering: "The Rise of the Mining Industry (Part 2) — The Rise of Bitmain." In the last episode, we discussed the two individuals who opened the doors to capitalization and commercialization of the mining industry: Pumpkin Zhang (Zhang Nan-geng) and Baked Cat (Jiang Xinyu). Although they jointly launched the golden age of the mining industry, the one who truly propelled the mining business to its peak was someone else — and that person's name is Wu Jihan.

2025年9月18日

thumbnail:ok-blockchain-lecture-60-episode-2-why-is-blockchain-called-blockchain-cn

OKX Blockchain 60 Lectures | Episode 2: Why Is Blockchain Called Blockchain?

The "OKX Blockchain 60 Lectures" is a blockchain educational animation series jointly produced by OKX and Sina Technology, designed for users with zero knowledge of blockchain. Through articles, animated videos, and other formats, it covers blockchain concepts from the perspectives of concepts, technology, and applications across five major sections and 60 knowledge points, presenting them in a vivid and accessible way. The content for this episode was guided by Meng Yan, Deputy Dean of the Digital Assets Research Institute. In 2008, a global financial crisis erupted. On October 31st, "

2025年9月18日

thumbnail:ok-blockchain-lecture-60-episode-16-what-is-the-pow-consensus-mechanism-cn

OKX Blockchain 60 Lectures | Episode 16: What Is the PoW Consensus Mechanism?

The "OKX Blockchain 60 Lectures" is a blockchain educational animation series jointly produced by OKX and Sina Technology, designed for users with zero knowledge of blockchain. Through articles, animated videos, and other formats, it covers blockchain concepts from the perspectives of concepts, technology, and applications across five major sections and 60 knowledge points, presenting them in a vivid and accessible way. The content for this episode was guided by Huang Fangyu, Co-founder of Wanyou Computing Power. Hello everyone, I'm Xiao K. Today we'll be covering:

2025年9月18日

thumbnail:ok-blockchain-lecture-60-episode-51-cnpng

OKX Blockchain 60 Lectures | Episode 51: 2019, Giants Enter the Scene — Facebook's Cryptocurrency Dream

Previously, we discussed how 2018, following the overhyped prosperity of blockchain, ushered in a massive de-bubble process, sending the entire industry into a prolonged winter. But danger and opportunity coexist — this cyclical downturn happened to provide the perfect window for international giants to enter the market. In February 2019, the Wall Street financial giant JPMorgan Chase sounded the horn for international giants to enter the blockchain space, followed by Goldman Sachs, UBS, Citibank, Microsoft, and other major players.

2025年9月18日

thumbnail:ok-blockchain-lecture-60-episode-7-what-does-the-fork-in-the-blockchain-mean-cn

OKX Blockchain 60 Lectures | Episode 7: What Does a Fork in the Blockchain Mean?

The "OKX Blockchain 60 Lectures" is a blockchain educational animation series jointly produced by OKX and Sina Technology, designed for users with zero knowledge of blockchain. Through articles, animated videos, and other formats, it covers blockchain concepts from the perspectives of concepts, technology, and applications across five major sections and 60 knowledge points, presenting them in a vivid and accessible way. The content for this episode was guided by Bulfeimo, an Austrian School economist. A fork in the blockchain can be described as a unique occurrence within a blockchain network.

2025年9月18日

25-什么是闪电网络png

OKX Blockchain 60 Lectures | Episode 25: What Is the Lightning Network?

Hello everyone, I'm Xiao K. Today we'll be covering: "What Is the Lightning Network?" The Lightning Network is a technology first proposed in 2015 by Joseph Poon and Thaddeus Dryja in a whitepaper, designed to address Bitcoin trading congestion. This technology originated from a problem left over from Bitcoin's early days. Because when Bitcoin was originally designed, a

2025年9月18日

Related Articles