August 30, 2022

fintech & blockchain

Decentralized Finance (DeFi)

It is time for the fourth installment of our 8-part series covering different crypto phenomena, and this time we dive into one of the most revolutionary topics in the financial world – decentralized finance, DeFi.

In this article, we will guide you through the basics of DeFi as a phenomenon, what possibilities it offers and what drawbacks DeFi systems have. This is a long one, so strap in for a thrilling journey into decentralized finance.

What is DeFi?

The DeFi system can be characterized as a collection of finance applications that use blockchain technology and seek to democratize finance in a way that replaces traditional financial institutions and intermediaries with (automated) smart contracts on a blockchain.

In the traditional financial system, all transactions require an intermediary. To buy and sell stocks or to send money to another person, the services of an intermediary is required to complete the transaction (e.g. a stock exchange, bank or a payment service provider). DeFi aims to cut out the oh-so traditional (e.g. centralized) middleman and replace it with blockchain-based smart contracts that allow peer-to-peer transactions without having to trust and utilize intermediaries and pay them transaction fees. Simply put, DeFi participants are part of a peer-to-peer network where assets can be transferred automatically via smart contracts without the need for a centralized entity that controls access to their users’ funds or financial services.

Use cases of DeFi

DeFi has already been adopted as the bedrock in a plethora of different crypto projects’ financial systems. At least six different categories for DeFi usage can be recognized in the current market:

Stablecoins (DAIUST)

Stablecoins are crypto assets that have their value attached or “pegged” to another asset (usually the United States Dollar), and they retain their value by having the stablecoins backed by, for example, 1:1 ratio with the US Dollar. The most prominent stablecoin in the crypto market is the USD-pegged Tether, or USDT, which provides investors a way to invest in cryptocurrencies and not having to switch between fiat currency or other crypto assets in order to maintain their portfolio value; owners of crypto assets can trade their assets to a stablecoin in order to lessen their exposure to risks induced by high volatility crypto assets or unstable markets.

How are stablecoins relevant in DeFi systems? Stablecoins usually act as enablers for these systems to work. Firstly, they serve as a stable medium of exchange to enable investors to enter and exit DeFi ecosystems without having to carry the risks associated with volatile crypto assets or unstable market conditions. Secondly, they provide an agile way to users to deposit their more volatile crypto assets as collateral in exchange for a stablecoin loan, which can the be utilized in different transactions inside a DeFi ecosystem (see “Lending” below).

Payments (FlexaSablier)

As opposed to using any crypto assets as means of payment, DeFi projects enable users to spend their crypto in stores and online merchants with no costs to the users, using decentralized instant payment networks. Some of the networks can utilize their own issued crypto tokens that can be used as collateral, which settle the transactions made on the the payment network’s blockchain. The merchants pay these networks a processing fee that the network then pays to the collateral provider(s).

Trading (UniSwapCurve)

Traditional centralized exchanges (or ‘CEXes’) require an intermediary to facilitate trading between interested parties. In CEXes, the “centralized” means any of the big crypto exchanges you see today – Coinbase, Binance, Crypto.com and so on. These CEXes provide a custodial (CEX-specific) crypto wallet that contains a user’s crypto funds. The CEXes safeguard the cryptos on the users’ behalf, and the users do not have the private keys of the wallet to directly control their own crypto. Instead, users can only access their crypto using the login information they have created in tandem with creating a user account in a CEX and trade their crypto via the CEX.

Decentralised exchanges (or ‘DEXes’), on the other hand, are used for facilitating crypto asset trading by executing trades through smart contracts without the aforementioned centralized intermediaries. DEXes do not require account creation, and the users themselves are in full control of their own crypto assets, along with the wallet’s private keys.

As opposed to traditional trading platforms, some DEXes do not have market makers and allow only for transactions to happen between two individuals sharing exact opposite interests – in other words, peer-to-peer exchanges. In addition to peer-to-peer exchanges, other variations of DEXes are decentralized order book exchanges and automated market makers.

The former variations often have something called reserve aggregation implemented in the smart contracts, which enable users and liquidity providers to bid and ask prices for a certain trading pair in the smart contract which automatically accepts the best offer and executes the trade on the users’ behalf.

The latter variation is a liquidity pool that holds at least two types of crypto assets in a smart contract and allows anyone to deposit one type in exchange for the other. As opposed to reserve aggregation, the prices for a trade are set automatically by the smart contract, which regulates the availability and price of the crypto tokens traded through the liquidity pool.

Lending (AaveCompound)

Collaterized lending is the most widely used lending function in DeFi – the function allows borrowers an access to new trading funds while depositing their own existing funds as collateral without having to sell them. Lenders can deposit their crypto assets into liquidity pools, and borrowers can borrow these assets from the pools by depositing their other crypto assets as collateral. For example, a user of a certain (DeFi) lending protocol can borrow the DAI stablecoin by depositing a certain amount of ether as collateral which is liquidated in case of a payment default by the borrower. Lending protocols often involve some form of collateral, and in case of liquidation, the smart contract offers the collateral up for auction to market makers at a discount in exchange for the stablecoin used in order to help the stablecoin to maintain its peg to the asset it is pegged to (see “Stablecoins” above). Other iterations of collateralised debt are, for example, peer-to-peer liquidity provision and credit pools.

