What is Decentralised Finance?

What is Decentralised Finance?

Oct 20, 2024
322

Decentralized finance continues to make waves in the crypto space with an astonishing $22.96 billion in total value locked into the underlying smart contracts on the Ethereum blockchain.    

Decentralized finance, or DeFi for short, is a term used to describe various decentralized services that aim to replace our current centralized financial system.  With DeFi, you can move cryptocurrency tokens around, trade, lend or borrow them as part of a more efficient, and in many cases, more profitable, financial ecosystem.  DeFi is open to anyone, meaning it is technically accessible to hundreds of millions of currently underinvested individuals.

In theory, DeFi could do pretty much everything that currently exists in today's financial services. A bold claim to make perhaps, so before we dive into this new and exciting world of DeFi, it's worth taking a step back to see how it all began. 

imagePhoto by Pixabay on Pexels.com

Maybe the best place to start is by looking at the most commonly used cryptocurrency, bitcoin. If you know about bitcoin, you are probably aware that it isn't controlled by any bank or government, it can be sent to anyone, by anyone, without the need to use a bank or financial institution.  So, by this very definition, we can say that bitcoin is a form of decentralized money, and this serves as a useful springboard to use for our deep dive into this topic.

The need to transfer money is not exclusive to bitcoin; it is an essential service that is the heart of any financial system.  Additional services such as the provision of loans, savings plans, insurance and even the stock markets are reliant on the ability to transfer money between parties.  

But let's pause the discussion on bitcoin and decentralization momentarily as its worth considering some examples of where centralized financial systems displayed their limitations and weakness, affecting a significant number of people.

Presently, all of our financial system and any services within it are completely centralized.

Banks, stock markets, insurance companies and other financial institutions all have someone in charge, whether it be a company or individual that controls, or offers these services. This reliance on a central authority may provide a level of assurance for the average bank account holder for example, since as any funds they deposit are protected (up to a set limit). However, complete centralization does have its risks and can be prone to mismanagement of funds, fraud and corruption as we shall now see.

Banks have a completely different mandate than its customers, and if a centralized authority gains absolute power, well, this power can absolutely corrupt. San Francisco based Wells Fargo bank, the fourth largest in the US, provides us with an unfortunate example of this. 

Driven by a need to create value, the bank went on to create over 1.5 million unauthorized deposit accounts and nearly 600 thousand unauthorized credit card applications without the customers' knowledge. Customers who had placed absolute trust in the bank to keep their money safe, suffered devastating long-term damage to their credit scores. 

imagePhoto by Pixabay on Pexels.com

The bank finally agreed to pay $3 billion in damages but did not have to face any criminal charges as part of the deal and continues to offer its full range of services.  An extreme example perhaps, but maybe it's becoming clear that if a central authority's interests do not align with its customers' needs, the customers have limited (if any) power to stop the mismanagement of their accounts and funds.

The value(?) of money

Since the removal of the 'gold standard', where money is backed by a physical commodity such as gold or silver, a nation's currency is government issued and is trust based. Paper banknotes often state that they are legal tender and have to be accepted when purchasing goods and services. Despite not being backed by anything to secure its value, because a government has issued the money, we are expected to place our trust in their ability to honour its value.

This fiat money gives central banks greater control over their economies because they can control how much money is printed. This is dangerous because governments can print more of it in times of economic uncertainty, eroding the value of your money.

imagePhoto by Karolina Grabowska on Pexels.com

Printing too much money can result in inflation and severe cases in hyperinflation, a rapid, excessive, and out-of-control general price increase in an economy. If people lose faith in a nation's currency, the money will no longer hold value. Venezuela is a prime example of when a government attempted to manage their economy by printing more money with ever-increasing denominations, forcing its national currency to lose 99% of its value during three years of hyperinflation.  

According to Bloomberg, inflation has soared to a colossal 5790% over the previous 12 months. The largest note in circulation, 50,000 bolivars is worth approximately $0.04, and citizens have been known to weigh the notes rather than count them when paying for goods or services.

As well as issuing new banknotes, governments can also retire denominations of notes which happened in India when it cancelled the legal status of the 500- and 1,000-rupee notes. This ‘demonetization’ wiped out 85% of India’s cash overnight and threw the country into chaos as people rushed to exchange these notes for legal tender.

Cutting out the middleman

While the examples above are extreme, they illustrate the power and influence a centralized entity has over money that it holds.  On top of this, out of necessity, the banking industry is also heavily reliant on intermediaries to move money across businesses, customers, and governments.

