How Decentralized Finance Works

Mfundo Mncwabe
10 min readJul 12, 2021
image by Behnam Norouzi @ unsplash.com

One of the main drivers of cryptocurrency resurgence has been the rise of Defi or Decentralized Finance. To the outside world, it remains one of the most opaque areas of the finance industry. So, what exactly is Defi, and how does it function? Why has it increased this year and gained such clout in the cryptocurrency market as a whole?

What exactly is Defi? ( Decentralized Finance)

Financial services carried out on a blockchain are referred to as “decentralized finance” (Defi). Defi refers to financial services that are not governed by a central authority. It entails removing the middleman from the financial system and replacing it with a smart contract. In layman’s terms, we can call it the fusion of traditional banking services and blockchain technology.

As a result, Defi requires a decentralized infrastructure to function. The Ethereum blockchain comes into play in this situation. The Ethereum blockchain is a self-contained decentralized application platform (DApps).

Most Defi protocols run on the Ethereum blockchain, but a few have moved to other competing blockchains for better speed and scalability.

The Old Financial System’s Flaws

A “hub and spoke” model is used to construct modern financial infrastructure. New York and London, for example, serve as operational hubs for the financial services industry, influencing economic activity in spokes — regional centers or financial powerhouses such as Mumbai or Milan, which may not be as globally crucial as hubs still serve as nerve centers for their respective economies.

From hubs to spokes and the rest of the global economy, economic prosperity or hardship radiates outward. In the functioning of multinational financial services corporations, this interdependency model is repeated. They have headquarters in hubs worldwide, as well as local branches, partnerships, and investments. Because of the size and scope of their operations, they are subject to a phalanx of laws and regulations in each of their financial jurisdictions. Because of their size and scope, such institutions are critical to the global economy’s stability and must maintain or build new financial services infrastructure.

Though this model worked well in the previous century, the financial crisis and, as a result, the Great Recession exposed its flaw. A domino effect of tumbling economies and the onset of the global recession resulted from the balance sheet problems of a few large financial institutions.

A domino effect of tumbling economies and the onset of the global recession resulted from the balance sheet problems of a few large financial institutions.

The Emergence of Defi

MakerDAO, a platform launched in 2015 and allowed users to use cryptocurrency as collateral for loans, is often credited with launching Defi. Defi protocols, like traditional cryptocurrencies, promise to cut out the middlemen. Until now, the market has been fueled by this libertarian viewpoint and the desire of investors to make money.

Bitcoin was founded in 2009 as a substitute for traditional finance and financial institutions such as banks. However, while bitcoin was designed to be used as money, it still has several limitations. The operation of Bitcoin is reliant on a network of new central authorities to keep the wheels turning. Miners, node operators, wallets, and exchanges are among them.

While helpful, these authorities tend to act like the people they were meant to eliminate. They have control over many crucial aspects.

Assets that are listed, customers who can use their services, and more are among them. The people alone should run a truly democratized financial ecosystem. Bitcoin has shown flashes of this potential, but it has also fallen short.

There are no central authorities, and protocols are managed by smart contracts designed to prevent fraud. Defi works as an open, decentralized, and trustless financial network. The value of tokens now locked in Defi protocols is approaching $16 billion as of mid-December 2020, thanks to this openness, which has attracted many investors.

Components and Technology Behind Defi

Defi’s components are similar to those of existing financial ecosystems in that they require stable currencies and a diverse range of use cases. Stablecoins and services such as crypto exchanges and lending services are examples of Defi components. Smart contracts provide the framework for Defi apps to function because they encode the terms and activities required for these services to work. A smart contract code, for example, has a specific code that establishes the exact terms and conditions of an individual loan. Investors may liquidate collateral if specific terms or conditions are not met. All of this is done through a code rather than by a bank or other institution manually.

A software stack contains all of the components of a decentralized financial system. The parts of each layer are designed to perform a specific function in constructing a Defi system. Composability is a distinguishing feature of the stack because the components from each layer can be combined to create a Defi app.

The four layers that make up the Defi stack are outlined. The four layers that make up the Defi stack are summarized below:

The Settlement Layer

