DeFi For Dummies book cover

DeFi For Dummies

Overview

Get to know the building blocks of a new economy

The promise of decentralized finance (DeFi for those up on their financial lingo) as a disruptor to financial institutions makes it must-know for anyone involved in finance. DeFi For Dummies provides an easy-to-understand option for unraveling the past, present, and future of DeFi. Understand current DeFi applications, including how to build basic applications on the leading platforms, and get a look into the future’s most promising new DeFi solutions. Staying ahead of the game is critical for finance professionals these days, and this Dummies guide makes it possible, with full coverage of how DeFi affects asset management, lending and borrowing, and investment markets. Wrap your mind around DeFi and start getting hands on, the Dummies way.

  • Learn how the DeFi revolution started and where it’s going
  • Get insight into opportunities for getting started and building value with DeFi
  • Discover the leading assets, exchanges, and marketplaces built on DeFi principles
  • Create secure DeFi applications on established platforms

This book is great for current pros or active investors in the world of finance who need to get up to speed on the world of DeFi as quickly and clearly as possible.

Get to know the building blocks of a new economy

The promise of decentralized finance (DeFi for those up on their financial lingo) as a disruptor to financial institutions makes it must-know for anyone involved in finance. DeFi For Dummies provides an easy-to-understand option for unraveling the past, present, and future of DeFi. Understand current DeFi applications, including how to build basic applications on the leading platforms, and get a look into the future’s most promising new DeFi solutions. Staying ahead of the game is critical for finance professionals these days, and this Dummies guide makes it possible, with full coverage

of how DeFi affects asset management, lending and borrowing, and investment markets. Wrap your mind around DeFi and start getting hands on, the Dummies way.
  • Learn how the DeFi revolution started and where it’s going
  • Get insight into opportunities for getting started and building value with DeFi
  • Discover the leading assets, exchanges, and marketplaces built on DeFi principles
  • Create secure DeFi applications on established platforms

This book is great for current pros or active investors in the world of finance who need to get up to speed on the world of DeFi as quickly and clearly as possible.

DeFi For Dummies Cheat Sheet

The nascent world of modern decentralized finance (DeFi) has grown rapidly since the advent of Bitcoin in 2009. Read on for helpful tips on how to navigate this exciting new realm.

Articles From The Book

3 results

Cryptocurrency Articles

How to Set Up a DeFi Wallet with MetaMask

To meaningfully navigate the world of decentralized finance (DeFi), you first need to set up a Web3 wallet that can submit transactions and access smart contracts on a public blockchain. Because so much of the DeFi ecosystem has been built on Ethereum, this article shows you how to get started with MetaMask, an application that connects you to the Ethereum blockchain. MetaMask is one of the most well-known and widely supported noncustodial crypto wallets connecting you to the Ethereum blockchain. Other popular contenders include WalletConnect and the Coinbase Wallet (not to be confused with the custodial Coinbase.com wallet).

Unmasking MetaMask

MetaMask is an amazingly simple, yet powerful, application that allows you to manage your Ethereum accounts and to interact with the Ethereum network. With this wallet app, you can create new accounts, import existing accounts, and submit transactions. In addition to handling ether (ETH), the token native to Ethereum, this wallet application is also compatible with ERC-20 fungible tokens and ERC-721 non-fungible tokens (NFTs). MetaMask operates as a browser extension, which makes it easy for you to connect to web-based Ethereum dApps (decentralized applications), the vast majority of which have integrated MetaMask functionality in their websites. More ambitious readers may be glad to discover that Remix — a web-based integrated development environment (IDE) — is integrated with MetaMask to allow you to seamlessly launch smart contracts on Ethereum without having to download additional software or run a full node on your computer.

Exercise caution when interacting with dApps, just as you would when engaging with any application coming from an unknown or untrusted source.

Installing MetaMask

MetaMask currently supports the Chrome, Firefox, Brave, and Edge browsers. I’ve chosen to proceed in Chrome because it’s the most commonly used desktop Internet browser in the U.S.

If you’re feeling a bit adventurous and want a full DeFi immersion, I recommend getting comfortable with the Brave browser.

Keep in mind that your visual and textual prompts may differ slightly from what’s shown in the following steps, depending on your chosen browser. You can use these steps to download and install the MetaMask browser extension:
  • Go to www.metamask.io and click the Download Now button, as shown in Figure 1.
  • Click the Install MetaMask for Chrome button, as shown in Figure 2.
