DeFi Is Here to Stay
If you were living in the United States at the time, the year 2008 is likely marked by a memory of turmoil and uncertainty. The complex and globally devastating financial crisis was catalyzed by the burst of the American housing bubble—caused by years of banks giving subprime mortgages to borrowers with poor credit and high risk of default, and selling these bundled loans as mortgage-backed securities. After the collapse of the market, many of the affected financial institutions survived by taking advantage of government bailouts and by merging with one another to create massive composite institutions. Though most Americans at the time agreed with the relief programs, what undoubtedly strengthened the national economy in a time of crisis also created a much more centralized financial sector.
Fast forward 15 years, and many Americans have a deep distrust in the financial industry, in some part because of the events that transpired in 2008. Many of us wonder if we can trust these powerful centralized institutions to make decisions about our money. And for most of modern history, we’ve had no other choice but to let them. But that began to change just one year after the crisis, with the release of the Bitcoin whitepaper and the birth of blockchain. Since then, blockchain technology has created new paradigms for finance with the rise of cryptocurrency, decentralized exchanges, and accessible peer-to-peer transactions.
Decentralized finance (DeFi) is the term used to describe a financial system built on blockchain. Unlike traditional finance, DeFi doesn’t rely on banks, credit card companies, or investment firms to function. Instead, it allows the average citizen to directly access and control their finances without having to trust or depend on a central intermediary. DeFi systems are more resistant to fraud and tampering and offer greater financial inclusion for those who may not have access to traditional financial services.
On-chain financial instruments
DeFi is characterized by various financial instruments built on the blockchain. On-chain financial instruments are transparent and immutable, meaning that they cannot be altered once they have been written to the blockchain, which adds a layer of security and trust to financial transactions. These applications are also accessible to anyone with an internet connection, making them more inclusive than traditional financial products and services that may be limited by geography or other factors. Let's take a look at a few examples.
One of the most popular and well known applications for DeFi is decentralized exchanges (DEXs), which allow users to buy and sell cryptocurrencies directly with one another.
- DEXs, such as Uniswap or dYdX, use smart contracts to facilitate trades, which makes them faster and more secure than traditional exchanges.
- Because DEXs are decentralized and not controlled by a single entity, there is no central point of failure, which makes them less vulnerable to hacks and other security breaches.
- DEXs are not subject to the same regulations and restrictions as centralized exchanges, allowing users to trade a wider range of assets, including those that might be banned on centralized exchanges.
- DEXs allow users to trade anonymously.
- Perhaps most importantly, on a DEX, users have full control over their own funds and don’t have to trust them to a third party.
Lending and borrowing
Another popular DeFi use case is decentralized lending and borrowing platforms, like Aave, which allow users to borrow money without going through a bank.
- These protocols use smart contracts to automate the lending process and often offer higher returns than traditional banks.
- Like DEXs, decentralized borrowing platforms allow users to retain control over their assets, offer increased security for lenders, and reduce the risk of default or fraud.
- Decentralized borrowing platforms also allow users access to a global market of borrowers and lenders, which can offer more diverse investment opportunities and potentially higher returns.
- Decentralized borrowing platforms often have lower fees than traditional borrowing platforms, as they do not have the overhead costs associated with operating a central authority.
- Decentralized borrowing platforms can offer greater transparency, as all transactions are recorded on a public blockchain, which can make it easier to track the movement of assets and ensure compliance with regulations.
Yield farming and liquidity mining
DeFi has also spawned a new class of financial instruments known as "yield farming" or "liquidity mining,” which allow users to earn returns by providing liquidity to DEXs or by participating in other DeFi protocols. In a centralized system, liquidity is provided by banks or brokerage firms, but in a decentralized system, liquidity is provided by individuals or organizations that add their assets to a pool.
- Yield farming involves providing liquidity to a DEX and earning rewards in return. These rewards can come in the form of the DEX's native token or another cryptocurrency. Yield farmers often move their funds between different DEXs and lending protocols to maximize their returns.
- Liquidity mining is similar to yield farming, but it involves providing liquidity to a specific lending or borrowing protocol rather than a DEX. Like yield farming, liquidity mining can earn returns in the form of fees and rewards paid in a particular cryptocurrency.
Decentralized prediction markets use smart contracts to automate the process of placing and settling bets placed on the outcome of events like sports or elections.
- These platforms allow users to trade on a wide range of events, including those that may not be covered by traditional betting markets, which makes them more appealing to users that want to speculate on non-mainstream events.
- Decentralized prediction markets also offer a high degree of transparency, as all bets and outcomes are recorded on the blockchain. This helps to reduce the risk of fraud and ensures that the results of the market are fair and accurate.
Limitations of DeFi
Although DeFi is reimagining finance and enabling new exciting on-chain use cases for individuals and organizations all over the world, it still has a ways to go before it’s mature enough to compete with traditional finance. For one, DeFi hasn’t been widely adopted by the general public, which limits the liquidity of certain markets. DeFi also deals in cryptocurrency, which is still relatively volatile. But both of these limitations can (and will) be overcome in time as the market matures and expands to a wider user base.
The more difficult-to-solve limitation to DeFi is the issue of its entire foundation and infrastructure: the blockchain. The blockchain is designed to act as a decentralized ledger, but it’s not meant to (and simply cannot) store large volumes of data, run complex computations, or integrate well with other environments. Because they’re built on the blockchain, DeFi protocols are similarly restricted.
DeFi protocols employ smart contracts, which have limited data sources that they can pull from: either they use tamperproof (but extremely limited) blockchain data, or they use off-chain data that's been written to the chain from centralized, tamperable databases. DeFi protocols rely on a variety of off-chain data sources to operate, such as asset prices, exchange rates, and other market data, which are fed to smart contracts through oracle networks. While oracle networks are tamper-resistant, they’re not completely tamperproof. And in DeFi, ensuring that data is tamperproof is paramount.
Solving the DeFi problem
Historically, there's never been a way to load real-world data that both originates off-chain and is completely tamperproof to a smart contract. But if you’ve been following along with the Space and Time project, you know that that’s changing. Space and Time is a decentralized data warehouse that indexes every major blockchain, stores the data in a relational state, and allows it to be joined with off-chain data loaded from any source. Proof of SQL, a patented novel cryptographic protocol, allows the data warehouse to generate a SNARK cryptographic proof of query execution, guaranteeing that the query was run correctly and that the underlying data is verifiably tamperproof. Finally, the cryptographically guaranteed query results can be connected directly to smart contracts.
For the first time since the inception of DeFi, developers have access to a trustlessly queryable, decentralized database with which to build smart contracts, enabling new financial instruments on-chain. DeFi protocols have access to both realtime and historical blockchain data, and smart contracts can access large data volumes aggregated off-chain in a verifiably tamperproof way, enabling new and expanded financial instruments on-chain.
DeFi is solving some of the most important problems in the traditional finance industry, but without verifiably tamperproof off-chain data and analytics, it’s still subject to the same catastrophic deficiencies. For example, if a malicious actor is able to change the price data used by a lending platform, they could cause the platform to lend out too much money and lead to a situation where borrowers are unable to repay their loans.
Which, if you think about it, is an eerily similar predicament to that faced by the U.S. housing market in the mid-2000s.
Tamperproof data provides a level of trust and security that is essential for the proper functioning of DeFi protocols and the protection of users' assets. The future of DeFi is cryptographically guaranteed data, and that future is here.
This article is also available to read on Medium.