DeFi: Ultimate Guide to Decentralized Finance

Rajat Dangi 🛠️
9 min readSep 9, 2024

--

This guide’s goal is to help you get started with learning fundamentals of DeFi (Decentralised Finance), setting up wallets, and DeFi tools. I tried to make this guide simple and as complete as possible.

Let’s dive into DeFi!

DeFi

DeFi Fundamentals — What is Decentralized Finance?

Decentralized Finance (DeFi) is a movement that uses decentralized blockchains to transform finnancial products into trustless and transparent protocols that work without intermediaries like banks and government.

As of now, most DeFi apps are built on the Ethereum and Binance Smart Chain. For example, Bitcoin, Ethereum and Binance have a blockchain that acts as a shared ledger in which digital value is tracked. Rather than a centralised authority like banks or govt., the participants that make the network control the issuance of new crypto tokens (ether, BNB, etc.).

Here’s a list of 35 Layer-1 Blockchains for you to explore other DeFi ecosystems and Dapps.

Crypto Tokens are the network’s currency which is treated as a store and representation of tangible, provable, and transferable value. These tokens are used to transactions and incentivising the people/servers that maintain the decentralised network. Also, anyone with technical know how can learn to create crypto coin, maing it possible for anyone to start their down DeFi (Readh: How to create a crypto coin?).

Developers can program applications that can create, store and manage digital assets, also known as tokens, on the blockchain. For this to work, smart contracts and decentralized applications (DApps) are written and built. The expiration of these contracts and agreements is automatically enforced if the blockchain receives the correct data. You can make complex, irreversible agreements without the need for an intermediary.

Anyone is able to create, adapt, mix, link or build on an existing DeFi product without permission. DeFi protocols are modular, so they can be stacked on top of each other to build an increasingly dense system of interacting parts.

Crypto Wallets — What are they? And how to use

Crypto Wallets

You can download a wallet on a PC, tablet or telephone. With this you can store, send or receive Bitcoin or other cryptocurrencies. Three related concepts determine whether someone has ownership of a certain wallet, these are your digital keys (also called public & private keys), your wallet address and your digital signature.

The most important aspect of a wallet are your digital keys, as they give you access to your wallet. It is important to know that these keys are not stored online on the blockchain but are instead stored independently within the digital wallet itself. Each key consists of both a public key and a private key.

Consider your public key the same as the bank account, which also consists of an address. Your public key works more or less the same. The pin code with which you subsequently gain access to this bank account is then referred to as your private key.

It is very important that you ALWAYS keep your private key to yourself. If someone else has the private key, he / she can send and steal all coins, so keep it safe. With the public key, people can only send coins, so that can’t hurt.

Every wallet has a unique code, which we also call the wallet address, which consists of a random letter and number combination that is different for everyone. This address is in fact the name of your wallet and makes it possible for others to transfer cryptocurrencies to you.

Example of just any bitcoin address: 14J5Q7ageKhM3miKd94DX44Kf6b7ko4BZe

Some people assume that your public key is the same as your wallet address. This is not entirely true, but the two are mathematically related.

In order for you to start using DeFi platforms, a browser wallet is needed.

Coins vs Tokens

Crypto Coins and Tokens

A coin runs on its own blockchain, on its own system. It is therefore completely independent. A coin could be compared to a contemporary currency, such as the Dollar. Bitcoin is a coin and has been developed with the aim of serving as a digital payment method and store of value.

Then there are tokens. Tokens by definition do not run on their own blockchain, unlike a coin. They have been added to an already existing blockchain. Tokens can have the same functionality as a coin, although this is not common.

Tokens that are created on the Ethereum network are typically ERC-20 tokens. When we talk about ERC20, we mean the standard that is implemented in certain tokens. ERC20 stands for ‘Ethereum Request for Comment 20’. The Binance Smart Chain uses a similar standard, which is the BEP-20 standard.

These standards contains numerous functions that allow any token that has implemented this set of functions to be traded. Examples of those functions are:

  • Sending tokens.
  • Request balance information from any address.
  • List the number of available tokens.

Layer 2 solutions

Because of high demand, the Ethereum network is getting overloaded. This resulted in very high transaction fees, making it to expensive for small investors to use it’s dapps.

This is the main reason why many investors moved to the Binance Smart Chain, which has much lower fees, untill Ethereum 2.0 has been implemented, which is an update that will drastically lower the transaction fees for the network.

However, in order for the Binance Smart Chain to maintain such low transaction fees, it had to sacrifice it’s decentralized properties. This resulted in that the Binance Smart Chain is much more centralized and less safe compared to Ethereum.

Fortunately, there are various projects working on Layer 2 solutions to improve both the scalability and speed of the Ethereum network. Layer 2 refers to a secondary framework, chain or protocol that is built on top of an existing blockchain system. By doing so, the mainchain can be unloaded and can solely focus on the safety of the network.

In the case of Ethereum, there are currently 2 sidechains that are pegged to it. These chains are the xDai chain and the Polygon chain. The latter of the sidechains is the most promising Layer 2 solution so far.

By bridging your assets from the Ethereum mainchain to the sidechains, you are able to interact with various dapps that work on these sidechains for almost an negligible amount transaction fees.

Getting started with DeFi

Now that you’re aware of the fundamentals of DeFi, let’s dive into how you can move your assets into the various DeFi protocols.

Setting up your wallet

In order to move your assets from your wallet on the exchange that you’re using to either the Ethereum network, Binance Smart Chain, or Sidechains, you will need a browser wallet that can interact with these DeFi protocols.

