An Introduction to DeFi

Book Summary: “How to DeFi: Beginner”

Dickson Wu
Geek Culture

--

Book by: Darren Lau, Daryl Lau, Teh Sze Jin, Kristian Kho, Erina Azmi, Benjamin Hor, Lucius Fang, Khor Win Win

Chapter 1: The Traditional Financial Institutions

Let’s start with the regular banks. They’re the core of the financial industry — facilitating payments (deposits, withdrawals, transfers), giving out loans, and more! They’re so big that the top 10 companies have a market cap of $2 trillion.

But these banks are run by humans. Humans make mistakes, can be corrupt, and mismanaged. 2008 is the classic example.

That’s CeFi (Centralize Finance). DeFi (Decentralized Finance) is here to revolutionize CeFi through:

  1. Payment & Clearance System
  2. Accessibility
  3. Centralization & Transparency

Payment & Clearance System:

Transferring money is a pain — especially if they’re in another country. It takes days + you get dinged with fees everywhere (exchange rate, international outbound fee, international inbound fee).

DeFi bypasses the middleman so you keep all the fees (but you just have to pay a little fee) + it’ll take 15 seconds to 5 minutes to complete the transaction!

Accessibility:

Not everyone has access to financial instruments — 1.7 billion people are unbanked! Mostly because of poverty, geography, and trust issues. But 66% of them have mobile phones with internet → Meaning they have access to DeFi.

DeFi is part of the moment to push borderless, censorship-free, and accessible financial instruments to everyone — no matter who you are. There is no discrimination.

Centralization & Transparency:

Banks can screw up — badly. Out of greed in 2008, credit rating agencies were giving top ratings to super risky securities → Which caused major banks like Washington Mutual, and the Lehman Brothers (combined > $800 billion in deposits) to fail. In the US there were 500 bank failures.

DeFi on the other hand has everything open-sourced so everyone can see what’s going on. Decentralized governing prevents 1 bad actor from screwing up everything.

DeFi protocols are written in lines of code, so you can’t cheat the rules without being caught. Not everyone can read the code, but we can gauge the reputation, word-of-mouth, and other dev’s comments to see what’s going on. Everything’s transparent and decentralized.

Decentralized Finance vs. Traditional Finance:

Lots of issues exist in the current banking system. Not everyone can get access to them, nor can everyone compete fairly.

When retail investors were bringing GME to the moon, Robinhood stepped in and restricted trades — turns out Citadel was one of Robinhood’s biggest customers, who were losing billions because they were shorting GME.

DeFi is here to make finance available to everyone without any discrimination, free of censorship. There are lots of pros and cons to both CeFi and DeFi. This book is here to show you where DeFi shines and how to use it to solve real-world problems!

Chapter 2:

We know what centralized finance is, but what is this decentralized finance thing we keep talking about? It’s literally just financial instrumentsminus centralization. Thus we build these applications on decentralized applications (Dapps).

DeFi isn’t one product or company — it’s a bunch of protocols and companies coming together. We can even combine several DeFi Dapps together, thus we call them money LEGOs!

DeFi Dapps work on having collateral locked up in smart contracts. The Total Value Locked = a growth indicator of DeFi. Now here are some amazing stats on the growth of this sector:

  • Start 2019 = $275 Million
  • February 2020 = $1.2 Billion
  • April 2021 = $86 Billion

The DeFi Ecosystem:

DeFi is growing like crazy — thus there are many categories popping up — thus we can’t cover everything in this book. But the ecosystem is highly experimental, so DeFi might become unrecognizable from what it is today!

How Decentralized is DeFi:

There are 3 different categories of DeFi:

  1. Centralized: Custodial, centralized versions of: price feeds, determining interest rates, liquidity for margin calls. Ex: Salt, BlockFi, Nexo, Celsius
  2. Semi-Decentralized: Which has one or more of: Non-custodial, decentralized: price feeds, interest rate determination, platform development + updates + permissionless: margin calls, margin liquidity. Ex: Compound, MakerDAO, dYdX, bZx
  3. Completely Decentralized: Everything is decentralized. There isn’t a DeFi protocol that is fully decentralized yet.

Most DeFi Dapps are semi-decentralized.

DeFi Key Categories:

