Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
 Building Full Stack DeFi Applications

You're reading from   Building Full Stack DeFi Applications A practical guide to creating your own decentralized finance projects on blockchain

Arrow left icon
Product type Paperback
Published in Mar 2024
Publisher Packt
ISBN-13 9781837634118
Length 490 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Samuel Zhou Samuel Zhou
Author Profile Icon Samuel Zhou
Samuel Zhou
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Part 1: Introduction to DeFi Application Development FREE CHAPTER
2. Chapter 1: Introduction to DeFi 3. Chapter 2: Getting Started with DeFi Application Development 4. Chapter 3: Interacting with Smart Contracts and DeFi Wallets in the Frontend 5. Part 2: Design and Implementation of a DeFi Application for Trading Cryptos
6. Chapter 4: Introduction to Decentralized Exchanges 7. Chapter 5: Building Crypto-Trading Smart Contracts 8. Chapter 6: Implementing a Liquidity Management Frontend with Web3 9. Chapter 7: Implementing a Token-Swapping Frontend with Web3 10. Chapter 8: Working with Native Tokens 11. Part 3: Building a DeFi Application for Staking and Yield Farming
12. Chapter 9: Building Smart Contracts for Staking and Farming 13. Chapter 10: Implementing a Frontend for Staking and Farming 14. Part 4: Building a Crypto Loan App for Lending and Borrowing
15. Chapter 11: An Introduction to Crypto Loans 16. Chapter 12: Implementing an Asset Pool Smart Contract for a Crypto Loan 17. Chapter 13: Implementing a Price Oracle for Crypto Loans 18. Chapter 14: Implementing the Crypto Loan Frontend with Web3 19. Index 20. Other Books You May Enjoy

Exploring the characteristics of a crypto loan

As we mentioned earlier, a crypto loan combines savings and loans together; this means the users have to deposit something via a smart contract as collateral before they can borrow assets. A crypto loan in the DeFi world has some unique characteristics, which are explained in the following sections.

Zero waiting time for approval

Everyone can get a loan immediately after providing the collateral. There is no need to provide other information or wait for approval before receiving the loan.

The loan qualification and the borrowing limit are determined by the value of collateral and the loan-to-value (LTV) parameter. LTV is a pre-configured parameter of an asset pool. Meanwhile, the borrowing limit also depends on the available assets in the asset pools. Here is the formula to calculate the borrowing limit (MathZone*IMGstyle="vertical-align:-0.406em;height:1.054em;width:3.632em"<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:msub><mml:mrow><mml:mi>V</mml:mi></mml:mrow><mml:mrow><mml:mi>b</mml:mi><mml:mi>o</mml:mi><mml:mi>r</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>w</mml:mi><mml:mo>_</mml:mo><mml:mi>l</mml:mi><mml:mi>i</mml:mi><mml:mi>m</mml:mi><mml:mi>i</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math>) for a user:

MathZone*IMGstyle="vertical-align:-0.406em;height:1.320em;width:20.269em"<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><mrow><mrow><msub><mi>V</mi><mrow><mi>b</mi><mi>o</mi><mi>r</mi><mi>r</mi><mi>o</mi><mi>w</mi><mo>&#x5f;</mo><mi>l</mi><mi>i</mi><mi>m</mi><mi>i</mi><mi>t</mi></mrow></msub><mo>&#x3d;</mo><mi>M</mi><mi>i</mi><mi>n</mi><mi>i</mi><mi>m</mi><mi>u</mi><mi>m</mi><mo>(</mo><msub><mrow><mi>L</mi><mi>T</mi><mi>V</mi><mi mathvariant="normal">*</mi><mi>V</mi></mrow><mrow><mi>c</mi><mi>o</mi><mi>l</mi><mi>l</mi><mi>a</mi><mi>t</mi><mi>e</mi><mi>r</mi><mi>a</mi><mi>l</mi><mi>s</mi></mrow></msub><mo>&#x2c;</mo><msub><mi>V</mi><mrow><mi>a</mi><mi>s</mi><mi>s</mi><mi>e</mi><mi>t</mi><mo>&#x5f;</mo><mi>a</mi><mi>v</mi><mi>a</mi><mi>i</mi><mi>l</mi><mi>a</mi><mi>b</mi><mi>l</mi><mi>e</mi></mrow></msub><mo>)</mo></mrow></mrow></mrow></math>

Here, MathZone*IMGstyle="vertical-align:-0.340em;height:0.988em;width:2.930em"<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:msub><mml:mrow><mml:mi>V</mml:mi></mml:mrow><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math> is the value of the collateral that the user provided. MathZone*IMGstyle="vertical-align:-0.406em;height:1.054em;width:4.064em"<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:msub><mml:mrow><mml:mi>V</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>s</mml:mi><mml:mi>e</mml:mi><mml:mi>t</mml:mi><mml:mo>_</mml:mo><mml:mi>a</mml:mi><mml:mi>v</mml:mi><mml:mi>a</mml:mi><mml:mi>i</mml:mi><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>b</mml:mi><mml:mi>l</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msub></mml:math> is the value of available assets in the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime