Lending and Borrowing Markets

The power of DeFi

Traditional lending, facilitated by banks, constitutes a fundamental pillar of the financial system. Lenders provide funds to borrowers with the expectation that the borrowed amount will be repaid, often with additional interest, in return for the immediate availability of capital.

In order to qualify for a loan from a bank, users must typically provide personal information, undergo identity verification, and adhere to geographic restrictions. But some regions don’t have access to banks at all, and in others, where lending is available, poor credit – or other barriers to access – can ruin a potential borrower’s chances of ever getting a loan.

Decentralized finance (DeFi) markets, unlike traditional banks or centralized platforms, let users access borrowing and lending without having to jump through as many potentially disqualifying hoops. Because decentralized lending and borrowing markets leverage blockchain technology and smart contracts, no intermediaries oversee their operations.

Instead, transactions occur directly between users: lenders deposit funds to a lending protocol, and borrowers borrow from that same protocol. The smart contracts built on open-source blockchains that govern these protocols ensure that, at any time, the respective parties can choose to redeem their deposits or pay back all or part of their debt. No user is ever required to relinquish custody of their funds to a centralized, third-party institution, and thus, lenders and borrowers alike retain the ability to access their assets, subject, of course, to the criteria and conditions stipulated by the smart contracts running on the protocol.

How decentralized lending and borrowing markets work

DeFi lending and borrowing markets allow any user to borrow or lend digital assets via decentralized protocols governed by smart contracts, which determine interest rates, transaction amounts, repayment terms, and loan expiration dates.

A lending and borrowing market relies on both lenders and borrowers. On one side of the market, lenders of a DeFi ecosystem, also known as liquidity providers, deposit their assets into a lending pool, hoping to earn interest on their deposits. The lending protocol determines interest rates on the assets, typically according to supply and demand dynamics: when there is more demand for borrowing a particular asset than there is supply, the interest rates for lending that asset tend to rise, and vice versa.

On the other side of the market, users borrow digital assets from the liquidity pool and provide required collateral in the form of other digital assets. The collateral funds are locked in a smart contract as security for the borrowed funds. Borrowers can then use these funds to trade, invest, or simply access capital without having to sell their other digital holdings, with interest rates depending on factors like the amount borrowed, the collateral provided, and the policies of the lending platform in question. Then, the interest borrowers pay goes back to the lenders. Depending on the protocol’s design and governance structure, the protocol may also collect a fraction of the interest paid by borrowers as fees.

A thriving DeFi ecosystem

While lending and borrowing markets on their own are powerful DeFi protocols that give users control over their own assets, they don't exist in a vacuum and often rely on or integrate with other ecosystem building blocks, like Oracles and Automated Market Makers (AMMs).

At the simplest level, lending and borrowing markets typically require price feeds to stay up-to-date on the valuation of digital assets. This is where oracles come in. A price feed oracle provides price feeds to the lending and borrowing markets by fetching real-time data from multiple sources, such as decentralized exchanges. The markets then use this information to generate interest rates, determine the value of collateral assets in their liquidity pools, calculate loan-to-value ratios (LTV), and assess the risk associated with loans.

Oracles are also used by lending and borrowing markets to monitor asset prices and trigger liquidation events, the process by which a borrower’s collateral assets are sold or seized to repay a debt when the value of that collateral falls below a certain threshold.

Beyond the off-chain data oracles provide, lending and borrowing markets may also rely on AMMs. For example, users who want to borrow assets on DeFi lending platforms usually need to provide collateral, which can include liquidity tokens obtained from AMMs. One user could be a liquidity provider to an AMM, receive liquidity tokens in exchange for their deposit to the AMM’s liquidity pool, and then use those tokens as collateral to borrow another asset on a lending platform. This means that users can take advantage of cross-asset opportunities: they can earn trading fees from an AMM, move assets between AMMs and lending platforms, engage in liquidity provisioning, and access collateral to borrow through a borrowing platform – all at the same time.


Of course, lending and borrowing markets are not without their risks and limitations. Lenders participating in lending markets may be exposed to counterparty risk if the borrowers fail to repay their loans. Liquidation is a risk management mechanism employed by lending and borrowing platforms to minimize this risk to lenders, protect their funds, and ensure the integrity of the system. Yet for the borrowers in question, this strategy can present a challenge since they must be sure to maintain their collateral at sufficient levels to avoid automatic liquidation and potential loss.

Furthermore, borrowers participating in lending and borrowing markets may be exposed to price volatility. If the value of the borrowed asset significantly increases, borrowers may face challenges in repaying the loan, especially if the value of their collateral falls below acceptable levels. Since borrower interest rates are also subject to market dynamics, borrowers may also see volatility in the borrowing costs they incur for participating in a borrowing protocol.

(Still, no market, centralized or otherwise, is truly free from all risk…)

DeFi financial tools: a clear use case

DeFi lending and borrowing markets open up significant opportunities for lenders and borrowers – not only because of the efficiency and trustlessness they offer users but also because they give more people in regions across the world the ability to use their money – to earn interest or receive capital – in ways they might never have been able to through traditional banking means.

Traditional lending and borrowing require capital, credit, perhaps even particular demographics, and certainly access to a bank or credit union – none of which is guaranteed worldwide. DeFi lending and borrowing markets enabled by blockchain technology and smart contract platforms create opportunities for anyone to participate, making borrowing more equitable and democratizing lending.

The Soroban ecosystem is growing!

We are excited to grow the Soroban ecosystem.

Smart contracts are usable on the Stellar network with Soroban, Stellar’s native smart contracts platform. Soroban is an additive feature that is integrated into the existing Stellar blockchain and can interact with Stellar accounts and assets. Soroban is currently live on Futurenet, a shared test network with Mainnet launch happening later in 2023.

Get started with Soroban now by accessing our Soroban documentation.

Explore Next

Your Next Read

Smart Contract Building Blocks

Smart Contracts

Explore building blocks for secure Smart Contract use cases.

Read More

Stellar Developer Hub

Explore documentation, tooling, & community support to help you get your blockchain project up quickly. Take advantage of learning resources to…


Soroban: Smart Contracts Docs

Start building on Soroban today with the help of established tools and documentation


Soroban GitHub

Review and contribute to the Soroban SDK repo