This book covers 9 main categories:

  1. Stablecoins: Cryptocurrencies are super volatile (\pm 10%). If we don’t want volatility, we can build a stablecoin that’s based on stable assets (like USD). USDT (Tether) was the first stablecoin, where every USDT is backed by $1 in a bank account (though we have to trust Tether to do their job). Decentralized stablecoins operate in a decentralized method to overcome that trust issue.
  2. Lending & Borrowing: Anyone that collateralized their digital assets can take out loans. You can even lend out money into lending pools and earn interest! No need for a bank account or creditworthiness
  3. Exchanges: We need exchanges to trade 1 cryptocurrency for another. We can do it through a centralized method (Coinbase, Binance), but they’re both middlemen + custodians → meaning we don’t have full control of our assets (meaning if they get hacked we’re screwed). Decentralized exchanges let’s exchange happen without being giving up custody.
  4. Derivatives: Contracts whose value is dedicated to other assets. We can trade derivatives with others in decentralized markets.
  5. Fund Management: To oversee your assets and manage the money so you get more money! DeFi allows for passive fund management where you can see exactly how your money is being managed + the costs
  6. Lottery: You get a lot of people to pool their money together. You take the money, get it to accumulate interest. At the end of the time interval, 1 person gets all the interest, and the rest of the people get their lottery tickets refunded to them (no loss lottery without any centralized figure)
  7. Payments: We can do the normal transactions with DeFi, but also some more creative versions! Like payments as streams → “pay-as-you-use” but better
  8. Insurance: Since all tokens and contracts are on the blockchain, there’s a probability in which they’ll be hacked, thus insurance to protect yourself
  9. Governance: Business management, but the crypto style. You give out governance tokens to people to give them voting power on how to push the project forward

Chapter 3: The Decentralized Layer: Ethereum

Ethereum is a global and open-source platform for Dapps! It runs all the time and no one can shut it down — thus many developers deploy their Dapps (for DeFi) on Ethereum.

What is a Smart Contract?

It’s a programmable contract between 2 parties that will execute without trusting a third party. These smart contracts are literally just “if this then that” but on a blockchain. We can even pipe multiple smart contracts together to build more complex operations

What is Ether (ETH)?

Ether is the currency of Ethereum. We can use it like bitcoin, where we use it for it’s money value. But is also used to pay the network to run smart contracts (Gas to run the smart contract). Ether is also used as a reserve currency.

What is Gas?

Everything running on Ethereum needs to pay a fee — this fee is Gas. More precisely, Gas is the unit of measure of the computational effort of executing a smart contract.

Gas prices will fluctuate. It’s like a supply and demand curve. If there’s an influx of demand (more transactions, more smart contract executions) then gas fees will go up. But if there’s less demand then gas goes down.

We can set the gas price ourselves too! The network prioritizes transactions with the highest gas fees. If you have a lower gas fee, then you’ll be added to the queue, and thus take much longer to execute.

Remember there’s the gas fee and gas itself. The gas fee is the thing you set, but the gas itself is determined by the complexity of your request. Total ether spent = #gas x gas fee

What are Decentralized Applications (Dapps)?

Dapps are interfaces that interact with smart contracts. They’re like regular applications, except with some additional features like requiring gas or being integrated in the blockchain.

Advantages of Dapps:

  • Immutability: You can’t change the information once it’s on the blockchain
  • Tamper-proof: You can’t tamper with the contract without alerting everyone on the network
  • Transparent: Anyone can see and audit it
  • Availability: As long as Ethereum is alive, our contract still work

Disadvantages of Dapps:

  • Immutability: if they have mistakes, they could lead to big problems
  • Transparent: Anyone can see them, thus hackers can find exploits
  • Scalability: The bandwidth of the Dapp is limited by the blockchain itself

What else can Ethereum be used for?

Ethereum can create DAOs (Decentralised Autonomous Organizations) or create other cryptocurrencies.

DAOs are governed through democracy and enforced using code. This makes it operate transparently and avoid being tampered with.

We can also create other tokens! Two common ones are ERC-20 and ERC-721. ERC-20 is to create other types of money (fungible) while ERC-721 is to create collectables (non-fungible).

Ethereum’s Future:

Ethereum’s popularity is growing like crazy, and it’s the center pillar for DeFi. The first-mover advantage allows it to grow more than other competitors. But this success is putting a lot of strain on the network itself → Gas fees! Since gas fees are so high, competitors have sprung up that are more efficient.

But Ethereum is planning on upgrading to ETH 2.0, where there will be “sharding” and it’ll solve the high gas fees.

Chapter 4: Ethereum Wallets

Wallets are interfaces that manage your private keys + let you receive, store and send out cryptocurrencies.

