Decentralized Borrowing and Lending

Module 2.3: Diving into Decentralized Borrowing and Lending

Aqua Protocol (Stablecoin on TON)
6 min readMar 22, 2024

--

This article delves into decentralized borrowing and lending within the DeFi world, explaining the process of obtaining crypto loans and offering crypto credits through smart contracts. It discusses the roles of lenders, borrowers, and platforms in this ecosystem. Instant loans and their use in arbitrage are also examined. The article highlights potential risks and challenges in crypto lending, advising caution when engaging with borrowed funds.

Crypto loans unlock the possibility of borrowing cryptocurrencies by paying a small fee, while crypto lending allows lenders to loan out their cryptocurrencies in exchange for interest. If you need a loan, you simply provide collateral and pay a fee, and you’re set with the loan. Conversely, lenders earn interest on the funds they provide.

These services are typically available through DeFi applications or decentralized exchanges. The process can occur directly between users via the blockchain or through centralized crypto exchanges acting as intermediaries.

In the DeFi world, decentralized loans and lending operate thanks to smart contracts, automating the entire process. To secure a crypto loan, collateral and a small fee are required. Well-designed smart contracts make these services not only faster and more efficient but also scalable to meet growing demand.

Let’s take a closer look at how it’s structured. The borrowing and lending process usually involves three key players: the lender, the borrower, and the platform — be it a DeFi DApp or a crypto exchange. To borrow cryptocurrency, borrowers need to provide collateral. This collateral can be utilized in various forms, such as through a smart contract that issues stablecoins (like in Aqua Protocol or CurveUSD) or through a platform that provides another user’s funds (like AAVE).

This model makes decentralized borrowing and lending convenient and accessible, opening new opportunities for both lenders and borrowers.

Lenders, by investing their cryptocurrencies into a communal pool, essentially lock them there for a certain period. This pool then manages the entire procedure and transfers the lenders their share of the loan interest. Here’s an illustrative example: suppose you want to borrow $10,000 from a DeFi app where the loan-to-value ratio is 50%. This means you’ll need to leave collateral worth $20,000. The collateral can be in various cryptocurrencies. This ratio is exclusively designed to minimize the risks associated with cryptocurrency volatility, thus safeguarding the lender’s interests.

After you’ve deposited the collateral, you’ll receive the required sum either in newly issued stablecoins or in cryptocurrency from another pool participant. Now, you’re free to use the borrowed funds as you please. Suppose the value of your collateral drops below the $20,000 mark. In such a case, you’ll need to add more funds to the collateral. And if the price of the collateral further decreases to, say, hypothetically $12,000, then your collateral will be liquidated to enable the lender to recover their money. It’s important to note that the liquidation threshold may vary depending on the chosen platform.

Beyond traditional lending, there’s another fascinating type of crypto loan that doesn’t require collateral — Flash Loans. These loans are unique in that they must be initiated and repaid within a single blockchain block, making the borrowing and repayment process a matter of seconds or minutes.

Flash Loans are particularly useful for quickly borrowing cryptocurrency for arbitrage price opportunities or collateral swaps. A collateral swap is when you provide more liquid assets in exchange for less liquid ones to ultimately receive a reward.

In the TON blockchain, Flash Loans are not yet available. However, they are highly popular among arbitrageurs in Ethereum.

Imagine you’ve found a unique arbitrage opportunity: one token is selling for $1 in pool A and for $1.1 in pool B. You decide to seize this chance by taking an instant loan of $1,000. The idea is simple: buy tokens for $1,000 in pool A and sell them for $1,100 in pool B, thereby earning a $100 difference. This entire process is managed by a smart contract, which helps automate the loan acquisition. You only need to organize the main transaction, which includes several smaller steps (in Ethereum, no-code solutions like Furucombo are available for this). If anything goes wrong at any of these steps, the main transaction is automatically canceled.

This approach allows you to benefit from arbitrage without risking your own funds, all thanks to instant loans and the clever use of smart contracts.

If something goes wrong and one of the sub-transactions fails to execute, the lender will cancel the instant loan before it even starts. The beauty of Flash Loans is that you can profit without risking your assets. Remember, such loans are only possible within the same blockchain network, as transferring funds to another chain would violate the single-transaction rule. Additionally, the funds may be subject to regulatory and market risks.

As with any sector, crypto lending has its risks, especially when dealing with third-party services. Market fluctuations can put your collateral at risk of liquidation. Furthermore, smart contracts are not immune to vulnerabilities, which could be exploited by attackers. Remember, engaging in operations with borrowed funds adds additional risks to your investment portfolio. Thus, approaching crypto loans with intelligence and caution is crucial. In our next module, we will dive deeper into the world of decentralized exchanges, or DEXs, and explore the services they offer.

Decentralized exchanges offer a platform for trading cryptocurrencies without the need for a central authority. These platforms are built on blockchain technology and enable direct peer-to-peer transactions. DEXs maintain the ethos of cryptocurrency by emphasizing decentralization, security, and anonymity.

One of the key benefits of using a DEX is the control it gives users over their funds. Unlike centralized exchanges, where the exchange controls your funds, DEXs allow you to maintain possession of your private keys. This significantly reduces the risk of hacks and theft, as funds are not stored in a central location that could be a target for attackers.

Another advantage of DEXs is the ease of access. There are no KYC (Know Your Customer) procedures to go through, making it straightforward for anyone to start trading. This inclusivity supports the broader vision of DeFi by making financial services accessible to anyone with an internet connection.

However, DEXs also come with their own set of challenges. The user experience can be less intuitive than that of centralized exchanges, potentially deterring less tech-savvy users. Additionally, because trades are executed on the blockchain, transaction fees can become prohibitively expensive during times of network congestion.

Liquidity can also be an issue on DEXs. While popular pairs may have sufficient liquidity for trading without significant price impact, less popular tokens may suffer from low liquidity, leading to high slippage costs. Projects like Uniswap have introduced automated market maker (AMM) models to address this issue, providing liquidity pools that users can contribute to in exchange for a portion of the trading fees.

Security is another critical aspect of DEXs. While the decentralized nature of these platforms can offer advantages in terms of reducing central points of failure, smart contract vulnerabilities can still pose risks. Projects in the DeFi space continue to innovate and improve security measures, but users should always conduct their own research and consider the risks involved in using these platforms.

As the DeFi space evolves, DEXs are likely to play a pivotal role in the future of financial services. By providing a secure, transparent, and accessible platform for trading, DEXs embody the principles of decentralization that are at the heart of blockchain technology. In the next module, we will explore specific examples of DeFi services, including stablecoins, decentralized lending and borrowing platforms, and decentralized exchanges, to give you a comprehensive understanding of the DeFi ecosystem and how you can engage with it.

This course was prepared by Julia Palamarchuk (co-founder of Aqua Protocol — the first CDP stablecoin on the TON blockchain, over-collateralized by liquid staking tokens).

Follow us on Twitter: @aquaprotocolxyz

Telegram channel: https://t.me/aquaprotocolxyzchannelen

Telegram community: https://t.me/aquaprotocolxyz

Website: https://aquaprotocol.xyz/

--

--

Aqua Protocol (Stablecoin on TON)
Aqua Protocol (Stablecoin on TON)

Written by Aqua Protocol (Stablecoin on TON)

AquaUSD is the first TON-native decentralised over-collaterized interest-bearing stablecoin backed by liquid-staked assets

No responses yet