All Articles
All Articles

Navigating DeFi —a Handy Guide to the New Web3 Decentralized Financial Ecosystem

Table of Contents

DeFi is evolving.

Once just another interesting corner of crypto, it took off in extraordinary style during the DeFi summer of 2020. Since then, it has moved gradually into the background, as new trends like the Metaverse, Play-to-Earn gaming and Web3 more generally have captured the spotlight.

However, no-one should ignore DeFi’s ongoing development and the exciting cryptocurrency investment opportunities that continue to arise.

In 2021 alone, we’ve seen the NFT PFP boom, innovations in token-bound content, the emergence of Layer-2 chains and Ethereum making meaningful steps towards the major upgrade known as Eth2.

At De.Fi, we’re constantly monitoring the space, with a particular focus on security and keeping users safe. We’ve launched a number of initiatives on this front, including our comprehensive report on all the crypto scams that took place in 2021.

However, we understand that many people still don’t know all the foundational building blocks of DeFi to the extent they should. We also know that they want to learn as much as possible, in order to help them succeed.

That’s why we’ve produced this handy guide to navigating DeFi, the new Web3 financial ecosystem.

To get things started, here are the three main layers of DeFi:

  1. Application — This is what the user sees and what they use to interact with DeFi protocols. For example, De.Fi.
  2. Protocol — They are made up of smart contracts interacting with the blockchain to store and transfer assets. For example, Uniswap.
  3. Blockchain — This is where digital assets are stored within addresses on a distributed and decentralized ledger. For example, Ethereum.

Now that you’ve got a high-level overview of DeFi’s main elements, let’s dig deeper into all of them to explain how they work.

Blockchains

DeFi wouldn’t be possible without blockchains as these distributed and decentralized data layers, where digital assets are stored, sit at the base of the entire ecosystem. As there are many different types of blockchains, there are also many different flavors of DeFi, made up of protocols and applications built on top of these blockchain base layers.

What is a blockchain?

As mentioned, a blockchain is simply a way of storing data in the form of digital assets in a distributed and decentralized way.

Every event, which usually involves the moving of digital assets between different addresses, is recorded in blocks, which are then connected together in a long chain that shows the entire history of what has gone on.

A blockchain could exist on a single computer but this wouldn’t be very useful, as they were designed to store data in a distributed and decentralized manner. Therefore, for a blockchain to be of any use, it has to be shared by a range of connected computers. This group of connected computers is what’s referred to as a blockchain network.

This network of computers all run the same software, which contains the shared rules about how the blockchain can be updated. The process of coming to an agreement about which transactions occurred and should therefore be added to the blockchain is called consensus.

Each blockchain network comes to consensus about the state of the blockchain in different ways but the most common approaches are Proof-of-Work (PoW) and Proof-of-Stake (PoS).

Proof-of-Work

Proof-of-Work is an idea that was originally presented by Cynthia Dwork and Moni Naor in 1993 but it really took off when it was adopted by Satoshi Nakamoto in the Bitcoin whitepaper.

Essentially, Proof-of-Work involves miners (who are a specific type of computer operating within the network) solving a complex mathematical problem in order to win the right to add a new block of transactions to the blockchain.

This requires a lot of energy as the math is so hard, which helps to ensure any miner wanting to manipulate the blockchain finds it extremely difficult to do so. A miner is rewarded for solving the problem and adding a new block of transactions, usually with the blockchain’s native asset.

Ethereum has used Proof-of-Work throughout its existence but is moving to Proof-of-Stake as part of the major ongoing upgrade known as Eth2. For further information, you can refer to the Bitcoin Whitepaper or the Ethereum Whitepaper.

Proof-of-Stake

Proof-of-Stake also involves adding new blocks of transactions to the blockchain but it does not involve miners working out the answer to a mathematical puzzle in order to do so.

Instead, it involves validators who own a minimum amount of the network’s native asset “staking” these assets in order to be chosen to add a new block. Different Proof-of-Stake mechanisms work in slightly different ways but essentially the stake is there to discourage bad actors from trying to manipulate the blockchain, as doing so would cause them to lose what they have staked.

As mentioned, Ethereum is gradually shifting from Proof-of-Work to Proof-of-Stake, with some of this activity having already occurred and much of it planned for 2022.