Custodial vs Non-Custodial Wallets:

Custodial wallets are where third parties keep your cryptocurrencies + keep control. Non-custodial wallets are the opposite — you control and own your cryptocurrencies.

You can use Custodial wallets — you end up not worrying about security! But you have to trust this third party, they could literally just lose your money! Mt. Gox was a custodial wallet that lost 850,000 Bitcoins in 2014.

Using non-custodial wallets means you have to carry the burden of securing your private keys + not forgetting them. The book includes a walk-through on 2 DeFi Friendly wallets to use for the ETH network. Mobile = Argent (non-custodial wallet). Desktop = Metamask (also non-custodial wallet).

Chapter 5: Decentralized Stablecoins

Since cryptocurrencies are volatile, stablecoins were created to hedge against price volatility, and allow for a medium of exchange. They’re a big part of DeFi, and the top 5 stable coins occupy $59.8 billion.

There are 3 types of stable coins:

  1. Fiat-collateralized (Tether)
  2. Crypto-Collateralized (DAI)
  3. Algorithmic Stablecoins — Not covered in this book (it’ll be in the advanced book)

Tether, or USDT, reserves $1 per Tether that is minted. Tether is the most popular stable coin, but all these reserves aren’t open — we have to trust that they’re doing their job. Thus Tether is a centralized, fiat-collateralized stable coin.

DAI is different. It’s collateralized through other cryptocurrencies and done through protocols that are created through a DAO → DAI is a decentralized, crypto-collateralized stablecoin.

DAI is managed through MakerDAO — which has 2 tokens! DAI (the currency one, backed by a basket of other cryptocurrencies (ETH, wBTC, USDC, etc)) and MKR (the governance one, where you can vote and make changes to the organization itself).

SAI used to be the token that Maker used — it was a single collateral DAI. But Maker added more forms of collateral, and this became DAI. A Black Thursday crash caused Maker to add USDC to solve the liquidity problem that it had.

Here are 3 components of DAI:

  1. Collateral Ratio: It’s the ratio of DAI we get versus the collateral we put in. Ex: 150% means we have to put $150 of another cryptocurrency to get $100 of DAI
  2. Stability Fee: It’s the interest rate you have to pay, along with the original amount. The stability fee is determined by Maker and is based on the internal risks team’s performance risk.
  3. DAI Savings: It’s the interest rate of holding DAI over time.

Okay, but why would I put $150 worth of ETH or whatever to get $100 of DAI? Well here are 3 motivations:

  1. You need cash now, but you believe ETH or whatever will go up in the future. Maker is like the pawnshop holding on to your item
  2. You need cash now, but don’t want to be taxed when converting your money to cash
  3. Investment leverage because you think your assets will go up in value in the future.

So how do we do it? Go on the Maker Platform and borrow DAI by putting ETH (or whatever other coin) into the Vault. There’s a max amount of DAI you can take out (given the collateral ratio), but you don’t want to take out everything.

That’s because if the price of ETH drops and you go under the collateral ratio, your collateral is liquidated and you’re charged a liquidation penalty. Or you can just trade DAI and we can get DAI that way.

Black Swan event is an unpredictable and extreme event. If this happens, Maker has an Emergency Shutdown where it shut down the system and makes sure DAI holders still get their assets. March 2020 almost triggered it (ETH dropped by 50% in 24 hours). But Maker mitigated that by an automated debt auction + they introduced USDC as a collateral type.

Chapter 6: Decentralized Lending And Borrowing:

Lending and Borrowing are some of the biggest services of the financial industry. As of April 1st, 2021, borrowing volume was 9.7 Billion (102 times bigger than before).

In CeFi, you would put up collateral, like a company, house or something else. But we need to trust an intermediary (Banks), and a credit system that ends up becoming a barrier to many to get the benefits of low-risk and high return lending.

DeFi is different. Anyone can take out loans (if you have collateral), or lend money out to get interest! Let’s investigate 2 of the biggest DeFi lending and borrowing protocols: Compound and Aave!

Compound:

It’s an ETH-based open-source protocol! It has lots of different tokens (9 so far). It’s a liquidity pool that’s built on Ethereum. Lenders just pool their money together into the liquidity pool, and borrowers take money out from that liquidity pool. Lenders get interest, and borrowers have to pay that interest.

