Avark
Jump to section
    Tags

    Published 24th June 2021

    A Beginners Guide To DeFi

    A Beginners Guide To DeFi Image

    Decentralised Finance has the potential to revolutionise financial services, quickly proving to be an alternative to central banks. We've pulled together a beginners guide to the emerging world of DeFi!

    CeFi vs DeFi

    Centralised Finance (CeFi) is the traditional fiat system that is most commonly used across the world. Financial services are offered by central authorities that are owned by either a person or a company. This has created room for corruption, fraud and mismanagement.

    Cryptocurrencies however are decentralised, which has led to the creation of decentralised finance (DeFi) where intermediaries like banks and PayPal are not needed for transactions to take place. This has many benefits, such as security due to immutability and transparency, as well as availability through permissionless access.

    Consequently, there are no centralised authorities in the crypto world to provide financial services such as loans, savings plans and stock markets.

    dApps

    Blockchain technology works as the infrastructure for programming and running decentralised applications (dApps). The most commonly used blockchain is Ethereum. Automated code can be uploaded to the blockchain in the form of a smart contract to manage any financial service a user would like to create.

    Smart contracts are the basis of dApps, they are used to determine the rules on how a service will work. Once the rules are in the smart contract they become immutable, meaning no one can manipulate, defraud or corrupt them.

    These decentralised apps are the building blocks of DeFi. In this article, we will run through some of the other key components of the DeFi ecosystem.

    Stablecoins

    The first thing any financial system needs is money. Traditional fiat currencies such as the USD and GBP are not decentralised, so they can’t be used within the DeFi ecosystem.

    Well known cryptocurrencies such as Bitcoin or ETH are decentralised but are far too volatile for a reliable financial system. They have a smaller market cap than traditional fiat currencies, which is the reason for their high volatility.

    Imagine the effect of throwing a rock into your bath, now imagine throwing that same rock into the ocean. The rock will have a much larger effect on the bath than the ocean. This is how market changes affect cryptocurrencies compared to fiat currencies.

    This has led to the creation of stablecoins, a new form of decentralised cryptocurrencies that are pegged to the value of real-world assets. These assets can include gold, property, fiat currency and even other cryptocurrencies.

    One example is USDC, the United States Dollar Coin. This is a cryptocurrency backed by the Dollar. When using USDC there is no need for a bank account, no geographical limitations, no pricing limit on transactions and very little transaction costs.

    Stablecoins like USDC are used in DeFi, but it’s recommended to use coins backed by collateral for borrowing, lending and other functions of DeFi. A good example of a stablecoin that is used in DeFi is Dai by Maker.

    MakerDAO’s Dai

    The perfect answer to currency in the DeFi world is coins like Dai, a product of Maker. Maker is a decentralised, autonomous organisation – or DAO for short – that was built on the Ethereum blockchain.

    Dai is pegged to the value of the US dollar, but is backed by a reserve pool of ETH. This reserve pool is used as collateral to build trust between MakerDAO and its users.

    Dai is the perfect coin for DeFi services including borrowing and lending. This is due to the stability of Dai, achieved through being pegged to the US dollar and the trust created through the collateral pool.

    The dApp used to generate or buy Dai is called Oasis. Oasis allows users to borrow Dai against their crypto such as ETH.

    DEX – Decentralised Exchange Platforms

    A DEX is different from normal exchange platforms such as Binance and Coinbase. An exchange platform is centralised, regulated with KYC rules and requires a user deposit. Users submit a buy or sell order which is recorded by the centralised body in an order book; when a match is located the order goes through.

    On the other hand, a DEX is decentralised. It’s governed by a smart contract that is executed by a set of independent computers.

    This means exchanges can’t be regulated by a central authority. Exchanges are permissionless, meaning they are open to everyone. They also don’t require any form of account or identification. The only thing users need is a digital wallet.

    Liquidity on a centralised exchange is determined by the number of orders. The more users in the order book means more liquidity. If there are fewer users, there is less liquidity and a trade is harder to make.

    However, DEX’s don’t rely on an order book. Liquidity on a DEX is created by liquidity pools that are generated by liquidity providers (LPs). In return for the depositing liquidity, LPs receive a portion of the DEX’s trading fees. This process is called liquidity mining.

    Another difference is the way prices are determined. On a centralised platform, a buyer and a seller agree on a price. That determines the price until a trade happens for a different price.

    Each DEX uses an algorithm to determine the price. This is known as an automated market maker, or an AMM. An example of a DEX with its own AMM is UniSwap.

    UniSwap

    UniSwap is a dApp that is built on the Ethereum network. It is currently the most popular dApp on the entire Ethereum network.

    It is also the most forked project, meaning people use parts of its code to build new dApps. UniSwap uses an AMM called the constant product market maker model to determine the price of coins on its exchange.

    The AMM ensures the amount of ETH times the amount of DAI stays at a constant number.

    Sushi Swap

    Sushi Swap is another example of a DEX. SushiSwap launched after UniSwap and does pretty much the same thing. After they launched, UniSwap creator Hayden Adam’s claims SushiSwap took billions of dollars worth of liquidity from UniSwap.

    Sushi Swaps UI is more gamified, the employees are anonymous and the entire thing is designed to look like a sushi menu.

    However, UniSwap has been around for longer so holds a higher volume of liquidity. Also, UniSwap liquidity providers receive the full 0.3% share of the exchange fee. SushiSwap gives 0.05% of the exchange fee to liquidity providers.

    Sushi Swap also has the most efficient system in DeFi for farming yield. Yield Farming is the process of locking up funds within a dApp to receive rewards in the form of fixed or variable interest.

    Prediction Market Protocols

    A prediction market protocol consists of a collection of people speculating on the outcomes of future events. Some examples of these events can be elections, sports results, and pretty much anything you can think of that can be objectively verified. Even including changes in the weather!

    Prediction markets have been around for a very long time. There have always been two major issues that need to be addressed when launching a prediction market. A prediction market needs an impartial judge to determine the result and it needs a trusted party to maintain the system.

    This clearly makes them very attractive to the world of blockchain and decentralised finance. These two issues can easily be solved with a smart contract.

    The first step of a decentralised prediction market is a user opening a market. The user puts forward a question, for example, will England win the 2020 European Championship? The question has two options: true/yes or false/no.

    This will be regulated by a smart contract on the blockchain, so everyone placing a bet can verify the conditions and that the money placed is legit. At the end of the particular prediction market, the correct share receives $1 and the wrong one receives $0. An example of a prediction market protocol is Augur.

    Augur

    Augur is decentralised and not for profit, it runs on peer-to-peer smart contracts and is accessible almost worldwide.

    Augur’s developers publish the smart contracts to the Ethereum network. After this, the Augur contracts are automated. The developers do not have the ability to: spend funds that are held, control how markets resolve, approve or reject trades, undo trades, modify or cancel orders, etc.

    Augur has a decentralised Oracle which migrates real time information to determine the price of the market. The Oracle is what determines how much a share can be bought for.

    Let’s use our prior example to explain how the shares can change. If England goes through a round and beat a team that is rated higher than them, the share price for England to win the Euros would go up as this would be more likely. If England loses one of their star players to injury, the share for England to win would go down because it is less likely.

    So you could buy a share after England lose their star man for $0.40, and the same share would be worth $0.60 if England just beat a team regarded better than them. But the final share will still be worth $1 if your prediction is correct when the market closes.

    The simplified lifeline of an Augur bet is; market creation, trading, reporting, settlement.

    Conclusion

    DeFi and the dApps which it is based on present many advantages. Some of these include: transparency, interoperability, cost and flexibility.

    However, it does have some risks. One risk is that DeFi is still in its infancy. In the past, the rules for some smart contracts have not been set up properly and hackers have been able to exploit them and steal money by finding loopholes.

    A decentralised system can only be as decentralised as its most central component, any system that allows one user control over the smart contracts will be defined as partially decentralised. So, it’s important to understand exactly how a dApp works before using it.

    DeFi definitely offers benefits for a large portion of the population who face financial exclusion, problems with high fees and issues managing their money. The next few years will tell if DeFi can remove itself from its limitations and launch into the mainstream. Whatever happens, it’s an exciting time for anyone interested in a new financial system.

    Next Article