How to DeFi PDF

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Summary

This book provides a comprehensive introduction to Decentralized Finance (DeFi). It explains the basics, key concepts, and different types of DeFi applications, including stablecoins, lending, borrowing, exchanges, and derivatives, while also detailing how to participate in them with step-by-step guides.

Full Transcript

How to DeFi 1st Edition, March 2020 Darren Lau, Daryl Lau, Teh Sze Jin, Kristian Kho, Erina Azmi, TM Lee, Bobby Ong Copyright © 2020 CoinGecko 1st edition, March 2020 Layout: Anna Tan teaspoonpublishing.com.my All rights reserved. No part of this publication may be reproduced, stored in a retriev...

How to DeFi 1st Edition, March 2020 Darren Lau, Daryl Lau, Teh Sze Jin, Kristian Kho, Erina Azmi, TM Lee, Bobby Ong Copyright © 2020 CoinGecko 1st edition, March 2020 Layout: Anna Tan teaspoonpublishing.com.my All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except brief extracts for the purpose of review, without the prior permission in writing of the publisher and copyright owners. It is also advisable to consult the publisher if in any doubt as to the legality of any copying which is to be undertaken. “DeFi can be intimidating and overly complex, but this book makes it simple.” – Seb Audet, Founder of DeFiSnap “If I didn't know anything about DeFi and needed to learn from scratch, this book is where I’d start.” – Felix Feng, CEO of TokenSets “This book makes it easy for beginners to get started with DeFi.” – Hugh Karp, CEO of Nexus Mutual “There is a lot of content about decentralized finance available but nothing matches this depth and comprehensiveness of this book.” – Leighton Cusack, CEO of PoolTogether “This is an excellent resource for anyone who wants a comprehensive introduction to DeFi.” – Kain Warwick, Founder of Synthetix “This book details the new economies created by a generation of bankless pioneers. It’s the best introduction you could ask for.” – Mariano Conti, Head of Smart Contracts at Maker Foundation CONTENTS Introduction 1 Part One: Centralized & Decentralized Finance 3 Chapter 1: The Traditional Financial Institutions The Banks 1. Payment and Clearance System 2. Accessibility 3. Centralization & Transparency Decentralized Finance vs. Traditional Finance Recommended Readings 4 4 6 6 8 9 10 Chapter 2: What is Decentralized Finance (DeFi)? The DeFi Ecosystem How Decentralized is DeFi? DeFi Key Categories Stablecoins Lending and Borrowing Exchanges Derivatives Fund Management Lottery Payments Insurance Recommended Readings 11 12 12 13 13 14 14 15 15 15 16 16 17 Part Two: Getting into DeFi 19 Chapter 3: The Decentralized Layer: Ethereum What is Ethereum? What is a Smart Contract? What is Ether (ETH)? What is Gas? What are Decentralized Applications (Dapps)? What are the benefits of Dapps? What are the disadvantages of Dapps? What else can Ethereum be used for? Recommended Readings 20 20 21 21 22 23 23 24 24 26 How to Defi Chapter 4: Ethereum Wallets Custodial vs Non-Custodial Which Wallet Should I Use? Mobile Users: Argent Pro Tip Argent: Step-by-Step Guide Desktop Users: Metamask Metamask: Step-by-Step Guide Recommended Readings 27 27 28 28 29 30 36 37 43 Part Three: Deep Diving into DeFi 44 Chapter 5: Decentralized Stablecoins Maker What is Maker? What are the Differences between Sai and Dai? How does Maker Govern the System? Collateral Ratio Stability Fee Dai Savings Rate (DSR) Motivations to Issue DAI How do I get my hands on some Dai (DAI)? Minting Dai Trading DAI Black Swan Event Why use Maker? Maker: Step-by-Step Guides Minting your own DAI Saving your DAI Recommended Readings 45 47 47 47 48 48 49 49 49 50 50 52 52 52 54 54 58 60 Chapter 6: Decentralized Lending and Borrowing Compound How much interest will you receive, or pay? Do I need to register for an account to start using Compound? Start earning interest on Compound cTokens? Start borrowing on Compound Price movement of collateral asset Liquidation 61 63 64 64 64 65 66 66 67 How to DeFi Compound.Finance: Step-by-Step Guides Supplying fund to the pool Borrowing fund from the pool Recommended Readings 68 68 71 74 Chapter 7: Decentralized Exchanges (DEX) Uniswap Liquidity Pools Automated Market Maker Mechanism How to get a token added on Uniswap? Uniswap: Step-by-Step Guide Swapping Tokens Provide Liquidity Stop Providing Liquidity Recommended Readings dYdX Lending Who pays the interest for my deposit? Borrowing Margin & Leveraged Trading Pro Tip What is leverage? What is liquidation? How are Profits/losses calculated? dYdX: Step-by-Step Guide Recommended Readings 75 77 77 78 81 82 82 85 86 87 88 88 89 89 90 91 91 91 92 93 99 Chapter 8: Decentralized Derivatives Synthetix What are Synthetic Assets (Synths)? Why Synthetic Assets? How are Synths Created? What Assets do Synths Support? Index Synths sCEX sDEFI Fun fact Synthetix Exchange Synthetix: Step-by-Step Guide 100 101 101 102 103 104 104 104 105 105 105 106 How to Defi Recommended Readings 110 Chapter 9: Decentralized Fund Management TokenSets What kinds of Sets are there? Robo Sets Social Trading Sets How are Sets helpful? TokenSets: Step-by-Step Guide Recommended Readings 111 112 112 112 113 113 115 122 Chapter 10: Decentralized Lottery PoolTogether What is PoolTogether? Why bother with Decentralized Lotteries? What’s the Catch? So, Lending on Compound vs. participating in PoolTogether? PoolTogether: Step-by-Step Guide Recommended Readings 123 124 124 125 125 126 129 132 Chapter 11: Decentralized Payments Sablier What is Sablier? What Does Streaming Payment Mean? Why is this important? Trust Timing Example of how it works Sablier Step-by-Step Guide Recommended Readings 133 134 134 134 134 135 135 135 136 139 Chapter 12: Decentralized Insurance Nexus Mutual What is Nexus Mutual? What event is covered by Nexus Mutual? How does coverage work? How is the coverage priced? How to Purchase Cover? NXM Token What is a Risk Assessor? Has NXM ever paid out claims before? 140 141 141 142 142 143 143 144 144 144 How to DeFi Nexus Mutual: Step-by-Step Guide Disclaimer Recommended Readings Opyn What is Opyn? What are Options? How does Opyn work? How much does Insurance cost? Why would anyone provide insurance on Opyn? Being a Liquidity Provider on Uniswap Selling oTokens on Uniswap Is Opyn safe? What are the key differences between Nexus Mutual and Opyn? Opyn: Step-by-Step Guide Conclusion Recommended Readings 145 149 150 151 151 151 152 153 153 154 154 154 155 156 160 161 Chapter 13: DeFi Dashboard What is a Dashboard? DeFiSnap: Step-by-Step Guide 162 162 163 Part Four: DeFi in Action 166 Chapter 14: DeFi in Action Surviving Argentina’s High Inflation Uniswap Ban 167 167 170 Chapter 15: DeFi is the Future, and the Future is Now What about DeFi User Experience? 173 174 Closing Remarks 177 Appendix CoinGecko’s Recommended DeFi Resources Information Newsletters Podcast Youtube Bankless Level-Up Guide Projects We Like Too Dashboard Interfaces 178 178 178 178 178 179 179 179 179 How to Defi Decentralized Exchanges Exchange Aggregators Lending and Borrowing Prediction Markets Taxes Wallet Yield Optimisers References Chapter 1: Traditional Financial Institutions Chapter 2: What is Decentralized Finance (DeFi)? Chapter 3: The Decentralized Layer: Ethereum Chapter 4: Ethereum Wallets Chapter 5: Decentralized Stablecoins Chapter 6: Decentralized Borrowing and Lending Chapter 7: Decentralized Exchange (DEX) Chapter 8: Decentralized Derivatives Chapter 9: Decentralized Fund Management Chapter 10: Decentralized Lottery Chapter 11: Decentralized Payment Chapter 12: Decentralized Insurance Chapter 13: DeFi Dashboard Chapter 14: DeFi in Action Glossary 179 179 179 180 180 180 180 181 181 182 182 183 183 184 184 185 185 186 187 187 189 189 191 INTRODUCTION Welcome to CoinGecko’s very first book, How to DeFi! DeFi is the acronym for the term Decentralized Finance and is currently one of the fastest-growing sectors in the blockchain and cryptocurrency space. DeFi has grown very rapidly in the past one year but materials to help people grasp the idea of DeFi lagged behind. We set out on our research in this exciting new space and condensed all of our findings into the 1st Edition of this book here. DeFi is an ecosystem of Decentralized Applications (Dapps) that provide financial services built on top of distributed networks with no governing authority. A majority of the DeFi Dapps currently being built are on the Ethereum blockchain, so for purposes of brevity, this will be the focus in this book. DeFi has been the key theme in Ethereum’s development in 2019 and 2020. At this point of writing, DeFi Dapps have locked up over $1 billion worth of cryptocurrencies. DeFi is expected to grow further in the coming years and is a key component in fulfilling Ethereum’s lofty vision and ambition. 1 How to DeFi In this book, we will be explaining what DeFi is and how it is important for the community. We will be looking at the various elements of DeFi such as decentralized stablecoins, decentralized exchanges, decentralized lending, decentralized derivatives, and decentralized insurance. In each of these chapters, we will be providing step-by-step guides to assist you to interact with at least one of the DeFi products. Throughout the book, we will have Recommended Readings at the end of each chapter. In these sections, we will share supplementary reading materials that we believe will be useful as you dive deeper into the DeFi ecosystem - all credits of course go to their respective authors. Kudos to them for making DeFi more accessible! This book is aimed at DeFi beginners so if you are a DeFi expert, do kindly share with us how we can further improve it to make DeFi friendlier for other beginners in our future editions. To accelerate the DeFi adoption, we want to make the complex designs of DeFi simple for the public to understand and accessible for them to get started. We hope that by sharing our learnings with you, we will help you get up to speed with DeFi and are able to join us to participate in this movement. CoinGecko Research Team Darren Lau, Daryl Lau, Teh Sze Jin, Kristian Kho, Erina Azmi, TM Lee, Bobby Ong 20 February 2020 2 PART ONE: CENTRALIZED & DECENTRALIZED FINANCE 3 CHAPTER 1: THE TRADITIONAL FINANCIAL INSTITUTIONS In our attempt to shed light on people new to DeFi, we’ll start by first going through the basics of how traditional financial institutions work. For simplicity, we will focus on the highest leveraged institutions in the traditional financial system, the banks, and discuss its key areas to see the potential risks. The Banks Banks are the giants of the financial industry that facilitate payments, accept deposits and offer lines of credit to individuals, businesses, other financial institutions, and even governments. In fact, they are so large that the total market capitalization of the top 10 banks in the world is valued at $2 trillion USD. In contrast, the total market capitalization of the entire cryptocurrency market was valued at approximately $200 billion on the 31st of December 2019. 4 The Traditional Financial Institutions Top 10 Global Banks 2019 Rank 1 2 3 4 5 6 7 8 9 10 Bank ICBC China Construction Bank Agricultural Bank of China Bank of China JP Morgan Chase Bank of America Wells Fargo Citigroup HSBC Mitsubishi UFJ Country China China China China US US US US UK Japan Market Cap. ($ bn) 338 287 243 230 209 189 168 158 147 146 Source: Top 1000 World Banks 2019 Banks are vital parts of the moving machine that is the financial industry—they enable money to move around the world by providing value transfer services (deposit, withdrawal, transfers), extend credit lines (loans), and more. However, banks are managed by humans and governed by policies that are prone to human-related risks such as mismanagement and corruption. The global financial crisis of 2008 exemplified excessive risk-taking by banks and governments were forced to make massive bailouts of the banks. The crisis exposed the shortcomings of the traditional financial system and highlighted a need for it to be better. DeFi seeks to build a better financial landscape made possible by the advent of the internet and blockchain technology, particularly in three key segments of the banking system: 1. Payment & clearance system (remittance) 2. Accessibility 3. Centralization & Transparency 5 How to DeFi 1. Payment and Clearance System If you’ve tried to send money to someone or a business in another country, you know this pain all too well—remittances involving banks worldwide typically take a few working days to complete1 and involve all sorts of fees. To make matters worse, there may also be issues with documentation, compliance with anti-money laundering laws, privacy concerns, and more. For example, if you are living in the US and would like to send USD $1,000 from your bank account in the US to your friend’s bank account in Australia, there are typically three fees involved: the exchange rate from your bank, the international wire outbound fee and the international wire inbound fee. Additionally, it will take a few working days for the recipient to receive the money depending on the recipient bank’s location. Cryptocurrencies that powers the DeFi movement allow you to bypass intermediaries who take the lion’s share of profits of these transfers. It is likely to be quicker as well - your transfers would be processed with no questions asked with relatively lower fees compared to banks. For example, the transfer of cryptocurrencies to any account in the world would take anywhere between 15 seconds to 5 minutes depending on several factors2, along with a small fee (e.g. $0.02 on Ethereum). 2. Accessibility Chances are if you are reading this book, you are banked and have access to financial services offered by banks—to open a savings account, take a loan, make investments and more. However, there 1 “How Long Does It Take to Have a Payment Post Online to ....” 2 Jul. 2017, https://www.gobankingrates.com/banking/checking-account/how-longpayment-posted-online-account/. 2 “How long does an Ethereum transaction really take? - ETH ....” 5 Jun. 2019, https://ethgasstation.info/blog/ethereum-transaction-how-long/. 6 The Traditional Financial Institutions are also many more who are less fortunate and do not have access to even the most basic savings account. Heatmap of the Unbanked (Source: Global Findex, World Bank, 2017) The World Bank estimates that as of 2017, there are 1.7 billion people who do not own an account at a financial institution and more than half of them are from developing nations3. They come largely from poor households and some of their main reasons for not having a bank account are due to poverty, geographical and trust issues. For the 1.7 billion unbanked, access to banking is tough—but DeFi has the potential to make it easier. Accessing DeFi Dapps only requires a person to have a mobile phone & internet access, as opposed to going through lengthy verification processes. The World Bank estimates that two-thirds of the 1.7 billion unbanked have 3 “2 THE UNBANKED - Global Findex.” https://globalfindex.worldbank.org/sites/globalfindex/files/chapters/2017% 20Findex%20full%20report_chapter2.pdf. 7 How to DeFi access to mobile phones4 and DeFi Dapps can be their gateway to accessing financial products as opposed to traditional banks. DeFi represents a movement that seeks to push borderless, censorship-free and accessible financial products for all. DeFi protocols do not discriminate and levels the playing field for everyone. 3. Centralization & Transparency There is no denying that traditional, regulated financial institutions that comply with government laws and regulations such as banks are some of the most secure places to park funds. But they are not without flaws—even large banks can fail. Washington Mutual with over $188 billion5 in deposits and Lehman Brothers with $639 billion6 in assets have both failed in 2008. In the US alone, over 500 bank failures have been recorded7. Banks are one of the centralized points of failure in the financial system—the fall of Lehman Brother triggered the start of the 2008 financial crisis. The centralization of power and funds in the hands of the banks is dangerous, and rightfully so looking at past incidents. Transparency also ties into this - there is no way for regular investors to fully know what financial institutions do. Some of the events 4 “Insights from the World Bank's 2017 Global Findex database ....” 20 Apr. 2018, https://www.devex.com/news/insights-from-the-world-bank-s-2017global-findex-database-92589. 5 “Washington Mutual (WaMu): How It Went Bankrupt.” https://www.thebalance.com/washington-mutual-how-wamu-wentbankrupt-3305620. 6 “The Collapse of Lehman Brothers: A Case ....” 26 Nov. 2019, https://www.investopedia.com/articles/economics/09/lehman-brotherscollapse.asp. 7 “Failed Bank List – FDIC.” https://www.fdic.gov/bank/individual/failed/banklist.html. 8 The Traditional Financial Institutions leading up to the 2008 financial crisis included credit rating agencies giving AAA ratings (best & safest investments) to high-risk mortgage-backed securities8. It will be different with DeFi. DeFi protocols built on top of public blockchains such as Ethereum are mostly open-sourced for audit and transparency purposes. They usually have decentralized governing organizations to ensure that everyone knows what is happening and that no bad actors can single-handedly make bad decisions. DeFi protocols are written as lines of codes—you can’t cheat the codes as it treats every participant equally without discrimination. The codes run exactly as they are programmed to, and any flaws quickly become evident as it is open for public scrutiny. At the end of the day, DeFi’s biggest strength lies in being able to cut out intermediaries and operate with zero censorship. Decentralized Finance vs. Traditional Finance Friction, inaccessibility and regulatory uncertainties are some of the major issues plaguing the current banking system. It is unfortunate that not everyone is privileged to be banked in the current financial system - it is tough for the unbanked to compete on a level field. The DeFi movement is about bridging these gaps, and making finance accessible to everyone without any form of censorship. In short, DeFi opens up huge windows of opportunities and allows users to access various financial instruments without any restriction on race, religion, age, nationality or geography. 8 “financial crisis – GovInfo.” https://www.govinfo.gov/content/pkg/GPOFCIC/pdf/GPO-FCIC.pdf. 9 How to DeFi When comparing both traditional and decentralized financial products, there will be pros and cons on each side. In this book, we will walk you through the concepts and possibilities of decentralized finance so you know how to use its best features to solve real-world problems. In Chapter 2 we will provide an overview of DeFi along with some of its Decentralized Applications to help capture the underlying notions on how DeFi works. Recommended Readings 1. Decentralized Finance vs Traditional Finance: What You Need To Know (Stably) https://medium.com/stablyblog/decentralized-finance-vs-traditional-finance-what-you-needto-know-3b57aed7a0c2 2. The 7 Major Flaws of the Global Financial System (Jeff Desjardins) https://www.visualcapitalist.com/7-major-flawsglobal-financial-system 3. Decentralized Finance: An Emerging Alternative to the Global Financial System (Frank Cardona) https://www.visualcapitalist.com/decentralized-finance/ 4. How Decentralized Finance Could Make Investing More Accessible (Jeff Desjardins) https://www.visualcapitalist.com/how-decentralized-financecould-make-investing-more-accessible/ 10 CHAPTER 2: WHAT IS DECENTRALIZED FINANCE (DEFI)? Decentralized Finance or DeFi is the movement that allows users to utilize financial services such as borrowing, lending, and trading without the need to rely on centralized entities. These financial services are provided via Decentralized Applications (Dapps), in which a majority of them are deployed on the Ethereum platform. While it is helpful to understand how Ethereum works to better visualize the ecosystem, you do not need to be an Ethereum expert to utilize the tools offered by DeFi. We will touch more on Ethereum in the next chapter. DeFi is not a single product or company but is instead a set of products and services that acts as a replacement for institutions ranging from banking, insurance, bonds and money markets. DeFi Dapps enable users to combine their services to open up multiple possibilities. It is often called money LEGOs due to its composability. In order for DeFi Dapps to work, it usually requires collateral to be locked into smart contracts. The cumulative collateral locked in DeFi Dapps is often referred to as the Total Value Locked. According to DeFi Pulse, the Total Value Locked at the start of 2019 measured around $275 million 11 How to DeFi but in February 2020, it reached a high of $1.2 billion. The large growth of Total Value Locked serves as an indicator of the rapid growth of the DeFi ecosystem. The DeFi Ecosystem With such rapid growth, it would be impossible for us to cover everything DeFi has to offer in this book. That is why we have selected a few categories and DeFi Dapps that we believe are important and crucial for beginners to understand before stepping into the DeFi ecosystem. These DeFi Dapps stand to revolutionize traditional financial services by removing the need for any middlemen. However, it should be noted that DeFi in its current state is still highly nascent and experimental with many projects being rapidly improved upon daily. As time goes on, DeFi may develop further and look entirely unrecognizable from what it is today. Nevertheless, it is useful to understand the early beginnings of DeFi and one can still take advantage of the features offered DeFi Dapps today with the right know-how. How Decentralized is DeFi? It is not easy to answer how decentralized DeFi is. For simplicity’s sake, we will separate the degrees of decentralization into three categories: centralized, semi-decentralized and completely decentralized. 1. Centralized ○ Characteristics: Custodial, uses centralized price feeds, centrally-determined interest rates, centrally-provided liquidity for margin calls ○ Examples: Salt, BlockFi, Nexo and Celsius 2. Semi-Decentralized (has one or more of these characteristics but not all) 12 What is Decentralized Finance (DeFi) ○ Characteristics: Non-custodial, decentralized price feeds, permissionless initiation of margin calls, permissionless margin liquidity, decentralized interest rate determination, decentralized platform development/updates ○ Examples: Compound, MakerDAO, dYdX, bZx 3. Completely Decentralized ○ Characteristics: Every component is decentralized ○ Examples: No DeFi protocol is completely decentralized yet. Currently, most DeFi dapps are sitting in the semi-decentralized category. A further breakdown of the decentralization components can be read in Kyle Kistner’s article in the Recommended Readings. Now that you have a better understanding of what being decentralized means, let’s move on to key categories of DeFi. DeFi Key Categories In this book, we will be covering the following 8 major categories of DeFi: 1. Stablecoins The prices of cryptocurrencies are known to be extremely volatile. It is common for cryptocurrencies to have intraday swings of over 10%. To mitigate this volatility, stablecoins that are pegged to other stable assets such as the USD were created. Tether (USDT) was one of the first centralized stablecoins to be introduced. Every USDT is supposedly backed by $1 in the issuer’s bank account. However, one major downside to USDT is that users need to trust that the USD reserves are fully collateralized and actually exist. Decentralized stablecoins aim to solve this trust issue. Decentralized stablecoins are created in a decentralized manner via an 13 How to DeFi overcollateralization method, operate fully on decentralized ledgers, are governed by decentralized autonomous organizations, and its reserves can be publicly audited by anyone. While stablecoins are not really a financial application themselves, they are important in making DeFi applications more accessible to everyone by having a stable store of value. 2. Lending and Borrowing Traditional financial systems require users to have bank accounts to utilize their services, a luxury that 1.7 billion people currently do not have. Borrowing from banks comes with other restrictions such as having a good credit score and having sufficient collateral to convince the banks that one is credit-worthy and able to repay a loan. Decentralized lending and borrowing remove this barrier, allowing anyone to collateralize their digital assets and use this to obtain loans. One can also earn a yield on their assets and participate in the lending market by contributing to lending pools and earning interest on these assets. With decentralized lending and borrowing, there is no need for a bank account or a credit-worthiness check. 3. Exchanges To exchange one cryptocurrency to another, one can use exchanges such as Coinbase or Binance. Exchanges like these are centralized exchanges, meaning they are both the intermediaries and custodians of the assets being traded. Users of these exchanges do not have full control of their assets, putting their assets at risk in case the exchanges get hacked and are unable to repay their obligations. Decentralized exchanges aim to solve this issue by allowing users to exchange cryptocurrencies without giving up custody of their coins. Without storing any funds on centralized exchanges, users do not need to trust the exchanges to stay solvent. 14 What is Decentralized Finance (DeFi) 4. Derivatives A derivative is a contract whose value is derived from another underlying asset such as stocks, commodities, currencies, indexes, bonds, or interest rates. Traders can use derivatives to hedge their positions and decrease their risk in any particular trade. For example, imagine you are a glove manufacturer and want to hedge yourself from an unexpected increase in rubber price. You can buy a futures contract from your supplier to deliver a specific amount of rubber at a specific future delivery date at an agreed price today. Derivatives contracts are mainly traded on centralized platforms. DeFi platforms are starting to build decentralized derivatives markets. We will go through this in further detail in Chapter 8. 5. Fund Management Fund management is the process of overseeing your assets and managing its cash flow to generate a return on your investments. There are two main types of fund management—active and passive fund management. Active fund management has a management team making investment decisions to beat a particular benchmark such as the S&P 500. Passive fund management does not have a management team but is designed in such a way to mimic the performance of a particular benchmark as closely as possible. In DeFi, some projects have started to allow for passive fund management to take place in a decentralized manner. The transparency of DeFi makes it easy for users to track how their funds are being managed and understand the cost they will be paying. 15 How to DeFi 6. Lottery As DeFi continues to evolve, creative and disruptive financial applications will emerge, democratizing accessibility and removing intermediaries. Putting a DeFi spin onto lotteries allow for the removal of custodianship of the pooled capital unto a smart contract on the Ethereum Blockchain. With the modularity of DeFi, it is possible to link a simple lottery Dapp to another DeFi Dapp and create something of more value. One DeFi Dapp that we will explore in this book allows participants to pool their capital together. The pooled capital is then invested into a DeFi lending Dapp and the interest earned is given to a random winner at a set interval. Once the winner is selected, the lottery purchasers get their lottery tickets refunded, ensuring no-loss to all participants. 7. Payments A key role of cryptocurrency is to allow decentralized and trustless value transfer between two parties. With the growth of DeFi, more creative payment methods are being innovated and experimented. One such DeFi project that is explored in this book aims to change the way we approach payment by reconfiguring payments as streams instead of transactions we are familiar with. The possibility of providing payments as streams open up a plethora of potential applications of money. Imagine “pay-as-you-use” but on a much more granular scale and with higher accuracy. The nascency of DeFi and the rate of innovation will undoubtedly introduce new ways of thinking on how payments work to address many of the current financial system’s shortfalls. 16 What is Decentralized Finance (DeFi) 8. Insurance Insurance is a risk management strategy in which an individual receives financial protection or reimbursement against losses from an insurance company in the event of an unfortunate incident. It is common for individuals to purchase insurance on cars, home, health, and life. But is there decentralized insurance for DeFi? All of the tokens locked within smart contracts are potentially vulnerable to smart contract exploits due to the large potential payout possible. While most projects have gotten their codebases audited, we never know if the smart contracts are truly safe and there is always a possibility of a hack which may result in a loss. The risks highlight the need for purchasing insurance especially if one is dealing with large amounts of funds on DeFi. We will explore several decentralized insurance options in this book. Recommended Readings 1. Decentralized Finance Explained (Yos Riady) https://yos.io/2019/12/08/decentralized-finance-explained/ 2. A beginner’s guide to DeFi (Linda J. Xie) https://nakamoto.com/beginners-guide-to-defi/ 3. A Beginner’s Guide to Decentralized Finance (DeFi) (Coinbase) https://blog.coinbase.com/a-beginners-guide-to-decentralizedfinance-defi-574c68ff43c4 4. The Complete Beginner’s Guide to Decentralized Finance (DeFi) (Binance) https://www.binance.vision/blockchain/the-completebeginners-guide-to-decentralized-finance-defi 5. 2019 Was The Year of DeFi (and Why 2020 Will be Too) (Mason Nystrom) https://consensys.net/blog/news/2019-was-the-yearof-defi-and-why-2020-will-be-too/ 17 How to DeFi 6. DeFi: What It Is and Isn’t (Part 1) (Justine Humenansky) https://medium.com/coinmonks/defi-what-it-is-and-isnt-part-1f7d7e7afee16 7. How Decentralized is DeFi? A Framework for Classifying Lending Protocols (Kyle Kistner) https://hackernoon.com/howdecentralized-is-defi-a-framework-for-classifying-lendingprotocols-90981f2c007f 8. How Decentralized is “Decentralized Finance”? (Aaron Hay) https://medium.com/coinmonks/how-decentralized-isdecentralized-finance-89aea3070e8f 9. Mapping Decentralized Finance https://outlierventures.io/wpcontent/uploads/2019/06/Mapping-Decentralised-FinanceDeFi-report.pdf 10. Market Report: 2019 DeFi Year in Review https://defirate.com/market-report-2019/ 11. DeFi #3 – 2020: The Borderless State of DeFi https://research.binance.com/analysis/2020-borderless-state-ofdefi 12. Decentralized Finance with Tom Schmidt (Software Engineering Daily) https://softwareengineeringdaily.com/2020/02/25/decentralized -finance-with-tom-schmidt/ 18 PART TWO: GETTING INTO DEFI 19 CHAPTER 3: THE DECENTRALIZED LAYER: ETHEREUM What is Ethereum? As mentioned in Chapter 1, the majority of the DeFi Dapps are currently being built on the Ethereum blockchain. But what exactly is Ethereum? Ethereum is a global, open-source platform for decentralized applications. You can think of it as a world computer that cannot be shut down. On Ethereum, software developers can write smart contracts that control digital value through a set of criteria and are accessible anywhere in the world. In this book specifically, we will be exploring Decentralized Applications (Dapps) that provide financial services known as DeFi. Smart contracts that are written by software programmers are the building blocks of these Dapps. These smart contracts are then deployed to the Ethereum network, where it will run 24/7. The network will maintain the digital value and keep track of the latest state. 20 The Decentralized Layer: Ethereum What is a Smart Contract? A smart contract is a programmable contract that allows two counterparties to set conditions of a transaction without needing to trust another third party for the execution. For example, if Alice wants to set up a trust fund to pay Bob $100 at the start of each month for the next 12 months, she can program a smart contract to: 1. Check the current date 2. At the start of each month, send Bob $100 automatically 3. Repeat until the fund in the smart contract is exhausted Using a smart contract, Alice has bypassed the need to have a trusted third-party intermediary (lawyers, escrow agents etc) to send the trust fund to Bob and made the process transparent to all involved parties. Smart contracts work on the “if this, then that” principle. Whenever a certain condition is fulfilled, the smart contract will carry out the operation as programmed. Multiple smart contracts are combined to operate with each other, which would be known as decentralized application (Dapp) in order to fulfill more complex processes and computation. What is Ether (ETH)? Ether is the native currency of the Ethereum blockchain. It is like money and can be used for everyday transactions similar to Bitcoin. You can send Ether to another person to purchase goods and services based on the current market value. The Ethereum blockchain records the transfer and ensures the finality of the transaction. 21 How to DeFi Besides that, Ether is also used to pay for the fee that allows smart contracts and Dapps to run on the Ethereum network. You can think of executing smart contracts on the Ethereum network as driving a car. To drive a car, you require fuel. To execute a smart contract on Ethereum, you need to use Ether to pay a fee known as Gas. Ether is slowly evolving to become its own unique reserve currency and store of value. Currently, within the DeFi ecosystem, Ether is the preferred asset choice used as the collateral underlying many DeFi Dapps. It provides safety and transparency to this financial system. If this confuses you, do not worry as we will be covering this topic in further depth throughout this book. What is Gas? On Ethereum, all transactions and smart contract executions require a small fee to be paid. This fee is called Gas. In technical terms, Gas refers to the unit of measure on the amount of computational effort required to execute an operation or a smart contract. The more complex the execution operation is, the more gas is required to fulfill that operation. Gas fees are paid entirely in ETH. The price of gas can fluctuate from time to time depending on the network demand. If there are more people interacting on the Ethereum blockchain such as transacting in ETH or executing smart contract operations, due to the limited amount of computing resources on the network, Gas price can increase. Conversely when the network is underutilized, the market price of gas would decrease. Gas fees can be set manually, and in a situation where the network is congested due to high utilization, transactions with the highest gas fee associated with it will be prioritized for validation. Validated transactions will be finalized and added to the blockchain. If gas fees paid are too low, the transactions will be queued up which can take a while to complete. 22 The Decentralized Layer: Ethereum Therefore, transactions with lower-than-average gas fees can take much longer to complete. Gas price is typically denoted in gwei. 1 gwei = 0.000000001 ether Assume a smart contract execution to transfer tokens require 21,000 gas units. Assume the average market rate for gas price is 3 gwei. 21,000 gas x 3 gwei = 63,000 gwei = 0.000063 ETH When executing the transactions, you will pay a gas fee of 0.000063 ETH to process and validate your transaction in the network. Example of how gas fees are calculated What are Decentralized Applications (Dapps)? In the context of Ethereum, Dapps are interfaces that interact with the blockchain through the use of smart contracts. From the front, Dapps look and behave like regular web and mobile applications, except that they interact with a blockchain and in different ways. Some of the ways include requiring ETH to use the Dapp, storage of user data onto blockchain such that it is immutable, and so on. What are the benefits of Dapps? Dapps are built on top of decentralized blockchain networks such as Ethereum and usually have the following benefits: ● Immutability: Nobody can change any information once it’s on the blockchain. ● Tamper-proof: Smart contracts published onto the blockchain cannot be tampered with without alerting every other participant on the blockchain. 23 How to DeFi ● ● Transparent: Smart contracts powering Dapps are openly auditable. Availability: As long as the Ethereum network remains active, Dapps built on it will remain active and usable. What are the disadvantages of Dapps? While a blockchain offers many benefits, there are also many different downsides that come along with it: ● Immutability: Smart contracts are written by humans and can only be as good as the person who wrote it. Human errors are unavoidable and immutable smart contracts have the potential to compound errors into something larger. ● Transparent: Openly auditable smart contracts can also become attack vectors for hackers as they can view the code to find exploits. ● Scalability: In most cases, the bandwidth of a Dapp is limited to the blockchain it resides on. What else can Ethereum be used for? Besides creating Dapps, Ethereum can be used for two other functions: creating Decentralized Autonomous Organizations (DAO) or issuing other cryptocurrencies. A DAO is a fully autonomous organization which is not governed by a single person but is instead governed through code. This code is based on smart contracts and enables DAOs to replace how traditional organizations are typically run. As it runs on code, it would be protected from human intervention and will operate transparently. There would be no effect by any outside influence. Governance decisions or rulings would be decided via DAO token voting. Speaking of tokens, Ethereum can be used as a platform to create other cryptocurrencies. There are currently two popular protocols for tokens on 24 The Decentralized Layer: Ethereum the Ethereum Network: ERC-20 and ERC-721. ERC-20 is a protocol standard that defines rules and standards for issuing tokens on Ethereum. ERC-20 tokens are fungible, meaning they are interchangeable and of the same value. On the other hand, ERC-721 tokens are non-fungible, meaning it is completely unique and non-interchangeable. A simple analogy would be to think of ERC-20 as money and ERC-721 as collectibles like action figures or baseball cards. And that’s it for Ethereum—if you’re keen to own your first cryptocurrency or try your first DApp, we will be covering several interesting DeFi products which include overviews and step-by-step guides. But before you begin your journey, you will need an Ethereum Wallet! 25 How to DeFi Recommended Readings 1. What is Ethereum? [The Most Updated Step-by-Step-Guide!] (Ameer Rosic) https://blockgeeks.com/guides/ethereum/ 2. Smart Contracts: The Blockchain Technology That Will Replace Lawyers (Ameer Rosic) https://blockgeeks.com/guides/smartcontracts/ 3. What is Ethereum Gas? [The Most Comprehensive Step-By-Step Guide Ever!] (Ameer Rosic) https://blockgeeks.com/guides/ethereum-gas/ 4. The trillion-dollar case for ETH (Lucas Campbell) https://bankless.substack.com/p/the-trillion-dollar-case-for-etheb6 5. Ethereum: The Digital Finance Stack (David Hoffman) https://medium.com/pov-crypto/ethereum-the-digital-financestack-4ba988c6c14b 6. Ether: A New Model for Money (David Hoffman) https://medium.com/pov-crypto/ether-a-new-model-formoney-17365b5535ba 26 CHAPTER 4: ETHEREUM WALLETS A wallet is a user-friendly interface to the blockchain network. It manages your private keys, which are basically keys to the lock on your cryptocurrencies’ vault. Wallets allow you to receive, store and send cryptocurrencies. Custodial vs Non-Custodial There are two kinds of wallets, custodial and non-custodial wallets. Custodial wallets are wallets where third-parties keep and maintain control over your cryptocurrencies on your behalf. Non-custodial wallets are wallets where you take full control and ownership of your cryptocurrencies. This is similar to the mantra espoused by many people in the blockchain industry to “be your own bank”. By using a custodial wallet, you trust an external party to store your coins safely. This may be convenient as you do not need to worry about private key security but you only have to worry about account credentials security just like how you would have to protect your email account. However, by trusting a third party with your cryptocurrencies, you open yourself up to the risk of the custodian losing your cryptocurrencies through mismanagement or hacks. There have been numerous incidents of 27 How to DeFi custodial wallets losing their cryptocurrencies with the most prominent example being Mt. Gox lost over 850,000 bitcoin worth over $450 million in 2014. By using a non-custodial wallet, you trust no external party and only yourself to ensure that your cryptocurrencies are safe. However, by using a non-custodial wallet, you pass the burden of security to yourself and you have to be fully equipped to store your private keys safely. If you lose your private keys, you will lose access to your cryptocurrencies too. At CoinGecko, we believe in the “not your keys, not your coin” mantra. We believe that you should educate yourself in all the best security practices and trust only yourself to keep your coins safe. Which Wallet Should I Use? There are many cryptocurrency wallets out there in the market. For the purposes of this book, we will walk you through two DeFi friendly wallets for you to easily start interacting with the Ethereum network. Mobile Users: Argent For mobile users, you may consider using Argent wallet. Argent is a noncustodial wallet that offers ease-of-use and high security, something that does not always go hand-in-hand. It does so by utilizing Argent Guardians, which are people, devices, or third-party services that can verify your identity. Examples include family and friends who are also Argent users, other hardware or Metamask wallets, or two-factor authentication services. By utilizing this limited circle of trust network, Argent is rethinking the need for paper-based seed phrase backups when recovering accounts. 28 Ethereum Wallets Argent Guardians allows you to lock your wallet and instantly freeze all funds in the event you believe your wallet has been compromised. Your wallet will be automatically unlocked after 5 days or you can request for your Argent Guardian to unlock it sooner. You may also set additional security measures to improve your wallet security such as a daily transaction limit. This is useful in preventing hackers from siphoning funds from your Argent wallet in the case they gain access to your wallet. Whenever your daily transaction limit is hit, you will receive a notification and any transactions over the limit are delayed for over 24 hours. You can of course authorize legitimate large transactions over the limit through the help of your Argent Guardians. Argent offers free transactions for wallet users and absorbs all Ethereum gas fees that need to be paid to the network. With Argent wallet, you can easily interact with DeFi Dapps directly from the wallet without the need to use another app or device. Pro Tip There is currently a waiting list to use Argent Wallet. To skip the queue, you may use this link (non-sponsored) to sign up: https://argent.link/coingecko 29 How to DeFi Argent: Step-by-Step Guide Step 1 ● Go to https://argent.link/coingecko ● Download the app on your mobile phone 30 Ethereum Wallets Step 2 ● Once downloaded, choose a unique Ethereum name for your argent wallet 31 How to DeFi Step 3 ● Argent will ask if you want to add your phone number for added security and verification purposes 32 Ethereum Wallets Step 4 ● Afterward, Argent will ask for your email for verification purposes. 33 How to DeFi Step 5 ● You will be on the waitlist. To skip the queue, you may use this link to sign up: https://argent.link/coingecko ● You will get an email notification once your wallet is ready to use! 34 Ethereum Wallets Step 6 ● You start depositing or sending cryptocurrencies to other people. Do consider adding additional Argent Guardians to improve your security. 35 How to DeFi Desktop Users: Metamask For desktop users, you may use Metamask, a web browser extension available on the Chrome, Firefox, Opera, and Brave browsers. Like Argent, Metamask is a non-custodial wallet and it acts as both a wallet and an interaction bridge for the Ethereum network. You can store your Ethereum and ERC20 tokens on Metamask. Acting as an interaction bridge, Metamask enables you to use all Decentralized Applications (Dapps) that are hosted on the Ethereum Network. Without the use of an interaction bridge like MetaMask, your browser would not be able to access the Ethereum blockchain unless you were running a full Ethereum node and have the entire Ethereum blockchain of over 400GB downloaded on your computer. On a technical level, MetaMask does this by injecting a javascript library known as web3.js written by the core Ethereum developers into your browser’s page to enable you to easily interact with the Ethereum network. Metamask makes interaction with DeFi Dapps on the Ethereum network very convenient on your laptop or PC. They are secured to some degree as it requires you to sign each interaction and transaction you execute on the network. However, you must take precautions to keep your Metamask safe and secure. Anybody who has your password or seed phrase (a secret phrase given to you during wallet sign-up) will have complete control of your wallet. Most DeFi Dapps can be accessed using Metamask and in the later chapters, you will notice that the step-by-step guides have been completed using Metamask. 36 Ethereum Wallets Metamask: Step-by-Step Guide Step 1 • Go to https://metamask.io/ • Download extension for the browser of your choice 37 How to DeFi Step 2 • After you have downloaded the extension, click “Get Started” Step 3 • Click “Create a Wallet” and click “Next”. 38 Ethereum Wallets Step 4 • Create your password. 39 How to DeFi Step 5 (IMPORTANT! READ CAREFULLY!) • You will be given a Secret Backup Phrase • NEVER lose it • NEVER show it to anyone • If you lose the phrase, you can’t retrieve it • If anyone else has it, they are able to access your wallet and do anything with it 40 Ethereum Wallets Step 6 • You will be prompted to write the given secret backup phrase to confirm that you have noted it down 41 How to DeFi Step 7 • Congratulations! Your wallet is now created! You can use it to store Ethereum and ERC20 tokens 42 Ethereum Wallets Step 8 • Below is your public key or your Ethereum address to your wallet • Your QR code can be scanned if anyone wants to send you coins. Recommended Readings 1. Argent: The quick start guide (Matthew Wright) https://medium.com/argenthqargent-the-quick-start-guide13541ce2b1fb 2. A new era for crypto security (Itamar Lesuisse) https://medium.com/argenthq/a-new-era-for-crypto-security57909a095ae3 3. A Complete Beginner’s Guide to Using MetaMask (Ian Lee) https://www.coingecko.com/buzz/complete-beginners-guide-tometamask 4. MyCrypto’s Security Guide For Dummies And Smart People Too (Taylor Monahan) https://medium.com/mycrypto/mycryptossecurity-guide-for-dummies-and-smart-people-too-ab178299c82e 43 PART THREE: DEEP DIVING INTO DEFI 44 CHAPTER 5: DECENTRALIZED STABLECOINS The prices of cryptocurrencies are extremely volatile. To mitigate this volatility, stablecoins that are pegged to other stable assets such as the USD were created. Stablecoins help users to hedge against this price volatility and was created to be a reliable medium of exchange. Stablecoins have since quickly evolved to be a strong component of DeFi that is pivotal to this modular ecosystem. There are 19 stablecoins currently listed on CoinGecko. The top 5 stablecoins has a market capitalization totaling over $5 billion. Top 5 Cryptocurrency Stablecoins (Feb 2020) Rank Bank Market Cap. ($ million) 1 Tether (USDT) 4,284 2 USD Coin (USDC) 443 3 Paxos Standard (PAX) 202 4 True USD (TUSD) 142 5 Dai (DAI) 123 Source: CoinGecko.com 45 How to DeFi We will be looking into USD-pegged stablecoins in this chapter. Not all stablecoins are the same as they employ different mechanisms to keep their peg against USD. There are two types of pegs, namely fiatcollateralized and crypto-collateralized. Most stablecoins employ the fiatcollateralized system to maintain their USD peg. For simplicity, we will look at two USD stablecoins, Tether (USDT) and Dai (DAI) to showcase the differences in their pegging management. Tether (USDT) pegs itself to $1 by maintaining reserves of $1 per Tether token minted. While Tether is the largest and most widely used USD stablecoin with daily trading volumes averaging approximately $30 billion in the month of January 2020, Tether reserves are kept in financial institutions and users will have to trust Tether as an entity to actually have the reserve amounts that they claim. Tether is therefore a centralized, fiat-collateralized stablecoin. Dai (DAI) on the other hand, is collateralized using cryptocurrencies such as Ethereum (ETH). Its value is pegged to $1 through protocols voted on by a decentralized autonomous organization and smart contracts. At any given time, the collateral to generate DAI can be easily validated by users. DAI is a decentralized, crypto-collateralized stablecoin. Based on the top 5 stablecoins’ market capitalization, Tether dominates the stablecoin market with approximately 80% of market share. Although DAI’s market share only stands at about 3%, its trading volume has been increasing at a much faster rate. DAI’s trading volume increased by over 4,000% relative to Tether’s growth of 126% since the start of January 2020. DAI is the native stablecoin used most widely in the DeFi ecosystem. It is the preferred USD stablecoin used in DeFi trading, lending and more. To understand DAI further, we will introduce you to its platform, Maker. 46 Decentralized Stablecoins Maker What is Maker? Maker is a smart-contract platform that runs on the Ethereum blockchain and has three tokens: stablecoins, Sai and Dai (both algorithmically pegged to $1), as well as its governance token, Maker (MKR). Sai (SAI) is also known as Single Collateral Dai and is backed only by Ether (ETH) as collateral. Dai (DAI) was launched in November 2019 and is also known as MultiCollateral Dai. It is currently backed by Ether (ETH) and Basic Attention Token (BAT) as collaterals with plans to add other assets as collaterals in the future. Maker (MKR) is Maker’s governance token and users can use it to vote for improvements on the Maker platform via the Maker Improvement Proposals. Maker is a type of organization known as a Decentralized Autonomous Organization (DAO). We will look further into this under the governance subsection. What are the Differences between Sai and Dai? Maker initially started out on 19 December 2017 with the Single Collateral Dai. It was minted using Ether (ETH) as the sole collateral. On 18 November 2019, Maker announced the launch of the new MultiCollateral Dai, which can be minted using either Ether (ETH) and/or Basic Attention Token (BAT) as collateral, with plans to allow other cryptocurrencies to back it in the future. To reiterate, 47 How to DeFi Single-Collateral Dai = Legacy Dai = Sai Multi-Collateral Dai = New Dai = Dai Moving forward, Multi-Collateral Dai will be the de-facto stablecoin standard maintained by Maker and eventually, SAI will be phased out and no longer supported by Maker. For brevity, we will only be using MultiCollateral Dai (DAI) to walk through examples in the following sections. How does Maker Govern the System? Recall our brief mention on Decentralized Autonomous Organization (DAO)? That’s where the Maker (MKR) token comes in. MKR holders have voting rights proportional to the amount of MKR tokens they own in the DAO and can vote on parameters governing the Maker Protocol. The parameters that the MKR holders vote on are vital in keeping the ecosystem healthy, which in turn helps ensure that Dai remains pegged to $1. We will briefly go through three key parameters which you will need to know in the Dai stablecoin ecosystem: I. Collateral Ratio The amount of Dai that can be minted is dependent on the collateral ratio. Ether (ETH) collateral ratio = 150% Basic Attention Token (BAT) collateral ratio = 150% Essentially, what it means with a collateral ratio of 150% is that to mint $100, you need to deposit a minimum of $150 worth of ETH or BAT. 48 Decentralized Stablecoins II. Stability Fee It is equivalent to the ‘interest rate’ which you are required to pay along with the principal debt of the vault. The stability fee is at 8% as of February 2020. III. Dai Savings Rate (DSR) The Dai Savings Rate (DSR) is the interest earned by holding Dai over time. It also acts as a monetary tool to influence the demand of Dai. The DSR rate is set at 7.50% as of February 2020. Motivations to Issue DAI: Why would you want to lock up a higher value of ETH or BAT only to issue Dai with a lower value? You could have sold your assets directly to USD instead. There are three possible cases: I. You need cash now and you have an asset that you believe will be worth more in the future. ● In this case, you could hold your asset in the Maker vault and get the money now by issuing Dai. II. You need cash now but do not want to risk triggering a taxable event when selling your asset. ● Instead, you will draw the loans by issuing Dai. III. Investment Leverage ● You are able to conduct investment leverage on your assets given that you believe the value of your assets would go up. 49 How to DeFi How do I get my hands on some Dai (DAI)? There are two ways you can get your hands on some Dai (DAI): 1. Minting Dai We will walk through how DAI can be minted using a pawnshop analogy. Let’s assume that one day you are in need of $10,000 cash, but all you have are gold bars worth $15,000 at home. Believing that the price of gold will increase in the future, instead of selling the gold bars for cash, you decide to go to a pawnshop to borrow $10,000 cash by putting your gold bars as collateral for it. The pawnshop agrees to lend you $10,000 with an interest of 8% for the cash loan. Both of you sign a contract agreement to finalize the transaction. Now let’s change the terminology to get the narrative of DAI: 50 Decentralized Stablecoins Gold bars (Collateral) Ether or Basic Attention Token (Collateral – Multi-Collateral Dai) Cash loan Dai (DAI) The pawnshop Maker Contract agreement Smart Contract (Vault) Loan interest Stability Fee What happens is that you will mint or ‘borrow’ Dai via the Maker platform by putting your Ether (ETH) or Basic Attention Token (BAT) as collateral. You will have to repay your ‘loan’ along with the ‘loan interest’ which is the stability fee when you want to redeem your ETH or BAT at the end of your loan. To provide an overview, let’s walk through how you can mint your own Dai. On the Maker platform (www.oasis.app), you can borrow Dai by putting your ETH or BAT into the vault. Assuming ETH is currently worth $150, you can thus lock 1 ETH into the vault and receive a maximum of 100 DAI ($100) with a 150% collateral ratio. You should not draw out the maximum of 100 DAI that you are allowed to but leave some buffer in the event that ETH price decreases. It is advisable to give a wider gap to ensure your collateral ratio always remains above 150%. This ensures that your vault will not be liquidated and charged the 13% liquidation penalty in the event that ETH falls in price and your collateral ratio falls below 150%. 51 How to DeFi 2. Trading DAI The above methods are all the ways DAI are created. Once DAI is created, you can send it anywhere you want. Some users may send their DAI to cryptocurrency exchanges and you may also buy DAI from these secondary markets without the need to mint them. Buying DAI this way is easier as you don’t have to lock up collateral and do not have to worry about the collateral ratio and stability fee. We will keep this section brief - you can check out CoinGecko for the list of exchanges that trades DAI. Black Swan Event A black swan event is an unpredictable and extreme event that may cause severe consequences. In the case where both ETH and BAT has a significant drop in price, Emergency Shutdown is triggered. It is a process used as a last resort to settle the Maker Platform by shutting the system down. The process is to ensure the holders of Dai holders and Vault users receive the net value of assets they are entitled to. Why use Maker? As previously mentioned in Section 2: Stablecoins, there are many stablecoins out there and the core distinctions of these coins lie in their protocol. Unlike most stablecoin platforms, Maker is fully operating on the distributed ledger. Thus, Maker inherently possesses the characteristics of the blockchain: secured, immutable and most importantly, transparent. Additionally, Maker’s infrastructures have 52 Decentralized Stablecoins strengthened the security of the system with comprehensive risk protocols and mechanisms via real-time information. And that’s it for Makers’ Stablecoin, Dai—if you’re keen to get started or test it out, we’ve included step-by-step guides on how to (i) mint some DAI for yourself and (ii) save DAI to earn interest. Otherwise, head on to the next section to read more on the next DeFi app! 53 How to DeFi Maker: Step-by-Step Guides Minting your own DAI Step 1 ● Go to https://oasis.app/ ● Click Borrow ● You will be asked to connect your wallet. Connecting your wallet is free, all you need to do is sign a transaction 54 Decentralized Stablecoins Step 2 ● Click “Start Borrow” once you are on the borrow page (https://oasis.app/borrow/) ● Choose which cryptoasset you want to lock-in (collateralize) 55 How to DeFi Step 3 ● In this example, I chose to lock-in ETH ● Insert any amount you wish to lock. Note: You have to lock an equal amount of 20 DAI and above. (ie: You can’t borrow DAI less than 20 DAI) ● Click Continue and follow the instructions afterward 56 Decentralized Stablecoins Step 4 ● Congratulations! Your ETH vault is now created! In addition to minting DAI, you can also save on Maker’s platform to earn interest on your assets. We’ve prepared a step-by-step guide on how to save your DAI below: 57 How to DeFi Saving your DAI Step 1 ● Navigate to the Save (https://oasis.app/save) 58 page on the left sidebar Decentralized Stablecoins Step 2 ● Click Start Save ● Enter the amount of DAI you wish to save ● Click deposit ● Confirm in wallet 59 How to DeFi Step 3 ● And it’s done! ● Note: You only have one DSR account. If you were to deposit more DAI after your first deposit, it will be added to it. Recommended Readings 1. Maker Protocol 101 (Maker) https://docs.makerdao.com/makerprotocol-101 2. Maker for Dummies: A Plain English Explanation of t

Use Quizgecko on...
Browser
Browser