Interest rates are APY (Annual Percentage Yield), and it’s determined for each asset through algorithms that take into account the supply and demand of the assets. This decreases the friction as lenders and borrowers can just interact with each other directly without needing to negotiate loan terms.

What’s cool is that you don’t even need to set up an account! You can just start lending/borrowing by connecting to your wallet!

Compound also has a Governance token (COMP), where they can make changes to Compound itself! You have to have more than 1% of COMP to start a proposal. 3 days later it must have 4 of the supply that votes for it, and then it’s queued, and then executed!

You can earn COMP by buying it from other people or by yield farming Compound itself to earn COMP tokens.

When you earn interest on Compound you get cTokens (if you supplied DAI you get cDAI, or if you supplied ETH you get cETH). cTokens represents how much you put in and how long you put it there. Let’s walk through an example:

  • Let’s say you put down 1000 DAI, and there’s a 10% APY
  • You get the cTokens right when you lend money to Compound. Thus you get 1000 cDAI
  • The exchange rate for DAI and cDAI is 1:1 right now, but if you waited a year, the exchange rate becomes 1:1.1 → Thus you can exchange your 1000cDAI for 1100 DAI

The exchange ratio increases as a function of time (because that represents the interest), but you can even transfer the cTokens to other people!

When you borrow, you can just supply the collateral to the system and then you can borrow! A portion of the interest will go into the reserve and act as insurance. But what happens when the price of the collateral moves?

  1. Value goes up: Yay! Nothing happens, but you can take out more money if you want
  2. Value goes down: Boo! If the value goes below the collateral ratio then a portion will be sold off and have an 8% liquidation fee. This protects the lenders

AAVE:

Aave has more asset types than Compound — it has 24 of them as of April 2021. Aave works in a similar way as Compound, but it’s more complex + more flexible. Here are 8 key features of Aave:

  1. Supports more assets — 24 of them as of April 2021
  2. Stable and variable interest rates on loan — you can choose between the 2 interest rates
  3. Rate Switching — and you can switch between the two interest rates
  4. Collateral Swap
  5. Repayment with Collateral
  6. Flash Loans — You can take out loans with 0 collateral if you repay the loan + interest in the same transaction. Good for arbitrage traders
  7. Flash Liquidations — Liquidators can use flash loans to in order to get a liquidation bonus
  8. Native Credit Delegation — You can borrow without collateral, but pay a higher interest rate

APR is determined with algorithms, like Compound. You get aTokens instead of cTokens, which you also have to redeem. When borrowing with Aave, Aave determines the amount you can borrow which is determined with the Loan to Value ratio. If the LTV hits the liquidation threshold, up to 50% of your collateral can be liquidated + a liquidation penalty of 15%.

For governance, anyone can submit an idea on the community forum. The community gives feedback, and then it’s submitted as a proposal, which is then voted on.

Chapter 7: Decentralized Exchanges (DEX):

In crypto, there are 2 types of exchanges: Centralized and Decentralized Exchanges. Centralized ones mean you have to trust an intermediary (which can and has been hacked in the past). DEXs use smart contracts so, assets will be held by the user’s wallets instead of the intermediary’s wallet.

There are 2 types of DEXs:

  • Order Book-Based DEXs (dYdX, Deversifi). Users can buy or sell orders with limit or market prices.
  • Liquidity Pool-Based DEXs (Uniswap, Balancer). Users become the market makers and provide liquidity to the exchange. They get fees on the swaps. But there are flaws here (liquidity providers might suffer from Impermanent Loss)

Limitations of DEX:

  1. Lower liquidity: Since lots of trades are occurring on CEXs, DEXs don’t get as good prices, have higher slippage and worst price executions. But DEXs are becoming more popular, thus are getting better
  2. Limited Features: They just don’t have the same features as CEXs (like limit orders, stop-loss orders, trailing stops, etc). But DEXs are implementing them
  3. Blockchain Interoperability: Right now you can’t trade across chains on DEXs. Ethereum Based DEXs can only trade ERC-20 tokens. Though people are building those cross-chain DEXs
  4. Costs: Since DeFi is getting more and more popular, you end up with a super loaded Ethereum Network, thus gas fees increase

Though DEXs are still in their infancy and they’re getting more and more popular! Let’s go through Uni-Swap to learn how they work!

Uniswap:

If we were to go through a CEX, you have to deposit your tokens in the exchange, place an order, and then withdraw your tokens. But with Uniswap it’s just 1 step!

