DeFi

DeFi (decentralized finance) is peer-to-peer financial services such as borrowing/lending, insurance, or the trading of assets being done utilizing blockchain technology without an intermediary. 

 

History

A. What is DeFi

DeFi, or decentralized finance, remains one of the fastest growing industries. From 2019 to 2021, the TVL, or total value locked, in DeFi protocols grew 80x from $1 billion in 2019 to $80 billion by mid-2021. Today, DeFi continues to grow, having surpassed $100 billion in TVL in 2022. DeFi, or decentralized finance, is a consortium of peer-to-peer financial services that uses blockchain technology and eliminates the need for intermediaries. DeFi aims to remove a central authority or middlemen from financial transactions such as loans, insurance, buying/selling digital assets, derivatives, or crowdfunding. With no middlemen, such as governments or companies who can block or restrict access to financial services, DeFi aims to democratize access to these services for everyone.

 

B. Understanding DeFi

To understand DeFi, we have to understand the history of cryptocurrencies. Bitcoin was released in 2009 and became one of the most successful cryptocurrencies. Bitcoin essentially became decentralized digital money not controlled by a central bank or government. Bitcoin was built using blockchain technology and cryptography to create a secure, public blockchain accessible for use by anyone. This accessibility is in contrast to traditional finance, where access is limited by KYC/AML regulations for services such as having a savings account at a bank, trading stocks on a centralized stock exchange (CEX) like Robinhood, or applying for a loan.  

Know Your Customer (KYC) are a set of guidelines in many countries that require the financial institution, such as a bank, to collect and periodically verify identifiable information about a person before allowing them to access the institution’s financial services.  For example, if you would like to open a savings account at a bank, the bank would require you to give personal information about yourself such as your Tax ID number, driver’s license number, photo, and home address to fulfill KYC guidelines determined by the country’s government.  While this information is very personal, refusal would stop you from obtaining these financial services in many countries.  KYC ties directly into Anti-Money Laundering (AML) regulations, where governments use KYC to restrict individuals or entities  from utilizing financial services for criminal activity. Many governments would have a list of individuals that each financial institution must refuse service. While governments have used KYC/AML regulations to stop criminal activity, they have also been accused of using these guidelines for political means.  For example, many financial institutions that do business internationally are restricted from offering services to citizens of Cuba or Iran due to sanctions by the U.S. government. While there may be reasons for these sanctions, the blanket ban based only on nationality economically harms millions of people who haven’t committed any crimes. 

The exclusion of hundreds of millions people from the global financial system is the impetus and one of the leading factors behind the growth of DeFi. In DeFi, there is no KYC process needed or restrictions based on nationality. While Bitcoin was revolutionary, its application was limited. One could only send money, or Bitcoin, to each other. Bitcoin lacked the functionality to do more complex financial transactions such as loans, insurance, or trading assets like stocks. To go beyond this significant limitation of Bitcoin, the Ethereum blockchain was launched in 2015. 

Ethereum is a decentralized, open source blockchain with smart contract functionality.  Loans, decentralized trading of assets, insurance, and many other activities not became possible for everyone.  The only limitation is internet access. 


II. TECHNICAL ASPECTS

DeFi is a category of decentralized applications, or dApps, that deals explicitly with peer-to-peer financial services.  DeFi applications are built on top of blockchain technology using smart contracts. Smart contracts are self-executing agreements in code based on predetermined conditions.  Since smart contracts execute automatically for each party when the predetermined conditions are met, they eliminate the need for intermediaries. The code is written using programming languages such as Plutus, which is the native smart contract language for Cardano.  Plutus is a Turing-complete language written in Haskell, a functional programming language that considers the computations as a combination of separate mathematical functions.  Haskell is a statically-typed, functional programming language that has been around since 1990.  In Haskell mathematical functions map inputs to outputs, which focuses on the result of inputs, limiting unintended side effects, shared data, and mutable data.  Due to provable correctness of code that Haskell offers as a programming language, it is used commercially in multiple industries such as finance, hardware design, and aerospace and defense, and other industries where entities are seeking high assurance coding.  There are many programming languages used for DeFi, including the Solidity language for Ethereum and the Rust language for Polkadot and Solana.

