This website uses cookies to ensure you get the best experience. By using the site, you agree to our privacy policy and Terms of use.
OK
 
DeFi Lending

How Does Defi Lending Work - With Unilend Finance as Our Example

Updated On: September 28, 2022
Decentralized Finance (DeFi) gained its popularity in 2021, during the last bull market cycle. At that time, everybody in the crypto space started to learn how to lend or borrow stablecoins to one another through DeFi protocols. And despite nowadays the hype has died down and the bears took over the market trend, DeFi is still pretty much alive and well.

At the time of this article’s writing, the Total Value Locked (TVL) in DeFi protocols is still above $50 billion (source: DeFiLlama). While this TVL number is way lower compared to the peak of the last bull market around November 2021, it still is a huge number.

In fact, there is no better time to start learning “how DeFi lending works” than during the middle of the bear market like today. Imagine if you keep earning interest on your crypto lending activities, you will reap the most benefits compared to those who will only dive deep into DeFi lending protocols during the next bull market cycle.

Simple Explanation - How Does DeFi Lending Work

The basic concept of DeFi lending is the same as traditional lending mechanisms. The main difference is that traditional lending is usually offered by banks while DeFi lending is offered by decentralized applications (DApps). Since Dapps are the ones offering DeFi lending, all the processes work automatically through the utilization of smart contracts.

The process of DeFi lending is quite simple. The Dapp offers crypto loans and displays the current annual percentage yield (APY). If you are interested in getting into this, you need to connect your wallet application that the Dapp supports.

The huge benefit of the Defi lending protocol is the fact that they offer far more flexibility compared to traditional lending processes by the banks. And since everything is automated via smart contracts, the entire processes become way more instantaneous.

So, are you interested? Just like everything else in life, the best way to learn more is to use examples. Below, we use step-by-step examples with UniLend Finance; one of the most promising DeFi lending applications at the moment. Before jumping into the walkthrough, let’s understand what UniLend Finance is.

What is UniLend Finance?

UniLend is permissionless lending and borrowing protocol for all ERC-20 Tokens. They are developing a futuristic base layer for all DeFi applications. 

In the current scenario, major DeFi protocols only offer lending and borrowing functionality to a set of limited assets (30 tokens). Therefore, restricting the majority of assets (more than 9000 tokens) from participating in the DeFi ecosystem. This leaves a huge gap in the industry.

UniLend Finance is bridging that gap by enabling any ERC20 to be utilized as collateral for lending and borrowing functionality. Ultimately, UniLend aims to make every digital asset productive. 

Currently, UniLend v1 permissionless lending and flash loans protocol is live on 4 major protocols: Ethereum, Polygon, Moonriver and Binance Smart Chain. 

UniLend offers a comprehensive set of DeFi services. Users enable their token’s functionality for lending to get an interest rate and borrowing to pay an interest rate. 

Permissionless flash loan feature facilitates uncollateralized loans, arbitrage opportunities, and collateral swaps for any token.

Literally, any token can utilize UniLend’s cutting-edge lending and flash loans features without any need for approval. Anyone can create a lending pool of any token and start earning passive income from idle tokens sitting in their wallets.

Let’s follow the steps below to utilize the UniLend Permissionless Protocol:

Step 1 - Connect Your Wallet To UniLend Finance Dapp

This tutorial assumes you have basic experience already with Metamask. Otherwise, you can learn How To Use Metamask from our tutorial section. UniLend Dapp also supports Coin98 wallet, WalletConnect, Coinbasewallet and Fortmatic.
connect your metamask to the dapp
To start, go to the UniLend Finance DApp page. Click Connect Wallet and choose Metamask. Make sure you are connected to one of the four supported networks (Ethereum, Binance Smart Chain, Polygon and Moonriver). Remember that every network has a different transaction fee for every smart contract interaction. For this tutorial, we choose Polygon Network.

Step 2 - Choose The Token From The DApp