For a further details, see Vitalik Buterin’s explanation on the Ethereum blog, as quoted below:

“In the case of proof of stake, it doesn’t take computational power to create a work — instead, it takes money…every “coin” has a chance per second of becoming the lucky coin that has the right to create a new valid block, so the more coins you have the faster you can create new blocks in the long run.”

EVM and EVM-Compatible Chains

The Ethereum Virtual Machine (EVM) is software that provides an environment (or virtual machine) for digital transactions, smart contracts and decentralized applications to run in.

When lots of different computers, or nodes, run the EVM at the same time, it establishes a core foundation for the distributed and decentralized network that is Ethereum. This is the platform on which an ecosystem of accounts, transactions, contracts and applications can operate.

Like any software, the EVM is made up of various rules that are written in code, define how the environment works and outline what developers can do. These rules also relate to other core elements of Ethereum’s design, such as addresses, accounts and the native Ether asset.

However, the EVM can also be used outside of Ethereum with a different set of core elements to produce a completely different blockchain network. When this occurs, these different blockchain networks are referred to as ‘EVM-compatible’.

Some well-known EVM-compatible blockchain networks include BNB Chain, Polygon and Fantom. One reason why blockchain networks choose to be EMV-compatible is so it is easy for developers and users who are familiar with Ethereum to be able to use the new chain.

Non-EVM Chains

Quite simply, a non-EVM chain is one that has not chosen to use the EVM as part of its core design.

As Bitcoin was launched before Ethereum, it is not EMV-compatible. There are also many blockchain networks that are younger than Ethereum and also not EVM-compatible, such as Solana, Terra and Polkadot.

In general, the blockchains that have not chosen to adopt the EVM have done so because they believe it is not the best technical option and they can implement a better one themselves. The trade-off they accept in taking this decision is to make it harder for Ethereum developers and users to move their activity or assets to the non-EVM chain.

Rollups

A rollup is a blockchain network that has been specifically designed to remove transaction computation from the Ethereum network in order to reduce the fees that are associated with this activity. This relates to the scaling issues that Ethereum has faced as a result of its design.

Essentially, the community has decided to prioritize the decentralization of the network over the cost associated with making transactions. Therefore, when lots of different entities want to have their transactions confirmed on the Ethereum network, the cost of doing so rises.

A rollup is a separate network that is designed to take transactions off the Ethereum blockchain, compute them and then ‘rollup’ these completed transactions into a package that can be returned and confirmed on the Ethereum blockchain.

Optimistic rollups, which includes Arbitrum and Optimism, and zero-knowledge rollups, which includes Loopring and zkSync, are the two main types of rollup available.

Polkadot

Polkadot is a blockchain network that supports a range of different connected blockchains, which it refers to as parachains. It includes a relay chain that is responsible for shared security, consensus and cross-chain interoperability, which all parachains interact with.

Polkadot’s goal is to provide a scalable, interoperable and secure ecosystem for the next web. Essentially, it wants anyone to be able to launch parachains (or parathreads, which are similar) for a specific purpose and for these to be fully interoperable.

In terms of DeFi, the Polkadot ecosystem is in its very early days of development. However, it’s worth understanding now as many people believe its interoperable design could be the future direction that all projects follow.

Cosmos

Similarly to Polkadot, Cosmos envisages a connected future for blockchain and refers to itself as the ‘Internet of Blockchains’.

The point to remember about these projects is that they are not trying to build a single blockchain but instead providing the tools and interoperability features that allow developers to build interconnected blockchains and DeFi protocols.

One key aspect of Cosmos that you should know about is the Cosmos SDK (Software Development Kit), which allows developers to easily create application-specific blockchains. Another is the Inter-Blockchain Communication (IBC) Protocol, which allows for communication between blockchains within the Cosmos ecosystem.

Numerous blockchains have been built to be independent but interoperable within the Cosmos ecosystem, including BNB Chain and Terra. These blockchains are the foundation on which well-known DeFi projects like PancakeSwap and Anchor are built.

Protocols and Applications

The protocols and applications are where the really important mechanics of DeFi occur.

In terms of computer science, a protocol is a set of rules for how data is transmitted between computers. That is why there are examples such as Internet Protocols, which define how data moves around the network.

