DeFi 101: A Guide For Beginners

4 weeks ago 21

Are you struggling to understand what DeFi is, how it operates, and how to get started? This blog post is aimed at beginners with no prior understanding. Easy to understand, straight to the point, with real-life examples to help you visualize how this intangible DeFi landscape operates.

youtube.com/playlist?list=PLaDcID4s1KronHMKojfjwiHL0DdQEPDcq

What is DeFi?

DeFi: a blockchain-based financial ecosystem that enables access to various financial services such as lending, borrowing, and trading without relying on centralised intermediaries.

Almost all DeFi applications are built on the Ethereum blockchain and Binance Smart Chain.

DeFi is built on three main things:

  1. Cryptography
  2. Blockchain Technology
  3. Smart Contracts

DeFi Glossary

Public address: account number, used to receive cryptocurrency transactions.

Private key: confidential code known only to the owner of a digital wallet, used to access and manage cryptocurrencies.

Self-custody wallet: digital wallet where a user has self-custody of their private keys, giving them full control over their assets.

Custodial wallet: wallet where a third party holds the private keys.

Lending: loaning crypto assets to others through a DeFi platform, in return for interest payments.

Borrowing: taking out a loan in cryptocurrencies from a DeFi platform, usually by providing crypto as collateral.

Trading: buying and selling of cryptocurrencies.

Liquidity pool: collection of funds locked on a smart contract, used to facilitate trading on a DEX by providing liquidity.

Stablecoin: cryptocurrency pegged to a stable asset, like the US dollar, to maintain a consistent value.

Coin: a digital currency that operates on its native blockchain.

Token: digital asset created on existing blockchain, representing assets or utility within a specific ecosystem

Governance token: a token that gives holders to right to vote on decisions affecting the future of a DeFi platform or protocol.

Smart Contract: self-executing contract with terms of agreement directly written into code.

Decentralised application(dApp): application built on a decentralised network that combines smart contracts and frontend user interface.

Gas fees: fees paid to conduct a transaction or execute a contract on a blockchain network.

Impermanent loss: temporary loss of funds experienced by liquidity providers in a liquidity pool due to the volatility in the price of assets

Onboard: fiat-> crypto

Offboard: crypto -> fiat

CeFi vs DeFi

What is DeFi (Decentralized Finance)? — WhiteboardCrypto

Accessibility

CeFi: accessible through banks/financial institutions, with geographical and status-based restrictions

DeFi: accessible to anyone with an internet connection and digital wallet.

Operation Time/Date

CeFi: limited to business hours and days + not available on weekends and holidays

DeFi: operates 24/7

Censorship

CeFi: regulatory controls and censorship -> Institutions have the power to freeze accounts or reject transactions

DeFi: censorship-resistant environment where transactions can’t be easily stopped or altered by a single authority

Cost

CeFi: generally higher due to intermediary wanting to take a cut and transaction fees and account maintenance fees

DeFi: generally lower however costs may vary due to fluctuating gas fees

Transparency

CeFi: transactions NOT publicly available.

DeFi: all transactions are smart contract codes that are visible to anyone if on a public blockchain.

Control over funds

CeFi: institutions manage and safeguard funds, leading to counterparty risk.

DeFi: users have complete control over their funds BUT you must be responsible for managing your OWN private keys.

Intermediaries

CeFi: banks, brokers, financial institutions

DeFi: no intermediaries, smart contracts, and decentralized protocols used instead

Flexibility & Innovation

CeFi: regulation & institutional inertia -> lack of innovation

DeFi: rapidly evolving -> high levels of innovation

Summary:

DeFi is seen to be as more innovative, you have control over your own funds, transactions are seen as cheaper + transparent, you do not require intermediaries and it’s accessible to everyone. However, you must take greater precautions regarding personal security, specifically safeguarding your own assets.

CeFi vs DeFi activities/ protocols

1. Lending and Borrowing

DeFi: users lend crypto and earn interest/ borrow crypto by providing collateral through smart contracts

CeFi: lend and borrow through intermediaries such as banks, which typically assess the users’ credit score, set interest rates, and require extensive documentation.

2. Exchanges

DeFi: DEXs such as UniSwap allow users to trade crypto from their wallets without the need for centralised exchanges

CeFi: centralised exchanges are managed by intermediaries

3. Stablecoins

DeFi: MakerDAO issues DAI, a stablecoin that provides price stability.

Different types: fiat, algorithmic, crypto, commodity.

CeFi: fiat currency issued by government

4. Yield Farming

DeFi: uses provide liquidity to platforms and can stake their assets and earn yield and additional rewards such as tokens which also have monetary value or provide them with additional features such as governance or access to certain protocols

CeFi: savings accounts offer interest but rates are set and centralised by institutions.

5. Governance

DeFi: DAOs which are companies governed by smart contracts and token holder voting, facilitating decentralized decision making.

CeFi: companies governed by a board of directors and shareholders who vote on decisions.

6. Insurance Protocols

DeFi: users participate in decentralized insurance protocols, providing coverage against smart contract vulnerabilities, hacks, or other unforeseen events.

Example: The insurance is CODE in the smart contract. Oracles feed real-world data into smart contracts. E.g. The smart contract will have a piece of code that says “Pay farmer Joe $100,000 if it’s 95 degrees or hotter 4 days in a row, however, farmer Joe has to pay $2000 to initiate his contract”. The smart contract uses oracles to see if it was 95 degrees or hotter 4 days in a row.

CeFi: insurance companies offer coverage but also involve intermediaries.

Example: With car insurance, you pay $100 a month to protect your car, and if you get into an accident the car insurance company pays you what your car is worth. — How does the insurance company know to charge you $100 a month, and not $90 or $110?

They use statistics to predict that $100 a month is the correct price of insurance:

They analyze how many drivers will crash their cars and use data to predict how much they would have to pay out each year to determine what the monthly price of the insurance is (insurance premium)

7. Cross Chain Platforms:

DeFi: Polkadot, Cosmos: facilitate interoperability between different blockchains, allowing assets + data to move across different blockchains

CeFi: cross border transactions are slow, inefficient, and have a lack of transparency.

DeFi Systems/Components

There are several important components of DeFi systems that make them function: blockchains, smart contracts, dApps, DEXs, crypto coins, crypto tokens, wallets, DAOs, quadratic funding, oracles

Blockchains

Digital ledger which is transparent, secure, and cannot be tampered with.

If you want to view activity on a blockchain, it is best to use blockchain explorer such as EtherScan or Dune Analytics.

Smart Contracts

Self-governing agreements are written in code on the blockchain, when certain conditions are met, these contracts automatically execute the terms of the agreement.

dApps

dApps are apps built on the blockchain which allow you to interact with DeFi services.

What is the difference between dApps and normal applications like Facebook and Instagram?

dApps report back to the blockchain, whereas Facebook and Instagram would report back to their own respective servers. dApps can only be built on smart contract networks therefore bitcoin cannot utilize dApps. Smart contracts code is open-source meaning anyway can view the code, but with traditional applications we cannot see the code Facebook uses to recommend friends to interact with.

dApps can never go offline as they are run on a blockchain so they are run by thousands of computers around the world, and it would be impossible to turn them all off.

There are many different types of dApps: (Game dApps, gambling dApps, Marketplace dApps)

  • Zedd is a gambling dApp that allows you to buy NFT horses and race them against each other, if the horse wins you earn certain skills and points which are then worth cryptocurrency
  • Rarible is a marketplace dApp which allows you to buy and sell NFTs

DEXs

DEXs: allow you to trade directly with others, without a middleman

Coins

Coins are cryptocurrencies that belong to their NATIVE blockchain.

Examples: Bitcoin (BTC), Ethereum (ETH)

Uses: medium of exchange, store of value

Types: native, forked, stable, wrapped

  • Native: run on their own native blockchain. e.g. BTC
  • Stablecoins: pegged to the value of another asset. Subtypes include: fiat, commodity, crypto, and algorithmic.
  • Forked: coins that derive from the same blockchain but have split off due to a change in the blockchain protocol.
  • Wrapped: coins that represent a different cryptocurrency on a different blockchain. They are wrapped to be compatible with a different blockchain.

Created: Mining

Tokens

Tokens are digital representations of assets or utilities that DO NOT run on their native blockchain.