You send your tokens to the smart contract, Uniswap algorithmically determines the exchange rate, and then the desired tokens are sent back into your wallet. This is done via liquidity pools and automated market maker mechanisms.

So Uniswap has liquidity pools. Liquidity pools are literally huge vaults of tokens. These liquidity polls are supplied by liquidity providers and are incentivized via transaction fees.

Let’s run through an example. The ETH liquidity pool has 100 ETH, and there are 460,000 DAI (1 ETH = $4600). Let’s just say you wanted to swap 4646 DAI for 1 ETH. The end result of the liquidity pools would be 99 ETH and 104,646 DAI.

The amount inside the pools determines the prices that are set by the Automated Market Maker (AMM) Mechanism.

The AMM works by always keeping a constant product between the 2 liquidity pools. So if they started off with 460,000 DAI and 100 ETH → 100,000 x 100 = 46,000,000 ← That’s the constant product!

Thus, when taking out ETH, we have to supply a proportionate amount of DAI to keep the constant product happy. But we can see that the premium changes as you take out more and more of the ETH. Premium is the additional DAI you have to use to buy 1 ETH. We can see this asymptotic nature in this table:

And you can literally add any token on Uniswap! As long as a liquidity pool exists between the two tokens, you’re free to swap it!

DEX Aggregators:

Now if we’re exchanging a ton of tokens, slippage might kill us. But there are lots DEXs today, each with its own liquidity pools. Thus we could take our trade and split it up among different DEXs to minimize slippage. But doing this manually is cumbersome.

That’s why DEX Aggregators exist! They take all the DEXs into account and give you the best price + they split large trades into smaller ones. Examples are 1inch, Paraswap, and Matcha. Let’s dive into 1inch.

1inch has over 40 sources of liquidity from multiple DEXs. Traders can route their big trades through multiple DEXs with only 1 transaction (saves gas). 1inch has its own routing algorithm (Pathfinder) which goes through all the DEXs + 1inch’s own liquidity pool before finding the optimum path.

You pay the fees of the underlying DEXs + 1inch has a governance token: 1INCH.

Chapter 8: Decentralized Derivatives:

Derivatives are contracts whose value comes from other assets. There are many types like futures, options, or swaps. Each with its own purpose. But they’re risky and you need to know what you’re doing before using them.

The DeFi Derivatives has a market cap of $5.82 Billion, which is relatively small compared to lending. This is because of the high gas fees on Ethereum. There are 2 major ones: Synthetix and Opyn.

Synthetix:

Synthetix is a protocol for Synthetic Assets (Synths). Synthetix has its assets (Synths) and its exchange (Synethix.Exchange) to exchange those assets.

Synths are assets that are related to the prices of other assets. Thus you can have exposure to those assets without actually holding them. There are 2 types of synths: Normal Synths (positively correlated with the underlying asset) and Inverse Synths (negatively correlated with the underlying asset).

An example would be Synthetic Gold (sXAU). We can use an oracle (or multiple) to get the real price of gold.

Another Synth is Inverse Bitcoin (iBTC) which has 3 key values: (entry price, lower limit, upper limit). Let’s say the derivative was created when bitcoin was $64,000 — that’s the entry price. If the price drops by $1,000, then iBTC gains $1,000.

Inverse Synths have a range of 50% upper and lower limits. Thus it caps the loss or profit you can make. When the limit is reached, it’s frozen and your position is liquidated. We can then trade it back to Synetix.Exchange.

Why bother with Synths? Well, it’s because we don’t have to hold the actual asset (no need to travel somewhere, deal with a middleman, sign up, then get the gold). Much less hassle. But it’s also frictionless to trade Synth Gold with other assets + anyone in the world can buy real-world assets!

Alright! So how do we create our own Synths? We create them like how we create DAI on Maker! You need to stake SNX tokens (at a 500% collateral ratio since SNX is much more volatile than ETH).

You then mint the synth by taking on debt (but the debt fluctuates as the price of the asset fluctuates). Or we can just buy them from exchanges.

There are 5 major asset classes of Synths:

Index Synths: This allows people to invest in a basket of tokens without needing to buy all of them. This allows for the exposure of many segments + the diversification of risks. sCEX = CEX tokens. sDEFI = DEFI utility tokens. sFTSE = the FTSE 100 Index. NIKKEI255 = the Nikkei 255 Index. (last 2 from oracles)

Synthetic Exchanges: It’s a DEX for trading SNX + Synths. There are no order books or liquidity pools though. You’re just trading with a smart contract that maintains liquidity. The benefit is that there is no slippage since it’s all synthetic assets.