In blockchain networks, this is where smart contracts operate, defining rules that serve a specific purpose within the network, as described below. In layman’s terms, the protocols that exist in blockchain are like the back-end logic that exists in web applications.

Lending & Borrowing

Just as they sound, lending and borrowing protocols are those that lend out assets to an entity that wants to borrow them. This is often made possible because other entities lend their assets to the protocol for the borrower to access. Usually, the lender receives a fee for lending and the borrower pays a fee for borrowing.

The most well-known example of this type of protocol is MakerDAO, which many people hold up as the original DeFi protocol. More recent but equally well-established examples include Compound and Aave.

Asset Management

The role of asset management firms in traditional finance is not just to manage their clients’ funds but also to ensure they grow. In DeFi, the same is true but with greater opportunity to increase your investment’s value significantly, if you’re willing to take on more risk.

Essentially, asset management protocols work by taking deposits and investing them into other protocols in order to receive the yield farming rewards on offer. One of the most well-known examples is Yearn Finance.

Centralized (CEX) and Decentralized Exchanges (DEX)

Exchanges are, as they sound, places where users can swap their assets for other assets or for fiat currencies. In the traditional finance world, the equivalent would be something like the Nasdaq or New York Stock Exchange, although these are exchanges where you would swap stocks.

The difference between a centralized exchange and a decentralized exchange is a matter of custody. A centralized exchange, such as Coinbase or Binance, will ask you to deposit assets or fiat currencies into an account they control before you can make an exchange. In this way, they are always in control of whether you can access your deposits, just like a traditional bank.

However, with a decentralized exchange, you are always in control of your assets because there is no entity that takes custody of them in order to facilitate an exchange. Instead, decentralized exchanges generate pools of assets lent by liquidity providers so that you can make an instant exchange of the assets you want.

Brokerage and Account Services

Brokerage and account services are similar to asset management services in that they manage and deploy assets in order to generate yield from investments. The best brokerage and account services enable this while also protecting users from scams by using auditing and analytics tools to highlight the protocols you should avoid.

In traditional finance, an example of a brokerage service is Robinhood, whereas De.Fiis an example within DeFi.

De.Fi

De.Fi is the only safe investment dashboard designed for all DeFi users.

It includes an innovative suite of asset management tools, such as an asset management dashboard and a security toolkit. De.Fi integrates with most major networks and protocols, including 24 that are live now and 800 that are expected to be integrated in 2022.

A couple of other things that make De.Fi different from a Web2 solution like Robinhood are that it is non-custodial and that it’s experienced in identifying DeFi scams.

Derivatives

A derivative is a financial product that derives its value from an underlying asset, such as a gold futures contract that enables you to bet on the price of gold at some future date. Other examples of derivatives include options and credit default swaps.

In the world of DeFi, derivatives come in many different shapes and sizes but one of the first implementations of derivatives are tokenized assets that represent financial assets from the traditional finance world, such as equities. Synthetix was a pioneering DeFi derivatives protocol.

Oracles

Oracles are data services that other protocols connect to in order to receive a feed of information that is critical to how they function. For example, an insurance protocol might use an oracle that feeds it some data to help it determine whether certain parameters have been met that cause a claim to be paid out.

Decentralized oracles exist within decentralized networks whose purpose is to collect data, verify whether it should be trusted and pass it on to other protocols. Oracles are not always decentralized and some are more like a standard data feed from a centralized exchange.

DAOs

DAO is an acronym for Decentralized Autonomous Organization. It is an organizational structure that is unique to blockchain and can be viewed as a blend of a community, a corporation and a cooperative for the Web3 world.

Essentially, a DAO is a group of crypto natives that choose to pool their capital into a collective treasury in order to achieve a common goal, such as investing or funding a protocol’s roadmap or making a social impact.

Why does DeFi have DAOs?

Many crypto natives believe that decentralization is the most important benefit of using blockchain because it allows autonomous systems to operate that aren’t controlled by a small number of centralized entities. At the same time, they also realize that they can achieve more through collaboration and the pooling of resources.

Therefore, in order to form groups that pursue a common goal, they have chosen the decentralized structure of DAO rather than the centralized structure of a corporation. In this way, different entities from across the world can join together and coordinate their activities within the Web3 world and avoid the location-based restrictions that corporations operating in specific jurisdictions have to deal with.