The settlement layer is also known as Layer 0 because it serves as the foundation for all other Defi transactions. It is made up of a public blockchain and a digital currency or cryptocurrency. The currencies, which may or may not be traded on public markets, are used to settle transactions on Defi apps. Ethereum and its native token ether (ETH), which is traded on crypto exchanges, are examples of the settlement layer. Tokenized versions of assets, such as the US dollar, or tokens that are digital representations of real-world assets, can be used in the settlement layer. A real estate token, for example, could represent the ownership of a piece of land.

The Protocol Layer

Software protocols are written rules and standards that govern specific tasks or activities. These would be a set of principles and rules that all participants in a given industry have agreed to follow as a condition of operating in the industry, similar to real-world institutions. Defi protocols are interoperable, which means multiple entities can use them to create a service or app simultaneously. The protocol layer gives the Defi ecosystem liquidity. Synthetix, an Ethereum-based derivatives trading protocol, is an example of a Defi protocol. It’s used to make digital replicas of real-world assets.

The Application Layer

The application layer is where consumer-facing applications live, as the name implies. The underlying protocols are abstracted into simple consumer-focused services in these applications. This layer houses most of the cryptocurrency ecosystem’s applications, such as decentralized cryptocurrency exchanges and lending services.

The Aggregation Layer

Aggregators connect various applications from the previous layer to provide a service to investors in the aggregation layer. They might, for example, make it possible to transfer money seamlessly between different financial instruments to maximize returns. Such trading actions would necessitate a lot of paperwork and coordination in a physical setup. On the other hand, a technology-based framework should smooth the investment rails, allowing traders to switch between different services quickly. On the aggregation layer, lending and borrowing are two examples of services. Other examples include banking services and cryptocurrency wallets.

Defi’s Applications

Decentralized Exchanges (DEXs)

Decentralized exchanges are those that operate without the use of an intermediary. They do not have the same level of popularity as their centralized counterparts.

DEXs allow users to buy and sell cryptocurrencies directly with one another in a trustless environment. Unlike centralized exchanges, assets traded on DEXs are never held in an escrow or third-party wallet. Centralized exchanges like Binance and Coinbase are well-known examples. They have a protective nature. To put it another way, buyers and sellers have faith in the central authority to protect their digital assets.

Lending Platforms

Decentralized lending platforms, according to proponents, are democratizing the lending ecosystem. Smart contracts are used instead of intermediaries like banks on these platforms, allowing borrowers and lenders to participate in an open system. Borrowers can access liquidity without selling their crypto assets, and lenders can earn interest on their crypto assets by lending them out.

In the traditional financial system, you must first provide collateral before applying for a loan from a bank. This idea is comparable to what occurs in Defi. Borrowers must over-collateralize their loans by pledging assets that are worth more than the loan amount. Maker, Compound, and Aave are three of the most popular Defi lending platforms.

Prediction Markets

Participants in a prediction market can wager on the outcomes of future events. These platforms work in the same way as traditional prediction markets but with the added benefit of blockchain technology, eliminating the need for intermediaries. Augur, Gnosis, and FTX are examples of Defi prediction markets. During the 2020 presidential elections in the United States, crypto-powered prediction markets thrived. Augur set a new record with a volume of over $8 million. Election volumes were also high on other platforms such as Polymarket and Predictit.

Yield Farming

The process of locking up cryptocurrencies in exchange for a reward is known as yield farming. It’s the newest buzzword in the Defi world. Yield farmers stake popular coins such as ether, dai, tether, and others.

The Advantages of Defi

Permissionless

Traditional banks are inherently costly and bureaucratic. They take too long to process transactions, and their stringent requirements have kept many people out of the financial system. Many of these problems were addressed by Defi. Here are a few of its advantages.

Defi allows anyone to participate in the financial system, regardless of their income, race, wealth, culture, or geographic location. All that is required of a user is a smartphone or a computer with internet access.

Unbanked people account for a sizable portion of the global population. In 2018, the World Bank estimated that 20% of the world’s population did not have access to banking services. This lack of access is because most unbanked people lack essential know-your-customer (KYC) documents such as state-issued identification cards.

Many Defi platforms allow users to work without any of this. A Maker loan, for example, can be obtained without the need for identification or a credit score.

Interest Rates for Investors