Whether it’s the day-to-day exchange of money through current accounts, banking arrangements using inter-bank messaging such as SWIFT or IBAN or via end of day deferred settlement systems like BACS, banks must ensure liquidity and payment settlement finality.  

imageI couldn't find a pic of a fat cat...

Each time there is a friction point in a transaction, such cross-border currency conversion, using a mortgage broker's services, trading stocks and shares, and so on, an intermediary or third-party system may have to be used with any fees incurred often passed down to the customer.  If we expand our view further, we can see that every finance system is built on its own proprietary technology stack that existing in its own 'bubble'. 

What if we could burst these bubbles of centralization and decentralize the financial system as a whole in the same way that bitcoin decentralized money?  

Decentralizing finance

Bitcoins rise in popularity arguably stems from its ability to avoid the need to involve any monetary institutions and avoid incurring unnecessary interchange fees when transferring this cryptocurrency globally between parties. Using bitcoin or other cryptocurrencies disrupt traditional financial transactions, removing the multi-step commits with intermediaries by virtue of the peer-to-peer and distributed ledger-based architecture.

If cryptocurrencies are a way to make payments accessible globally, decentralized finance is trying to do the same for every financial service.  As with the use of cryptocurrencies, DeFi often removes the intermediaries that typically exist in traditional systems; in turn, users benefit from lower fees or higher returns from their money. 

Currently, the primary uses of DeFi are:

  • Lending/borrowing of cryptocurrency

  • Derivatives

  • Automated Market Makers 

  • Insurance

  • Automated investing

DeFi sounds fascinating, but how does it work?

Composability

Before exploring some real-world examples of DeFi applications in operation, it’s vital to introduce a new term – composability. 

One of the benefits of DeFi applications is that they can work in conjunction with one another, making it possible to mix and match services to create new DeFi apps.  Due to the ability to combine DeFi apps, the term ‘money Legos’ has been coined.  

Workstate | AWS vs. Azure vs. Google Cloud … and LEGO® Bricks

Individual DeFi applications or services exists as a ‘Lego brick’ which can be freely combined with others into a more complex offering and can even be brought together for an individual transaction. This is a compelling driver of innovation and an unthinkable concept in the world of traditional financial systems.

For these money Legos to work, the DeFi platform, the apps run on need two things, a standardized way of connecting (like the way actual Lego blocks consists of interlocking plastic bricks) and the ability to be connectable instantly and completely (known as atomicity) within a single transaction.  If these two elements are achieved, that’s DeFi composability.  

Without composability, apps running on a DeFi platform may still be decentralized but operate in their own bubble, much like in centralized finance world covered at the start of this article.

A quick brick

Let’s say you wanted to build a money Lego that allows you to lend a sum of cryptocurrency to a borrower and wanted to add in an insurance service that would protect you in case of a loss. 

The beauty of money Lego’s is the flexibility they offer, and this is but one of many potential configurations of how one could be constructed.  

One example of how this could work is by building a brick from DeFi applications that does this:

  1. Use the Chain Link oracle to pull in data to find the exchange with the best rate for swapping ETH for Dai.

  2. Automatically select the decentralized exchange (DEX) you want and conduct the trade (e.g., trade ETH for DAI on Uniswap)

  3. Connect to the Avve platform to lend the DAI to borrowers and to receive interest on the loan.

  4. Add insurance from Nexus Mutual to the DAI borrowed so that you are covered in case anything goes wrong with the smart contacts.

Building a decentralized financial system

Bitcoins inception was undoubtedly the key enabler of the cryptocurrency industry that DeFi is part of.  Using decentralized money that can be programmed for automated activities, we can build exchanges, lending services and insurance products that don’t have an owner and aren’t controlled by anyone.  Blockchain technology allowed the creation of Ethereum, on top of which most DeFi applications (dApps) are built. 

Ethereum has become a hotbed for innovation around DeFi. Anyone who can program in Solidity, Ethereum’s code, can write automated code known as smart contracts. 

imagePhoto by Bram van Oosterhout on Pexels.com

Smart contracts contain predetermined rules as to how a specific service will work and once deployed on the Ethereum network they become immutable and can run themselves with little to no human intervention.  

Solidity and the ERC20 standards for creating new tokens allow developers to exploit the possibilities of decentralized applications.  To successfully conduct a transaction on the Ethereum network, a ‘gas’ fee is charged, which is paid in ether (ETH).  Gas prices can differ across dApps and protocols depending on the complexity of the transaction involved.   