The basic function of a decentralized exchange like the Genius DEX or centralized exchanges like Robinhood is the same, allowing users to trade assets for other assets. However, DeFi uses a distributed ledger technology, or a decentralized blockchain for transactions. No single node has control of the blockchain and all transactions added to the blockchain are immutable. User’s funds are bound by the smart contract of the dApp.

In traditional finance, entities like banks typically keep the ledgers internally. By having sole control of the ledger, the bank can change, cancel, or reverse transactions. Banks can also block those who can access their financial services and require users to identify themselves to satisfy KYC guidelines before allowing the use of their services.

In DeFi, the ledger is distributed and transactions are approved by multiple nodes. In traditional finance, the centralized nodes, or a single entity, controls the ledger. Let’s illustrate the difference below:

The distributed ledger of transactions, or blockchain, is distributed between multiple nodes. When a user interacts with a DeFi protocol on the Cardano blockchain, the potential execution of that transaction is performed based on the conditions of the smart contract. When the transaction is executed, it is recorded on the distributed ledger stored on each full node.

A great example of a smart contract coded in Plutus is the Genius DEX, where you can swap tokens or provide liquidity without the need for KYC.  Technically, smart contracts allow trustless operation of a dApp.  You don’t need to know the other party because the smart contract defines the conditions of your transaction. In addition, the transaction is correctly validated and executed on the Cardano blockchain, ensuring security and immutability.

 

Applications

DeFi has many applications that provide real utility

  • Decentralized Exchanges (DEXs)— dApps that allow users to swap supported tokens in a decentralized way.  In DeFi, there are two main models that exist for DEXs: the Automated Market Maker (AMM) model used by Uniswap and many other DEXs, the order-book model used by the Genius DEX.  The advantage of the Genius DEX is that you can use Smart Swaps, which will give you more functionality with your order types.  Limit orders, stop orders, dynamic orders, and algorithmic orders will be available on the DEX. 

  • Lending/Borrowing—Users are allowed to lend money or borrow from each other in a decentralized manner.  Current implementations require users to post a higher collateral than the value of their requested loan.
  • Insurance—Users are able to take out insurance.  Current implementations include users who are liquidity providers and want to ensure against a substantial loss.
  • Derivatives—Options such as call or put options become possible, along with many other derivatives.
  • Decentralized Autonomous Organizations (DAOs)—Some countries are pushing regulation that would implement KYC, eliminate the use of unhosted wallets, and attempt to the regulate the code of DeFi applications by targeting the developers. If successful, we can see many people again being left out of the global financial system due to governments’ compelling developers to enforce their public policy or economic sanctions. To avoid this outcome, many dApps are creating DAOs, which allow the community to control the code, use of funds, and other decisions of a protocol. For example, Project Catalyst on the Cardano ecosystem is a platform that allows ADA holders to vote on where to spend money made from Cardano’s treasury. Eventually, Cardano’s developers want to cede all control to a DAO, which will handle any updates to Cardano’s code, developer compensation, and many other aspects of the blockchain. If decision-making is spread across millions of pseudonymous coin or token holders instead of a handful of developers, the thinking is that any government would not be able to regulate the technology of DeFi applications.
  • Decentralized Digital Identity (DIDs)—The creation of portable, self sovereign identity solutions that allows individuals to identify themselves, prove academic credentials,  or vote, or conduct financial transactions where identification may be required.   Using the security of blockchain technology, DIDs are resistant to fraud and allow users to control what information is shared.

 

 

Legal aspects