You can MetaMask or any other Wallet (List of 6 Best Aptos Wallets, can be used for other crypto assets as well):

  1. Go to the official MetaMask website in your browser (https://metamask.io/)
  2. Press “Get Chrome extension”, “Chrome Firefox Opera” or “Get Brave Browser”. This of course depends on the browser you want to use at that time.
  3. You will now be taken to a page where you can add the extension. With Chrome, for example, there is a button with: + ADD. TO CHROME. Click on the button.
  4. A popup appears to confirm this
  5. You will now see a MetaMask logo at the top right of the browser. Click this to set up MetaMask.
  6. Accept the terms and conditions
  7. Create and confirm a new password. Please remember this password.
  8. You will now see 12 words. With these words you can always recover your wallet — in combination with the password. Write these words down and keep them safe. Preferably offline — just on paper.
  9. Congratulations! You have now installed and configured a MetaMask extension. You can now use the buttons “Buy” and “Send” to buy or send Ether to your wallet. You can now also send Ethereum to the address under “Account 1”.

Your MetaMask wallet will be automatically connected to the Ethereum network. In order to connect your MetaMask to a specific chain, follow these steps:

  1. Click on the network in the top right corner.
  2. Go to settings.
  3. Click “Add network”

In order to setup your wallet for the any other network, explore the following RPCs, use their URL, ChainID, and block explorer.

Testnet Faucets

In order to be able to perform transactions on these chains, you need to have some of their coins/tokens in your wallet in order to pay for the transaction fees.

  • In order to use Ethereum you need Ether
  • In order to use Sui you need Sui Token
  • In order to use Aptos you need Apt

Luckily you can get small amounts of the currencies for free from so called faucets.

A faucet is an app or a website that distributes small amounts of cryptocurrencies. They’re given the name “faucets’’ because the rewards are small, just like small drops of water dripping from a leaky faucet.

However, in the case of crypto faucets, tiny amounts of free or earned cryptocurrency are sent to a user’s wallet. In order to get free crypto, users need to complete tasks as simple as viewing ads, watching product videos, completing quizzes, clicking links (be careful!) or completing a captcha.

Sending crypto from the exchange to MetaMask

In order to receive send your assets to MetaMask wallet, you need to fill in the correct address. This is probably straight forward for most of you, but please make sure to quadruple check you’re MetaMask wallet address before sending your tokens from the exchange to your address.

When you’re sending tokens from Binance, it will ask if you want to send them as BEP20 or ERC20 tokens. Please choose the correct one! Sending BEP20 tokens to your Ethereum address can result in a loss or they end up in your Binance Smart Chain wallet.

Bridging: An important step!

Please notice that you can’t send your tokens directly from the exchange to sidechains i.e. L2! You need to send them first to the Ethereum network (if they are both sidechains pegged to the Ethereum blockchain). Once received, you can bridge them to specific sidechain by using the following links:

Read: Guide on How To Easily Bridge to Base Mainnet (Coinbase L2 Network).

Keep in mind that for during the bridging, Ethereum transactions fees have to be paid. After the bridging, you play by the rules of the sidechain (which means cheap transactions).

Can’t find tokens in your wallet?

If you can’t find your tokens back in your wallet after sending them from the exchange, you can follow these steps:

  • Check the transaction record, is the transaction completed?
  • Make sure you look at the right network. Your MetaMask wallet might be connected to the Binance Smart Chain network, hence not showing your assets.
  • Add the contract address of your token to the wallet. You can find the address of your token via https://etherscan.io (Ethereum) or https://bscscan.com (Binance Smart Chain). The token address can then be copied in to the MetaMask wallet by clicking on add custom token.

Setting up your dashboard

To make things a bit more clear, I would advice you to use the DeFi dashboard Zapper. Zapper is an interesting platform that lets you quickly and easily deploy and manage your DeFi positions within a single interface. It is a DeFi portfolio management dashboard that helps you stay on top of your portfolio, liquidity pools, and liquidity mining positions.

Zapper supports Ethereum, Binance Smart Chain, xDai and Polygon. In order to connect to the right network, you must first connect your MetaMask to the network you want zapper to connect to. By clicking in the top right corner of your MetaMask wallet you can connect to the network you want Zapper to manage for you.

The first tab of Zapper, shows an overview of your account. It shows the value of your assets in your MetaMask wallet and how your deployed assets are performing in the DeFi protocols (if you deployed any already).

In order to reduce gas fees, Zapper has several features that can “Zap” your assets fast and “cheap” in order to:

  • Start providing liquidity in a pool.
  • Swap tokens.
  • Bridge your tokens from one network to another.

Zapper also keeps track of the estimated APY’s (Annual Percentage Yield) of the various pools from different DeFi protocols as well as farming opportunities.

A list of DeFi protocols

You can visit https://defipulse.com/ to the list of DeFi protocols. To learn building DeFi applications, you can enroll in free web3 and defi courses on Metaschool.

DeFi Pulse records the top performing DeFi protocols on the Ethereum main chain as well as their TVL (total locked value) and ranks them accordingly. This page is really worth checking out as it can help you to pick the right protocols to deploy your assets in.

In order to monitor the DeFi space of Binance Smart Chain, Polygon and xDai use https://dappradar.com/rankings/category/defi and https://defiprime.com/#defi_projects. However, If you use other resources in order to find the right dapp, let me know!

Hope this guide helps you to get started on your DeFi adventure.

--

--