ETH, suffers from market volatility, causing wide fluctuations in its price and on top of this when network congestion occurs the amount of gas payable per ETH transaction increases as the Ethereum network can’t scale to handle these transactions and process them quickly and cost effectively.

Going Stable

To alleviate the volatility experienced with traditional cryptocurrency, decentralized price-stable money, otherwise known as stablecoins, can be used as a fundamental component of the DeFi ecosystem. Stablecoins remove volatility and ensure stability by pegging to something like the US dollar or a basket of other assets or cryptocurrencies.

It could be argued that a significant factor holding back wider adoption of cryptocurrencies has been its extreme volatility. Cryptocurrency volatility is also a limiting factor in time-based contracts; people need assurance that the price you will pay or be charged for a service does not change depending on when it is actioned.    

Stablecoins can be categorized depending on what they are backed by.

Fiat Collateralized – backed by real-world assets like fiat currencies or commodities such as gold, silver or oil.  Tether (USDT) is pegged 1:1 to the US dollar., Digix Gold (DGX) is a commodity-backed stablecoin.

imagePhoto by Pixabay on Pexels.com

Crypto Collateralized – backed by a basket of cryptocurrencies. Because cryptocurrencies can be volatile, these types of coins are 'over collateralized'.  DAI is an example of a crypto collateralized stablecoin. Its core smart contract is called the Collateralized Debt Position (CDP). 

The CDP works as follows:

  • The Maker platform generates the CDP to issue DAI tokens.

  • The DAI to ETH ration is overcollateralized. For example, if you locked in 2 DAI would require 3 ETH worth of tokens to be locked into the contract.

To illustrate the relationship between DAI and CDP, let's assume that ETH is trading for $300. In that case:

  • You could deposit 1 ETH in the CDP and withdrawn 200 DAI (300/1.5), assuming that 1 DAI = $1.

  • If the price of ETH falls below $300, the CDP gets shut down. In this can, you need to put in more ETH into your CDP and ensure liquidation.

Creating a CDP requires you to fees that are payable only in MKR, and upon closing a CDP, you return your borrowed DAI and payback stability fees in MKR. As soon as you pay the fees, the MKR used gets immediately burnt to keep its circulating supply in check.

Commodity Collateralized – backed by commodities such as gold, silver or oil.  Digix Gold (DGX) is a commodity-backed stablecoin.

Non-collateralized – these coins are not backed by assets but by a complex combination of algorithms and smart contracts, also known as Seigniorage Shares.

Decentralized Exchange (DEX)

A decentralized exchange (DEX) is built on the Ethereum platform and operates according to a set of rules in smart contracts which allow users to buy, sell or trade cryptocurrencies.  No accounts, signup or ID verification, is required to use a DEX, instead smart contracts enforce the rules, execute trades and securely handle funds when necessary.  

imagePhoto by Anna Nekrashevich on Pexels.com

In contrast to a standard centralized exchange, there is often no need to give up custody of your coins by depositing funds into an exchange account before making a trade. This also eliminates the threat of losing funds if an exchange is hacked.  

There are two main types of DEX, order book-based, or liquidity pool based.  

Liquidity Pools

Liquidity pools are an automated market making strategy used in decentralized exchanges like Uniswap, Curve, Kyber and Sushiswap. Although these exchanges may use different approaches, at their core, they consist of transactions traded against a smart contract rather than other traders as in the traditional order book model.

The traditional order book model suffers from issues with tokens with low liquidity that are difficult to sell. They may list tokens that may be susceptible to unpredictable price swings caused by large individual transactions. 

Liquidity pools directly address these problems by removing the dependence on tokens on trade volume and ensuring constant liquidity. 

Automated market makers

On order book-based exchanges, market makers need to continually adjust their bids and asks as asset prices move. Liquidity pools don’t need to analyze information across exchanges to determine the price of assets. Liquidity providers deposit their assets into the pool, and the smart contract takes care of the pricing. 

Liquidity pools have no listing fees, KYC, or other barriers associated with centralized exchanges; anyone can invest in an existing liquidity pool or create a new exchange pair for a token at any time. 

Behind the scenes, the ‘liquidity pool’ is an constant automated market maker in the form of a smart contract.  This smart contract automatically matches traders’ buy or sell orders based on predefined parameters. Traders do not need to be matched directly with other traders, as long as liquidity providers have deposited assets into the pool, liquidity is constant.  