DeFi currently offers many financial services that are similar to traditional finance services that require KYC.  Due to this reason, DeFi has started to come under regulatory scrutiny because it could eventually allow an unregulated financial system with no controls. Regulators have identified these key risks with DeFi:

  • Compliance - Many DeFi projects have no compliance or inadequate internal controls.  As there is no KYC, private or state actors can manipulate the market with little fear of prosecution.  The lack of surveillance allows entities to carry out manipulation schemes using multiple accounts across different DEXs.  Market manipulation has been documented for years, with nefarious actors using multiple accounts to carry out manipulation schemes such as:
    • Pump and dump - Illicit actors spread false or misleading information about a digital asset in order to “pump” or increase the price.  The entity can create multiple social media to spread news.   The entity can also create multiple crypto wallets to buy into the digital asset to increase the price.  Once the price rises due to other users buying the digital asset, the illicit actor sells, or “dumps” their digital assets and stops hyping the asset.  The price falls rapidly, hurting others who bought in.  In traditional stock markets, this is much harder due to heightened surveillance and the requirement for KYC for each account.  However, with DeFi applications like DEXs, this activity is relatively easy.
    • Wash trades - The entity creates multiple crypto wallets to buy and sell a digital asset with each other to create the illusion of high trade volume, misleading the public into believing the digital asset has significant interest.  Once the public starts buying the digital asset and the price rises, the illicit entity can sell at a profit.  Afterwards, liquidity goes down and the price drops.  Due to the ease of creating multiple wallets with no KYC, wash trading has been prevalent in the cryptocurrency markets.  In regulated markets with KYC, wash trading would require multiple parties to work together and could easily be caught due to systems that monitor and identify irregular trading activity.
    • Spoofing - is when a trader enters one or more non-bona fide orders at the top of the order  book.  This creates a new best bid or offer or adds significantly to the liquidity displayed at the existing best bid or offer.  In the short timespan before or after this order is canceled, the same trader executes a trade on the opposite side of the market, allowing them to get a more favorable price because of the misleading first order they made.
    • Layering - Layering is when a trader enters multiple orders on one side of the market at different price tiers, in an attempt to move the midpoint of the spread to move away from the orders, allowing the trader to execute an opposite order at a more favorable price.
    • Cross product manipulation - A user trades a digital asset on one DEX for the purpose of manipulating the price of a digital asset on another DEX, capitalizing off the price-moving effects.
  • Rug pulls - Similar to pump and dump, but an entity creates a fake crypto project with its own token.  With DeFi applications like DEXs being permissionless, anyone can create and list their token there.  The entity uses social media and news releases to pump up investor interest while also providing liquidity as potentially doing wash trades to create the illusion of trade volume for the product.  When the public starts providing liquidity and starts trading the non-bona fide token, the entity sells all of their tokens for a profit.  Users owning the token of a fake project see the value of their tokens go to zero.  In traditional finance, KYC, disclosures, financial reports with audits, and many other measures are used before an entity can have its asset trade on a regulated exchange.  These measures greatly reduce the number of scams in traditional markets vs crypto markets.
  • Information asymmetry - In traditional finance markets, insiders holdings and trade activity has to be reported and is heavily monitored by the authorities.  In addition, there are mandatory disclosures which attempt to limit the advantage rich investors and insiders have over retail investors who have the least access to information.  In crypto, there exists a significant information asymmetry between the insiders and developers of DeFi projects and retail investors that can allow insiders and developers to exploit retail investors for profit.  
  • Permissionless access - What happens when a national or transnational criminal organization uses a DeFi application to enhance their criminal activities?  What happens if a criminal organization publicly solicits for crypto donations and receives funding in stablecoins or other coins? While being permissionless has the advantages of opening up the economic opportunity for the unbanked, regulators feel there must be guardrails to limit illicit activity.  
  • Securitization / Tokenization - Many tokens are bought and held by participants in the expectation that a DeFi project will do well and the value of their token will grow.  For regulators like the Securities Exchange Commission (SEC) in the United States, a “belief” in future profit by a participant who buys a token constitutes an investment contract, which means the token needs to register as a security with the SEC

Ethics

Consumer protection - Many DeFi projects have mantras and disclosures of “review the code” or “DYOR” (Do your own research).  Regulators believe this is not sufficient for average retail participants.  While DeFi projects can be well-intentioned and publish their code, most retail investors don’t have the knowledge or skill to understand the code behind projects or test it themselves.  However, a rich participant would have the skills or could hire someone with the skills to review the code and understand the risks.  Regulators argue that public oversight by a central authority is necessary to even the playing field between retail participants and rich participants.  


In conclusion, many regulators feel that completely unregulated markets eventually trend to corruption, fraud, cartel-like activities, and information asymmetries.  The growth and robustness of the U.S. capital markets is a prime example of how well-regulated markets flourish when there are minimum standards of disclosure and conduct.  The opinion of government authorities is that if DeFi really wants to flourish and experience mass adoption, it needs to integrate a regulatory framework.