Examples: COMP, MKR, UNI

Uses: utility, governance, interoperability

Types: utility, governance, security, NFT, fungible tokens, soulbound, wrapped

  • Utility: provide utility (access) to a good or service on the blockchain. E.g. Filecoin enables access to decentralised file storage.
  • Governance: provide governance (decision-making rights) to the tokens protocol such as voting on changes to the protocol. E.g. COMP, MKR
  • Security: represents ownership in an asset/business/income stream. Subtypes: equity, real estate, debt.
  • Non-fungible tokens (NFTs): represent ownership of a unique asset. E.g. Cryptopunks, collectibles.
  • Fungible Tokens: tokens that are interchangeable with the same type. e.g. GBP, USD
  • Soulbound Tokens (SBTs): tokens that are permanently tied to one wallet and cannot be sold or transferred to another. They can represent a person’s identity, qualifications, and achievements within a blockchain network.
  • Wrapped Tokens: tokens that represent a cryptocurrency on a different blockchain to the blockchain they are originally from. E.g. if I wish to use ETH on the Polygon blockchain, I would have to wrap Ether in order to use the Ether on the Polygon Blockchain.

Created: Pre-mined

Wallets

Cryptocurrency wallets are programs/services that enable the storage of public and private keys to store and transfer crypto.

Public key acts as an email address, where anyone with a public address can send you money.

Private key is the password to your email.

You receive transactions with your public key.

You send transactions with your private key, where your private key acts as a signature to authorize the transaction before it can be sent.

DAOs

Decentralized autonomous organizations (DAOs) are companies that run off smart contracts contained on the blockchain, and they do not operate without any central authority. Decisions are made through voting via token holders who act as shareholders. The amount of tokens you hold is representative of your voting power.

Many DeFi platforms operate as DAOs, in the sense that users of the DeFi platform have a say in the governance and the evolving nature of the platform. For example, if a DeFi platform wishes to change a rule or introduce a new feature, its community votes on decisions, ensuring the platform operates in a way that aligns best with the interests of its user base.

DAOs have transformed how projects can raise funds, as larger communities can pool funds together and decide collectively on investment decisions. One method of pooling funds together is known as QUADRATIC FUNDING.

Quadratic Funding

A method of funding public goods such as open-source projects and community initiatives with the goal of optimizing the preferences of the majority rather than the few. It democratically determines the allocation of funds to a particular project based on the number of supporters rather than the amount donated. This method of funding ensures a few wealthy individuals do not have their preferences overshadow the majority.

For example: a project that has 10 people donate £1 each would receive more funding from a quadratic funding pool compared to a project that has 1 person donate £10.

Summary: quadratic funding values the width of support (how many people support) rather than the depth of support (how much money is given).

Oracles

Oracles are data messengers that feed external data into smart contracts enabling smart contracts to make decisions in real time.

They can be categorized based on:

  • Source of data (software + hardware)
  • Direction of data flow (inbound + outbound)
  • Degree of decentralization (centralized + decentralized)

Popular DeFi Services

The types of DeFi applications (use cases) are: exchanges, bridges, lending/borrowing, margin trading+ synthetics, yield farming, degen yield farms, insurance, and stablecoins.

Exchanges

There are 2 types: centralised and decentralized exchanges.

Centralised Exchanges (CEXs) are exchanges such as Coinbase and Binance. They are called crypto banks because they essentially keep your money like a traditional bank does. NEVER KEEP YOUR CRYPTO on an exchange, you always want to transfer your funds to a self-custody wallet.

Decentralized Exchanges (DEXs) such as Aave offer smaller transaction fees, and the crypto is sent directly to your self-custody wallet.

Most popular DEXs work in a way in which investors pool their money together and then traders can trade that money. For example, if you want to exchange ETH (ether) for OP (optimism), there will be a pool of both coins that other people have put together so that you can trade it automatically. The fee for each trade goes to the pool investors and the amount is set in advance (AMM).

Bridges

The purpose of bridges is to transfer assets and information between different blockchain networks. They act as a bridge, from one blockchain network to another.