In return for providing liquidity to the pool, the liquidity provider receives liquidity pool tokens (LP tokens) representing their proportional share of the pool. Anyone can become a liquidity provider by depositing crypto into a liquidity pool to earn trading fees in proportion to their share in the pool.  

When a trade is placed, trading fees are deducted from the asset that the trader sends to the exchange contract and are added to the liquidity pool after the transaction.   For example, if Uniswap charges a 0.3% trade fee and your liquidity contribution makes up 0.007% of the pool, you’ll get 0.007% of that 0.3% trading fee.

Decentralized Money Markets

Decentralized money markets are services that connect borrowers to lenders, an example of a protocol offering this is Compound, an Ethereum-based borrowing and lending dApp. Compounds smart contract allows users to borrow and lend tokens. Because this is all facilitated by a smart contract, there are no intermediaries or the term disintermediation fits better because applications still charge fees but a much lower rates.

imagePhoto by Pixabay on Pexels.com

The Compound platform automatically connects the lenders to the borrowers, enforces the loans' terms, and distributes the interest.  Interest begins compounding from the minute your funds are deposited into Compounds smart contract. 

Borrowing

Compound loans are secured by over-collateralization. Borrowers deposit tokens into Compound, which increases their borrowing power; if this borrowing power falls below zero, their collateral is sold to cover the debt incurred. Interest rates are different for each asset and vary based on the demand for that asset.

Lending

Lenders earn interest for supplying tokens to Compounds money market with stablecoins such as DAI offering relatively high rates (historically 5 to 20% APR) for lenders. cTokens are issued representing the deposit and interest it accrues. So depositing DAI would result in you being given cDAI tokens.

As interest accrues in the market, each cDAI will become worth more DAI. The basic idea is that as your interest accrues, fewer cTokens will be needed to redeem your original DAI. In other words, the exchange rate between Dai and cDai grows proportionally with the interest rate.

By simply owning and holding onto cDAI tokens, lenders can earn a passive income in decentralized finance.

Staking

In DeFi, staking usually involves depositing liquidity pool tokens into a smart contract in order to earn rewards. Staking is similar to earning interest from a bank account but at a much higher rates - the longer you hold, the more you earn.

The process of earning interest on cryptocurrencies has become extremely popular giving rise to yield farming, a term given to the process of putting crypto assets to work while seeking to generate the most returns possible.

Yield Farming

In essence, Yield Farming maximizes the return rate on capital by leveraging different DeFi protocols. On the surface it seems simple enough, deposit a token, stablecoin or liquidity pool token into a farm to earn tokens at variable APR. Yield farmers chase the highest yield by switching between multiple different strategies. To compare it to traditional finance, you can imagine people trying to find the best savings account with the highest yearly yield.

imagePhoto by Karolina Grabowska on Pexels.com

Yield farmers will use a few DeFi protocols like Compound, Curve, Synthetix, Uniswap or Balancer. If the strategy doesn't work anymore or a better strategy is available, yield farmers move their funds around. For example, they may transfer the funds between different protocols or swap some of their coins to other ones that are currently generating more yield. This procedure is sometimes called crop rotation.

Maximizing returns

Yield farming strategies can bring in as much as 100% average percentage yield (APY) by utilizing a variety of methods.

Liquidity Mining

Liquidity mining is a process of distributing tokens to the users of a protocol. One of the first DeFi projects that introduced liquidity mining was Synthetix, which rewarding users with SNX tokens when they added liquidity to the sETH/ETH pool on Uniswap.

Liquidity mining creates additional incentives for yield farmers as the token rewards are added on top of the yield already generated by using a particular protocol. Depending on the protocol, these incentives may be so strong that farmers may be willing to lose on their initial capital to get more rewards in the distributed tokens.

Leverage

Besides liquidity mining, leverage is another element that makes ultra-high returns possible. Leverage is a strategy of using borrowed money to increase the potential return of an investment. In yield farming, farmers can deposit their coins as collateral to a lending protocol and borrow other coins. 

Then they use the borrowed coins as further collateral and borrow even more coins. By repeating the whole procedure, farmers can leverage their initial capital a few times over and start generating even greater returns on their initial capital.

With the potential to earn extremely high rewards from yield farming, you can expect to see more DeFi application and services offering automated farming services similar to what is already provided by Harvest Finance. Harvest automatically farms the highest yield available from the newest DeFi protocols and optimizes the yields received using the latest farming techniques.

Ti piace questo post?

Offri un birra a Scott Barron

Altro da Scott Barron