Opyn:

They protect against price volatility on assets + insurance on smart contracts. They do this with financial derivatives (options). What are options though?

There are 2 types of options:

  1. Call — Has the right to buy an asset at a specific price within a particular period of time
  2. Put — Has the right to sell an asset at a specific price within a particular period of time

Also: In order to buy the option, someone else has to sell the option to you

Here’s a super awesome analogy to understand Calls:

And there are 2 types of option flavours:

  1. American — you can execute the option anytime before it expires
  2. European — you can execute the option only at the strike date

So you can use this strategy as a way of hedging the risk of price fluctuations or insurance. Let’s say you buy a put (right to sell) ETH with a strike price of $2,400. If the price were to fall down to $2,000, we can execute the option and then get $400 back. There is a premium, but this is a way to protect yourself if the price falls.

You can buy an option through oTokens! In version 1 you could buy them wherever, but in version 2 you can buy them through an order book model (although the price of oTokens fluctuates with supply and demand).

The price usually reflects the nature of the option. If there was a put with a strike price of $3,000 but the current price is $1,000, it would be worth at least $2,000. But other factors can discount the option premium. Also since oTokens are determined through supply and demand, it’s a good signaling mechanism to check if options are under or overvalued.

If someone buys the option, someone else must sell it. You would sell it because you earn a yield on your holdings. You first have to supply some collateral to Opyn (140% to 100%). Then you mint oTokens.

You can then be a Liquidity provider on Uniswap, or you can sell the Tokens on Uniswap. And you can earn some nice premiums on this — but you have the risk that an adverse event doesn’t happen (hacks, or financial risks) + you have to maintain the collateralization ratio, else be liquidated.

Opyn has been audited, it’s non-custodial and trustless.

Version 2 has some additional features like:

  • European style options
  • Margin improvements (put credit + debit spreads)
  • Options that automatically exercise when it expires
  • Anyone can create options if the asset is whitelisted
  • Yield-bearing assets can be collateral

Chapter 9: Decentralized Fund Management:

Fund management is all about overseeing your money and investing it so it can make more money for you! But instead of a boring centralized fund manager, we can have decentralized, and automated smart contracts which invest for you! This reduces the fees paid!

TokenSets:

This is a platform where you can buy Strategy Enabled Tokens (SETs). These tokens are automated strats that manage your money. Each set = an ERC20 which holds a basket of cryptocurrencies + rebalances its holdings automatically.

There are 2 types of sets:

  1. Index Sets: You can get exposure to a ton of different tokens and reduce the gas fees (cause you only have to buy 1 token instead of multiple of them) Most popular = DeFi Pulse Index (DPI)
  2. Yield Farming Sets: You save on gas because you don’t have to call smart contracts constantly for LP farming. The set will do it all (Claim rewards, sell them, stake them again) for you

Though you have to do your research on each of those, previous performance is not indicative of future performance. The DeFi Pulse Index set is a collection of 14 different assets and it uses the market capitalization weighting strategy.

The overall strategy won’t do as well as some of the individual ones, but it still outperformed 11 of them! Thus, unless you have a competitive advantage, your best bet is to use the strategy.

Chapter 10: Decentralized Lottery:

A no-loss lottery! Basically, you can put in $10 and have a 1 in 69,738 chance to win $1,648. But the best part is that everyone who puts money gets refunded back. This is a no-loss lottery?

So where does the money come from? It’s from the interest (earned through Compound) that’s accumulated from the lottery tickets! You literally just purchase the entry tickets (you can buy as many as you want, each ticket increases the probability of winning)

PoolTogether is the protocol for this! You can buy it with 4 different types of currencies (DAI, USDC, UNI, and COMP). Plus sponsors can provide some extra tokens which are called a loot box.

This ain’t new though — CeFi has something called Prize-Linked Savings Account (PSLA) where the money in your account is put into a lotto second. But the major advantage of Decentralization is that there are no middlemen, no lock-up period, we can see the prize distribution is fair and correct.

But CeFi can’t give PSLA to anyone, gambling laws restrict only people from certain geographic areas from participating.

But can’t we just shove our money into Compound? Yup, we can! The opportunity cost is the “fee” that we’re paying to get the potential payout. The probability of winning is proportional to the number of tickets sold (more tickets = more payout too!).

