# The DeFi Primer
# 1. DeFi Explained: What is DeFi?
DeFi or decentralized finance is a movement that aims at making a new financial system that is open to everyone and doesn’t require trusting intermediaries like banks. To achieve that defi relies heavily on cryptography, blockchain and smart contracts. Smart contracts are the main building blocks of defi.
It’s worth noticing that currently most if not pretty much all of the defi projects are built on Ethereum. The main reason for this is the Ethereum’s fairly robust programming language called Solidity that allows for writing advanced smart contracts that can contain all the necessary logic for the defi applications, besides that Ethereum has the most developed ecosystem across all the smart contract platforms with thousands of developers building new applications every day and the most value locked in smart contracts which create an additional network effect. In fact, all the defi protocols mentioned in this article are built on Ethereum.
## Quick History of DeFi
One of the first projects that started the decentralized finance movement was MakerDAO.
MakerDAO, founded in 2015, allows user to lock in collateral such ETH and generate DAI – a stable coin that by using certain incentives follows the price of US Dollar. DAI can be also used for saving on Maker’s Oasis platform. This recreates one of the pillars of the financial system – lending and borrowing. In fact, defi is trying to create the whole new financial ecosystem in a permissionless and open way. Lending and borrowing is only one part of this ecosystem. Some of the other important parts are stable coins, decentralized exchanges, derivatives, margin trading and insurance.
## Lending and Borrowing
Besides MakerDAO that I just mentioned there are a few other important defi projects in this category.
The main one is Compound. Compound at the time of creating this article is on of the biggest defi projects in the lending category with \~$5.6B worth of assets locked in the protocol.
Compound is an algorithmic, autonomous interest rate protocol that allows users to supply assets like Ether, BAT, 0x or Tether and start making interest. Supplied assets can also act as collateral for borrowing other assets.
Another popular defi project in this category is Aave.
## Algorithmic Stable Coin
With clever use of smart contracts and certain incentives it is possible to create a stable coin that is pegged to the US Dollar without having to store dollars in the real world. I’ve already mentioned MakerDAO that essentially allows the users to lock in their collateral and generate DAI. DAI is a good example of an algorithmic stable coin.
Besides DAI, there are multiple other non-algorithmic stable coins like USDT, USDC or PAX. The main problem with them is the fact that they’re centralized as there is a company behind them that is responsible for holding the equivalent of the value of stable coins in USD or other assets. Nevertheless, these stable coins gained a lot of popularity and are extensively used in defi applications like Compound or Aave.
## Decentralized Exchanges
Decentralized exchanges or dexes, in opposite to standard, centralized crypto exchanges, allow for exchanging crypto assets in a completely decentralized and permissionless way without giving up the custody of the coins. There are 2 main types of dexes the liquidity pool based and the order book based ones.
A few examples of the liquidity pool based ones are Uniswap, Kyber, Balancer or Bancor. Loopring and IDEX are examples of the order book based ones.
## Derivatives
Similarly to traditional finance, derivatives are contracts that derive their value from the performance of an underlying asset.
The main defi application in this space is Synthetics which is a decentralized platform that provides on-chain exposure to different assets.
## Margin Trading
Margin trading also similarily to traditional finance is the practice of using borrowed funds to increase a position in a certain asset.
The main defi apps in the margin trading space are dYdX and Fulcrum.
## Insurance
Insurance is yet another part of traditional finance that can be reproduced in decentralized finance. It provides certain guarantees of compensation in return for a payment of a premium. One of the most popular applications of insurance in the defi space is protection against smart contract failures or protection of deposits.
The most popular defi projects in this space are Nexus Mutual and Opyn.
## Oracles
Another really important although not strictly limited to finance part of the defi ecosystem are oracle services that focus on delivering reliable data feeds from the outside world into the smart contracts. The most popular project in this space is Chainlink.
These are pretty much all the main parts of the defi ecosystem. They can also be combined together in multiple various ways. We can think about them as “money Legos” as more complicated defi projects can be built on top of the existing blocks.
## DeFi vs CeFi
Let’s compare the main differences between defi and cefi that stand for centralized or traditional finance.
DeFi:
* Permissionless
* Open
* Censorship-resistant
* Cheaper
* Built on the blockchain
CeFi:
* Permissioned
* Closed
* Can be censored
* Expensive
* Built on old foundations
## What are the risks?
Before I wrap up this post I have to also mention the potential risks associated with defi.
One of the main risks are bugs in smart contracts and protocol changes that can affect the existing contracts. This is also when users can take additional insurance to lower the risk of potential issues.
Besides that, you always have to check how decentralized a defi project really is and what is the shutdown procedure if something goes wrong. Does someone have an admin key that can be used to shutdown the protocol? Or maybe there is some on-chain governance in place to make such a decision.
On top of that, you have to always account for the more systemic risk that can be caused by for example asset prices sharply losing their value which may result in a cascade of liquidations across multiple defi protocols.
Network fees and congestion can also be a problem, especially if you want to avoid liquidations and you’re trying to let’s say supply more collateral on time. Upcoming Ethereum 2.0 and second layer scaling solution can help to solve this problem.
There is also a set of more subtle features or changes that applied to one of the protocols may incentivise users to certain non-obvious actions that can cascade across multiple protocols. A good example of something like that would be a recent distribution of COMP tokens in the Compound protocol that caused users to get into seem to be non-profitable high-interest borrowing that was actually profitable due to being rewarded in the additional COMP tokens. Even though situations like that can be quite dangerous they make the whole ecosystem stronger and less vulnerable to similar situations in the future.
## Summary and the future of DeFi
As you probably already noticed, defi is a super interesting and vibrant space that is full of opportunities. Although, you have to remember that it is still a very nascent industry, so it’s a high risk and a high reward game.
Defi is the closest thing that can actually disrupt the traditional financial industry. In opposite to most of the fintech companies defi is built on the new rails instead of relying on the outdated technologies and procedures.
Currently, most of the financial products can be only created by banks. Defi is open, permissionless and enables cooperative work in a similar way to the Internet.
Although defi is currently built predominantly on Ethereum, with more adoption of interoperability protocols we may see more projects being built on different chains in the future.
Now, it's time to [compare DeFi wallets](https://www.reddit.com/r/CryptoCurrency/comments/mdjsrj/defi_explained_defi_wallets/)!
Edit: typos and layout
# 2. DeFi Explained: DeFi wallets
What are the best DeFi-friendly wallets? What features do they support? And what are the pros and cons of using each of them? I’ll try to answer these questions in this post.
## In general
Wallets, allow for sending, receiving and storing cryptocurrency. They come in many different shapes and forms, but the most popular options are:
* a browser extension
* a hardware wallet
* a mobile app
* a web wallet
DeFi-friendly wallets facilitate managing your digital assets and interacting with DeFi applications, such as decentralized exchanges or lending and borrowing protocols.
Let’s start with a wallet that most DeFi users are very familiar with: Metamask.
## Metamask
Metamask is a crypto wallet and a gateway to blockchain apps. It allows users to easily connect to all popular DeFi apps such as Uniswap, Compound, Aave, Maker and Yearn Finance.
Metamask supports ETH and Ethereum based tokens such as ERC20 and ERC721. It is basically a bridge into Ethereum.
Metamask (and all other wallets) mentioned in this post is non-custodial. This means that users have complete control and ownership over the assets stored in their wallet.
But like always, with great power comes great responsibility. Users of non-custodial wallets cannot rely on the wallet provider to recover their wallet and instead, they have to take wallet recovery into their own hands. This is usually achieved by securing a recovery phrase.
A recovery phrase, also known as a seed phrase, is a set of words that can be used to fully restore a wallet with all of its corresponding private and public keys. This means that losing access to your wallet, together with losing your recovery phrase is equal to losing all of your digital assets stored in that wallet. This is also why everyone, who decides to use a non-custodial wallet, has to take the security of their recovery phrase seriously.
The basic security measures for your recovery phrase include:
* Write it down offline e.g. on a piece of paper, preferably with multiple copies stored securely in different locations
* Never store any copies of your recovery phrase online e.g. in a Google doc or Apple notes
* Move funds to a new wallet if you have to recover an existing wallet using your recovery phrase
In Metamask, the private keys derived from the recovery phrase are stored in the user’s browser and they are not sent to an external server, for security reasons. The private keys are used to sign transactions in the user’s browser before broadcasting them to the Ethereum network. Metamask allows for creating multiple accounts where each account has its own pair of private and public keys that can be derived from the recovery phrase.
So, what are the pros and cons of using Metamask?
Pros:
* Non-custodial
* An easy to use bridge into Ethereum and DeFi apps
* Open-source
* Private keys are kept in the user’s browser
Cons:
* It is still a “hot” wallet – so the keys are stored on the device that is connected to the Internet which increases the risk
* It only supports Ethereum-based assets – this could be a problem for people who want to keep all of their assets in one place.
With over 1 million users, Metamask is usually a go-to wallet for everyone interested in DeFi. Although Metamask is mostly used as a browser extension, it also offers a mobile app. The users have an option to sync the existing wallet with a mobile app, creating a new wallet or recovering a wallet using a recovery phrase.
## Hardware Wallets
Our next DeFi-friendly wallet is a hardware device that most of the cryptocurrency users have already heard of: Ledger. Ledger allows users to store multiple assets including ETH and ERC20 tokens, Bitcoin, Litecoin or Zcash. Ledger, similarly to Metamask, requires users to write down their recovery phrase when setting up the device.
With Ledger, user’s private keys are stored offline on a secure hardware device. This provides full isolation between the private keys and online devices such as computers or smartphones that can be more vulnerable to hacks. This makes it a great option for users that have a significant amount of digital assets.
When it comes to DeFi-friendliness, Ledger has recently added a feature that allows for lending coins on Compound directly from the hardware device via the LedgerLive management app. They are also working on adding more DeFi features in the future.
Additionally, Metamask allows users to create a separate account that is connected to a hardware wallet, such as Ledger. The account behaves exactly like any other MetaMask account making navigating across multiple DeFi apps super easy. The main difference is that in order to sign a transaction, the hardware device has to be connected to your machine. A ledger device is highly recommended to anyone taking the security of their digital assets seriously.
The pros and cons of using Ledger:
Pros:
* Highest degree of security available for the everyday user
* Supports a wide range of cryptocurrencies
* Integrated with Compound via LedgerLive
Cons:
* The inconvenience of using a separate hardware device
* Requires security of the physical device (although each Ledger is also secured by a PIN code)
The most popular model is Ledger Nano S which connects to your computer via USB. Ledger also offers a range of other models including a Bluetooth-based Ledger Nano X.
## Mobile Wallets
When it comes to DeFi-friendly wallets that are available on your phone, Argent is one of the best choices. Argent makes interacting with DeFi easy by directly integrating with multiple different DeFi protocols such as Uniswap, Aave, Compound or Set Protocol.
Argent, similarly to the other already mentioned wallets, is non-custodial. When a new wallet is created, Argent creates a smart contract on Ethereum that is controlled by the user of the wallet, so Argent doesn’t have any control over that smart contract at any point. This allows for enabling extra features that wouldn’t be possible to achieve just with a simple Ethereum address.
When it comes to security, Argent uses a different recovery model. Instead of writing down a recovery phrase, users can set up social recovery by choosing “Guardians”. Guardians can be your trusted friends or family members, but also other devices such as hardware wallets, MetaMask or third party services.
In order to recover a wallet, the majority of Guardians have to provide an approval. If the number of Guardians is even, 50% is enough to proceed with the recovery.
Argent also provides an option to set daily transfer limits and even the ability to temporarily freeze your wallet, just like how you can freeze a credit card.
So, The pros and cons of using Argent in a nutshell:
Pros:
* Non-custodial
* Doesn’t require a recovery phrase
* Integrated with the most popular DeFi protocols
* Daily limits and locking option
Cons:
* Requires a good understanding of the social recovery model
* Still a limited number of DeFi protocols available (cannot just use a new one)
* Still not as secure as a hardware wallet
## DeFi Dashboards
Although they are not strictly wallets, it’s also worth mentioning two apps that make managing a DeFi portfolio much easier: Zapper and Zerion. Both apps allow users to see their portfolio in one place. A user can either connect a wallet, such as Metamask or Ledger, to be able to invest or transfer their assets or they can provide an address/set of addresses to see a portfolio in a view-only mode.
I hope this post helped you out with;
* Getting a deeper understanding of crypto wallets.
* Setting up a crypto wallet.
Not sure what DeFi is? Check my previous post [here](https://www.reddit.com/r/CryptoCurrency/comments/mctn4r/defi_explained_what_is_defi/).
Next up: [Smart contracts](https://www.reddit.com/r/CryptoCurrency/comments/me9p7h/defi_explained_smart_contracts/)
# 3. DeFi Explained: Smart Contracts
What is a smart contract? How do smart contracts work? And what are they good for? I'll try to answer these questions in this post.
## What are smart contracts?
A smart contract is an agreement between two or more parties in the form of computer code. The contracts are stored on the blockchain and cannot be changed. Transactions that take place in a smart contract are processed by the blockchain, which means they can be sent automatically without the intervention of a third party. When you enter into an agreement with a smart contract, no confidential advisor is required. The transactions only take place if the conditions in the agreement are met.
## What can smart contracts do?
Smart contracts help you exchange money, stock or anything else of value in a transparent, trustless manner, all while avoiding the services of an intermediary and the possibility of conflict. Smart contracts provide you:
* Autonomy - You are the one who makes the deal and you don't have to rely on an intermediary to confirm transactions. The execution is automatically managed by a decentralized network, which excludes manipulation of contracts.
* Speed - Automated contracts can save you hours on manual paperwork.
* Security - Smart contracts are secured with similar cryptography that encrypts websites. In short, it keeps your documents safe.
* Savings - Because they disable the presence of an intermediary, smart contracts can save you a lot of money. Where, for example, you would normally have to pay a notary to witness your transaction, this is now regulated by the blockchain.
* Backup - Unlike files on your computer, data on the blockchain is duplicated many times over. So you do not have to be afraid of losing something that is registered on the blockchain. Also, there is no way anyone can say they lost the contract or the dog ate it.
## A smart contract in effect
As an example; If you were to register cinema tickets on the blockchain using a smart contract, then as a visitor you will receive the tickets in your personal wallet. You only have to show the address to which the tickets were sent upon entry and the cinema can immediately be sure that you do not have any fake tickets and that you have actually paid for your tickets. This gives a better customer experience and the cinema can save a lot of costs in this way because it no longer needs ticket processing services.
## But why is this so safe?
Thanks to blockchain technology, we can decentralize smart contracts so that they are fair and trusted. Decentralization means that they are not controlled by one central party, such as a bank or the government.
The blockchain is a shared database managed by many different computers (nodes). As a result, not one person or company has control over it. It also means that it is almost impossible to hack it and therefore smart contracts can be executed securely and automatically without anyone being able to change them.
## Best practices for smart contracts
In principle, smart contracts can be used for any type of transaction, it does not have to be financial. Here are some industries where smart contracts can be used conveniently.
## Insurances
The insurance world could be shaken up considerably by blockchain technology. An example of a smart contract was a project run by a French insurance company called AXA. AXA offered flight insurance that were paid out if the policyholder's flight was delayed by more than two hours. AXA was running a pilot project that payed out insurance via smart contracts on the Ethereum blockchain. Unfortunately the project has been discontinued.
The smart contract worked with an “if / then function”: IF the flight was delayed by more than two hours, THEN the policyholder would be paid. Because the smart contract was connected to a database that keeps track of flight times, the function could be performed automatically and paid for via the Ethereum blockchain. This would have saved a lot of time for AXA, but also for the policyholder. This is just one example of the many options that smart contracts offer.
## Healthcare
Within healthcare, smart contracts will be used to record and securely transfer data. We can already see examples of smart contracts used in the medical industry, such as the company Encrypgen, for example. This is an application that uses blockchain to transfer patient data in a secure manner, eliminating the need for third-party access. In this way, the patients are in control of their own data. If researchers want to use patient data, they have to pay for it. The patient also chooses whether the data may be sold or not.
## Governments
Governments guarantee that it is extremely difficult to manipulate the voting system, but despite that, smart contracts could alleviate all concerns by providing an infinitely more secure system. Smart contracts could also prevent low voter turnout. Much of the small turnout is due to a clunky system consisting of lining up a queue, showing your identity, and filling out forms. With the use of smart contracts, anyone can transfer their votes securely online, which is expected to generate much more response.
## Business management
There is still a lot of room for improvement within business management and smart contracts can help a lot. Why do administration when everything is registered on the blockchain anyway? Right, the blockchain is already doing the work for you. You also do not have to make a pay slip every month. The money automatically goes to your employees as soon as they have fulfilled the agreements. Companies can simply set up a smart contract that states: IF the date is 10/20/2020, THEN $2500 will be sent to employee A. This means that employees will always be paid on time and that they will never be underpaid. The advantage of the company is that it is all automated, saving them a lot of time and money!
## Fundraising (ICOs)
In principle, anyone could create their own token and sell it to the general public in order to raise money for a project. In 2017 there was a real ICO craze, where some projects managed to raise tens of millions within hours. There was even an EOS ICO that lasted for a year and racked up more than $ 4 billion in total!
If you want to organize an ICO (Initial Coin Offering) you create a token and a contract to sell the token. The function of the smart contract in this case would be: if person A sends an X amount of ETH, person A gets an X amount of tokens.
## Smart contracts in a nutshell
The most important features of a smart contract are:
* Digital Agreement - A smart contract is an agreement in the form of computer code.
* Blockchain - Transactions are processed by a public database, based on blockchain technology.
* Confidentiality - A transaction can only take place if the conditions in the agreement are met.
## Conclusion
It will be a while before smart contracts are everywhere in everyday life, but we can say with some certainty that the technology has a lot to offer.
I hope this post helped you with:
* Getting a better understanding of smart contracts
* Understanding the significance of smart contracts within the crypto space.
Next post: [NFTs](https://www.reddit.com/r/CryptoCurrency/comments/mexb51/defi_explained_nfts/)
Wondering which crypto wallet you need? Check my post about wallets [here](https://www.reddit.com/r/CryptoCurrency/comments/mdjsrj/defi_explained_defi_wallets/).
# 4. DeFi Explained: Non Fungible Tokens
What are NFTs? And what can you do with them? In this post I’ll try to answer these questions.
## What is an NFT?
If you want to understand the concept of NFT, you must first know what a Fungible token is. NFT stands for Non-Fungible token. An important property of a fungible token or “normal” token is that they are interchangeable - You can exchange bitcoins with each other, the value is equally divisible for everyone - bitcoins can be divided into parts and you can exchange them. For example: 0.003240000 BTC.
An important difference with the Fungible tokens is that the NFTs have a unique aspect and cannot be replicated. This unique aspect is encoded in the token's metadata. Think of it as a certificate of authenticity.
## Some features of NFTs:
* They are unique, this allows you to identify items with them.
* They are not divisible.
The latter has the advantage that you can only claim right to a certain product, service or other object such as an art object. Compared to a real-life example; a football ticket for the match is for one person. You cannot share this ticket with multiple people. There is one seat available for you in the grandstand.
## What can you do with NFTs?
The NFTs have already entered the gaming industry. However, there are plenty of applications to come up with in other situations as well. Think of; birth certificate, diploma, or ID. All these unique items can be "tokenized". Tokenizen is digitizing a certain asset and linking it to the blockchain, such as art.
## NFTs vs normal tokens
Another difference between normal tokens and NFTs is the protocol they run on. The normal tokens run on the Ethereum protocol: ERC-20.
For Non-fungible tokens there is a choice of two protocols: ERC-721 and ERC-1155. Of which ERC-721 is the most used. ERC-1155 is slightly newer and less used.
The ERC-1155 protocol has been developed to enable developers to implement this protocol in a smart contract in a smart and efficient way. This can then be used to generate unlimited fungible (identical) tokens and non-fungible (unique) tokens.
The ERC-721 protocol, on the other hand, is used to generate non-exchangeable tokens, forcing developers to implement a new smart contract for each new token.
## Non-fungible tokens and gaming: Crypto Kitties
A well-known example using ERC-721 tokens is Crypto Kitties. Each ERC-721 token in that game is a unique digital cat.
You can breed these with the help of another digital cat and create new cats. The new cats can then be bought and sold on the platform.
## Decentraland
Another good example of a platform that utilizes NFT's is Decentraland. The name already gives it away: it is a (virtual) world that is completely "built" on blockchain. It can be compared to Simcity: you buy a virtual piece of land, on which you can build and develop whatever you want. Nobody decides what you can build, you are completely free. In addition to buying virtual land, you can also trade other unique assets with other players in the form of NFTs.
## Ethernity chain
Ethernity Chain, a new player to the game, is developing a community-centric platform for digital artists to create limited edition NFT lines. Ethernity Chain enables users to own unique digital artifacts and artwork, which are tokenized and traded on the blockchain. This is of particular appeal to the gaming, music and sports industries. However, the scope for NFTs is unprecedented. Ethernity Chain addresses this with the use of Authenticated non-fungible tokens (ANFTs).
## NFTs in the future: What can you expect from them
One development in which NFTs can play a major role is DeFi. Decentralized Finance. This topic has been growing in popularity in recent years. And the Non-Fungible tokens can play a supporting role in this.
Let's look at an example: a car accident. Two different parties. Two different insurance companies that have to sort everything out among themselves. They need to collect all data. This is a lot easier via the blockchain, because everything is linked. An NFT may contain data about an insurance policy or car. Link smart contracts to this, and you know: you don't have to think about anything yourself. The blockchain will solve it for you.
## Final words
In this post, you’ve learned that non-replaceable tokens are unique and have unique properties. This allows them to be associated with a specific item. In addition, items such as artwork, have different values that make it interesting to use NFTs. Especially in the gaming industry, it is becoming more popular to use NFTs.
Missed my previous post about smart contracts? You can read the post [here](https://www.reddit.com/r/CryptoCurrency/comments/me9p7h/defi_explained_smart_contracts/).
Next post: [Liquidity pools](https://www.reddit.com/r/CryptoCurrency/comments/mfk2oi/defi_explained_liquidity_pools/)
Edit: typos and layout
# 5. DeFi Explained: Liquidity Pools
You may have come across the theory of liquidity pools in the Defi ecosystem.
But what are liquidity pools and how do they work? And why do we really need them in decentralized finance? In this post I will explain how they work, their main benefits and general aspects.
## What are liquidity pools?
Liquidity pools are pools of tokens that are locked in a smart contract. By offering liquidity, they guarantee trading, and because of this, they are widely used by decentralized exchanges. DeFi platform Bancor took one of the first initiatives to include liquidity pools.
Liquidity pools, in essence, are the trading aspect of a decentralized exchange. Their role is to increase the liquidity of the market among market participants.
## How do liquidity pools work?
In its simplest form, a single liquidity pool contains 2 tokens and each pool establishes a new market for the same pair of tokens. DAI / ETH is perhaps a clear example of a popular liquidity pool at Uniswap.
The first liquidity provider, when a new pool is created, is the one who decides the initial price of the assets in the pool. The liquidity provider is encouraged to provide the pool with an equivalent value of all tokens.
Based on the liquidity provided to a pool, the liquidity provider (LP) receives special tokens called LP tokens in proportion to how much liquidity they provide to the pool. A charge of 0.3% is allocated proportionally to all LP token holders when a transaction occurred in the pool.
The liquidity providers needs to burn their LP tokens if they want to get their underlying liquidity back, plus any unpaid fees. By utilizing a deterministic price algorithm, any token swap within a liquidity pool results in a price shift. This process is also referred to as an automatic market maker (AMM).
A constant commodity market maker algorithm is used for basic liquidity pools such as the one used by Uniswap, which means that the amounts of the 2 tokens given remain the same. In addition, a pool still has liquidity, no matter how massive a trade, because of the algorithm. The main reason for this is that as the target amount increases, the algorithm increases the price of the token asymptotically.
## The importance of liquidity
The reason that liquidity is so important is that it largely determines how the price of an asset can shift. In a market with low liquidity, a relatively limited number of open orders are open on both sides of the order book. This suggests that one trade can shift the price significantly in any direction, making the stock unpredictable and unattractive. Because of this, liquidity pools are an important part of the Decentralized Finance (DeFi) revolution.
## What are liquidity pools in Defi?
Liquidity pools are intended to successfully address the low liquidity problem and thus ensure that the price of a token does not fluctuate significantly after executing the order of a single large trade.
As mentioned earlier, decentralized exchanges offer bonuses to those who invest in the liquidity pools to maximize engagement. The user has to deposit money into the liquidity pool to reap the benefits and take advantage of it. Liquidity pools are regulated by one or more smart contract protocols. The amount of funds to be invested and the proportional ratio of each token will vary between different DeFi platforms.
## How to participate in a liquidity pool?
To provide $50 in liquidity in an ETH / USDC pool, it requires a deposit of $50 in ETH and $50 USDC. In this situation, a total deposit of $100 is required. In return, the liquidity provider collects tokens for the liquidity pool. These tokens reflect their proportional pool share and allow them to withdraw their pool share at any time.
Every time a seller places a trade, a trade fee is deducted from the trade and the order is sent to the smart contract with the liquidity pool. The trading fee is set at 0.3% for most decentralized exchanges. In this case, if you deposit $50 ETH and $50 USDC and you make 1% of the pool with your donation. You will then receive 1% of the 0.3% trading fee for one of the specific trades.
## How do liquidity pool exchanges work?
There are currently two types of decentralized exchanges in the DeFi space, namely:
* **Exchange of order book:** The order book exchanges depend on a bid / ask arrangement to fulfill trades. Orders are redirected to an order book when a new buy or sell order is placed. Then the exchange's matching engine executes matching orders for the same price. Examples of order book exchanges are 0x and Radar Relay.
* **Liquidity pool exchanges:** LP exchanges exclude the emphasis of order book trading from their exchange. By doing this, they enable the exchange to keep the liquidity level stable. Examples of LP exchanges are Kyber, Uniswap and Curve Finance.
## Advantages of liquidity pools
* **Guaranteed liquidity at any price level:** Traders do not need to be directly connected with other traders as liquidity is constant, as long as clients have invested their assets in the pool.
* **Automated Pricing Enables Passive Market Making:** Liquidity providers put their money into the pool and the pricing is controlled by the pool’s smart contract.
* **Anyone can become and earn a liquidity provider:** Liquidity pools do not require listing fees, KYCs or other obstacles associated with centralized exchanges. If an investor wants to provide liquidity to the pool, he only needs to deposit the equivalent of the assets.
* **Lower gas fees:** Gas fees are reduced by the minimal smart contract design offered by decentralized exchanges such as Uniswap. Effective price calculations and fee allocations within the pool imply less volatility between transactions. Uniswap V3 will reduce the gas fees even (30%) more.
## Returns
The return of the liquidity pool depends on three factors:
* The asset prices upon delivery and withdrawal
* The size of the liquidity pool
* The trading volumes.
It is very important to remember that, in proportion to what’s originally invested, investors would end up removing some ratio of assets. This is where the market movement can work either with or against you.
## Risks of Liquidity Pool
Of course, as with everything in DeFi, you have to consider the potential risks. Some of the associated liquidity risks are listed below:
* Impermanent loss
* Possible smart contract bugs.
* Liquidity pool hacks
* Systemic risks
## Impermanent losses
Before you join a liquidity pool, I would like to stress out the impact of impermanent losses.
Impermanent loss describes the temporary loss of funds occasionally experienced by liquidity providers because of volatility in a trading pair.
This also illustrates how much more money the LPs would have had if they simply held onto their assets instead of providing liquidity.
## LP tokens
Like any other tokens, a user can use the tokens from the liquidity pool during the period of the smart contract. A user can therefore deposit this token on another platform that accepts the liquidity pool token to get additional yield to maximize returns. Therefore, the user can compose two or three interest rates using yield farming, and ultimately increase returns.
An example of such a DeFi platform is harvest.finance. Harvest.finance allows the user to stake their LP tokens and rewards them with additional rewards **on top** of their fees rewards from the liquidity pool. In harvest.finance’s case, they reward the user with FARM tokens.
So as an example: Let’s say you have deposited $100 in a USDC/ETH liquidity pool on Uniswap with an annual percentage yield (APY) of 50%. The received UNI LP tokens can then be staked at havest.finance for additional rewards, which in this case would be 70% FARM APY. This means that you would receive in 1 year:
* $50 in LP ($25 in USDC and $25 in ETH tokens).
* $70 in FARM tokens.
As you can see, by staking your LP tokens rewards can be highly lucrative. By utilizing these techniques, APY’s of over 200% can be achieved. Of course, you need to remember that the price of tokens such as FARM are quite volatile and thus are risking to turn your $70 in FARM into way less amount of $ in a matter of days.
If you are interested in yield farming, I would recommend to use DeFi dashboard zapper.fi, which gives a great overview of all current liquidity pools and farms.
## Final words
Liquidity pools provide a user-friendly platform for both users and exchanges. The user does not have to meet any special eligibility criteria to participate in liquidity pools, which means that anyone can participate in the provision of liquidity for a token pair. In the DeFi ecosystem, liquidity pools play an essential role, and the concept has been able to increase the level of decentralization.
Do you know what Oracles are? Find out in this [post](https://www.reddit.com/r/CryptoCurrency/comments/mgak48/defi_explained_oracles/).
So what's all the hype around NFTs? You can read about them in my previous post [here](https://www.reddit.com/r/CryptoCurrency/comments/mexb51/defi_explained_nfts/).
# 6. DeFi Explained: Oracles
What are oracles? How do they work? And how do smart contracts benefit from them? I’ll try to answer these questions in this post.
## Blockchain Oracles
You may have heard of the Oracle problem. This problem is actually a very simple limitation, and that is that blockchains cannot retrieve or send data themselves to an external problem. In any case, this function is not built into the blockchain itself.
As a result, blockchains are actually isolated networks that look suspiciously like a computer without an Internet connection. And that isolation is precisely what makes the blockchain so secure, because no one can access it just like that.
The participants of the blockchain network check whether everything is done according to the rules, based on the consensus algorithm. For example, they check whether the transaction has been properly signed and whether the transaction can be made within a smart contract. This also makes smart contracts very trusted. They work exactly as they are made, and it is impossible to deviate from them.
However, smart contracts must be connected to the outside world, so that they can be used in as many situations as possible. For example, smart contracts in the financial world need market information to pay for settlements, and smart contracts in the insurance world need certain information from the internet to make decisions about policy payments.
Smart trade finance contracts need trade documents and digital signatures to know when to release payments.
So you see that an awful lot of external information is needed before smart contracts can be used in all sorts of ways. And none of the above information is generated within the blockchain. So there must be a connection between the blockchain and external systems in order to set up a new infrastructure, also known as the 'Oracle'.
Blockchain Oracles therefore in fact provide the data necessary to be able to execute smart contracts when the set conditions are met. A blockchain Oracle is the only way for the blockchain to communicate with the outside world.
## What does a blockchain Oracle do?
Blockchain Oracles are therefore the bridge between the blockchain and external systems that can provide the blockchain with information. In fact, it is the man-in-the-middle that takes care of the communication between two different systems.
An Oracle has several functions to ensure that this communication can be established.
Let's talk a little bit more about Oracles' key features:
* Listens to the blockchain network to check for requests to fetch data outside the network to make smart contracts work.
* Retrieve data from different types of systems in order to be able to offer the requested data.
* Convert data to the correct format in order to allow different systems to communicate with each other. A blockchain cannot just communicate with any other system, because they are different programming languages, have different system requirements, etc. The Oracle takes care of the compatibility.
* Validate performance with a cryptographic proof that certain transactions, signatures and executions actually took place.
* Make calculations on data. Consider, for example, calculating the median, as well as performing more complex tasks, such as generating insurance quotations based on different types of data.
* Sending data and evidence to the blockchain and other systems, so that they can then perform the necessary actions. For example, smart contracts can perform actions based on the data that the Oracle sends.
In order to provide the above functions, the Oracle must work on and off the blockchain at the same time. The part that sits on the blockchain is there for establishing a blockchain connection (to listen for requests), broadcast data, send evidence, convert blockchain data and sometimes perform calculations on the blockchain.
The portion that works outside of the blockchain is for processing requests, retrieving and formatting external data, sending blockchain data to external systems, and possibly performing calculations in more advanced Oracle networks.
## Oracle examples
There are many different situations where Oracles can offer a solution. Consider, for example, betting on football matches. For example, you could place a bet with a friend about the winner of a match.
You then put this bet into a smart contract. The winner will then automatically receive the reward. But the smart contract will have to know who the winner of the competition is. The fairest way is that it happens automatically, and no person has to enter the outcome.
In principle, a smart contract does not interact with the competition. An Oracle will therefore have to be made so that the blockchain and the smart contract can read who has become the winner of the Classic.
By means of a trusted API, the smart contract can read who has won the competition. Smart contract then determines who is the winner of the bet, and the money is then sent to the winner.
In the absence of Oracle, the bet could not be settled fairly. Then there should be a person who enters who the winner is, but in that case there is a chance that this is not done completely honestly, because the importer can also enter something else.
## Chainlink
An example of an oracle platform is Chainlink. Chainlink wants to connect different blockchains as well as external systems. They do this by giving the smart contracts access to resources such as data feeds, web APIs and traditional bank details. These resources are provided by the affiliated agencies that can use the smart contracts in return. As a result, they do not have to switch to a new system themselves and can still use smart contracts. In addition to the fact that they are allowed to use these smart contracts, they also receive a reward in the form of LINK tokens for supplying data and APIs. When a party does this, they are called Chainlink Node Operators. They are then responsible for maintaining the connection between the API and the Chainlink network. The Chainlink network consists of all connected Node Operators.
## Band Protocol
Another interesting oracle platform is Band Protocol. The main difference between Chainlink and Band Protocol is that Band Protocol uses its own blockchain called BandChain, based on Tendermint, with a Delegated Proof of Stake (DPoS) consensus algorithm. It works in the Cosmos ecosystem. Chainlink, on the other hand, is not a blockchain, it is a kind of network of nodes that only work when oracles are solely focused on delivering data between entities. There is no blockchain of its own, because it is all based on Ethereum.
## Conclusion
With a blockchain Oracle we can have the blockchain communicate with central systems, so that much more is possible. Smart contracts in particular can make good use of this.
Blockchain Oracles therefore ensure that we come a little closer to a future in which blockchain can play a major role. It builds a bridge between the world as we know it today and a world as it could be if we use blockchain.
Interested in liquidity pools? Read about them in my previous post [here](https://www.reddit.com/r/CryptoCurrency/comments/mfk2oi/defi_explained_liquidity_pools/).
# 7. DeFi Explained: Wrapped Bitcoin
You might have come across the term “wrapped Bitcoin” in the DeFi space. How is it possible that (wrapped) Bitcoin is available on Ethereum, even though Bitcoin is on another block chain? And why would you use wrapped Bitcoins in the first place? In this post I’ll try to answer these questions.
## Wrapped bitcoin explained
Wrapped Bitcoin (WBTC) is an ERC-20 token, linked to bitcoin 1:1, launched on the Ethereum network on January 30th, 2019. As a result, bitcoin can be used in the largely Ethereum-powered DeFi market.
## How wrapped Bitcoin works
There are three main players in the process of obtaining WBTC: the user, the merchant, and the custodian.
To exchange Bitcoin for Wrapped Bitcoin, a user submits a request to a WBTC merchant. Traders distribute WBTC in exchange for bitcoin - or vice versa. They have also included a KYC step in the process. The traders act as an intermediary between the user and the custodians, who form the network's liquidity pool.
When the trader submits the transaction request to the custodian, the custodian chooses to allow or deny the request for WBTC. The minting and burning is done through an exchange, directly between the merchant and the custodian.
The process starts when a merchant submits a coin request through an Ethereum smart contract while sending Bitcoin to the custodian. At that point, the custodian waits for confirmation on the Bitcoin block chain, approves the request on the Ethereum network, and releases the WBTC to the merchant.
In order for the user to get their tokens, they must enter into a trusted exchange with the merchant. Once the user has his WBTC, his Bitcoin is essentially "wrapped" in an Ethereum wrapper. Hence the name "Wrapped Bitcoin."
## How wrapped Bitcoin benefits the DeFi space
Liquidity is the foundation of all finance. Lenders have no value without money to borrow. In addition, limited liquidity could kill a fast-growing financial movement. If investors rushed to DeFi and encountered one platform after another that didn't have enough liquidity, DeFi would quickly be slapped with crippling labels like 'unsustainable' and others by DeFi doubters.
Since the Bitcoin and Ethereum blockchain don't go well together, and DeFi is largely powered by Ethereum, there has been a thick brick wall between DeFi and Bitcoin investors. Wrapped Bitcoin is a sledgehammer trying to tear down that wall. If investors keep accumulating via this way, a flood of liquidity can flush into the DeFi space.
## How to add WBTC to your portfolio
Investors can go through the "wrapping" process with a trader, or they can buy WBTC on one of the several DeFi exchanges such as Uniswap. WBTC follows the price of BTC. Once obtained, you can use it to invest in DeFi protocols.
## WBTC Wrapping Fees
As with most financial services, wrapping BTC comes at a cost. These are the fees you must pay to the following entities:
* Custody fee. These are collected by the custodian when the trader chooses to mint or burn wrapped tokens.
* Merchant Fees. The merchant takes a fee from the user as payment to help him convert his BTC into WBTC.
* Sidechain transaction fees. To help prevent spam on the sidechain, there is a fee shared by all entities using a sidechain node.
## Other types of BTC
Although WBTC might publicly be the most known of BTC tokens, there are a few other ones which I would like to elaborate on:
* renBTC: REN works via a smart contract on Ethereum and a HTLC transaction on Bitcoin. When engaging with this smart contract, a balance blocking operation in BTC and the minting of RenBTC on Ethereum is carried out, and all in a decentralized way, without intermediaries.
* tBTC: A user can obtain tBTC by depositing BTC into a wallet through the tBTC Dapp within the Bitcoin blockchain. The custody method performed by a decentralized pool of custodians who each have to supply a collateral in Ether.
* sBTC: Created by Synthetix, It provides access to the value of Bitcoin without the friction of owning a Bitcoin wallet or holding it. This allows Ethereum users to gain non-custodial exposure to Bitcoin, which means they don’t need to trust an institution or protocol to hold the underlying asset. This also enables it to be used within the Ethereum ecosystem, for such purposes as trading or any one of the many others available on the blockchain.
## Final words
Wrapped Bitcoin, as well as the other variants, may be just what DeFi needs. Since it is linked to BTC and users can obtain it through a fairly simple process, it can rise. As bitcoin players, big or small, increasingly move to WBTC, renBTC, tBTC and sBTC, the liquidity boost can help DeFi soar to new heights.
For investors, this offers a new way to earn interest on bitcoin holdings by depositing the token in yield farming DeFi protocols.
* Do you know what Oracles are? Find out in my [previous post](https://www.reddit.com/r/CryptoCurrency/comments/mgak48/defi_explained_oracles/).
# DeFi Explained: 8. Forks
You might have heard of forks. A fork is a piece of cutlery, which... Oops, wrong fork! Forks play an essential role within the crypto world. New blockchains and platforms are born on a daily basis because of them. Once you understand what forks are – And what they do, it will be much easier to wrap your head around most blockchains, cryptocurrencies and tokens.
## What is a fork?
When a blockchain is getting too large, it is almost impossible to adapt new stuff to the protocol. Consider Bitcoin – Imagine that Satoshi comes up with the idea to adjust the protocol of the blockchain. This is almost impossible due to the size of the blockchain.
To make this work, he would have to make a separate version of the Bitcoin blockchain, a protocol which is different from the Bitcoin protocol. There will then be a split off from the blockchain. And this exact thing happened; consider Bitcoin Cash. The Bitcoin Cash blockchain is the same as that of the Bitcoin blockchain, but with slightly different protocols.
We call the blockchain that splits off a fork. There are then two versions of the same blockchain, with different rules. The reason why it is called a fork, is that this looks quite a bit like a real fork when you visualize it.
There are two versions of a fork. These are the soft fork and the hard fork. Let us talk a little more about them, so that you will get a better understanding what you could do with forks.
## A soft fork
First up, the soft fork. The soft fork is a new version of the blockchain that will eventually return to the original version of the blockchain.
This creates the case that some nodes work in the 'old' version of the blockchain, and other nodes work in the 'new' version. They still make blocks at the same time, but the protocols that are used are different.
## The usefulness of a soft fork
Every system needs maintenance at some point. Consider, a website, or your own laptop. It receives updates at a certain time. After these updates, certain rules in settings have been changed – For example, new security features.
There are also blockchains of whose creators would like to update the protocol. However, that is often not possible, because most blockchains are too large for this. The maker can then a use soft fork to update the protocol.
Imagine that a blockchain always gives 1 coin as a reward to the miner. The maker wants to change this to 2 coins. For this he could make a new version of the blockchain, where the protocol states that the reward is 2 coins. Some of the nodes will end up in the new part, while another part will remain in the blockchain with the old rules. Both blockchains continue to produce blocks at the same time. However, at some point someone in the old environment will make a mistake by, for example, giving 1 coin as a reward. This node was not yet aware of the new protocol. The network of the updated nodes will then correct it so that the old node can adapt to the new rules. Ultimately, all nodes are aware of the new protocol, after which the entire blockchain continues as before (but with the new protocol).
## Hard fork
With a hard fork, things are slightly different. As previously explained, with a soft fork every node can adapt to the new protocol. Now, here is the difference with the hard fork.
The nodes in a hard fork cannot or will not adapt to the new protocol. When they see other nodes following a different protocol, they will not allow and deny their blocks. That is when a new fork arises.
A hard fork can be planned, as in the case of an update, but can also be caused by a disagreement.
When a hard fork is planned, the nodes with the old protocol will be given the option to update their software with the new protocol. They can choose not to do this, so they continue to work with the old protocol in the blockchain. In most cases, the blockchain with the old protocol will die out over time, as most nodes have been updated to the new protocol.
Another scenario is that a hard fork arises because of disagreement. For example, some people may want to adjust the protocol, and others want to adhere to the old protocol. Due to this disagreement, one party decides to start a fork. Nodes can then decide whether to stay in the blockchain with the old protocol or go to the blockchain with the new protocol. In almost all cases, the new protocol will eventually lead to a separate crypto coin.
## Examples of forks
There are many crypto coins that have been created from another crypto coin. Some of them have even grown bigger than the original crypto coin. That is why it is always interesting to keep an eye on blockchains that decides to split up.
## Ethereum
You may remember the Ethereum DAO hack. In this hack, $ 55 million worth of Ethereum was stolen. This caused widespread disagreement between Ethereum's nodes. In the end there were two different groups. One group wanted to reverse the hack by modifying all the blocks from the past, while the other group was strongly against this. They felt that something like this goes against all principles of blockchain. In the end, these two groups did not came to an agreement. This caused a split in the Ethereum blockchain. The group that opposed the hack's rollback split off and started a new blockchain, is now known as Ethereum Classic.
## Bitcoin Cash
The split of Bitcoin and Bitcoin Cash was about an issue that Bitcoin had been facing for a while. It is common knowledge that it can take quite a long time for a transaction to be validated by the Bitcoin network. Because of this, many people feel that Bitcoin is not sustainable. Therefore, a group decided to increase the number of transactions in the Bitcoin blockchain. Several proposals were made, but none were received well. One of these proposals was to increase the block size. This proposal eventually led to a hard fork of Bitcoin, which is now known as Bitcoin Cash.
## Sushiswap
A fork isn’t necessarily strict to blockchains. Forks can also be started from platforms, such as DeFi platforms. Ever since Uniswap made their code open-source and available for anyone to fork, several platforms have implemented it. One of the better-known platforms that did this is Sushiswap.
Sushiswap is a fork of Uniswap and was created in 2020 by an anonymous team called Chef Nomi. Although Sushiswap started as a direct clone of Uniswap – they are both DEXES and use automated market-making where liquidity providers can add funds to liquidity pools to receive trading fees – both platforms have grown into a different direction.
The focus of Sushiswap is user-friendliness. Sushiswap enables liquidity providers to stake LP tokens for extra rewards in the form of Sushi tokens. Sushiswap also focuses on adding features of which the community has voted for. Uniswap, on the other hand, discreetly developed version 3.
## Replay Attack
In the case of blockchain forks, most investors decide to wait a while before making a transaction with the new crypto coin. This is because they might otherwise fall victim to a replay attack.
When a hard fork takes place, the two blockchains split from each other. If there are enough investors who decide to immediately buy the new crypto coin, hackers can copy the transaction to the old version of the blockchain. They can then proceed to steal crypto coins from your wallet with the transaction data. Because the blockchain is anonymous, it is not possible to find the perpetrator of the attack. In that case, the anonymity that the blockchain offers works against itself.
A replay attack can only take place in the first days of a new crypto coin. After a few days, the algorithm will solve the problem by means of replay protection. That is also the reason that most people do not buy crypto coins during the first days of the blockchain. The chance that they will fall victim to this attack is too great.
## Conclusion
Thanks to soft forks, nodes are able to update their protocol. Hard Forks give the opportunity to split nodes that do not agree with each other, and thus create new protocols. Forks keep the blockchain healthy. Even though new forks are initiated daily, they make sure that only the best blockchains and platforms will survive.
* New to DeFi lending & borrowing? And not sure where to start? [Check this post](https://www.reddit.com/r/CryptoCurrency/comments/mnzv1c/defi_explained_lending_borrowing/).
* Did you know Bitcoin is [available on the Ethereum blockchain](https://www.reddit.com/r/CryptoCurrency/comments/mh2oc7/defi_explained_wrapped_bitcoin/)?
# DeFi Explained: 9. Lending and Borrowing
DeFi had recently breached a new milestone: after breaking $100 billion TVL, it managed to be the equivalent of a top 40 U.S. bank. New investors are moving their assets to DeFi on a daily basis. And at the time of writing, lending and borrowing platforms are becoming widely popular. Which brings us to the question: What is all the fuss about lending and borrowing in crypto? And who are the big players in this game?
## What is crypto lending?
Crypto lending is an alternative investment form, where investors lend fiat money or cryptocurrencies to other borrowers in exchange for interest payments. This means there are two main parties involved in this loan:
* The lender, who will receive interest from the borrower in exchange for the loan.
* The borrower, who will deposit crypto-assets as collateral to secure the investor’s investment.
By depositing collateral, lenders can be sure that if something goes wrong the collateral will be used to compensate them. All DeFi lending services are based on blockchain, which is usually the Ethereum blockchain. This means that there are no traditional banks or custodians.
## Why Crypto Loan Rates Are So Attractive
Traditional banking does not offer any attractive interest rates anymore. Some of them even go so far as to have a negative deposit rate. No wonder many investors are looking for more lucrative opportunities in search of passive income.
Cryptocurrency lending is still a topic of debate, but more and more people are turning to crypto loans as an alternative source of income. Interest rates can even go up to 30%. DeFi is a young and evolving market and the demand for it is constantly increasing. Borrowers can take out cryptocurrency-backed loans to ensure they have available funds while avoiding losing their exposure to specific crypto assets.
The lenders are those who help provide these loans to the borrowers through DeFi platforms, and often through centralized financing (CeFi) platforms.
It is no secret that DeFi has taken the crypto lending industry a significant step forward. Let’s take a look at the advantages:
* All loans are provided through smart contracts. Every detail of the loan has been automated and verified.
* DeFi lending does not require custody to perform any operation.
* Income interest is automatically adjusted to the market.
* The interest or collateral is collected automatically, so no need to worry if the deal goes wrong.
In short, DeFi loans have proven to be a safe and easy way for investors to make their money work for them without breaking a sweat (that is if you don’t look at your investment every minute).
## The Crypto Lending Ecosystem
While crypto lending platforms are not classified as banks, they can be centralized or decentralized entities such as Nexo, BlockFi, Celsius, Aave, Yearn.finance or Compound. These crypto lending platforms play the role of the middleman in both CeFi and DeFi.
## Top crypto lending platforms in DeFi
Crypto lending platforms are springing up like mushrooms, which can be confusing for investors. So, for the sake of clarification, let’s review some of the well-known crypto lending platforms in DeFi:
## Aave
The name Aave comes from the Finnish word for "ghost" and is a lending protocol on the Ethereum blockchain.
The main feature of Aave is its open-source environment. It is a non-custodial protocol that allows for decentralized lending and borrowing. Lenders provide liquidity to the market to generate passive income, while borrowers can… well, borrow! After providing collateral of course.
Lenders earn from ERC20 compliant aTokens at a ratio of 1: 1 to the delivered assets. This means that while lending 36 Dai, they receive 36 aTokens (in this case, 36 aDai).
Interest rates are adjusted algorithmically based on supply and demand, but Aave allows borrowers to choose a stable interest rate (at any time) that changes less often. What makes Aave unique is its latest feature: flash loans. This feature allows borrowers to borrow any available amount of assets without collateral.
## Compound
Compound is an algorithmic money market protocol on Ethereum that, like Aave, allows you to borrow or lend money and earn interest for providing collateral. The interest rates are automatically adjusted based on supply and demand.
As in the case of Aave, asset balances provided are represented by ERC20 minted tokens, but in Compound’s protocol they are called cTokens. When the investors received their cTokens, which is after providing collateral, they can borrow up to 50-75% of their cTokens value depending on the type of the underlying asset.
The Compound Protocol reserves 10% of the interest paid as reserves; everything else goes to the lenders.
## Yearn.finance
The Yearn Finance platform communicates with several other DeFi protocols on the Ethereum blockchain with the aim of maximizing the investors’ returns. It can be described as a AI advisor for DeFi returns. Because of this, investors can earn the most from lending their stablecoins. Yearn works purely based on codes without a financial intermediary.
Yearn has an automatic reward system has been developed based on the YFI token. The Yearn platform consists of several products:
* Earn - Earn indicates where the highest interest can be earned by lending a crypto asset. Earn searches across different lending protocols such as Balancer, Aave and Compound to find the best interest rate. Users can deposit DAI, USDC, USDT, TUSD or sUSD on the yearn.finance platform to start earning interest.
* Vaults - a collection of investment strategies designed to maximize returns from other DeFi projects and operate as actively managed investment funds. The use of these decentralized funds does not come without risks. The yDAI vault was robbed of $11 million dollars due to a vulnerability on February 5, 2021.
* Zap - allows to combine and execute different trades with one click to save time and money. Thus, an investor can instantly trade DAI for yCRV in one click instead of three different actions across the Yearn.finance and the Curve Finance platform.
* YFI tokens - Users can earn YFI tokens by placing cryptocurrencies in Yearn.finance contracts running on the Balancer and Curve DeFi trading platforms, which use the Yearn.finance platform.
Because of these features, Yearn.finance provides an extensive yield farming service that enables users to capture crypto assets in a DeFi protocol in order to automatically earn more cryptos and achieve better returns.
## Top crypto lending platforms in CeFi
While writing this article, gas fees on the Ethereum blockchain are reaching absurdly high numbers. This makes investing in DeFi for smaller investors not profitable. They could, however, consider CeFi platforms. With CeFi, investors trust the people behind a business to ethically manage funds and execute on services the business is offering. This differs from DeFi, where investors trust that the technology will function as intended to execute on services being offered.
## Nexo
Nexo is a cryptolending platform founded in 2018 by the same people that were behind Credissimo, which is an organization that has more than 10 years of experience in offering loans. It is probably the most known CeFi platform of this list. Like Compound and Aave, Nexo offers a service that allows you to act as both a borrower and a lender. The platform is especially interesting for investors who think that they currently receive too little interest on their savings account (which is everyone). At Nexo you receive up to 8% interest on your euros, dollars, pounds or stablecoins.
The benefits of Nexo are:
* Fully licensed and regulated.
* Insurance up to $ 100 million (BitGo Custody).
* Fully automated platform.
* Processed more than $ 1.5 billion.
* 8% interest for lenders.
* Flexible loan with 5.6% interest for borrowers.
* All loans are 100% covered.
It’s also worth noting that Nexo is developing a payment card called the Nexo card, which allows investors to spend the value of their digital assets without having to sell them.
## Block.fi
BlockFi is a peer-to-peer credit marketplace that was founded in 2017 by a number of key figures from the financial sector. Block.fi supports the following coins: Bitcoin, Litecoin, Ethereum and Chainlink. They also support USD stablecoins. Like the other platforms, interest can be compounded. BlockFi charges a withdrawal fee, which is deducted from the total withdrawal amount. Investors get 1 free withdrawal per month, so if you plan your withdrawals strategically, you pay no fees at all.
## Celsius network
Although not supporting US investors, Celsius carved a name for itself. The Celsius Network was founded in 2017 by Alex Mashinsky (CEO), Daniel Leon (COO) and Nuke Goldstein (CTO). Celsius is currently working with \~250 large institutional investors. These companies borrow crypto from Celsius on which they pay an interest of 16%. That is a high interest rate, but that is because these companies often have no other choice, because they are limited by law. For example, most institutional investors are not allowed, to invest in crypto because of the volatility. This is circumvented by borrowing crypto. The companies deposit dollars as collateral, putting Celsius at minimal risk. This is also exactly how users can borrow from Celsius.
Of that 16% interest paid by Celsius' institutional clients, 80% goes to Celsius users. The amount of interest you get on your crypto depends on which crypto coin(s) you have deposited and your loyalty level. It is worth noting that as of writing, unlike Nexo and Block.fi, Celsius has never been hacked, doesn’t have withdrawal fees and offers the highest lending interests (\~10%).
## Final words
DeFi (and CeFi) crypto lending platforms are experiencing a hype that has attracted billions of dollars from investors. Based on these numbers, it can be concluded that migration from banking to blockchain and exchanges seems like a natural next step for the entire crypto niche and will most likely keep continuing and evolving.
* Did you know most new crypto currencies are [initiated through forks](https://www.reddit.com/r/CryptoCurrency/comments/mnbc6i/defi_explained_forks/)?
EDIT: I forgot to mention the website [https://defipulse.com/](https://defipulse.com/). It shows the top platforms in DeFi for different catagories. It helped me out a lot.
# DeFi Explained 10: Margin Trading
The year is 2021. DeFi is booming. Loan and yield farming platforms are incredibly popular: Billions of dollars circulate in them. But, DeFi also has its margin and derivatives platforms. First-time investors typically stay far away from these platforms – which they should. Nevertheless, it is important to talk about these platforms and explain how they work. So, In this article, the focus is on margin trading and it’s DeFi platforms.
## Margin trading
In essence, margin trading is investing with borrowed money. It allows you to buy more financial products (such as stocks, options or futures) than you have available in money. The use of this borrowed money is also called leverage. This ensures that profit results are increased and can thus ensure higher returns. However, it also has a bigger risk of larger losses. In margin trading, the user’s portfolio serves as collateral and, when prices are falling, this can lead to a margin call.
## How margin trading works
Margin trading, simply put, is leveraged investing. The leverage is determined by the investor. The concept of margin trading is most easily explained with an example:
Let’s say an investor has a wallet with $10.000 of ETH and buys for $15.000 in ETH. In this case, the investor buys $5.000 in ETH above of what he was able to buy with the amount in his wallet. The extra $5.000 in ETH is bought with money borrowed from the broker. So, the investor buys the $5.000 in ETH "on margin" and pays interest on this borrowed amount.
## Pros and cons of margin trading
The advantages of margin trading are:
* It enables investors to take larger positions. Should the investor prove right and the price does indeed move in the right direction, the profits are higher due to the use of leverage.
* Some financial products, such as USD currencies, are usually not very volatile. The use of margin can ensure that high returns can still be made, although the risks also increase with leverage.
Some of the disadvantages of margin trading are:
* Using leverage allows results to be magnified. When a trade goes wrong, an investor will therefore have to deal with greater losses.
* Margin trading ensures that investors may be faced with a so-called margin call, with which they can lose more than their investment. In a margin call, the investor has to add money or close part of his portfolio, because the leverage has become too great in relation to the equity capital. With cash accounts there is no leverage and the maximum loss is therefore limited to the deposit.
* Like borrowing, the use of margin is not free. The interest 1. depresses the return and 2. it may be flexible. The latter can cause interest costs to fluctuate. Using margin makes the portfolio more volatile. It is therefore advisable when you use margin in your portfolio to keep a close eye on it.
## Margin trading DeFi platforms:
There are fewer margin trading platforms in DeFi than "regular" DeFi exchanges. Let's take a look at the 2 best-known DeFi margin trading platforms on the Ethereum blockchain.
## dYdX
dYdX is a decentralized trading platform for margin trading in combination with a lending & borrowing marketplace. Lenders and borrowers can gather here and earn interest on an Ethereum (ETH) basis, use loans and leverage on the trading platform. The dYdX trading platform runs on smart contracts, on the Ethereum blockchain without intermediaries. It is a great defi project that works completely transparently. dYdX currently has one of the largest volumes and has a lot of liquidity compared to other decentralized crypto exchanges. Investor will have to deposit collateral before trading.
dYdX supports the following trading features:
* Spot: Investors can buy and sell currencies “on the spot”. This is the most standard form of investing.
* Margin: With this feature, investors can use a leverage of 2x to 5x on their spot trade.
* Perpetuals: For even higher leverage, investors can leverage their investment up to 10x via this feature.
dYdx supports the following currency pairs: ETH-DAI, ETH-USDC, and DAI-USDC. More currency pairs are being added over time. It is also worth to mention that dYdX offers 2 different types of trades: Isolated and Cross. Isolated assigns a specific amount of an asset as margin. Cross utilizes all positive balances in your dYdX Margin Account as margin.
Just like the platforms described in my previous post about lending and borrowing, dYdx also supports traditional lending & borrowing options. Currently, the dYdX Ethereum DEX supports the following digital assets: ETH, DAI and USDC. A loan must be backed by collateral, covering 125% of the loan and must be kept above a minimum of 115%.
## Fulcrum
Fulcrum, like dYdX, is a decentralized trading platform. It enables trustless and permisionless transactions, without fees. It sets aside 10% of the accrued interest for the maintenance of the platform and the insurance fund. Fulcrum uses smart contracts, and works on both the Ethereum and Binance blockchain. The platform supports more than 10 cryptocurrencies for loans, and dozens of currency pairs for margin trading. Like dYdX, the investor will have to deposit collateral before a leveraged position can be taken.
Fulcrum only supports the margin trading feature, where the leverage can be increased up to 5x. No spot or perpetuals tradings can be performed on this platform.
As mentioned earlier, Fulcrum also supports traditional lending & borrowing features with a wide range of cryptocurrencies. The lending rates of both fulcrum and dYdX are higher than those of Aave and Compound. What I personally like about Fulcrum is its user-friendliness, thanks to its minimalistic yet colorful interface.
## Conclusion
Margin trading is a high risk/reward game which should only be exercised by experienced investors. Both fulcrum and dYdx are designed to be robust yet simple platforms for margin trading and lending that takes full advantage of the benefits of smart contracts and decentralization.
* Interested in platforms such as Synthetix? Read my post about [derivatives](https://www.reddit.com/r/CryptoCurrency/comments/mt8c67/defi_explained_derivatives/).
* Missed my post about DeFi lending and borrowing platforms? [Read it here.](https://www.reddit.com/r/CryptoCurrency/comments/mnzv1c/defi_explained_lending_borrowing/)
EDIT: Margin trading is risky. This post should not be interpreted as finacial advice. DYOR.
# DeFi Explained 11: Derivatives
Traditional banking does not offer any attractive interest rates anymore. Some of them even go so far as to have a negative deposit rate. Because of this, It is getting more popular by the day for investors to move their money from their banking account to centralized exchanges to buy stocks or crypto. And then there are investors who take it even further: They invest in DeFi. It is common knowledge to spread your investments in, for example, various stocks, crypto and indices to minimize risks. In case of stocks and indices, this would still require the investor to invest via centralized exchanges. Except… they don’t have to. At least, not anymore.
## Stocks in crypto
The DeFi market is gaining more and more platforms that allow investors to invest in regular stocks such as Tesla, Apple or Google. These products are called synthetic assets and are in fact derivatives. By investing in these products, investors can still trade “shares” of companies via DEXES, and therefore spread investments more widely.
Now, the term derevatives might not ring a bell, and that’s ok. Before we dive into some DeFi platforms that use derivatives, let’s first explain what they are.
## Derivatives
Derivatives are financial products based on an underlying asset, such as shares or commodities. A derivative gives the buyer the right to buy or sell a specific commodity at a specific price. The most well-known derivatives are options, swaps and futures.
These derivatives can have different underlying values, such as a stock, stock index, commodity or currency. They are mainly used to hedge risk or to speculate.
Financial derivatives are traded on the stock exchange, but also between parties. This is called over the counter (OTC). Derivatives owe their popularity to the fact that the contracts are standardized. The products are therefore easy to trade and the liquidity is high.
Because derivatives are available on stock exchanges, it is possible to take a position in the underlying asset through this product, such as a share or a commodity such as oil.
## Types of derivatives
Here is an overview of the most common derivatives you’ll find in centralized exchanges:
* Futures: A future is a forward contract in which the buyer and seller set a price and time at which the underlying financial product is delivered. The traders enter into an obligation by means of a future. Futures are available for financial products such as stock indices and government bonds, as well as physical products such as gold, silver and oil.
* Options: An option is a financial product that gives the buyer of the option the right to buy shares at a predetermined price. In addition, the date on which the right can be exercised has also been determined, the so-called expiry date. The price at which the option is traded is called the option premium.
* CFDs: The abbreviation CFD stands for Contract For Difference. With this product, an investor can easily speculate with leverage on a price rise or fall. With a CFD, the buyer and seller agree to settle the difference in value of the underlying asset from the moment of agreement.
* Swaps: An interest rate swap is a financial product in which two parties exchange interest payments. An interest rate risk can be hedged or an interest position can be taken by means of this derivative. The value of the swap depends on the interest rate.
## Risks of derivatives
In view of the many negative experiences that individuals (and companies) have with financial derivatives, the risks of these products are always emphasized. It is recommended that you read carefully about how a derivative works before you start trading them.
The most important risks are:
* Leverage: Due to the leverage effect, a small price movement in the underlying asset can already cause a large change in the value of the derivative. From a technical point of view, losses can often even be unlimited. On the other hand, it goes without saying that an enormous profit can be made through derivatives.
* Counterparty risk: Counterparty risk is mainly run with an over-the-counter transaction. As a private investor you usually have little to do with this. Nevertheless, it is important to know exactly what the risk entails.
Now, with that out of the way, let’s look at some of the DeFi platforms that support synthetic assets.
## Synthetix
Synthetix is a decentralized protocol for deploying synthetic assets on the Ethereum network. The project also includes the Synthetix.Exchange. The deployment of synthetic assets is done through Ethereum tokens called Synths, which can replicate the value of cryptocurrencies such as Bitcoin or Ether. The value can also be replicated of more traditional stocks such as Apple shares (AAPL). The protocol uses its own Ethereum token, SNX, to ensure the proper functioning of its services. SNX is thus used as a guarantee for the stability and liquidity of the various Synths offered to the users.
The difference between Synths and “regular” tokens is that their value fluctuates in relation to the underlying asset they replicate. To take a simple example: sBTC will have a similar value to traditional BTC. This allows the investor to take advantage of the fluctuations of the underlying assets without having to own them directly.
The following Synths are available:
* Cryptocurrencies such as BTC, ETH and BNB.
* Fiat currensies such as USD, EURO and JPY
* Stockindices such as gold- and silverindices.
* Inverse Synths, such as inverse Bitcoin.
## UMA
UMA, short for Universal Market Access, is an Ethereum-based protocol that allows users to create custom synthetic tokens that can track the price of just about anything. To be more specific, UMA allows you to trade any asset with ERC-20 tokens without any real exposure to the asset itself. This allows anyone to access assets that would otherwise be out of their reach. The UMA token is used for protocol management and price oracle.
Since an investor can use almost any asset as collateral with UMA, you can use, for example, cUSDC. cUSDC is received after depositing USDC into Compound. In this example, cUSDC accrues the interest from the initial USDC deposit. With this token, it is then possible to create a synthetic token. This synthetic token can represent, for example, the price of gold. This token not only tracks the price of gold, but also earns 10% interest per year through the USDC that is locked.
## Final words
The DeFi derivatives market is growing. Thanks to platforms like UMA and Synthetix, it is now possible for investors to invest in synthetic assets, which would normally only be possible via CeFi. It is therefore expected that derivatives platforms are going to play a major role in future derivative investing.
* Interested in DeFi indices? [Click this link](https://www.reddit.com/r/CryptoCurrency/comments/muonht/defi_explained_indices/)!
* You might have missed my previous post about [margin trading](https://www.reddit.com/r/CryptoCurrency/comments/mslzt8/defi_explained_margin_trading/).
# DeFi Explained 12: Indices
In traditional stock markets, millions of dollars are invested into Index funds. The most popular category of index funds are ETFs, which are passively managed funds that fill their investment basket by tracking a particular index. This makes it easy for investors to have good spreading in their portfolio without putting too much effort and time into managing it. Crypto also has its indices, which are very similar to how ETFs work. Typically, crypto indices track currencies or tokens. Before we talk about crypto indices – For the sake of clarification – Let's first focus on what ETFs exactly are and how they work.
## What are ETFs
Exchange Trades Funds (ETFs) allow investors to invest in a basket of securities such as stocks, bonds, commodities or a mix of these. This offers the investor diversification benefits. Investing in ETFs has become increasingly popular in recent decades.
ETFs are mutual funds that want to track the performance of a basket of securities. For example, if you buy an ETF that tracks all of the securities within an index, you can invest in all of the securities in that index by purchasing just one ETF.
An ETF is also referred to as a publicly traded fund because it is traded on a stock exchange just like stocks. The price of the ETF changes during the trading day as they can be traded in the market. This differs with mutual funds as they can only be traded once a day after the stock markets close.
## Types of ETFs
There are different types of ETFs available on the market. Each ETF has a prospectus and a fact sheet that describes the characteristics of the ETF, such as composition, objectives and risk. These documents are available on the website of the ETF issuer.
Below are some examples of ETF types.
* Index ETFs track a basket of stocks that are comparable to a particular index.
* Bond ETFs can consist of a basket of government bonds, corporate bonds, and government and local bonds.
* Sector ETFs track securities from a particular sector, such as technology, banking, or the oil and gas sector.
* Commodities ETFs can consist of commodities such as oil or gold.
* Currency ETFs invest in currencies such as the euro or the Canadian dollar.
* Blockchain ETFs own stocks in companies that have business operations in blockchain technology or in some way profit from it. The blockchain ETFs are out of the scope of this article.
## Tracking methods
The tracking methods the ETF uses to track the underlying securities may vary. The tracking method can be both physical and synthetic. Physical ETFs try to track their target composition by holding all, or at least a representative sample, of the underlying stocks that make up the index. For example, if you invest in an S&P 500 Index ETF, you own any of the 500 stocks represented in the S&P 500 Index, or a subset of them. Physical replication is fairly straightforward and transparent. Most ETF products are physical ETFs.
A synthetic ETF is designed to mimic the performance of an underlying composition using derivatives (eg S&P 500 futures) and swaps instead of physical stocks.
## Indices in Crypto
Now, with the fundamentals out of the way, let’s see what kind of DeFi indices are out there.
## PieDAO DEFI+L
DEFI+L is a tokenized representation of the biggest projects on the Ethereum blockchain. When an investor buys DEFI+L, the smart contract either purchases the underlying assets from Uniswap or other decentralized providers, or uses tokens available in the investor’s wallet, sending them to the treasury. In this way DEFI+L tokens are fully backed by reserves, redeemable at any time at the press of a button.
The DEFI+L index is built using Balancer smart pools which constantly rebalance and react to market changes in real-time.
It’s also possible to stake DEFI+L in the DEFI+L / ETH pool. Investors are able to provide liquidity in return for a steady stream of DOUGH. This pool enables an efficient market for other investors to easily swap in and out of the DEFI+L token.
At the time of writing, the underlying assets in which this index is investing is as followed:
* YFI (Deposited in the Aave lending protocol)
* Aave (HODL)
* SUSHI (Staked at Sushiswap)
* UNI (Deposited in the Compound lending protocol)
* SNX (Deposited in the Aave lending protocol)
* MKR (HODL)
* COMP (Deposited in the Compound lending protocol)
* LINK (Deposited in the Aave lending protocol)
## PieDAO DEFI+S
DEFI+S is a tokenized representation of the most promising projects in the space. Like DEFI+L, when a user buys DEFI+S, the smart contract purchases the underlying. If the investor holds all the required tokens in his wallet, the tokens can be directly bought as well. In this way DEFI+S tokens are fully backed, and can be redeemed at any time at the press of a button.
This index is also built using Balancer smart pools. For both DEFI+L and +S indices, there is no withdrawal fee.
At the time of writing, the underlying assets in which this index is investing is as followed:
* UMA (HODL)
* REN (HODL)
* LRC (HODL)
* BAL (HODL)
* PNT (HODL)
* MLN (HODL)
## DeFi Pulse Index
The DeFi Pulse Index (DPI) is another index that tracks the performance of DeFi assets on Ethereum.It was the first of its kind by deploying an index of decentralized finance that isn’t synthetic or a derivative and lets the investor own the tokens that comprise the capitalization weighted index. Like DEFI+L and +S, DeFi Pulse Index tokens are directly redeemable for its DeFi tokens.
DPI is built on Set Protocol’s new v2 infrastructure and is automatically rebalanced. Still, the DeFi Pulse team manually curates the index as well.
Currently, DPI invests in the following assets:
* UNI
* Aave
* MKR
* SNX
* COMP
* YFI
* SUSHI
* REN
* LRC
* BAL
* KNC
* FARM
* CREAM
* MTA
## sDEFI
sDEFI is an index token developed by the community of Synthetix. Synthetix is one of the leading on-chain synthetic assets and derivatives trading platforms on Ethereum. sDEFI can only be purchased on the Synthetix Exchange with Synthetix’s native stablecoin, sUSD. As such, sDEFI is not only an attractive financial instrument covering the performance of the DeFi market, it’s also a unique value proposition of the Synthetix project in general. It is import to note that sDEFI is comparable to a synthetic ETF: it is designed to mimic the performance of underlying composition by using derivatives. In sDEFI’s case, Chainlink price oracles are used to track the prices of the selected tokens.
As of writing, the sDEFI index includes the following tokens:
* Aave
* SNX
* YFI
* UNI
* COMP
* MKR
* BAL
* CRV
* KNC
* REN
* UMA
* WNXM
## Conclusion
With so many high potential DeFi projects launching on the Ethereum platform, it can be very difficult for investors to separate the wheat from the chaff. Luckily for them, DeFi indices can help investors with setting up healthy portfolios with little to no maintenance from the investor’s side.
* You might like [my post about derivatives](https://www.reddit.com/r/CryptoCurrency/comments/mt8c67/defi_explained_derivatives/).
# DeFi Explained 13: Consensus Algorithms
Every day, millions of transactions are performed on various blockchains. To perform a transaction, one has to pay a transaction fee. Transaction fees are paid to cryptocurrency miners in exchange for their transaction verification work.
All transactions that take place on the blockchain are verified by a consensus mechanism on the network. In short, a consensus mechanism is a fault-tolerant mechanism that is used in computer and blockchain systems. It is used to achieve the necessary agreement on a single data value or a single state of the network among distributed processes or multi-agent systems, such as with cryptocurrencies.
Now, Let’s take a deeper dive into what kind of consensus mechanism are used in blockchains.
## Proof of Work
Proof of Work is a protocol with the main purpose of countering cyber attacks such as a DDoS attack. Proof of Work is an idea originally published by Cynthia Dwork and Moni Naor in 1993. In Nakamoto's 2008 Bitcoin white paper, Proof of Work is perhaps the greatest idea, as it allows for trustless and distributed consensus.
A trustless and distributed consensus system ensures that (for example in the case of Bitcoin) a payment can be made and received without the need for a third party. Traditional payment methods (Banks, CreditCard, Paypal) require a party to handle the transactions. These parties also keep their own register of the transaction history. With Bitcoin and other cryptocurrency, everyone has a copy of this register (blockchain). No third party is required because everyone can immediately verify the information / transactions.
Back to Proof of Work. This protocol is a prerequisite for the intensive form of calculations (also called mining) that must be performed to create a new group of trustless transactions on the blockchain.
Mining is necessary for two reasons:
1. Verifying the legitimacy of transactions.
2. Create new digital cryptocurrency by rewarding miners for performing reason 1.
To verify these transactions, miners have to solve a mathematical puzzle. The first miner to solve this problem gets the reward (in new cryptocurrency). Verified transactions are stored in the public blockchain. This puzzle is a bit more difficult with each new block. That is why miners have to work more efficiently.
## Proof of Stake
Proof-of-Stake is the validation of transactions and the creation of blocks on the blockchain by means of the betting (staking) of crypto coins. In contrast to Proof-of-Work, where transactions are validated through the use of computer power.
With Proof-of-Stake, nodes validate the transactions and node create blocks by putting their crypto coins in a stake wallet. These crypto coins must remain in this wallet and cannot be traded. With a normal version of Proof-of-Stake, people with few crypto coins will not be able to stake. The more crypto coins you have, the more likely you are to be chosen by the network as a node.
When one has 1,000 crypto coins, one is 10 times more likely to be chosen as a node than someone who has 100 crypto coins. A node that staked more crypto coins is therefore more likely to create a new block on the blockchain and validate transactions. Therefore, it will make more money than a node that puts in less money.
Why does a node behave in the group interest? Can't a node act in self-interest and validate transactions in its own interest? This could be done when a node has a majority. This is 51% of all crypto coins and therefore hardly affordable by anyone. Furthermore, a node will never do this. A node uses its crypto coins to be able to validate transactions. When a node does not act in the group interest, a node will run a great risk of losing the crypto coins and no longer being admitted to the network.
## Proof of Stake variants
Over the years, many new Proof of Stake variants have been created. These so called enhanced versions try to improve the original Proof of Stake consensus mechanism by implementing small changes such as how users are chosen to be the next staker, or how to create better user and transaction anonymity. Let's take a look at what kind of POS variants are out there.
### Proof of Storage
Instead of using a blockchain, the Proof of Storage network uses a blocktree. Also instead of seeing every single transaction listed, the user will only see transactions that are relevant to them. Each node on the blocktree contains a blockchain.
### Proof of Stake Time (PoST)
Proof of Stake Time uses coin age. Coin age is a way to display how long a coin has been in one's possession in order to prioritize it for use in transactions or mining. It is calculated by multiplying the number of coins by the average amount of time in blocks they have been possessed.
With Proof of Stake Time, instead of using the amount of coins to calculate age, they use the period of time the coins have been held at the specific address. This method was implemented to avoid making the rich, richer, which many Proof of Stake methods do.
### Proof of Stake Anonymous (PoSA)
With Proof of Stake Anonymous, all transactions are made invisible by other nodes of the network. These nodes receive rewards for helping in the anonymization of the transaction. Other nodes provide inputs and outputs to the transactions, making it impossible to determine the source and destination of the transaction.
### Proof of Checkpoint (PoC)
Proof of Checkpoint is a hybrid system that utilizes any Proof of Stake system with a Proof of Work system. The idea of this concept is to mitigate attacks on the Proof of Stake system; however, it is still subject to an attack on a node that has been offline for an extended period of time and can in turn be used to provide false information about the blockchain.
Every x amount of blocks on the Proof of Stake system requires a Proof of Work block to be mined. Each Proof of Work block contains no transactions and are directly linked to both the Proof of Work network and the Proof of Stake network.
### Proof of Stake Velocity (PoSV)
Proof of Stake Velocity rewards users based on how many coins they have and how actively they use them.
### Delegated Proof of Stake (DPoS)
The way Delegated Proof of Stake works is that it has users voting for "delegates" who are then given the power to earn rewards from running a full node. This method is supposed to be more efficient and should protect all users from unwanted regulatory interference.
### Proof of Activity
Proof of Activity (POA) was proposed as a variation to Proof of Stake. It is a method that compliments Proof of Work and helps prevent a 51% Attack, which is when a user or pool controls 51% or more of a network's mining hashrate. Proof of Activity, in short, selects a random peer from the network to sign a new block. This method requires continuous data exchange. In order to reduce traffic, the block template does not include the transaction list and is instead added by the last signer.
### Proof of Burn (PoB)
The way Proof of Burn works is that users are providing proof that another user have burned some of his/hers coins, in the process of sending a transaction to an address that is unspendable. This method only works with coins mined from Proof of Work crypto currencies. Users will try to burn the most amount of coins to hopefully win the block reward. Most times Proof of Burn has been introduced to seed other coins by destroying the value of one.
### Proof of Importance (POI)
Proof of Importance was introduced to promote economic activity. Each account is assigned an importance score that proxies its aggregate importance to the economy. This method helps make sure that all the computers on the network agree with each other and can stop people from spending coins they do not have. Users who are important can harvest and earn rewards.
### Proof of Capacity (PoC)
Crypto currencies that utilize Proof of Capacity, also known as Proof of Space, use Hard Drive Mining to validate new blocks. Burst coin was the first to introduce this concept. Proof of Work miners burn resources whereas Proof of Capacity allows you to use allotted space on your hard drive to mine. An algorithm is used to create chunks of data called plots by repeatedly hashing public keys. The more space that you have, the more likely you are to mine a block.
## Conclusion
Consensus mechanisms are essential to the functioning of distributed systems such as blockchains. There is no “perfect” consensus mechanism, and chances are that there never will be, but it sure is interesting to see newer cryptocurrencies coming out with their own consensus mechanism protocols.
​
* Not sure what ERC-20 tokens to invest in? [Read my post about Indices](https://www.reddit.com/r/CryptoCurrency/comments/muonht/defi_explained_indices/).