DeFi defined: a guide to decentralized finance

January 26, 2022

DeFi leverages blockchain technology to challenge traditional banking and bring financial products to everyone with internet access

Coinbase Cloud Discover knoweledge base dev founds header image

Decentralized finance (DeFi) incorporates a category of financial products and services built on blockchain technology. The benefits are significant:

  • Unlike traditional financial products and services, DeFi does not use intermediaries. This enables people from all social and geographical backgrounds to access financial systems.

  • Users can access DeFi services and stake their earnings to participate in networks whose tokens they hold.

  • Developers can build decentralized applications entirely on‐chain, using read/write infrastructure to interact with the network’s data.

By removing the intermediaries used in traditional financial products and services, DeFi makes financial systems accessible to a broader spectrum of users. 

The DeFi ecosystem removes many of the traditional barriers to access for financial services, such as preferential terms, identity requirements, credit scores, and arduous pre‐qualification paperwork. This means anyone with an internet connection and access to crypto assets can participate.

Participation in DeFi is booming; DeFi Pulse data shows that the amount locked in to Ethereum‐based DeFi applications was $103 billion as of October 26, 2021, up from $65 billion on April 26, 2021. Over the course of 2020, the average Ethereum block size nearly doubled, from 22,415 bytes to 40,265 bytes. This was partly due to the boom in DeFi participation. Complex DeFi transactions became more common, prompting miners to set higher gas ceilings, which led to larger block sizes.

Why is DeFi important?

DeFi projects typically take the form of decentralized applications (referred to as dapps). How do they differ from established, centralized applications — and what are the benefits?

Centralized applications call data from a centralized server. So when Jane logs in to her bank’s online app on her smartphone, for example, the app checks the data server in the bank’s data center to ensure her password is correct. Then it loads her account balances. All of Jane’s information is controlled by that one entity. She must trust the bank to accurately maintain the record of her account balances and securely maintain any other personal data.

In contrast, a decentralized application calls its data from a blockchain (or other P2P network), normally via a combination of wallets and smart contracts. Because the application's data and business logic is stored in a blockchain, which is usually decentralized, the application itself is decentralized. No single entity controls a user’s data; smart contracts and cryptography ensure the information is shared around the network in a secure manner.

The basic features of dapps design highlight some of the reasons why people are excited about DeFi:

  • Trustless transfer of money  Because DeFi products are decentralized, assets can be transferred and managed without users needing to trust intermediaries, such as banks or national settlement companies.

  • Logic embedded in smart contracts  A smart contract is a self‐executing program on a blockchain that controls and/or documents events or actions according to preset terms. Smart contracts can execute the stipulations of an agreement, such as automatically distributing funds. They can also call data from a blockchain and serve as the business logic for decentralized applications. This means financial transactions — such as trading, lending, or even payroll — can happen automatically on preset terms, rather than requiring approval from a third party during their business hours. Some experts estimate banks could save up to $270 billion annually by leveraging smart contract technology to execute compliance functions such as know-your-customer (KYC) and anti-money laundering (AML) controls.

  • Minimal counterparties  While a traditional asset exchange requires a buyer to be paired with an individual seller, decentralized exchanges use smart contracts, with supply and demand coded into the contract’s logic. This means buyers can purchase tokens from an overall pool, rather than relying on counterparties. Counterparty risk is removed because the collateral for the other side of the exchange is already in the dapps smart contract. The purchaser does not need to be paired to a specific seller.

  • Decentralized/"bankless"  By removing a central authority from financial services, DeFi creates products that are censorship‐resistant. Being spread across a peer‐to‐peer network also makes them more resistant to manipulation.