You’re rerouted to the MetaMask page of the Chrome web store, as shown in Figure 3. Of course, if you’re using a different browser, the prompts will look slightly different, as shown in Figure 4.
  • Click the Add to Chrome button.A pop-up window appears, as shown in Figure 5.
  • Click the Add Extension button.
After the installation is complete, a pop-up window momentarily appears to inform you that MetaMask has been added to your browser. You should now see a small fox icon in the upper-right corner of your browser window (to the right of the address bar), as shown in Figure 6. If the fox icon doesn’t automatically appear in your browser’s toolbar, follow these additional steps:
  • Click the puzzle-piece-shaped icon in the upper-right corner of your browser window (to the right of the address bar). A drop-down menu appears, as shown in Figure 7.
  • Click the pin icon to the right of the MetaMask fox icon.
The pin icon turns blue, and you see the fox icon pinned to your browser’s toolbar. Yay, you’re now ready to set up your MetaMask wallet!

Setting up MetaMask

After you’ve successfully installed the MetaMask browser extension, you can follow these steps to set up your wallet:
  • Click the MetaMask fox icon in your browser’s toolbar. (In my case, I am continuing to use the Chrome browser.)A new browser window appears, with a Get Started button displayed at the bottom of the page.
  • Click the Get Started button.
The page that opens shows an Import Wallet and a Create a Wallet button, as shown in Figure 8. The Import Wallet button on this page is what you’ll use if you ever need to reinstall MetaMask and recover a MetaMask wallet that you’ve already set up.
  • Click the Create a Wallet button.
On the Help Us Improve MetaMask page that opens, you can click either the No Thanks or I Agree button, depending on whether you want to share your usage data with the MetaMask development team. The next page opens, prompting you to create a password, as shown in Figure 9.
  • Create and confirm your new password.
  • Click the check box to confirm that you’ve read and agree to the terms of usage, and then click the Create button.
A page appears that features instructions and a brief video explaining the importance of your Secret Recovery Phrase. Watch this video and read the instructions carefully. When you’re ready, click the Next button, which takes you to your Secret Recovery Phrase.
  • Click the lock icon to reveal your private 12-word phrase, as shown in Figure 10.
  • Write down this phrase and store it for safe keeping.
This Secret Recovery Phrase represents the digital keys that provide access to your crypto wallet and its contents. Do not share this phrase with anyone.

Do not skip this critical step! You’ll need your Secret Recovery Phrase if you ever need to reinstall the MetaMask browser extension or if you want to access your MetaMask wallet on a different browser or different computer.

In fact, even the MetaMask Support team cannot recover your MetaMask account for you. Specifically, MetaMask’s “Basic Safety and Security Tips” state that: “MetaMask is not a cloud-based solution. If your device breaks, is lost, or has data corruption, there is no way for the MetaMask Support Team to recover this for you. This Secret Recovery Phrase is the only way to recover your MetaMask accounts.
  • After you’ve secured your Secret Recovery Phrase, click the Next button.
The next page requires you to confirm your Secret Recovery Phrase by selecting the correct words in the correct order, as shown in Figure 11.

Do not share this unordered word matrix with anyone, as I’ve (foolishly!) done here for demonstrative purposes.

Using this word matrix, a hacker can easily create a program to regenerate my Secret Recovery Phrase. In fact, this hypothetical hacker could guess my secret phrase within 12! = 12 x 11 x 10 x …. X 2 x 1 = 479,001,600 attempts, which represents the total number of possible permutations of the words presented in Figure 11. Although 479,001,600 distinct guesses would be quite onerous to attempt manually, a computerized algorithm can glide through this guessing game.
  • After you've clicked each word in the correct order to produce the correct word sequence, click the Confirm button.
Congratulations! Your browser takes you to your initial MetaMask Account 1 Page, as shown in Figure 12. Going forward, you can simply access your MetaMask wallet by clicking the MetaMask fox icon in your browser’s toolbar, which reveals a drop-down window, as shown in Figure 13. (Revisit Steps 5 and 6 from the previous “Installing MetaMask” section if you need to re-pin the MetaMask fox icon to your browser’s toolbar.)

Cryptocurrency Articles

What Is Decentralized Finance (DeFi)?