Many DAOs have been established in DeFi in order to achieve these benefits and direct them towards a specific financial goal. For example, the LAO is a DAO designed to act like a venture capital firm, to fund new crypto protocols and help them develop. Another well-known DAO is the MakerDAO, which is one of the most established DeFi DAOs and funds the development of the Maker protocol.

DAO governance

Each DAO works differently but the common characteristic across all of them is that all the rules that govern a DAO are encoded into smart contracts.

This is similar to how the rules that govern a corporation are recorded in legal documents, with the obvious difference being that a DAO has a much more automated and efficient form of governance. Furthermore, DAOs are much more open, transparent and easy for anyone in the world to interact with or take part in.

DAOs that you need to know

As mentioned, MakerDAO is recognised as one of the most established and impressive DAOs in existence. The DAO funds core units, which are decentralized teams of workers responsible for maintaining and developing the most important parts of the MakerDAO system.

We’ve also mentioned the LAO, which is an example of a DAO that has been set up to invest its members’ assets in a variety of new or emerging projects, and there are many other similar examples. Another common DAO format is based around a common interest and Friends With Benefits, a DAO for cultural creators, is a well known example.

Finally, it’s worth mentioning “The DAO” which may be the best known one of them all. This was one of the earliest incarnations of a DAO when it was launched in 2016 but is best known for being hacked and causing a soft fork of the Ethereum blockchain as a result.

NFTs

Non-fungible tokens (NFTs) are totally unique digital assets representing art, music, video game items and much more.

They differ from fungible tokens, like Bitcoin and Ethereum, because those tokens can be exchanged one-for-one, whereas every NFT has its own unique value. Also, when you purchase an NFT, you are buying built-in authentication of ownership that is registered on a blockchain.

Why do NFTs matter?

If assets like Bitcoin or Ethereum can be said to represent money or gas or maybe even a reserve asset in the Web3 world, NFTs can represent everything else.

This matters because of how much people already care about the unique items they own. Just think of how much individuals treasure their house, car, land or even their designer bag, famous painting or vintage bottle of wine.

Another reason NFTs matter is because digital items have been so easy to copy and distribute up to now. Whether it’s music or art or anything else, creators have found it extremely difficult to prove that they own these items and should have the right to profit from their sale.

The most famous NFTs

So far, the most popular NFTs that have achieved the highest prices and the most attention have tended to be pictures. As they say, beauty is in the eye of the beholder, but there are also factors such as rarity that have clearly played their part in making them so.

Bored Ape Yacht Club (BAYC)

This collection of 10,000 portrait pictures of Bored Apes was first released in 2021. As a collection, these NFTs have experienced the highest volume of total sales, with over $2.5 billion spent on exchanges of BAYC by March 2022.

CryptoPunks

CryptoPunks are considered the original NFT collectible by many, having first launched in June 2017. They are second only to the BAYC in terms of total sales, with over $2 billion spent by March 2022.

Beeple’s collection

Beeple’s works were sought after during the NFT craze of 2021 and were even sold by world-renowned auction house, Christie’s. “Everydays: the First 500 Days” was the most expensive NFT when it sold for over $69 million in March 2021 and is now second on the all-time list.

Pak’s “The Merge”

In December 2021, Beeple’s place at the top of the list of most expensive NFTs was taken by “The Merge’’ by artist Pak. At the time, a group of nearly 30,000 collectors banded together to pay $91.8 million for the piece.

How to buy and sell NFTs

To buy an NFT, you will need a wallet and enough tokens to pay for the one you want.

Once you have these, you can connect your wallet to a range of NFT marketplaces. Then you can browse the marketplace for the NFT you want to purchase, make an offer and see whether it is accepted.

Some of the most popular marketplaces include:

  • OpenSea
  • Rarible
  • Axie Marketplace
  • SuperRare
  • Nifty Gateway

Wallets

A crypto wallet is technology that allows you to securely access your digital assets stored on a blockchain. Unlike physical wallets, a crypto wallet does not store the assets itself. Instead, it stores the public/private keys that allow you to access, transfer or exchange digital assets.