Other highlights of DeFi include:

  • Speed: Most DeFi transactions take just a few seconds, regardless of the time of day or week, rather than being dependent on business hours. They are also available more quickly than those requiring an intermediary. DeFi functions according to programmed logic and mathematically provable values, rather than depending on email ping-pong or onerous settlement lines.

  • Flexible and composable  Anyone wanting to trade digital asset pairs (such as ETH/USDC) that are not tradeable on any centralized exchange can create their own pair on a decentralized exchange, such as Uniswap. Other users can then trade that pair. Anyone wanting to build a new financial product can create a new smart contract to meet their exact needs. Token swaps and bridges enable broad ecosystem participation by heightening interoperability, and the composable elements of open‐source blockchain technologies break down data silos and encourage cross‐chain innovation.

  • Open and permissionless  Traditional lending methods require potential borrowers to submit years of tax returns and other personal documentation, then subject them to background and employment checks, and more. With DeFi, anyone with the right technology and assets can participate. If you have enough funds in your connected wallet to use a DeFi product, you can.

  • Potential for financial independence  DeFi protocols can increase financial independence around the globe. In countries such as the U.S., for example, retail investors generally receive low yields on traditional investments. People living in countries with higher-yield opportunities have a different problem: interest rates can make borrowing unfeasible. Global, open DeFi protocols enable users in lower‐yield countries to earn better returns than traditional finance can offer. Meanwhile, users in higher‐yield countries are able to borrow funds at lower rates than they would otherwise pay to domestic financial institutions. By using stablecoins within these DeFi solutions, users enjoy the benefits of DeFi while avoiding the volatility of some cryptocurrencies.

What are people building in DeFi?

Decentralized exchanges are platforms that enable the peer‐to‐peer exchange of digital assets. Pools of digital assets and derivatives, managed by a smart contract, enable DeFi lending and trading. Liquidity pools and smart contracts replace the order book system; liquidity providers lock their assets into the pool, providing liquidity, and earn fees when people trade in these pools.

Yield farming, also referred to as liquidity mining, is the process of generating rewards by contributing assets to liquidity pools or locking/staking assets into new protocols in exchange for rewards. Financial marketplaces offer rewards — in the form of a native protocol token — to incentivize capital migration on to their platform. Users leverage these opportunities to maximize their annual returns by participating in cycles of such early‐stage capital migration opportunities. Yield farming is considered the first "native DeFi" growth‐hacking strategy. 

Collateralized borrowing and lending platforms enable people to borrow against their crypto assets or earn savings as a liquidity provider, leveraging their asset’s value without needing to sell. Users can lock a specified asset into a smart contract as collateral, then take out an over‐collateralized loan against that asset. In these protocols the collateral is loaned elsewhere to gain greater yields, which offset the loan and any interest being charged on it. Users can also earn a return on their deposited savings by providing liquidity for borrowers — often earning a higher rate than via a traditional savings account. For borrowers, unlike in traditional borrowing mechanisms, DeFi loans often do not have a set repayment schedule. As long as the borrower leaves their collateral deposited, the loan can remain open.

Plenty of other projects are currently blossoming within this new and growing field. DeFi insurance providers use pooled capital to maintain capital efficiency while allowing claim validity, underwriting, and governance to be determined by token holders. DeFi equivalents of hedge funds use smart contracts’ self‐executing functionality to follow active investment strategies, thereby replacing actively managed funds. From earn‐as‐you‐work payment applications to building asset management strategies for other users to participate in, DeFi’s composability and smart-contract functionality opens up seemingly limitless possibilities for development.

Popular DeFi protocols include: 

  • Uniswap, a decentralized exchange.

  • dydx, a perpetuals contract trading platform.

  • Yearn, a gateway to other DeFi applications, featuring community‐driven investment strategies.

  • Aave, an open‐source protocol for earning interest and borrowing digital assets.

  • Metamask and Argent: Ethereum‐based crypto wallets that also enable investing, borrowing, and saving.

  • Anchor, a Terra‐based savings and yield protocol.

  • RabbitHole, a gateway to new DeFi projects that offers rewards for exploring the space.

What are the risks of participating in DeFi?

Participating in DeFi comes with greater risk than simply purchasing tokens. Consider that in most cases, when purchasing a layer‐1 cryptocurrency such as ETH or BTC, you are trusting a vastly distributed network with years of transaction history and development efforts. In contrast, many DeFi protocols are relatively new (or spring up overnight). They may be built by untested individuals or teams. On top of that, they may offer high yields when they first start out, to attract participants. This can prompt users to dive in headfirst, before properly testing the project’s credentials.