choose token
Once your metamask wallet is connected to the Dapp, you will need to choose which token you want to deposit into the Dapp. You can choose the token dropdown under Balance and choose one of the tokens available on the list.
choose token 2
You can also click on the manage icon inside the token list and access more tokens.

Now we’re going to demonstrate how anyone can create a lending pool for any token on the Dapp by taking the DAI token as an example.
choose token 3
Look for DAI but if you are enable to find it. Then Click on Manage.
choose token 4
Copy-paste the smart contract address. You can find a smart contract address on Polygonscan Explorer just by typing the token name. After copy pasting the address just click on Import.

DAI token smart contract address: 0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063

Please note: Make sure the token which you have selected should not have an ongoing token pool in the protocol already and if it does, you cannot create a new pool of that,as only 1 pool for 1 token can exist, so you can lend your tokens into that pool which is already created, which you can find in search by typing its name or symbol or using token smart contract address. 

Go Back and search for $DAI. You can see added by user will be written on it. This means it's added. Select it.
choose token 5

Step 3 - Create Lending Pool

Now we need to create a lending pool so we can add liquidity and earn interest.
create lending pool
Click on Create Pool option. By clicking on it will be automatically redirected to metamask wallet and then confirm the transaction on the Wallet to add liquidity in the token pool.  

And just like that $DAI lending pool is now live in just a few steps. Now you or anyone can start lending $DAI in this pool. 

This is a great way to generate passive income from idle tokens sitting in your wallet and earn good APY. 

Please Note : Project and Community adds reward tokens to the reward pools and distribute rewards for the contributions by the community in lending pools.

Do not use the "Reward" & "Airdrop" tab on the DApp, unless you wish to give your funds to the community! Simply use the "Lend" option available. When you select the reward tab you will get a warning also. Please do not use the rewards or airdrop tab. 

This is a great way to generate passive income from idle tokens sitting in your wallet and earn good APY. 

We have successfully created a DAI pool on UniLend’s Polygon Chain Permissionless Protocol. Anyone can lend their DAI token in the pool.

Step 4 - Withdraw Tokens, Go To Redeem Tab

Let’s say you want to withdraw your tokens. It’s simple. Go to the Redeem tab.
create lending pool
From here, you can redeem the entire amount of your deposited token balance that you previously deposited into the UniLend dapp. Just like the deposit process, your Metamask will ask for transaction confirmation. Once the transaction is confirmed by the blockchain, your token deposits will be withdrawn instantly to your wallet address.

That’s it! It’s as simple as that. Deposit your tokens through the Lend page and withdraw your tokens through the Redeem page after you think you want to withdraw some or all of your tokens from the Dapp.

Checkout UniLend’s Permissionless Protocol Tutorial here: https://youtu.be/94qirwE-bMU

Is DeFi Lending A Profitable Activity?

So, if DeFi lending is as simple as the above tutorials, why hasn’t it become more mainstream? Well, the thing is, DeFi lending’s profitability is very vague. APY usually goes much lower during the bear market and it goes drastically higher during the bull market.

You need to remember that many DeFi protocols usually pay the rewards through their own native utility tokens. That means that the token rewards that you get might vary depending on the time of token liquidation. For example:

Let’s say you make a $10,000 USDC deposit into a dapp called XYZ. For this amount of deposit, every day you get 100 XYZ token rewards. If every XYZ token is priced at $0.1, that means you get $10 XYZ token rewards as your unrealized profits.

However, what happens if you just keep accumulating the XYZ token rewards and wait until the token price goes to $0.5 before you liquidate them all at the same time? In this case, your actual profit from your initial $10,000 USDC deposit will become 5x higher than the original APY, since you don’t want to sell the token rewards until the price goes up.

Of course, it works both ways. There are many cases where people decide to keep HODL-ing their token rewards, and the token price eventually goes lower.

This is why the answer to this question depends on various factors, mainly on when you decide to sell the token rewards from your DeFi activities.

But as we have mentioned above, the good time to start earning interest is during the bear market; that’s assuming you believe the token price will go much higher in the long term.
Did you like this article?