For example, if you have a token on the Ethereum blockchain but want to use it on the Binance Smart Chain (BSC), a crypto bridge can help you convert that token into a format which compatible with the Binance Smart Chain. The bridge ensures that the value is transferred correctly and securely between the two different blockchains. Bridges enhance the interoperability and flexibility of different blockchain networks and make it easier to use various blockchain services and applications regardless of the underlying blockchain infrastructure.

What is DeFi (Decentralized Finance)? — WhiteboardCrypto

Liquidity pools are required for bridges to work, as the bridge needs coins/tokens on both networks present already. Those who provide liquidity to bridge pools (bridge liquidity pools) get paid interest by user fees since everyone who uses a bridge pays a small fee for it. For example, if someone wants to move ETH from Ethereum to BSC, the bridge will need to have ETH on Ethereum and wrapped ETH on BSC. So a liquidity provider for the bridge pool would lend both ETH and wETH to allow this trade to happen.

HOWEVER, you can also provide single-sided liquidity, where you only deposit one type of asset. But the issue with this is, if there is more of one asset than another, then trades won’t be able to occur, so this tends to favour lenders rather than users.

Lending & Borrowing

Involves the use of smart contracts to facilitate lending and borrowing through over-collateralization on DeFi platforms such as Compound or Aave.

Flash Loan: a smart contract that creates a loan in cryptocurrency where you can borrow large amounts of money with no collateral. However, you must pay back the flash loan in the same transaction that you bought it in. i.e. pay back the flash loan immediately.

Simple explanation: a flash loan is a quick loan that you can get without putting down any collateral, but you have to pay it back almost instantly. It uses code in smart contracts to make sure the loan can be taken and paid back in seconds, with no risk to the person giving the loan.

Breakdown of how it works:

· When you request a flash loan, you are asking for a smart contract to lend you funds. This singular request is part of a larger transaction that you’ve programmed to execute several actions.

· If the smart contract has enough funds to lend, it releases the requested amount to you. From this moment the blockchain transaction is in progress, but not yet completed. You can now use these funds for predefined actions such as arbitrage, collateral swaps, or paying off debts in other protocols.

· After you complete the intended actions with loan funds, the smart contract automatically checks if you have repaid the loan amount plus any associated fees. This check happens within the same transaction that started with borrowing the funds.

· If you have successfully repaid the loans + fees, the smart contract updates the blockchain to reflect this. HOWEVER, if you fail to repay the loans within the same transaction, the smart contract automatically reverses all actions taken during the transaction. Meaning the funds are returned to the lender, and any trades or swaps you made are nullified as if they never happened.

· The loaning of the money only successfully goes through if repayment is confirmed. If repayment is not confirmed then the blockchain’s ledger does not record any change, thus ensuring the lender’s funds are safe.

Essentially a flash loan is a loan in which the smart contract code will only successfully loan you the funds if you can pay back the funds + interest within an extremely short period of time, if not then the loan will not be confirmed and the funds will be taken back from you, like the transaction/ loan never occurred.

There are three main use cases for Flash loans (arbitrage, collateral swap, self-liquidation):

  1. Trading Arbitrage: buy BAT for $100 on Coinbase and sell it on Gemini for $101. With flash loans you can buy $100,000,000 worth of BAT on Coinbase and sell it to Gemini for $101,000,000, making a $1,000,000 profit. However, the platform you borrowed it from charges you a fee for using their money, normally around .09% so a fee of $9000 to borrow a $100 million.
  2. Collateral swap: use flash loans to swap your collateral out for something else.
  3. Self-liquidation: you deposited 100ETH into AAVE a year ago, with ETH being worth $200 each, therefore you deposited $20,000 worth of ETH. You took a loan out of $16,000 worth of Tether and cashed it out to the bank (off-ramp) so you could pay the bills. Now the ETH is worth $2000 each, so now you have $200,000 worth of ETH, but in order to access it you have to pay back your original loan of $16,000. So you take a flash loan out of $16,000 Tether to repay you and get access to the 100 ETH, so now you have $184,000 of ETH which is now withdrawn.

Margin Trading

In DeFi, margin trading is trading with borrowed funds, and the governance of these trades is monitored via a smart contract code.

In order to gain a better understanding of Margin Trading, let’s explore how it works in the traditional finance world.

