Venus Protocol DeFi Tutorial: How to Supply and Borrow Assets, mint VAI stablecoin, and farm XVS tokens
Venus Protocol is a decentralized lending platform that lives on the Binance Smart Chain. At its core Venus is a money market protocol, enabling lenders to provide loans and borrowers to take out loans. In this guide we will go through how to supply and borrow assets to earn interest on your crypto. How to mint and repay VAI stablecoin. Along with learning how to farm XVS tokens. A complete Venus Protocol DeFi tutorial!
How does Venus work?
You can think of Venus Protocol working similar to a bank. You can deposit various cryptocurrencies to earn annual interest on your deposits. Much like how you earn interest when depositing money into a savings account with a traditional bank. However, the key difference is that Venus Protocol never has custody over your cryptocurrency deposits. Essentially, you’re interacting with a smart contract and not with a company or person. This part is important to understand as it means that no central authority can take your funds.
Venus Protocol leverages audited smart contracts for all lending and borrowing of popular cryptocurrencies. As a result, you do not have a Venus login, but use a wallet with web3 support such as MetaMask, Trust Wallet, or Binance Chain Wallet.
Since Venus Protocol is a DeFi platform, it doesn’t have to follow any restricting rules that are found in a traditional lending environment. Venus Markets are always on, meaning you can lend or borrow crypto assets in seconds without any intervention or permission from the company itself. Furthermore, you will find that the interest rates are usually higher than any savings account. Because APR is bolstered by farming the platform’s native governance token XVS. The platform distributes XVS tokens to users supplying liquidity, borrowing assets, or minting VAI stablecoins. To summarize quickly, you can get paid for taking out a loan!
In this guide, we will focus on using the platform to earn interest and borrow Binance Smart Chain assets. If you’re looking for a more technical understanding of what’s happening under the hood, check out Venus Protocol’s whitepaper.
In this tutorial, we will focus on using MetaMask as Venus currently does not support any other wallets.
Creating a Wallet
- If you don’t have MetaMask installed you can download it here. Note this tutorial is for the desktop extension version.
- Once installed, open the app and click Get Started and then Create a Wallet.
- Set a password of at least 8 characters.
- Now for the important part, MetaMask will display your secret backup phrase. This is your 12-word seed phrase and you need to save it. Without your backup phrase, you may lose your wallet and funds forever.
- Your wallet is now created, but by default, MetaMask will connect to Ethereum.
Adding Binance Smart Chain
- First, click on Settings and then Add a new network.
You need to fill in the fields with the following:
- Network Name: Binance Smart Chain
- New RPC Url: https://bsc-dataseed.binance.org/
- ChainID: 56
- Symbol: BNB
- Block Explorer: https://bscscan.com
Once you click Save, MetaMask should automatically connect to BSC.
Connect your Wallet
- Open the website, the interface should automatically pop up and ask you to connect your Web3 wallet. Currently, we have to use MetaMask but once WalletConnect is available you can use other wallets such as Trust Wallet.
- Wallets secure the private keys to your crypto, which lets you authorize transactions, view balances, along with performing other essential actions on the Binance Smart Chain.
The Venus Interface
- After connecting your wallet, you will be able to access all the features of the interface. On the bottom right you will find the Supply and Borrow markets, along with minting VAI under their respective tabs. At the top right, you will find your Supply Information which will show your current APY.
- On the left, you will see your Credit Limit where you can manage your borrowing to avoid liquidation. Lastly, at the bottom left you can find a dashboard to display more details about each money market.
Supply Assets to Earn Interest
- To begin the deposit process, click on an asset in the Supply markets on the bottom right. In this example we will use BUSD, a new box will open once you click on the market.
- First, you will need to enable the asset you wish to supply. This will ask you to confirm a transaction with your wallet, there will be a small gas fee, so you will need some BNB in your wallet also.
- Once the transaction has been confirmed, you can move on to setting the amount you would like to Supply. Assets are supplied directly from your wallet into Venus Protocol, and will immediately start earning interest.
- You will not see any incoming transactions as interest accrues directly to your Supply Balance. Meaning you will see your balance slowly increase over time.
- Remember you always have control over your assets. You can withdraw any portion of your balance to your Binance Smart Chain wallet at any time.
Manage your Borrowing Limit
Venus Protocol calculates how much you can borrow depending on the amount you’ve supplied as collateral. You control which assets can be used as collateral, which allows you to increase your Borrow Limit.
- An asset’s Collateral Factor determines the proportion of its value that can be borrowed. For example, if you’ve supplied $50 of BUSD, which has a collateral factor of 60% then your Borrow Limit will increase by $30.
- You can use the toggle on the right of the asset to enable or disable its use as collateral. Every time you click the toggle, you will need to confirm the transaction with your wallet.
- Bear in mind that if you disable an asset as collateral then your Borrow Limit will immediately decrease.
You can borrow assets instantly for any duration. Furthermore, the loan will transfer from the protocol directly into your wallet.
- To start the process, you need to open the Borrow Markets tab and click on an asset you wish to borrow. Note that you cannot borrow an asset that you’re supplying as collateral.
- Set the amount of the asset you’d like to Borrow, then submit the transaction and sign with your wallet.
- You can use the Safe Max button to borrow up to 40% of your Borrow Limit.
- Use the Repay Borrow tab to pay back any amount of your loan, at any time. This allows you to easily manage your borrowing to avoid any liquidation scenario. Remember when borrowing assets, you will also be accruing interest that will need to be paid.
Minting VAI Stablecoin
Venus Protocol also enables you to mint a synthetic stablecoin VAI, much like borrowing the amount you can mint depending on your supplied collateral.
- To start the process, you need to open the Mint / Repay VAI tab.
- Set the amount you would like to mint, again you can use the Safe Max button to conveniently set 40% of your Borrow Limit.
- To repay your VAI loan, you will first need to Enable this asset with the protocol. You may want to do this straight away, to ensure you can repay the loan quickly if required.
- When you’re ready to repay your loan, set the amount, and click Repay VAI. At the moment, minting VAI is interest-free though that will change in the future.
Farming XVS tokens
Venus Protocol distributes its governance token as rewards for usage. Distribution APYs are dynamic as they attempt to incentivize deposits and borrows in a way to keep the protocol secure.
- Use the Vote tab on the left to open the governance dashboard. This is where you can monitor your XVS farming, and claim any rewards.
- Click on the Collect button next to your Venus Earned balance. Once the transaction is confirmed the XVS tokens will be in your wallet.
- An easy strategy to compound your rewards would be to immediately supply your rewards to the XVS Supply Market.
Example Borrowing and Minting VAI Use Cases
- Alice wants to increase her long exposure to SXP. She supplies 5,000 SXP to Venus, which she uses as collateral to borrow 60 BNB. Alice then swaps 60 BNB via Pancakeswap to buy 1,900 more SXP. Alice now has long exposure to 6,900 SXP, and owes Venus 60 BNB. As a result, she is long SXP/BNB meaning she believes SXP/BNB will increase in value. That will allow her to buy back the 60 BNB owed for less than 1,900 SXP. Meaning she can repay her debt and keep the extra SXP as profit.
- Bob wants short exposure to SXP. He supplies 200 BNB to Venus as collateral, which let’s him safely borrow 2,300 SXP. Bob immediately swaps the SXP for 70 BNB, he now has a long exposure to 270 BNB and owes Venus 2,300 SXP. Meaning he is short SXP/BNB. If SXP/BNB decreases in value then Bob can buy back the 2,300 SXP owed for less than 70 BNB. As a result, he can repay his debt, and keep the excess BNB as profit.
- Charlie wants to increase his DeFi farming operation. He supplies 1,000 USDC as collateral which means he can safely borrow $400. Charlie borrows 200 BUSD and mints 200 VAI. Which enables him to provide liquidity to the VAI-BUSD pair on Pancakeswap, and stake his LP tokens to farm CAKE. He is now earning interest on his initial deposit into Venus and earning trading fees from swaps going through the VAI-BUSD pool. Furthermore, he is also XVS and CAKE tokens!
If your Borrow Balance is greater than your Borrow Limit, then your account could be partially or fully liquidated. Remember this can occur if your collateral loses value, or if your borrowed assets increase in value.
You will notice as your borrow, mint VAI, or your collateral value changes, that your Credit Limit will update automatically on the dashboard. Monitor your borrowing carefully!
vTokens are a tokenized representation of your supplied balance on Venus Protocol. Each vToken has a unique BEP20 address, which you can view on Binance Smart Chain explorers such as bscscan. When you supply an asset to Venus, you will receive the equivalent amount of vToken in return. Because interest accrues by the block, it wouldn’t make much sense to constantly distribute payouts. Essentially, vTokens allow users to accumulate interest without needing to have the amount paid out every block.
It works by the underlying assets representing one vToken gradually increasing over time, depending on the market’s Supply APR. For example:
- Assuming a vBUSD/BUSD rate of 0.0204, if you supply 1000 BUSD to Venus then you would receive ~49019 vBUSD in return (1000 / 0.0204).
- Let’s say one year later, the vBUSD/BUSD rate has gone up to 0.0215. That would mean your 49019 vBUSD is now worth 1021.5 BUSD (1000 * 0.0215) – an increase of 21.5 BUSD.
One of the benefits of vTokens is that they are transferable and continue to earn interest regardless of where they are held. However, remember that vTokens determine the Borrow Limit of the wallet they reside in. Meaning a transfer of vTokens could lead to liquidation scenarios. We expect to see more use cases for vTokens as the Binance Smart Chain ecosystem grows. Be sure to read through my thoughts on best platforms for crypto spot and futures trading.
That’s all you need to know for now! We will continue to update this guide as more Venus Protocol features go live.