Schweitzer Fachinformationen
Wenn es um professionelles Wissen geht, ist Schweitzer Fachinformationen wegweisend. Kunden aus Recht und Beratung sowie Unternehmen, öffentliche Verwaltungen und Bibliotheken erhalten komplette Lösungen zum Beschaffen, Verwalten und Nutzen von digitalen und gedruckten Medien.
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.
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.
Seoyoung Kim, PhD, is an Associate Professor of Finance and Business Analytics at Santa Clara University and bestselling co-author of NFTs For Dummies. Seoyoung's expertise lies in innovative financial instruments, crypto-assets, and blockchain-based ventures, on which she has consulted and written extensively. She regularly gives workshops and talks to academic, legal, and financial institutions, both domestically and internationally.
Introduction 1
About This Book 1
Foolish Assumptions 2
Icons Used in This Book 3
Beyond the Book 4
Where to Go from Here 4
Part 1: Getting Started With DEFI 5
Chapter 1: Introducing Decentralized Finance 7
Demystifying DeFi 8
From autonomous collectives to trillion-dollar DAOs 9
Transacting in DeFi versus CeFi 10
Dispelling harmful DeFi myths 11
Going Full Circle: The DeFi-CeFi Infinity Loop 12
Safeguarding wealth 12
Transferring funds 13
Continuing the cycle 13
Deciding to DeFi or Not to DeFi 14
Acknowledging inherent deficiencies in DeFi 14
Recognizing CeFi problems that migrate into DeFi 15
Identifying hurdles to adoption 16
Contemplating the Future of DeFi 17
The potential amazingness of seemingly unimportant applications 17
Can we completely replace CeFi? 18
Proceeding on Your DeFi Journey 19
Chapter 2: Discovering the DeFi Lingo 21
Introducing Key DeFi Terms 21
Moving into the Web3 era 22
Going the way of a DAO 22
Characterizing blockchains and consensus protocols 23
Describing cryptocurrencies and NFTs 23
Defining smart contracts and dApps 24
Getting acquainted with L1, L2, and the EVM 24
Grasping important metrics: Market cap, volume, and TVL 25
Knowing Important Distinctions 27
Custodial versus noncustodial 27
On-chain versus off-chain 28
Chapter 3: Dabbling in DeFi: Getting Your Hands Dirty 29
Setting Up Your Wallet 30
Unmasking MetaMask 30
Installing MetaMask 30
Setting up MetaMask 35
Renaming your account 39
Working with MetaMask on your mobile device 41
Funding Your Account 45
Getting (Real) ETH 46
Getting test ETH 47
Chapter 4: Making Your First DeFi Transactions 55
Decentralized Lending 56
Decentralized Borrowing 61
Executing a Trade on a Decentralized Exchange 63
Unwinding and Closing Out 70
Part 2: Diving Into The Burgeoning DEFI Space 75
Chapter 5: Decentralized Assets 77
Understanding Native Tokens 78
Exploring Non-Native Tokens 80
Stablecoins 81
Wrapped tokens 82
Governance tokens 82
Security tokens 83
Meme coins 83
Differentiating Non-Fungible Tokens (NFTs) 85
Chapter 6: Decentralized Exchanges and Marketplaces 87
Understanding Liquidity Providers and Order Books 88
Distinguishing between Custodial and Noncustodial Exchanges 92
Exploring DEXs 93
Decentralized order books 94
Automated market makers 95
Hybrid liquidity and aggregators 101
Navigating Marketplaces for Non-Fungible Goods 101
Chapter 7: Decentralized Lending and Borrowing 103
Making a Collateralized Loan 104
Understanding the Compound lending protocol 105
Revisiting DAI: A collateralized loan turned stablecoin 109
Using price feeds: What is the collateral worth? 111
Implementing a Flash Loan 112
A tale of two CEXs: Arbitraging without flash loans 112
A tale of two DEXs: Arbitraging with flash loans 114
Noting the caveats: The steep price of failure 115
Manipulating markets (the dark side of flash loans) 116
Chapter 8: Decentralized Metaverses 119
Introducing Decentralized Virtual Economies 120
Paving the way for real-world possibilities 120
Discovering decentralized metaverses 122
Experiencing Decentraland 123
Exploring the Metaverse 125
Part 3: Developing Your Own Dapp: A Step-By-Step Guide 129
Chapter 9: DeFi Building Blocks 131
Introducing Public Blockchains 132
Grasping the importance of a native token 135
Understanding key pairs and digital signatures 136
Touching on other types of distributed ledgers 142
Explaining Consensus Mechanisms 143
Proof of Work (PoW) 144
Proof of Stake (PoS) 146
Proof of XYZ 146
Following a Day (or a Second) in the Life of a Transaction 147
Determining transaction fees 148
Understanding transaction times 154
Tracing the journey of a transaction 158
Streamlining the Development Process 161
Leveraging smart-contract libraries 161
Oracles: A Blockchain's Divine Access to the Outside World 162
Chapter 10: Smart-Contract Platforms 163
Diving into Layer 1: Comparing Base Protocols 164
Bitcoin 165
Ethereum 166
Ethereum Classic 168
Binance Smart Chain 170
Other EVM-Compatible Networks 171
TRON 172
Flow 173
Cardano 175
Solana 177
Floating Up to Layer 2: Off-Chain Scaling Solutions 178
State channels 179
Plasma chains and sidechains 180
Rollups 180
Fraud proofs versus validity proofs 181
Crossing Cross-Chain Bridges 182
Chapter 11: Launching a Smart Contract on Ethereum 183
Understanding Smart Contracts 184
The birth of a smart contract 184
Contract accounts versus "regular" (externally owned) accounts 185
Smart-contract languages 187
Anatomy of a smart contract 189
Multiple inheritance: Can you have three or more parents? 191
Launching Your Smart Contract 192
Using the Remix IDE 192
Entering your code 194
Compiling your code 199
Pre-launch preparations 200
Deploying your code 204
Accessing Your Smart Contract 209
Following your smart contract on a block explorer 209
Interacting with your smart contract 212
Allowing others to interact with your smart contract 220
Chapter 12: Launching a Smart Contract on the Binance Smart Chain 229
Testing the Waters: How to Navigate the BSC Testnet 230
Configuring MetaMask 230
Launching your smart contract 234
Accessing your smart contract 238
Feeling Ready for Mainnet? 247
Deploying onto Other EVM-Compatible Platforms 248
Avalanche 249
Polygon 250
Cronos 250
Fantom 251
Arbitrum 252
Huobi ECO (HECO) 253
Celo 253
Chapter 13: Launching Your First DeFi Product 255
Proving Your Proof of Concept 256
Identifying the market pain 257
Assessing the competition 257
Solidifying the value proposition 258
Preparing Your Development Stack 258
Setting up necessary accounts 259
Setting up necessary IDEs 263
Implementing the Back End of Your DApp 263
Entering your code 263
Deploying your Crowdfund contract 269
Following your Crowdfund contract 272
Funding Crowdfund 274
Verifying your Crowdfund contract 280
Creating the Front-End User Interface 287
Integrating the friendlier front end with the (less friendly) back end 288
Nurturing your dApp 294
Part 4: The Part Of Tens 297
Chapter 14: Top Ten DeFi Applications 299
Instadapp (INST) 300
Compound (COMP) 301
PancakeSwap (CAKE) 301
JustLend (JST) 301
Convex Finance (CVX) 302
Curve (CRV) 302
Uniswap (UNI) 303
Aave (AAVE) 303
Lido (LDO) 304
Maker (MKR) 304
Chapter 15: Top Ten Smart-Contract Platforms 305
Optimism (OP) 306
Arbitrum (N/A) 307
Fantom (FTM) 307
Cronos (CRO) 308
Polygon (MATIC) 308
Solana (SOL) 309
Avalanche (AVAX) 309
TRON (TRON) 310
Binance Smart Chain (BNB) 310
Ethereum (ETH) 311
Index 313
Chapter 1
IN THIS CHAPTER
Defining decentralized finance
Comparing CeFi and DeFi processes
Considering the cons of a DeFi world
Exploring promising DeFi implementations
The modern decentralized finance (DeFi) era truly began with Bitcoin, the first widespread implementation of a decentralized method of recordkeeping 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. 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; and more recently, the fall of Kabul (2021) and the Russian invasion of Ukraine earlier this year (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"!) This 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.
This book isn't about touting the next big cryptocurrency or NFT. It's about the promise of the underlying technology, and where and how that technology can be elegantly applied in ways that truly add value to the situation at hand.
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. Recordkeeping 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 recordkeeping systems. After all, when you sell your car, you are really transferring the legal right to access the car. Without a reliable recordkeeping 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 recordkeeping that is not maintained by a trusted intermediary, such as Bank of America or the DMV. Behold the dawn of the modern DeFi era!
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 foolproofed against malicious players who may work hard to cheat the system. I explain these protocols in greater depth in Chapter 9, "DeFi Building Blocks."
By this point in the chapter, DeFi may still seem rather abstract. Comparing examples of DeFi versus CeFi processes for certain types of transactions can help to demystify the distinction.
Suppose you want to borrow money. How would this transaction be implemented in primitive DeFi versus modern CeFi versus modern DeFi?
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:
Check out Chapter 4, "Making Your First DeFi Transactions," for a quick, hands-on tutorial if you want to get your hands dirty without learning the technical underpinnings.
Of course, both the CeFi and DeFi worlds have some bad actors, but DeFi activity is not synonymous with illicit activity. The misconception that DeFi applications primarily facilitate or promote criminal activity is untrue and harmful to the DeFi community.
In contrast to cash transactions, which typically aren't recorded, crypto transactions (such as in bitcoins or ether) are memorialized for all time on a public recordkeeping system known as a blockchain. In fact, any legitimate entity that touches crypto must employ the services of at least one blockchain analytics firm (such as Chainalysis) to credibly convey that it is serious about adhering to anti-money laundering (AML) provisions.
As the lowest-hanging fruit, blacklisted accounts (such as those associated with ransomware attacks or on the OFAC list) are barred from transacting with legitimate institutions. From there, blockchain analytics firms assign risk scores to graylisted accounts based on suspicious activity that suggests a possible connection to other graylisted or blacklisted accounts. Chapter 9, "DeFi Building Blocks," introduces you to tracing activity on a block explorer, and Chapter 11, "Launching a Smart Contract on Ethereum," delves more deeply into this process.
Just as it's (nearly) impossible to spend $10 million in ill-gotten cash (you can't show up with suitcases of cash to buy a home), it's (nearly) impossible to spend $10 million in ill-gotten crypto.
Dateiformat: ePUBKopierschutz: Adobe-DRM (Digital Rights Management)
Systemvoraussetzungen:
Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet – also für „fließenden” Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein „harter” Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.Bitte beachten Sie: Wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!
Weitere Informationen finden Sie in unserer E-Book Hilfe.