Firstly, what is Margin?

Margin is just a loan that automatically sells your investment if the value of your investment goes below your down payment (collateral). For example: if you wish to buy Apple stock at $100, so you ask the bank for a $100 loan, and the bank agrees to give you a $100 loan, but you must give the bank a $20 down payment and a fee of 5% each year.

There are 2 scenarios which could occur:

  1. Stock increases in value

The initial stock valued at $100 increases to $150. You sell the stock and receive $150, you only pay back $80 of your loan as the bank already has a $20 down payment from you. Therefore you have made a profit of $70. You made $70 by only spending $20 (the $20 down payment).

2. Stock decreases in value

Stock starts at $100 but drops to $80. The bank forces you to sell your Apple stock in order for you to have enough funds to pay back the $80 you borrowed. The $80 from selling the stock and the $20 you gave them as a down payment equalises the $100 loan the bank originally gave you.

But in DeFi, if you want to receive a loan and engage in margin trading, you have to over-collateralise. This means you have to put more money in as collateral than the amount you want to loan. This prevents the debtor from running off with the creditor’s money, as in this case, the creditor can just take the debtor’s collateral without worrying they won’t receive any funds.

Synthetics

Synthetics are tokens that represent assets like gold, stocks, or even cryptocurrencies, but you don’t actually own the real asset. For example, a synthetic token might track the price of gold, so if the price of gold increases so does the value of the synthetic token.

Examples of blockchain platforms that specialise in creating and trading synthetic assets include: Synthetix, Mirror Protocol, and UMA

Staking vs Liquid Staking vs Liquidity Pools vs Yield Farming

What is Staking?

Staking: locking up your cryptocurrency as collateral, to support the operations of the blockchain network. You are supporting the operations of the blockchain network by participating in transaction validation on a proof-of-stake blockchain.

How does staking help ensure that the blockchain network is secure?

Helps ensure validators in the blockchain network are trustworthy, by ensuring validators have aligned incentives such as financial commitment, as they have committed their cryptocurrency to the network (stake) and they have the economic incentive to earn additional money through acting in an honest and trustworthy manner. Additionally, if they choose to act in a dishonest manner, they run the risk of losing their staked cryptocurrency through slashing.

Example of how Staking works:

  • Bob decides he wants to participate in the CryptoIsle network, so he purchases 100 CryptoIsle tokens and stakes those CIT tokens as he wants to earn rewards.
  • Bob’s 100 CIT tokens are locked on a smart contract on the CryptoIsle blockchain. Bob now has the chance to become a validator through random selection, however the more tokens he stakes, the more likely he is to be chosen as a validator.
  • One day Bob is chosen as a validator for a new block of transactions-> he checks the transactions to ensure they’re valid, signs off on the block, and broadcasts that these transactions are valid to the network.
  • Bob receives a reward of 10 CIT tokens for validating these blocks correctly. These rewards are derived from the transaction fees paid by users of the CryptoIsle network.

What is Liquid Staking?

Traditional stacking: lock your tokens for a period of time and you cannot use your tokens for anything else.

Liquid Staking: lend your tokens to a third-party service which then stakes those tokens on your behalf, and in return you receive a liquid staking token that represents your staked token.

Here's an example to help further understand the main differences in how these two DeFi protocols operate:

Liquid Staking:

  • Stake 100 ETH and receive 100 stETH ( a representative token indicating your staked ETH)
  • The APR is 10% for a year
  • So INSTEAD of directly increasing your stETH balance, each stETH is worth more over time, so each stETH would be worth 1.1 ETH, reflecting the 10% APR
  • End balance: you still hold 100stETH by the end of the year, but these 100stETH are now worth 110 ETH

Traditional Staking:

  • Stake 100 ETH
  • APR 10%
  • END BALANCE: 100 ETH + 10% = 110ETH. The additional 10 ETH is normally added to your stake balance.

How Liquid Staking would work (an example):