URL hacks, fatal code flaws or vulnerabilities in smart contracts are all common risks in the DeFi space. So too are "rug pulls." These happen when a project masquerading as a decentralized or open‐source project is actually controlled by a single entity — who absconds with all users’ funds at once. To mitigate the risks involved in DeFi participation, thoroughly research any DeFi projects you are considering investing in. Ensure the project has a verifiable development team and that its smart contract has been independently audited. Also, check to see what kind of chatter surrounds the application in the ecosystem. Projects with established communities are generally safest, because they are focused on the long‐term development and services of the project.

In addition to the risk of scams, DeFi comes with many market‐driven risks. Volatility is a given, as users pull liquidity in and out of projects frequently to seek out the highest yields in the space. There may also be tax implications for token swaps, purchases, and earnings, and most transactions charge significant fees.

Overcollateralized borrowing/lending DeFi protocols carry a liquidation risk for borrowers. When the value of the collateral asset becomes too close to the value of the loaned asset, the protocol calls your position and seizes your collateral. This is referred to as a margin call. Although you do not need to repay the borrowed assets, the loss of the underlying collateral can disrupt your financial planning and crypto savings goals.

Another risk factor to consider in DeFi is impermanent loss. This happens when the value of assets provided as liquidity in an automated market-maker changes during the course of the investment, leading to missed market gains. Users may find themselves in a scenario where their asset would have gained more in value from market changes — earned at a set rate — than from being a liquidity provider.

Things to consider when getting involved in DeFi:

  • A good first step to participating in DeFi is to examine the tokens you own and look at how they can be leveraged. Are you an early holder of a token that now lacks liquidity in a high‐yield liquidity pool? Perhaps your BTC could be wrapped for use in Ethereum‐based DeFi products via Keep’s tBTC?

  • Weigh up your goals, the amount of time you are willing to invest into maintaining your DeFi ventures, and the variety of tokens you already hold — then choose a DeFi project that aligns with that. Do you want to save your tokens and earn interest? Maybe you want to take out a loan using your holdings as collateral, or invest in a new and upcoming protocol? Carefully survey the DeFi landscape to select a project that services your needs.

  • Read the documentation for any DeFi project you are considering taking part in. Does the balance of manual monitoring and automatic actions (withdrawing, compounding, assessing collateralization, etc) align with the amount of time and energy you are willing to put into the project? Easy‐to‐use retail interfaces such as Coinbase Wallet can also streamline and simplify the process of investing in DeFi projects.

  • You can also stake, or delegate, the tokens you earn in most DeFi protocols (instead of selling them for fiat) and earn further returns for participating. Learn more about delegation in our explainer.

How can I get involved as a developer?

"For all intents and purposes, DeFi was not a thing two years ago — it was just a few folks at a meetup who were talking about this idea that we could have finance that was built using smart contracting platforms and systems. [Now] new protocols, new pieces of technology that fit into the different protocols — everything from liquidity pools to automated market-making to lending to insurance: literally everything across the board is sort of being built in the decentralized finance space."— Joe Lallouz, Coinbase Cloud, speaking to Finance Magnates in September 2020

Developers are involved in all components of DeFi, from building protocols to dapp development, auditing smart contracts, and supporting product upgrades. Most projects have open Q&A sessions and Discord channels. Some even have open GitHub repos, which are a great place for aspiring DeFi developers to start. Many projects share any developer opportunities within their broader ecosystems, on Twitter and other social media platforms.

Coinbase Cloud builds for the protocols supporting DeFi solutions. Whether we’re offering query and transact nodes for Ethereum, powering eth2 staking, testing network upgrades and running the Terra Foundation’s public Terra validators, or operating the seed nodes to keep Chain operating smoothly, we support the fundamentals underpinning the growth of the crypto and DeFi ecosystems.

Query and Transact by Coinbase Cloud provides an easy on‐ramp for developers wishing to access blockchain data. It enables enterprises, DAOs, foundations, and individuals to query data from and write data to their preferred blockchain, without needing to develop the engineering know‐how to do so in‐house. Query and Transact’s read/write infrastructure is fully managed by Coinbase Cloud. Builders can easily scale usage, and DeFi developers can focus time and resources on their products, rather than their infrastructure.

Query and Transact is available not only for Ethereum, the current hub of DeFi activity, but for a number of other protocols gaining traction in the DeFi space. Whether you want to integrate Acala products into your offering, develop a lending protocol for Solana, or create a savings product on Terra, the possibilities are endless.