DeFi and Yield Farming Explained

DeFi and Yield Farming have been the most popular buzzword among the crypto community in recent months. Some DeFi tokens can skyrocket to more than 10K USD in just a few days but drop back to near zero also in a matter of days! Besides that, people in the crypto community are talking about yield farming instead of mining nowadays, most of you might scratch your head and wonder what the heck is that? Skeptics might challenge that DeFi is merely hype, but the total value of digital assets locked in the DeFi platforms has reached an astounding $10 billion(as seen in the figure below), thus it has created huge DeFi economics(Should I call it DeFiconomics?).

To help you understand DeFi and Yield Farming, I shall try my best to explain these two concepts in a nutshell.

What is DeFi?

The word DeFi stands for decentralized finance, which means operating financial applications on a decentralized platform such as blockchain. It is the new financial architecture that leverages decentralized networks and decentralized technologies such as smart contracts to transform old financial products into trustless and transparent protocols that run without intermediaries. DeFi has a popular nickname ‘Money Lego’ because of the process of DeFi development like building legos where different components of a system can easily connect and interoperate.

DEFI Features

DeFi has unique features compared to CenFi (Centralised finance) and claimed to be able to provide more convenient and seamless services, particularly for the underserved people. Here are some of the features:

  • P2P- Transactions are performed on peer to peer basis without the need for intermediaries
  • No need KYC- Anyone can open an account with a DeFi platform anytime and easily without going through the tedious and painful process of KYC
  • No one holds your digital assets- DeFi platforms are non-custodian in nature which means they do not hold your private keys, you have full control of your own digital assets.

DeFi Products

Popular DeFi products include decentralized exchanges, loan and savings markets, tokenized physical assets such as gold, derivatives, forecasting/betting markets, payment networks, insurance and more.

Loan and Savings Markets

DeFi loan and savings markets allow you to lend, borrow, or deposit money in a platform. Among the popular loan and savings platforms are Compound, Aave, MakerDAO, Dharma, dYdX, and more.

Compound is a protocol on the Ethereum blockchain that creates a money market, which is a group of assets with algorithmically earned interest rates, based on supply and demand for those assets. The asset provider (and borrower) interacts directly with the protocol, earning (and paying) floating interest rates, without having to negotiate conditions such as maturity, interest rates, or collateral with peers or business partners.

MakerDAO is a smart contract that allows users to open Protected Debt Positions, or CDP (Collateralized Debt Positions). Users deposit ETH as collateral and can mint or borrow tokens called DAI. DAI is a stablecoin linked to the US dollar.

Borrowers pay an annual interest rate called the stability fee to mint a new DAI. After the debt is repaid, the DAI is burned along with the stability fee owed in the MKR Maker token. Stability charges prevent users from overspending the amount of DAI supply in excess.

Aave is a decentralized non-custodial money market protocol in which users can participate as depositors(lenders) or borrowers. Depositors provide liquidity to the market to earn passive income, while borrowers can borrow in an overcollateralized or undercollateralized manner.

Dharma is an open-source lending and savings account built on Compound which is characterized by its ease of use and simplicity. Dharma features a Smart Wallet is a non-custodial that automatically lends out any DAI or USDC it receives on Compound and generates a variable interest rate. Dharma requires users to have a fully verified Coinbase Account in order to create a new account.


dYdX is a non-custodial trading platform on Ethereum that caters to more experienced traders. The dYdX platform allows users to lend, borrow, or margin trade any supported asset like ETH, Dai, USDC, and more. Interest rates vary by asset and adjust with supply and demand. Interest continuously accrues and is paid to lenders, minus 5% which is set aside for dYdX’s insurance fund.

All borrowed funds must initially be collateralized with 125% of their value. Liquidation occurs if that ratio falls below 115% and comes with a 5% penalty. Traders can take leveraged long positions of up to 5x their collateral’s value and 4x for shorts. Loans and margin trades can remain open for a max of 28 days, after which they are automatically closed out with a 1% expiration fee.

Decentralized Exchange

Decentralized exchanges or DEX are like stock exchanges but run by smart contracts on the Ethereum blockchain. While both allow you to trade assets, decentralized exchanges only trade cryptocurrencies and do not require centralized authorities to operate. Some of the popular exchanges are Uniswap, SushiSwap, Bancor, Kyber, Balancer, and more.

Uniswap is a decentralized ERC-20 token exchange that supports Ethereum and ERC20 tokens. The advantage of Uniswap is that you can exchange ETH with other ERC-20 tokens in a decentralized way. No companies involved, no KYC, and no intermediaries.

The Uniswap platform is unique in that it does not use an order book to derive the price of an asset or to match buyers and sellers of tokens. Instead, Uniswap uses the Liquidity Pool which comprises a group of tokens managed by smart contracts. The liquidity pool ensures enough tokens for users to exchange with each other using Ethereum as a channel.

Bancor is a protocol on Ethereum for non-custodial token exchange using pooled liquidity. Bancor does not use order books, Instead, it uses an algorithmic market-making mechanism through the use of Smart Tokens. This will ensure liquidity and accurate prices by maintaining a fixed ratio among connected tokens and adjusting their own supply.