Alice has 10 Ethereum (ETH) and wants to stake to earn rewards, however, she’s concerned about locking up her ETH because she might need liquidity (the money from the ETH) for other investments.

  1. Alice goes to EtherLiquid and stakes her 10 ETH. EtherLiquid is a staking pool that participates in Ethereum’s staking by running validator nodes on behalf of its users.
  2. Alice receives 10EtherLiquid tokens (ELT) in return for staking her 10 ETH, these ELT tokens are a 1:1 representation of the value of her staked ETH. So if the value of the staked ETH increased by 10% (original ETH + staking reward of 10% of the original value of ETH deposited/staked, so in this case 1 additional ETH), Alice would exchange her 10 ELT and receive 11 ETH.
  3. Alice can use 5 of her 10 ELT tokens to participate in a lending protocol to earn additional interest and keep the other 5 ELT tokens in her wallet, or she can just keep all 10 ELT tokens in her wallet and exchange them.
  4. Let’s say Alice earns 1 extra ETH as a staking reward, she decides to cash out. She has held onto her 10 ELT tokens, she exchanges them and receives 11ETH.

Similarities between staking vs liquid staking

  • Reward generation: participants earn rewards on staked coins
  • Network support: participants contribute to network security.
  • Participation requirement: both require crypto assets to be locked up to participate.

Differences between staking vs liquid staking

  • Liquidity: In traditional staking, assets cannot be accessed until the end of the staking period. However, with liquid staking, participants are provided with a liquid token that has a 1:1 value with their staked assets + staking rewards, which can be traded or used in DeFi applications, offering immediate liquidity
  • Flexibility: traditional staking — participants are restricted from using their assets until they are unstaked. Liquid staking — participants can use their liquidity token in various DeFi protocols without unstaking.
  • Complexity and accessibility: liquid staking is more complex.

Liquidity Pools: What Are They?

Liquidity pools: smart contracts that hold pools of two tokens, enabling users to trade between these tokens without the need for traditional buyers and sellers to create liquidity. They operate using a constant product automated market maker which maintains an even 50:50 ratio of two tokens being traded, so if more of one token is being bought, the value of that one token being bought increases relative to the other token as there is reduced supply of that one token.

Liquidity pool: pool of pairs of tokens that enables traders to swap one coin for another. i.e. take one coin out, and exchange it for one coin in.

Example:

  • Pool operates on a 50:50 ratio, and you deposit $500.
  • $250 goes to Ethereum and $250 goes to BAT.
  • As you purchase more BAT from the pool by trading it ETH in return, the quantity of BAT in the pool decreases as you are taking BAT away from the pool into your own personal wallet, whilst the quantity of ETH increases, as you deposit ETH from your wallet into the pool.
  • As the supply of BAT decreases, the value of BAT increases relative to ETH, meaning more ETH is required to exchange for one BAT.

Individuals who provide funds to a liquidity pool are known as LIQUIDITY PROVIDERS.

YIELD FARMING

Yield farming is when someone lends their crypto in order to make a profit from the interest rewards. It’s called farming because you are trying (farming) to get the best reward rate as possible, i.e. highest yield rate. Yield farmers will hop between lending pools to get the highest reward rate. Remember reward rates tend to be based on how many people are in the pool, so yield farmers will try to keep moving between pools in order to get the highest rates.

Simplified explanation:

Yield farming: finding the best place to store your crypto which will earn you the highest yields.

AKA farming (finding) the best place to maximize yield. = farming yield.

Yield farming is multifaceted compromising of several strategies/subtypes to make maximize your return on crypto investments. These include:

1. Liquidity provision

Provide liquidity to a liquidity pool through depositing tokens into the pool and received returns through trading fees on the liquidity pool.

Example:

  • You put $500 of ETH and $500 of BAT into a pool, your friend does the same now there is $2000 in the liquidity pool.
  • $150 of trading fees from people trading all day long, I earn $75 since I provided 50% of that liquidity to the pool.
  • As more people contribute towards the liquidity pool, your cut of the trading fees becomes less and less. HOWEVER, the price of the assets in the pool is stable, as it will require more money to move the ratios of the assets in the pool. So if the total value of assets in the liquidity pool was $2000 ($1000 ETH + $1000 BAT) and someone came in and spent $500 to buy some ETH and exchange it for BAT, that would raise the price of ETH a lot compared to if the total value of the liquidity pool was $5,000,000.

2. Lending & Borrowing