Listen to the article:
Download audio
The decentralized finance (DeFi) sector is an alternative to traditional financial services with applications in cryptocurrency or blockchain technology. The modern DeFi era truly began with Bitcoin, the first widespread implementation of a decentralized method of record-keeping that is permissionless yet reliable and secure. Bitcoin effectively provides a currency that doesn’t rely on the stability of a central authority. The implications of such a technology are huge for developing economies where faith in central government is low and bank runs are a serious risk, if not a reality. Moreover, much of the world’s population is, at most, one generation removed from being forcibly chased from their homes. Consider these events:
  • Just 70 years ago, Seoul, the capital of Korea, was captured and recaptured four times, and families were permanently separated in a war that ultimately resulted in two separate nations.
  • The fall of Saigon 50 years ago resulted in a mass exodus of Vietnamese refugees seeking asylum.
  • More recently, the fall of Kabul in 2021 and the Russian invasion of Ukraine in 2022 led to more waves of emigrants who found themselves in sudden exile.
But aside from more dire circumstances — like the collapse of a banking system or the fall of your government — it’s natural to question what true value Bitcoin’s underlying technology adds in a stable and wealthy nation. After all, I trust that Bank of America won’t maliciously siphon funds from my account, and despite the infamous Wells Fargo fake account scandal (for which it was ultimately fined $3 billion), I would even entrust my money to a Wells Fargo checking account. Nonetheless, reliable economies still have submarkets that are inherently rife with distrust of the central operator, with dark pools (securities exchanges in which participants can trade anonymously and with less transparency) being a case in point. (Try Googling “dark pool lawsuit”!) The trust issue naturally goes away if there is no central operator to distrust, and with the advent of Bitcoin, a proven technology now exists to implement modern DeFi processes across many use cases in finance.

Demystifying DeFi

The idea of decentralized processes is certainly not new. After all, before centralized finance (CeFi) arose to establish trusted intermediaries, primitive DeFi was the status quo. Transactions were all peer-to-peer, and you were constrained by your local neighborhood to gain access to capital and to obtain goods by bartering one item for another. Record-keeping was minimal, and ownership was determined by physical possession. In modern markets, transactions require confidence in the validity of the agreement, which is provided by reliable and secure record-keeping systems. After all, when you sell your car, you are really transferring the legal right to access the car. Without a reliable record-keeping system in place, chaos would ensue. (Imagine the return of finders keepers as a rule of law!) What’s truly exciting now is the distributed-ledger technology that provides a reliable and secure method of record-keeping that is not maintained by a trusted intermediary, such as Bank of America or the DMV. Behold the dawn of the modern DeFi era!

From autonomous collectives to trillion-dollar DAOs

Well-functioning, leaderless communities are all around us, and in each circumstance, an inherent governance mechanism incentivizes and gels the group to act in concert — all without an elected official to assign roles and lead the process. From homework teams to neighborhoods to informal potlucks, small groups can effectively and efficiently self-govern when there are grades to maintain, property prices to protect, or reputational concerns at stake. These small-scale examples probably feel reasonable and natural. But what if I told you that a trillion-dollar organization could autonomously validate, execute, secure, and provide ongoing updates to an entire system without an elected leader to assign tasks? The concept sounds naïve at best, and possibly crazy. And yet, Bitcoin has provided a battle-tested case in point for the underlying technology that enables it to function in a decentralized and autonomous fashion. Yes, Bitcoin is indeed a trillion-dollar decentralized autonomous organization (DAO)! Of course, at this scale and with the value at stake, a DAO can’t rely solely on simple mechanisms like reputational concerns to incentivize participants to behave honestly and in a way that upholds the values of the system. Instead, the underlying protocol must be protected against malicious players who may work hard to cheat the system.

Transacting in DeFi versus CeFi

Borrowing assets

Suppose you want to borrow money. How would this transaction be implemented in primitive DeFi versus modern CeFi versus modern DeFi?
  • Under a primitive DeFi process: You hit up everyone you know within reasonable geographic proximity — a neighbor, a friend, a family member — and hope that someone will lend you something that you can barter with at your local marketplace.
  • Under a modern CeFi process: People have checking accounts, savings accounts, CDs, and so on with the bank, which means that all these people have lent money to the bank. In turn, the bank lends some of this money to you.
  • Under a modern DeFi process: People lock up funds in a smart-contract account, which is a software program on a public blockchain that automatically enforces and executes the rules in the smart-contract code. This smart-contract account is programmed to function as a lending pool from which you can borrow funds.

Selling assets