The Bancor platform has expanded beyond Ethereum to offer an exchange with EOS and POA Network. It also features a native token known as BNT( Bancor Network Token), which serves as a Smart Token hub that connects all other tokens in the Bancor Network, enabling instant trades among any asset supported by Bancor.

Kyber Network is an on-chain liquidity protocol that allows the token holders to contribute liquidity known as reserves. The Kyber Network offers multiple types of reserves that exist in smart contracts. Besides that, Kyber does not use order books; when a user initiates a trade, Kyber returns the best price across all reserves.

The Kyber Network can be integrated into dApps to enhance user experience. In addition, Vendors and wallets can also use the Kyber Network to allow users to transact using their token of choice in a single transaction. Moreover, Kyber has a native token called KNC which is used to align ecosystem incentives. Holders can stake KNC to participate in governance and earn rewards, reserve managers pay fees and receive rebates in KNC, and DApp integrators receive a portion of fees.

Balancer is an automated market-maker built on Ethereum. It allows anyone to create or add liquidity to customizable pools and earn trading fees. Instead of the traditional AMM model, Balancer’s formula allows any number of tokens in any weights or trading fees.

In fact, Balancer is like an inverse of ETF: instead of paying fees to portfolio managers to rebalance your portfolio, you collect fees from traders, who continuously rebalance your portfolio by following arbitrage opportunities. Balancer protocol is designed to be composable and has three types of pools:

1) Private Pools where only the owner can contribute liquidity and has full permissions over the pool, being able to update any of its parameters.

2) Shared Pools where the pool’s tokens, weights, and fees are permanently set and the pool creator has no special privileges. Anyone may add liquidity to shared pools and ownership of the pool’s liquidity is tracked with a specific token called BPT — Balancer Pool Token.

3) Smart Pools which are a variation of a private pool where the controller is a smart contract, allowing for any arbitrary logic/restrictions on how pool parameters can be changed. Smart pools may also accept liquidity from anyone and issue BPTs to track ownership.

Yield Farming

Yield farming is an activity that uses crypto assets to generate as much return as possible on those assets. A yield farmer may continually chase which pool offers the best APY (Annual Percentage Yield). This may mean moving to risky pools from time to time, but yield farmers can deal with the risks.

In some sense, yield farming is similar to staking but is a lot more complex. In many cases, it works with users called liquidity providers (LP) that add funds to liquidity pools. For example, a yielding farmer puts 100,000 USDT into the Compound. In return, he or she will get a token for the stock, called cUSDT.

Let’s say he or she get 100,000 cUSDT back. He or she can then put the cUSDT into a liquidity pool that uses cUSDT in Balancer, an AMM (auto market maker) that allows users to set up a crypto index fund that is rebalancing. At normal times, this can earn a small amount of transaction fees. This is the basic idea of ​​yield farming. Users are looking for sophisticated cases in the system to produce as many results as possible in as many products as possible.

What is a liquidity pool? It’s basically a smart contract that contains funds. In return for providing liquidity to the pool, LPs get a reward. That reward may come from fees generated by the underlying DeFi platform, or some other source.

Some popular Yield Farming platforms are SushiSwap, Yearn Finance, and YAM Finance.

SushiSwap is an automated market making (AMM) decentralized exchange (DEX) currently on the Ethereum blockchain. Unlike other protocols, SushiSwap is a community-run project that is governed by the vote of the community. There are a few core products for SushiSwap’s ecosystem:

Each of these serve a different purpose within the ecosystem. Users Earn SUSHI tokens by staking SushiSwap V2 SLP Tokens. is a decentralized ecosystem of aggregators that utilize lending platforms such as Aave, Compound, Dydx, and Fulcrum to optimize your token lending. When you deposit your tokens into, they are converted to yTokens. yTokens are periodically rebalanced to choose the most profitable lending services.

Among the aggregators, is the most prominent integrator of yTokens. creates an AMM between yDAI, yUSDC, yUSDT, yTUSD that not only earns the lending fees but also the trading fees on On the other hand, YFI,’s governance token, is distributed only to users who provide liquidity with certain yTokens. With no pre-mine, pre-sale, or allocation to the team, YFI is claimed to be the most decentralized token in the DeFi space.

YAM Protocol is a decentralized cryptocurrency that uses a rebasing mechanism to raise funds for a treasury managed by the community. The community can then use those funds via YAM governance to build the protocol.

In addition, YAM is the governance token for the YAM protocol. Using token voting, YAM holders have direct influence over the YAM treasury and direction of the protocol. Governance discussions take place on the Yam Governance Forum.

Currently, you’re able to earn YAM rewards by providing liquidity to the yUSD/YAM Uniswap pool. The rewards given to the pool are 92,500 in week 1, decreasing by 10% every week after. Please realize that you must apply the YAM scaling factor to get the current reward amount at any given time.


In short, DeFi is the most exciting blockchain-based financial ecosystem right now, but it is also extremely risky and confusing. This article is just an introduction to DeFi and I hope you could understand the basic concepts. To help every understand the DeFi applications better and even use them to accumulate wealth in digital assets, I will attempt to write a series of article on DeFi that shall zoom into some famous DeFi platforms like Compound, UniSwap, SushiSwap, yearn finance, Balancer, and more, stay tuned!

To learn more about DeFi, please refer to my book published on

Blockchain Architect

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store