Hot wallets

A hot wallet is software that connects to the internet and makes it easy to interact with DeFi and other Web3 applications. They usually involve a browser extension, web application, mobile app or a combination of all three.

Examples of hot wallets include Metamask, which is a non-custodial wallet designed for use with Ethereum, Phantom, which is Solana’s recommended wallet, and Coinbase Wallet, which is a custodial wallet provided by the well-known centralized exchange.

Cold Wallets

A cold wallet is a physical device (often referred to as a hardware wallet) that stores private keys locally on the device and, in order to achieve the best level of security, is not supposed to be connected to the internet.

Although some users do connect their cold wallet to the internet, they are still considered safer than hot wallets as the connection is only momentary, thus reducing the potential for attacks. Cold wallets use random number generation to create public/private keys and let you set your own PIN code and recovery phrase.

Examples include Ledger and Trezor, which support multiple assets, and Coldcard, which is designed for Bitcoin.

Wallet security

Stories of DeFi users who have lost their digital assets as a result of poor wallet security management continue to be revealed on a daily basis.

Therefore this isn’t an area of your DeFi adventure that you should skip over or assume is ever complete. Even the most experienced DeFiers can fall victim to scams, so you should always put time aside to review and update your security practices.

Some best practice steps that all users should take are:

  • Make a note of your seed phrases so you can recover your wallet.
  • Keep your seed phrase private and secure.
  • Never reveal your seed phrase to anyone under any circumstances.
  • Use a cold wallet for savings and at least one hot wallet for DeFi investing.
  • Check and double check all websites and apps before connecting your wallet.
  • If a new opportunity looks too good to be true, it probably is.

Bridges

A bridge is a tool that allows you to move your assets from one blockchain to another.

For example, you may have some stablecoins on Ethereum that you want to use in various DeFi protocols in order to generate returns. However, you might also see that the gas fees you will have to pay for doing so are very high, while fees on another blockchain are much lower.

In this situation, you can use a bridge to move your stablecoins across to the other, cheaper blockchain in order to invest these assets.

How bridges work

In most cases, it’s actually better to think of a bridge as a way of mirroring your assets on another blockchain, rather than as moving them there.

That’s because what bridges actually do is lock up your assets in a smart contract on one blockchain and use this as proof of their existence. Then the bridge can use this proof to generate new assets on the other blockchain.

The user is then able to use these mirrored assets on the second blockchain for whatever purposes they want. Once they are finished, they return their mirrored assets to the smart contract and can unlock assets from the smart contract on the original blockchain.

There are a number of important technical steps in this process which might be exploited by hackers if the bridge’s smart contracts are not secure. Therefore, you should also do your own research about which bridges are considered the most secure and why.

Notable examples of bridges

It’s worth noting that bridges are very much a feature of the current blockchain landscape, as many of the established blockchains were built to be monolithic, rather than interoperable.

For example, Bitcoin is not interoperable with Ethereum by design and therefore users who wanted to use their bitcoin holdings to take advantage of yield generation activities on Ethereum would need a bridge to do so.

However, even though many first and second generation blockchains were not built to be interoperable, many of the more recent blockchain projects have been designed for exactly that purpose. Two notable examples are Cosmos and Polkadot, both of which enable projects to build application specific blockchains that are automatically interoperable.

Multichain/Anyswap

Multichain, which is a recent rebranding of Anyswap, is a cross-chain protocol that provides bridges between different blockchains. It is backed by BNB Chain, which will promote Multichain as a recommended bridge for developers.

Rango

Rango is a multi-chain DEX aggregator that provides an all-in-one swap for all coins in all blockchains. It covers all the major blockchain networks, including Bitcoin, Ethereum, BNB Chain, Solana, Terra and Polygon.

Hop

Hop is a trustless bridging protocol that is designed to make it easy for users to bridge assets between Ethereum scaling solutions, such as Optimism, Arbitrum and Polygon. In this way, it aims to solve the specific issue of high gas fees for dedicated Ethereum users.

Wormhole

Wormhole is a token bridge protocol that connects multiple blockchains, including Ethereum, Solana, Terra and BNB Chain. In February 2022, the bridge between Ethereum and Solana was targeted by hackers, who exploited a vulnerability to extract over $375 million of assets.