Suppose that instead of borrowing assets, you have assets that you want to sell. Comparing the three types of processes again, here’s how this transaction would be implemented:
  • Under a primitive DeFi process: You again hit up everyone you know within reasonable geographic proximity — a neighbor, friend, family member — and attempt to barter by trial and error.
  • Under a modern CeFi process: Liquidity providers stand by, waiting to buy the asset from those who want to sell and to sell the asset to those who want to buy. These liquidity providers commit to buy and sell a certain quantity of assets at varying prices on designated exchanges that serve as official marketplaces for the assets in question. In turn, you place an order to sell the asset through your brokerage firm (who has custody of the asset).
  • Under a modern DeFi process: Liquidity providers lock up assets and funds in a smart-contract account. This smart-contract account serves as a liquidity pool and is programmed to function as an automated market maker. In turn, you can swap your assets for funds from this smart-contract account.

Cryptocurrency Articles

The Different Tokens of Cryptocurrency

Cryptocurrency tokens are virtual currency representing fungible (non-unique) and tradable assets and utilities that reside on their own blockchains. There are two main categories of tokens: native and non-native.

Native tokens

Native tokens share the common characteristic of serving as the base token or inherent currency of their own proprietary blockchains. Some native tokens, such as Bitcoin (BTC), were designed to serve as disintermediated currencies. The purpose of a disintermediated currency is to provide a global medium of exchange that is independent of a central authority, such as a bank or a government. Other examples in this category include Litecoin (LTC) and Bitcoin Cash (BCH). Most other native tokens were designed to serve as utility tokens. A utility token provides access to a service or good within a given platform. For instance, ether (ETH) serves as the native token that fuels transactions on the Ethereum smart-contract platform. You need to pay ETH to transfer funds, deploy smart contracts, or access functions in an existing smart contract. Other examples in the utility category include ada (ADA) for Cardano and TRONIX (TRX), often simply called TRON, for the TRON Protocol. Coins can shift categories and even straddle more than one category. For instance, ETH became so popular that it’s also used as a disintermediated currency outside the Ethereum platform. Think of Walmart gift certificates, which are like utility tokens. The gift certificates are designed to be used to access goods and services within the Walmart platform. However, if Walmart becomes so popular that restaurants and movie theaters begin to accept Walmart gift certificates in place of cash, these gift certificates will have become a global medium of exchange that is now accepted outside the Walmart platform. Figures 1 and 2 present examples of online vendors that accept BTC, LTC, and ETH, among other crypto, as forms of payment.

Non-native tokens

Close to 21,000 exchange-traded cryptocurrencies were listed on CoinMarketCap as of the end of August 2022. Most crypto assets are not native tokens. Instead, they are built on and secured by an existing blockchain. After all, we really don’t need 20,000 different blockchains that essentially provide the same recordkeeping function. Also, having so many distinct blockchains would compromise the safety of each system, which depends on the size of the network. Although there are now many serious contenders to be the number-one. smart-contract platform, Ethereum remains the predominant blockchain on which to issue crypto assets, either as ERC-20 fungible tokens or as ERC-721 non-fungible tokens. Much like how you can have numerous tabs in an Excel spreadsheet to keep records of different things, Ethereum allows developers to carve out their own recordkeeping systems on a reliable and tamper-proof platform. The following sections, from Stablecoins to Meme coins, provide examples of non-native fungible tokens.

Stablecoins

So-called stablecoins derive their name from the soft one-to-one peg they seek to maintain with a chosen fiat currency, such as the U.S. dollar. (A soft peg allows some flexibility in the exchange rate, whereas a hard peg requires strict one-to-one adherence.) Some stablecoins, such as Tether (USDT), are centrally controlled by a trusted party that controls the supply and is responsible for holding sufficient collateral — such as U.S. dollars or gold — to maintain the public’s faith in its stablecoin. With a total market cap in excess of $180 billion, USDT is the largest stablecoin and the third largest cryptocurrency. It began as an ERC-20 token for use on Ethereum and later expanded to other blockchain platforms, such as TRON, Solana, and EOS.

The stability of a stablecoin depends critically on the management (or mismanagement) of the stablecoin and ongoing public faith in the system. Whether the stablecoin is centrally managed and backed by traditional collateral or is algorithmically maintained by a nexus of smart contracts, stablecoins are not immune to a classic run on the bank.

Regulators are increasingly concerned about the seeming Wild West environment in which stablecoins have been operating. Their concerns were heightened by the recent catastrophic implosion of TerraUSD (UST), an algorithmic stablecoin that plummeted to just a few cents and has remained de-pegged from the U.S. dollar since May 2022. Overall, lawmakers are in favor of imposing capital requirements on stablecoin issuers like Tether Limited Inc. (for USDT) and Circle (for USDC). Perhaps the next move will be to require algorithmic stablecoins to undergo a formal credit rating process!