In addition to collateralised lending, some DeFi protocols offer uncollateralised lending whereby depositors of collateral can delegate their credit lines to third parties. A potentially dangerous sub-category of uncollateralised lending is so-called flash loans, in which the loan is granted on the condition that the loan capital is received, used and repaid during the same set of blockchain transactions. These flash loans can be used for refinancing and arbitrage, but they have also been used in some attacks on DeFi systems, including market manipulation.

Insurance (ArmorNexus Mutual)

Insurances in the DeFi ecosystems focus on the inherent risks of the blockchain environment. Such risks include smart contract failures or bugs, hacks or governance risks. Users deposit crypto assets as collateral in exchange for insurance tokens that grant their holders rights to insurance premiums collected. If a smart contract failure or other “insurance event” takes place, the collateral is used to reimburse the insured.

Synthetic Assets (SynthetixMakerDAO)

In traditional finance, if an investor wants to profit from price fluctuations in capital markets, they can use derivatives. Derivatives are financial instruments that represent a certain stock that the trader does not own but wants to buy or sell. Such derivatives can be, for example, futures, credit default swaps, forwards or options.

In the DeFi ecosystem, synthetic assets (or ‘synths’) are derivatives that are tokenized (ie. the derivative is added on the blockchain and it becomes its own cryptocurrency token). Synthetic DeFi tokens can be divided to at least two categories: asset-based and event-based tokens.

Asset-based tokens are somewhat closely related to lending protocols. Users can deposit crypto tokens as collateral, and in return they are issued debt which they can use to trade other synthetic tokens that track the value of other assets. Some asset-based synthetic DeFi tokens represent a basket of crypto tokens, much like a traditional investment fund with multiple different assets in their portfolio.

Event-based tokens gain value from any observable event. With event-based tokens, users deposit collateral and receive a set of tokens that they can use to predict the outcome of said event, with each token of a token set representing a certain potential outcome of the event. The tokens can be traded between traders to reach a desired prediction “portfolio”. Profits can be made if a certain set of potential outcomes comes to pass, which is when the collateral deposited is paid out to the token holders that predicted the outcome of the event right. Such an event could be anything, for example, whether bitcoin (BTC) reaches a certain price before a certain date.

Drawbacks concerning DeFi

As DeFi systems are based on smart contracts – lines of code – they are always subject to the risk of being hacked or having bugs, which can lead to the loss of millions of dollars. If the coding in said smart contracts is flawed, malicious users can exploit weaknesses in the code and steal user funds. A case can be made, for example, of the DeFi stablecoin system Terra Luna, which was subject to one of the largest crashes in the history of crypto due to an unprecedented flaw in the system that ultimately lead to the depegging of their stablecoin pair, which set in motion a “bank run” where all investors cash out and the price of the asset crashes to virtually zero.

The Luna smart contract was coded so that it if you sold the stablecoin Terra, the smart contract guaranteed you one dollar’s worth of the native token Luna. After the depegging of the stablecoin Terra (ie. the price of Terra was not tied to the dollar), users could exploit this feature in the smart contract and print Luna tokens indefinitely.

Given that DeFi systems are unregulated, the risk of scams and fraud are ultimately carried by the investors (institutional or retail). The current DeFi sphere makes it possible for tax fraud, money laundering and pump-and-dump schemes to happen. While not specifically a DeFi-issue, the crypto sphere in general has witnessed multiple rug pulls, where project developers abandon a project after an ICO or token launch, cash out and disappear with investor funds.

Multiple DeFi applications work in a way that keeps their users anonymous so that they do not have to verify their identities. This can be seen as a double-edged sword as while anonymity is seen as a cornerstone for the decentralized aspect of DeFi, this also makes it hard to hold accountable malicious actors that could benefit from fraudulent behaviour as described afore.

Conclusions

While DeFi offers possibilities the traditional financial markets have not seen before, there are still some unaddressed regulatory issues that could be seen as beneficial for the greater good and security of investors in the DeFi world. DeFi offers solutions that enable anyone with an internet connection to trade, lend, borrow, invest and pay without banking credentials or necessarily having to disclose their identity to anyone. This can democratize finance in a way that allows people from relatively poor or disadvantaged financial or social backgrounds to accumulate wealth in ways that the centralized system can not provide. Nevertheless, due to the regulatory vacuum they are in, DeFi applications inevitably expose investors to risks without the possibility of claiming damages caused by an inherent weakness in the smart contract used or the fraudulent activity committed by malicious actors.

Entrepreneurs planning to implement DeFi in their projects should always account for the risks adhered to using DeFi applications in their business models and prepare for the unexpected legal issues that might present themselves. If you are planning a DeFi project and have questions about what these issues may be, we are happy to assist you in your project.

Our Associate Trainee Patrik Anthoni took part in writing this article.

30.08.2022 JON