Defi not only allows you to keep your money in a savings account, but it also allows you to earn money. You can deposit assets and lend them out to borrowers on platforms like Aave and Compound. You will receive your interest at a predetermined time and will be able to reinvest your funds into the system.

Compound pays up to 4.3 percent interest on deposits made with specific tokens, while Aave pays up to 5.73 percent. It’s easy to see why some people are shifting their assets to Defi compared to the 0.6 percent to 0.7 percent currently offered by traditional banks for savings accounts.

Financial self-sufficiency

You keep control of your finances with Defi platforms. You decide what happens to your funds after you deposit them into the platform. A smart contract can qualify you for a loan or choose how to manage your investments instead of relying on human intermediaries.

No one has the authority to expel you from the Defi protocol. The law that underpins the smart contract operates invisibly.

Greater transparency

Defi allows for more transparency and accessibility. All activities are visible to the public because most Defi protocols are built on the blockchain, a public ledger. Anyone can view transactions, but unlike traditional banks, these accounts are not linked to anyone directly. Accounts are instead pseudo-anonymous, with only numerical addresses listed. Because most Defi products are open source, users with programming skills can audit or improve the source code. Because of community interaction, open-source codes are far more secure and of higher quality than proprietary software.

Disadvantages and Risks of Defi

Smart contract security concerns

Any Defi protocol’s backbone is smart contracts. They are, however, vulnerable to manipulation.

Smart contracts are open-source by default. This design allows potential Defi users to examine them before committing to the protocol. Security firms audit the smart contracts of most Defi protocols. This process is where the issue starts. Humans are prone to overlooking flaws in contracts that could be exploited in the future.

Take Take, for example, the DAO. The digital “Decentralized Autonomous Organization” was a sort of investor-directed venture capital fund launched in April 2016 and quickly grew to become the largest crowdfunding platform, with $120 million in assets under management. By June of that year, however, hackers had discovered a flaw in the smart contract and had stolen about a third of its funds. They transferred the funds to a “child DAO,” which followed the parent protocol’s structure. For weeks, users could not access their funds, making this the largest hack in crowdfunding history.

Since then, there have been several refunds, allowing investors with leftover DAO tokens to receive compensation. However, the incident caused a stir in the Defi community. Developers who create protocols must now ensure that their smart contracts are audited multiple times.

Data Feed Centralization

Off-chain data is inaccessible to blockchain protocols. To address this, many of them rely on oracles, which are third-party services that give them access to external data. Oracles act as a link between blockchains and the rest of the world, relaying information to smart contracts.

The main problem with oracles is that they introduce a central point of trust into otherwise trustless and decentralized systems, thus making the smart contract vulnerable because of this centrality. The consequences of an oracle broadcasting incorrect information could be disastrous.

Synthetix, for example, is a Defi asset issuance platform. An oracle sent false price feed data to the platform’s smart contract on June 25, 2019. This misinformation was exploited by a user’s trading bot, which inflated the user’s balance. This error allowed the user to convert the balance into about 37 million Synthetic ETH (sETH) tokens worth about $70 million at the time. Synthetix confirmed that they contacted the user, who agreed to reverse the transaction for an undisclosed bug bounty.

The Future of Defi

The performance of Defi in 2020 has shaken the entire crypto market. With the value of assets locked increasing, even traditional crypto companies are looking to profit from the hype.

The total USD value locked in Defi now exceeds US$16 billion, according to Defi Pulse. This value represents a more than 2,300 percent increase since the beginning of the year, as of December 2020.

Unfortunately, the rise of Defi has attracted a slew of nefarious characters. According to recent data from crypto analytics firm CipherTrace, total losses from Defi thefts in 2020 have totaled $100 million. And it’s on the rise. Defi protocols were responsible for half of all cryptocurrency thefts in the second half of 2020. Thieves used decentralized exchanges to steal $19 million from centralized exchange KuCoin.

According to CipherTrace, DeFi’s rapid growth made it a prime target for cybercriminals, most of whom were aware of and exploited some of its technical flaws.

The Defi industry, like the crypto space as a whole, is going through some growing pains. It’s still in its early stages, so there’s plenty of room for development. Despite the advantages and returns, however, it is still a risky venture for the average investor.

--

--

Mfundo Mncwabe

Copy Writer and creative writer. I enjoy writing and sharing my creativity with the world.