Wrapped tokens

Wrapped tokens allow for the synthetic use and trading of a native token from another blockchain. Much like how stablecoins are pegged to a fiat currency, wrapped tokens are pegged to a particular token. For instance, you can’t swap ETH for actual Bitcoins (BTC) on the Ethereum blockchain, but you may have noticed that you can swap ETH for Wrapped Bitcoin (WBTC), which is issued as an ERC-20 token, via a DEX like Uniswap, as shown in Figure 3.

Governance tokens

Governance tokens have become a popular way for development teams to elicit community participation in the ongoing management of a DeFi protocol after it has been deployed. For instance, the Uniswap token (UNI) is an ERC-20 token that allows its holders to vote on various features of the Uniswap DEX protocols. Similarly, the SushiSwap token (SUSHI) is an ERC-20 token that allows its holders to vote on various features of the SushiSwap DEX protocols. Note that UNI and SUSHI are purely governance tokens and do not serve as utility tokens on the respective protocols:
  • Specifically, you don’t need UNI to execute a trade on a Uniswap liquidity pool, and you don’t need SUSHI to execute a trade on a SushiSwap liquidity pool (unless, of course, you are planning to swap UNI or SUSHI).
  • The Uniswap and SushiSwap protocols are built on the Ethereum blockchain, and thus, you need ETH, the native utility token of Ethereum, to transact on these DEXs.
In addition to voting rights, governance token holders also receive a portion of the fees earned on the protocol. SUSHI holders receive a portion of the 0.30 percent swap fee charged for trading in the SushiSwap liquidity pools, and UNI holders are expected to soon begin receiving a portion of the 0.30 percent swap fee charged for trading in the Uniswap liquidity pools. Despite their uncanny resemblance to equity securities (which also provide voting and cash-flow rights), governance tokens have thus far managed to stay out of the SEC’s crosshairs. The implications, though, would be huge — requiring their removal from any crypto exchange not registered as an Alternative Trading System (ATS).

Security tokens

Security tokens are tokenized securities, which represent equity ownership or other types of cash-flow claims in tokenized form. BCAP, an ERC-20 token issued by Blockchain Capital in 2017, is reportedly the first security token offering (STO) and was used to raise funds for its Blockchain Capital III Digital Liquid Venture Fund. Other examples of security tokens include OSTKO, an ERC-20 token representing preferred equity shares in Overstock.com, and ArCoin, an ERC-20 token representing shares in the Arca U.S. Treasury Fund.

Meme coins

Some coins are simply meme coins that have no explicit monetary value or practical use associated with the coin at creation. Dogecoin (DOGE), the most famous meme coin, is actually a native token with its own blockchain that was originally designed as a joke. DOGE is the largest meme coin and tenth largest cryptocurrency, with a total market cap close to $8.5 billion as of the end of August 2022. Inspired by the success of DOGE, other meme coins followed in its wake. Shiba Inu (SHIB), launched as an ERC-20 token on Ethereum, is another runaway success with a total market cap in excess of $6.5 billion, making it the second largest meme coin and 14th largest cryptocurrency. Of course, meme coins can also shift or straddle other categories. Refer to Figures 1 and 2 (above) to see that both DOGE and SHIB are also accepted as forms of payment on CheapAir.com and Newegg.com. Other intriguing (though far less successful) meme coins include FOMO Coin (shown in Figure 4), and Jesus Coin (shown in Figure 5), both of which were also launched as ERC-20 tokens on the Ethereum blockchain. Much like the rise (and fall) of Beanie Babies in the 1990s, it’s hard to predict whether a meme coin is destined for DOGE-like greatness (though, it certainly helps if vendors adopt the meme as a form of payment and Elon Musk tweets about it!).

Differentiating non-fungible tokens

Finally, I would be remiss to ignore the category of non-fungible tokens (NFTs)! Although NFTs also fall under the category of non-native tokens, I’ve assigned this group its own header to clearly demarcate it from the tokens covered previously, which are all fungible tokens. NFTs are still relatively young, and thus far have mostly been designed to represent ownership of digital collectibles and gaming assets. However, many nascent projects are in various stages of planning and development. From NFT-izing the ownership records of luxury goods to event tickets to real estate, the possibilities are seemingly endless. Already, NFTs are being used to secure ownership and transaction records of digital property in decentralized metaverses, such as Decentraland and Sandbox. Perhaps more real-world analogues will soon follow!