PoolTogether has governance tokens (POOL), and these tokens were given out to those using the platform (airdrop) based on the amount and duration of time their money was in PoolTogether. Only 5% of the total supply was deposited at the airdrop. And 57.54% was put under the treasury which will be diverted by governance.

POOL Governance can vote on: Creating referral programs, setting liquidity mining programs, grant programs, adjusting the number of winners, prize frequencies, new prize strats and new prize pools.

Chapter 11: Decentralized Payments:

So a huge part of crypto is all about transactions. But that’s just sending money from one person to another in a decentralized manner. But what if we wanted cheaper, faster, timed transfers, conditional transfers, invoice formats etc! There are a few projects out there, but let’s talk about Sablier.

Sablier allows for payment streaming. So instead of waiting a certain amount of time (weekly, bi-weekly) and then paying (rent, contract work), we could have money be drawn out of the account in real-time.

What’s the deal? For those who are living paycheck to paycheck, this is a big deal. Because if there’s a delay in their income, they end up taking out loans with huge interest rates to get food on the table. This also establishes trust between contract workers and employers, since they’re paid in real-time. Additionally, you can use the money that you’ve earned so far and no need to wait for the monthly or bi-weekly payment.

In the current system, you either pay upfront (have to trust the provider), pay later (have to trust the client) or put it in an escrow (have to trust the escrow). But with Sablier you don’t have to trust anyone. Everything is paid in real-time and managed by immutable code, rather than humans.

Chapter 12: Decentralized Insurance:

In DeFi, you always have to lock up money as collateral, which is a potential vector for attack. Even though the code has been audited, millions of dollars have been stolen in hacks. There are some inherent risks in DeFi:

  1. Technical Risks: Smart contracts are hacked, bugs are exploited
  2. Liquidity Risks: Lending protocols run out of liquidity
  3. Admin Key Risks: The master private key of the protocol is compromised

To mitigate these risks we have insurance! We’ll go through Nexus Mutual and Armor.

Nexus Mutual is a decentralized insurance protocol that covers 64 smart contracts and custody cover for centralized ledgers + exchanges. They cover against hacks of smart contracts, but not negligence (loss of private keys).

For custody cover, it’s when a centralized exchange controls your assets. You get money if more than 10% of your funds are lost, or when the withdrawal is halted for more than 90 days.

So how do I get insurance? You first become a member of Nexus Mutual, then you select the Cover Amount (the amount you’re paid out in case the smart contract fails) + the Cover Period (how long this lasts). If a hack occurs then Claim Assessors will evaluate the situation and send the money out.

This costs something of course. the pricing depends on things like the Cover Amount, the Cover Period, and the evaluation by the Risk Assessors.

Nexus has a Token too! It’s called NXM. NXM is used to buy cover, vote on governance, used to participate in Risk and Claims Assessments, and represents Mutual’s capital (As the capital rises, the price of the coin rises too).

The price is determined by a bonding curve that relates to the amount of capital that Nexus Mutual has, and also how much capital Nexus needs to meet claims (weighted by their probabilities).

You can’t buy NXM, it’s an internal token that is obtained through becoming a member of Nexus Mutual (you have to go through KYC and AML). But you can go through Armor and not do the KYC.

There’s also wNXM, which is a wrapped NXM. This can be bought on the open market and transferred. You can then unwrap it and it becomes NXM!

Also, who are these risk assessors? They’re the people who are staking against smart contracts. They’ve done the analysis/trust other people’s analyses and think trust that the smart contract is safe. By doing so they earn NXM rewards.

DeFi is getting more and more complicated, but also able to be integrated with each other like “money legos”. Money legos allow for people to build complex pipelines without needing to create everything from the ground up! But this creates a risk where 1 failure can affect multiple protocols.

Also, Armor is an insurance aggregator for DeFi. You can buy insurance covers without KYC or are restricted by Nexus Mutual’s geographic restrictions.

Another insurance project is Nsure Network where you can trade insurance risks and everything is determined by the free market. It has a governance token and is subject to the free market but tokens are shares in the network!

Cover is a peer-to-peer insurance market. You put down money (ex: 100 DAI) as coverage and insurance is minted with an expiry date. This mints (100) CLAIM and (100) NOCLAIM. People have to buy CLAIM (that’s the insurance premium) from you. If the event happens (100) CLAIM can get access to the collateral (100 DAI). Else the (100) NOCLAIM gets back the collateral (100 DAI).

Insurance is a niche that not many are using, but it’s expected to increase as more people come into the market.

Chapter 13: Governance:

Imagine building the next big thing in DeFi, but you have to manage a bunch of people in different timezones, objectives, when you’re limited to social media, and when there’s lots of money involved. Luckily, we can use blockchain to help us!

Decentralized Autonomous Organizations (DAOs) are what emerge! They are organizations governed by smart contracts and align groups of people to work on a common goal!

Governance tokens as voting power aren’t perfect. There are many problems with it (voter apathy, gas fees to vote, non-binding voting results). But crypto is in its infancy and we’ll get better tools. But until then, governance tokens are what we’ve got!

Let’s talk about 2 projects that are governing tools: Aragon and Snapshot!

Aragon was founded to make sure that web3 is free, fair and open to everyone! Thus they created lots of tools to help DAOs. One tool is Aargon Court.

This is like a court where a bunch of jurors vote on the correct outcome between 2 parties. Jurors are compensated when they vote with the majority and punished (stake taken away) when they vote with the minority. Parties can pay a fee to appeal the dispute with more jurors.

Jurors are selected from the juror pool, and they’re able to join the juror pool if they have more than 10,000 Aragon Court Tokens (ANJ) + you can buy them!

So far big DeFi projects like Aave and Curve use Aragon + 1600 other DAOs!

Snapshot is tackling the problem of super-high gas fees to vote. Snapshot takes a snapshot of all the votes off-chain. This makes the voting process basically free.

But the problem is that voting results are not binding on-chain you need people to push the vote on the chain. Thus it’s still a bit centralized but it’s practical and cost-effective.

Chapter 14: DeFi Dashboard:

This just aggregates all your DeFi activities in 1 place and then tracks + visualizes all your assets + bins your investments into categories. You can enter your ETH address or ENS domain. 2 dashboards are Zapper and Zerion.

Chapter 15: DeFi In Action:

Let’s talk about how people in this world are actually using DeFi to change their lives!

For example, Argentina had an all-time high inflation rate of 53.8% annually — your money is halved every single year. So some people wanted to be paid in USD.

But the Argentinian government made it damn hard to do so. Capital control of $200 USD per month (black market prices of USD rose by 30% higher than the exchange rates), punishing those who went over the limit by leaking their personal information, and forcing USD liquidation for those who worked for foreign companies.

Some turned to Bitcoin, which is volatile, thus they turned to DAI! You withdraw as little as possible to pay all your expenses. The rest is kept in DAI. Using this DAI we can invest it and gain access to other financial instruments.

Additionally, people around the world are all blocked from accessing financial institutions. DeFi allows them to access them though. For example, Uniswap was forced to geo-block people from accessing their website to do exchanges.

But that didn’t stop other sites from popping up and connecting people to Uniswap (since Uniswap is on Ethereum). Anyone can access DeFi financial instruments from everywhere.

Chapter 16: DeFi is the Future, and the Future is Now:

DeFi is still nascent, but it’s growing with ferocious power and potential! CeFi is starting to bridge into DeFi and DeFi is becoming the alternative financial ecosystem. DeFi is the future of finance.

The growth has been insane, just look at the numbers of TVL:

  • 2018: 5x increase from $50 million to $275 million
  • 2019: 2.4x to $667 million
  • 2020: 23.5x to $15.7 billion
  • 2021: 5.5x to $86.06 billion (as of April 2021). 11x to $172 billion (as of November 2021)

Finally, a recap of the benefits of DeFi:

  • Transparency: You can see and audit everything
  • Accessibility: You can access DeFi anywhere with no fear of discrimination
  • Efficiency: Removing the centralized middleman to make a more efficient financial market
  • Convenience: You can send money anywhere, anytime to anyone. Small fee with tiny waiting time

Also the DeFi User Experience! Argent is creating a state-of-the-art wallet experience. Zapper is combining many DeFi products. Gelato Finance created the “if this, then that” of crypto. Nexus Mutual has insurance. 1inch is aggregating DEXs, and Yield optimizers exist!

So many lego blocks, so much potential to change the world!

If you want to find out more: Read the book here!

Thanks for reading! I’m Dickson, an 18-year-old Crypto enthusiast who’s excited to use it to impact billions of people 🌎

If you want to follow along on my journey, you can join my monthly newsletter, check out my website, and connect on LinkedIn or Twitter 😃

--

--

Dickson Wu
Geek Culture

Hi I’m Dickson! I’m an 18-year-old innovator who’s excited to change the course of humanity for the better — using the power of ML!