Analytics tools

One of the great advantages of blockchains is their transparency, which means anyone is able to check the existence of assets and transactions for themself. Practically though, this does require quite a high-level of technical knowledge.

Therefore, a number of projects have developed analytics tools to assist everyone from your average DeFi participant to the most active trader.

Block explorers

A block explorer, such as Etherscan, is essentially a search tool for blockchains. It allows you to search for and retrieve all sorts of information related to addresses, assets, transactions and the relationships between these different entities.

For example, some people use block explorers to monitor certain addresses that they know or believe to be controlled by exchanges or whales, so they can make decisions based on what these accounts do.

Audits and auditing tools

Another benefit of transparency is that you can review the open-source code that is used within various key elements of blockchain, including smart contracts. Again though, it isn’t easy to review a smart contract unless you are very technically savvy and can understand exactly what results the code will produce.

This is where smart contract audits, performed by professional auditing firms come in. Most protocols pay to have their code reviewed by these firms in order to receive a stamp of approval that will reassure users that their funds are secure if they choose to use the protocol. However you should always remember that these firms cannot spot everything and only provide a snapshot of the code’s status when they perform the review.

The average DeFi user should be wary, do their own research and use additional services to remain safe. One example is De.Fi, which puts particular emphasis on user safety by providing the scanner tool and approvals tool, as well as the audit database and rekt database.

De.Fi also provides a ‘fast track audit’ for development teams in need of support. You can request it here.

Building on Blockchain

As the introduction to this guide described, the world DeFi is made up of three core layers.

A simple comparison to make between this structure and the more familiar Web2 stack that many people are more familiar with is to say that the blockchain layer is like a database, the protocol layer is like the back-end of a web app and the application layer is like the front-end of the web app.

Another way to think about DeFi architecture is with smart contracts at the center of everything that happens. That’s because smart contracts are what make DeFi protocols possible.

At the most basic level, smart contracts interact with blockchain addresses in order to store and transfer assets. Then, when you have multiple smart contracts interacting with each other, you can build sophisticated tools for trading, exchanging and investing, which are known as protocols. Users can then interact with these protocols via applications they access through their web browser.

So, when it comes to building on blockchain, this usually revolves around writing the smart contracts that make protocols possible or building front-end applications that allow users to interact with them.

Important developer tools

When writing smart contracts for protocols or building applications for users, developers rely on a variety of tools, one of which is described below.

Subgraphs

Subgraphs are like APIs for developers to query blockchain data. They are the key elements of The Graph, a decentralized protocol for indexing and querying data from blockchains.

Although blockchains are transparent, sourcing and interpreting data that is stored on the blockchain by smart contracts is difficult because you need to know the context around the data, including its relationship to a smart contract, in order to really understand it.

To collect and then interpret all of this information manually would be very time consuming but subgraphs provide the framework and incentive model to make this activity worthwhile, especially for the most used smart contracts.

As a result of these subgraphs being built, developers can query the data and build it into tools or products that add value for users.

How to succeed in DeFi

As you can see from this handy guide, which is a brief overview but still runs to over 5,000 words, the DeFi ecosystem is big already and it continues to grow.

Our guide is designed to introduce you to the key concepts in DeFi and act as a reference point if you ever get stuck. For those that want to dig deeper, we have also published a complete guide to DeFi called “The Wall Street Era is Over”. In it you’ll find even more detailed information about all the topics covered here and a lot more, including psychological approaches you should consider and a range of security concepts that will help keep you safe.

Whatever you do, don’t let this be the only thing you read on the subject, as constantly doing your own research is an essential requirement for anyone who wants to succeed. You can use publicly available information sources like Twitter and Telegram to find a whole host of alpha leaks and helpful content, including through the Official De.Fi Twitter account.

You can also join our Private Group on Telegram by getting in touch with Vadim from our team.

For more De.Fi updates you can visit us at:🌐 Website | 📱 Telegram | 🐦Twitter

Check our guides here!

Good luck in farming!

More from De.Fi

How to Add Solana to MetaMask

With new crypto ecosystems popping up on a regular basis, the integration of different blockchain networks with popular wallets is a key narrative moving into the next crypto cycle. 

© De.Fi. All rights reserved.