Lending: lend crypto assets through a decentralised platform to earn interest like in normal finance. E.g. Aave, Compound

Leveraged Lending: strategy used to increase return on investment through borrowing and reinvesting.

Here’s how it works:

  • Lend cryptocurrencies to platforms such as Compound or Aave.
  • Deposit $100 worth of Basic Attention Token (BAT) into Aave. Aave will allow you to borrow against your deposit, say up to $60, but in another cryptocurrency called DAI.
  • Your deposited BAT is earning an interest of 30% APR.
  • You exchange your $60 in DAI for BAT and now deposit that $60 worth of BAT, so you are now earning an interest of 30% on $160 worth of BAT, instead of $100 worth of BAT.

Summary: you deposit $100 worth of crypto such as BAT into a DEX, and the DEX allows you to borrow against your deposit, so they give you $60 worth of another token such as DAI, and you exchange this $60 of DAT exchange it for $60 of BAT and then deposit this new BAT into the same DEX, now you are earning interest on $160 of BAT rather than $100 of BAT.

Borrowing: Borrow crypto assets through over-collateralization of your existing digital assets.

Here’s an example to illustrate how borrowing works in DeFi:

  • In order to have the right to borrow funds, you must first deposit collateral. DeFi loans, tend to be overcollateralized, all this means is that you have to put more money in as collateral than what you want to borrow.
  • For instance, you want to borrow $1000 of USDC, but you may need to deposit $1500 worth of ETH as collateral.
  • The reason overcollateralization is essential in DeFi is because there are no intermediaries to ensure that you will receive your funds in the case of fraudulent events. Overcollateralization ensures that the creditor will not fall victim to fraud, as performing fraud on the debtor side, just doesn't make economic sense.

3. Staking

Staking is technically a form of yield farming because you can buy coins, stake them, and then earn more free coins.

For example with Tezos, in 2021 you had a 6% APY, but you have to have the hardware and knowledge to set up your own staking node that would be reliable throughout the year. But if you want to avoid this hassle, you can go to a platform such as Coinbase, which stakes for you, but they take a cut of your 6% APY

4. Holding coins which have a redistribution fee

You want to hold coins that have the potential to increase in value. Most people invest in coins and tokens that have viability based on their use case potential, the team working on it, the tokenomics, etc.

But another facet to look at is to invest in coins which have a redistribution fee.

Some cryptocurrencies like Safemoon, charge a fee on transactions e.g. 10% transaction fee, this fee is not lost but used in ways that can benefit the remaining holders of the cryptocurrency. 5% is burned forever, and the other 5% is redistributed evenly to all other holders. The idea behind this is that the 5% of burned Safemoon, reduces the supply and should in theory increase the price (if demand stays constant). So just by holding the coin Safemoon, you will earn free Safemoon through everyone else’s transactions.

Example:

There is a total supply of 1000 Safemoon coins. A transaction of 100 safemoon occurs with a 10% transaction fee:

-5% Burned:

· Transaction amount: 100 coins.

· Burned: 5% of 100= 5 coins.

· Effect on Total Supply: total supply of Safemoon decreases by 5 coins from 1000 to 995.

-5% Redistributed :

· Redistribution: 5% of 100 = 5 coins

· Your share: since you own 10% of the total supply (100 out of 1000 coins), you get 10% of the 5 redistributed coins = 0.5 coins

After the transaction:

· Your New Holdings: 100 (initial) + 0.5 (redistributed)= 100.5 safemoon coins

· New total supply: 995 Safemoon coins (after burning 5 coins).

Summary:

After this single transaction scenario, I now have 100.5 safemoon coins, and the total supply of safemoon coins in circulation has been reduced to 995 coins.

5. Auto-compounding

PancakeBunny is a platform that optimises your earnings or yields from investments made on PancakeSwap, which is a decentralised exchange. When you invest in their token, PancakeBunny offers rewards. With the “auto-compounding” feature, PancakeBunny takes any rewards you earn and automatically reinvests them for you, thus boosting your investment growth without you having to manually reinvest your earnings.

Example to illustrate auto-compounding:

Imagine you invest $1000 in Pancake Bunny’s token, and you earn 10% rewards after a month, which would be $100. With Auto-Compounding:

1) Instead of taking that $100 reward out, PancakeBunny automatically adds it back to your initial investment. So now your investment is $1100.

2) The next time rewards are calculated, they’re based on this amount ($1100), not the original $1000. If you earn another 10% reward, that’s $110 this time, not just $100.

3) This process repeats, with each round of rewards being added to the last, causing your investment to grow more quickly over time because you’re earning rewards on top of rewards.

Risks of Yield Farming

  • Rug Pulls: when developers pull out of a project
  • Impermanent loss: when the value of one token vastly changes compared to the other token

Degen Yield Farms

Degen yield farms involve lending your cryptocurrency/ providing liquidity to a less-established (degenerate) DeFi project, with the chance of receiving rewards in the form of new tokens.

They are high-risk, high-reward investments, as they offer higher yields but also a greater risk on the investment.

What are the risks?

Hacks. The projects are untested so they may be vulnerable to hacks. And you may run the risk of the rewards you receive being worthless.

Insurance

With car insurance you pay $100 a month to protect your car, if you get into an accident, the car insurance company pays you what your car is worth and they use statistics to predict the price of their insurance per month by analysing how many of their drivers will crash their cars and uses this data to predict how much they would have to pay out each year to determine what the monthly price of the insurance is (insurance premium).

With DeFi, the insurance is CODE, so in the smart contract you could have a piece of code that says “Pay farmer Joe £100,000 if it’s 95 degrees or hotter 4 days in a row, however, he has to pay $2000 to initiate his contract”. The smart contract uses oracles to gain real-world up-to-date information i.e. to see if it was 95 degrees or hotter 4 days in a row.

Stablecoins

Stablecoins are coins whose value is pegged to the value of fiat currency. They are designed to have a stable value. For example, the USDC coin is pegged to the US dollar, meaning for every 1 USDC in circulation there is an equivalent 1 dollar held in reserves.

Another way stablecoins maintain their value is through algorithms. Some stablecoins like DAI will use smart contracts to manage their supply. If the value of DAI starts to rise above a dollar, then the smart contract will create more DAI to bring the price down. If the value drops, it will reduce the supply to push the price back up. This is called REBASING.

Collateral-backed stablecoins are stablecoins backed by other cryptocurrencies. For example, MakerDAOs DAI involves users depositing their crypto assets like ETH into a smart contract as collateral to generate DAI.

Types of Crypto Investments

Buying and holding/ hodling: purchase cryptocurrencies to hold in your wallet, with the hopes that their value with increase over time.

Trading: buying and selling cryptocurrencies on exchanges to profit from price fluctuations. This includes: day trading, swing trading, and position trading.

Futures contracts: agreements to buy and sell a crypto asset at a predetermined future date and at a predetermined price.

Perpetual contracts: similar to futures but without an expiry date, allowing positions to be held indefinitely with margin requirements.

Short selling: borrowing cryptocurrency to sell at the current market price, then buying back at a lower price to profit from the difference.

Margin trading: trading cryptocurrencies with borrowed funds.

Staking: support network via locking cryptocurrencies to receive rewards, typically in the form of more coins.

Yield Farming and Liquidity Mining: lending crypto assets in a DeFi platform to earn interest or rewards, involving complex strategies.

ICOs and Token Sales: investing in new cryptocurrency project tokens, similar to crowdfunding, with the value increase.

NFTs: buying, selling, and trading unique digital items or art represented by NFTs.

Risks in DeFi

  • Market volatility: prices of cryptocurrencies can swing wildly within short periods.
  • Security risks + smart contract risks: hackers find flaws in smart contracts and technology.
  • Liquidity risks: unable to withdraw funds e.g. vampire attack.
  • Over-collateralization: value of collateral drops, have to provide more funds to prevent losing collateral.
  • Impermanent loss: price of deposited assets drops compared to when you deposited them.
  • Lack of consumer protection: unable to receive money back if mishaps occur, such as hacks or bugs.
  • Regulatory risks: not an established global regulatory framework, differing regulations depending on the jurisdiction.

DeFi 101: A Guide For Beginners was originally published in The Dark Side on Medium, where people are continuing the conversation by highlighting and responding to this story.

Read Entire Article