
- Introduction
- DeFi Wallets And Monitoring
- Wallet Monitoring: Zerion
- Starting Simple With Trading On Uniswap, Balancer and 1inch Exchange
- DeFi Savings Accounts With Aave and Compound Finance
- Enabling DeFi For Creating “Signature” And Collateral Loans
- ”Mutual Funds” and Portfolio Management in Decentralized Finance
- Broader Investment Applications in Decentralized Finance
- Resources and Links
Introduction
DeFi is a complex ecosystem that’s expanded on a daily basis. There are tons of moving parts, including blockchains that make up the main highways of exchange, cross chains and oracles that help create an efficient transaction, and applications on top of these that help make things easier for the user.
This is part two of a series devoted to sharing practical applications of DeFi. It’s designed for newbies to learn how the main parts of DeFi work. In Part One we discussed a lot of the background basics of DeFi including applicational theory, comparing DeFi to normal finance, security concerns, and how to set up three different wallets on either a blockchain-based browser or a mobile device.
It is highly recommended that you read part one of this series called Getting Started With DeFi: The Practical Application Guide. It is also recommended to read The Ultimate Guide to DeFi, although it’s not a mandatory prerequisite to do so. It is also assumed you have some understanding of traditional finance and an understanding of interest rates, loans, and money management.
This guide is NOT intended for financial advice and is given for educational purposes only.
This guide is also not something you need to spend money on if you want to learn. You are encouraged to read the whole article and several specific sections multiple times, without spending any money. It should be assumed that although these mini-tutorials are accurate, the trading examples used are simulated.
Let’s jump right in.
DeFi Wallets And Monitoring
Starting from where we left off in part one, we made three wallets:
- Trust Wallet: via mobile device with recovery phrase
- MetaMask: via Brave Browser as an extension, also with a recovery phrase
- MyEtherWallet (MEW): depending on your preference we created this as an either a Brave extension or on your mobile device with a 24-word recovery phrase
With these three you set up the foundations of what you’ll need for the rest of the DeFi world. You can purchase crypto, send and receive it, but you can also do much more with it too. For example, Trust Wallet can let you look at your decentralized collectibles like Forgotten Artifacts that have benefits on that collectable’s platform and other non-fungible tokens on the ERC721 and ERC1155 standards.
Other DeFi services allow you to use your wallets in indirect ways like monitoring and tracking. One thing about blockchain technology is the transparency to monitor assets without directly having access. Anyone can see when large amounts are being bought, sold, or transferred or by watching on-chain activity, but this principal applies to your personal holding as well. It’s great for keeping track of your portfolio without directly touching your wallets, which could lead to security issues.
Wallet Monitoring: Zerion
A project called Zerion is one of these custodial services. This service allows you to add multiple wallet addresses to a dashboard where you can see all your assets at once, the prices and price history in real time, transaction history, and a handful of DeFi statistics.
- Go to the Zerion website and download the app on your mobile device. You can also stay in the web browser by logging into Trust Wallet if you have it from Part One and follow the same steps below, omitting the app installation. If you have installed the app, launch it.
- Navigate to the main screen and click on “Connect Wallet”. You will then be asked to add your wallets from other sources (like Trust) by adding the wallet address or Ethereum DNS which allows you to copy and paste addresses directly into the text field in addition to custom names from services like Unstoppable Domains.
- Repeat if necessary.
- That’s it! You now have all your wallets monitored under one location. From here you can see prices of all your assets, price differences from the previous 24 hours up to the past 365 days, in addition to seeing wallet transaction history. All of this is based on the transparency of the Ethereum blockchain architecture without compromising security.
Keep in mind you are not allowed to buy/sell crypto on Zerion itself as it’s just a place to monitor your DeFi wallets. Zerion also gives the benefit of reviewing more complex DeFi services like Yield Farming performances, Coinbase Reviews, Liquidity Pools, and Top Tokens. It’s definitely worth checking out as a beginner since it will show some insight into the world of DeFi. It also has a market similar to CoinMarketCap but for DeFi assets only.
From here, we can show some actual trading on some of the most popular DeFi projects.
Starting Simple With Trading On Uniswap, Balancer and 1inch Exchange
Although DeFi can be extremely complex, a lot of aspects of decentralized finance are easy to understand or have a low barrier of entry. Exchanging digital assets is relatively simple in the DeFi ecosystem and we will walk through three ways to do it:
- Uniswap: arguably the top place to buy/sell and trade tokens, promotes an open source environment, low barrier to entry for tokens to be listed, no access restrictions, good liquidity, and with a reasonably low slippage. It has recently had more volume than prominent exchanges like Coinbase.
- Balancer: not easily explained to a layman, Balancer Labs at its core is a portfolio manager and liquidity provider, but one of the key features is the ability to use a token swap for different assets. Balancer uses the concept of pools where people can help provide liquidity to that pool or trade from it. Balancer will be revisited for these other features later in the Portfolio Management section.
- 1inchExchange: a website full of technicals mixed with creativity, 1inch is best described as a decentralized exchange aggregator that searches for the best prices on the market to save you slippage. They manage this by looking at splitting orders among multiple other exchanges within one transaction, which is made possible by a liquidity threshold.
Let’s take a simple walkthrough on each of the three platforms above and do some mock trading using Ethereum. We will use MetaMask for Uniswap and Trust Wallet for both Balancer and 1inch Exchange. Note: if you are following the tutorials below to do real trading on these platforms, remember that you need to add funds to the wallets either by purchasing crypto or by transferring crypto to the wallets. This also assumes you understand the risks of trading.
Using Uniswap (with MetaMask)
- If you are not there already, head to the Uniswap website via this link. You will see a fairly simple interface with two tabs: Swap and Pool. For this example we will deal only with the Swap option.
- In the top right hand corner area, click on the tab that says “Connect to a wallet”. From there you will see a list of wallet connections. Click the one that says “MetaMask”. If you have not installed MetaMask you can do so here. Once you do this, MetaMask will initialize and give you some prompts to complete the integration. It should automatically connect and return you to the Uniswap main page.
- On the Swap section, Ethereum should be pre-selected but if not, select ETH on the list of tokens on the “From” section.
- For the mock trading example, we will select DAI, a stablecoin token on the Ethereum network. If you are trading for real, select the token you wish to obtain. You may see something called “Token Lists” and if you do, select “Uniswap Default List”. Search and select LEND. You can select any amount to trade but for the mock example we will use 1 ETH which yields a trade of 411 DAI at the time of writing.
- After selecting your token, it will return to the main screen again with Ethereum selected to be used to trade for DAI. Select “Swap”. It will ask you to confirm with the “Confirm Swap” button.
- Special Note: this transaction may not go through on the first try depending on how tight the slippage is or how much ETH you have available for gas prices. Exchanges like Uniswap may need to offer a different trade value than you intend based on factors like the time of execution, the liquidity available, or when using market orders instead of limit orders. A good primer on slippage can be found here. Uniswap allows you to customize the amount of slippage you wish to tolerate. This slippage toleration can be anywhere from 0.1% to 1%, or none at all. The tighter the slippage (closer to 0%) the less likely you may get the price you want due to the lack of flexibility in your chosen trade value. In addition, ETH gas prices can vary on several factors like network congestion, so more gas may be needed to make the transaction than you have in your wallet.
- Finished! You should receive a confirmation of your swap.
Token Swap With Balancer/Trust Wallet
- Using Trust Wallet, go to the Balancer Exchange website and in the top right corner you will see a button that says “Connect Wallet”. Click that button and select “Scan with Wallet Connect”.
- Open your Trust Wallet and go to Settings. Select the WalletConnect tab which will bring up a camera. Scan the QR code from the Balancer website and on the Trust Wallet a prompt will appear to connect. Click it and return to the Balancer website where your wallet should be connected.
- You will see two boxes, one labeled “Token to Sell” and “Token to Buy”. For this example we will select Ethereum as the token to sell, so select that from the list. On “Token to Buy”, select the Compound token reserved under the ticker COMP.
- Once you have set the amount you wish to trade, hit the “Swap” button. This will send a message on the Trust Wallet for you to confirm the swap which includes the network fee. Note: you may be shocked to discover that the network fee is high (currently ranging from $80-120 per fee). It is perfectly okay to not go through with this transaction as this is just a mock example. If you wish to follow through on the transaction, click “Confirm”.
- That’s it!
Trading on 1inch Exchange
- Navigate on your browser to the 1inch Exchange website and just like many other examples, click “Connect Wallet” in the top right corner. Select “WalletConnect” and follow the same steps as Balancer.
- After connecting the wallet, you will see the main page with “From” and “To” and what tokens to trade. Select ETH once again and to trade, select “USDC”.
- Take a brief pause here and look at the website underneath the swap. You can see the aggregation that 1inch uses to get the best prices. You can select/deselect the types of spreads that you want, the amounts of liquidity on each exchange, and the difference between them.
- Select “Swap” and confirm if you wish to go through with the transaction. And that’s it!
You are now able to trade using three different exchanges with multiple wallet types. So far this is something reasonably basic for the average crypto user. Now we will do something a little more complex by doing some savings and lending options.
DeFi Savings Accounts With Aave and Compound Finance
After getting some foundations on how to use and interact with wallets and token swaps, we can get to the heart of what makes DeFi so unique. The first layer we can visit is the idea of earning and saving money that’s very similar to a traditional savings account. However, DeFi has greater advantages than normal savings accounts. For example, some services let you receive your accrued interest every 15 minutes instead of every month, quarter, or year. In addition, the ability of decentralization helps to remove unethical barriers like discrimination or lack of credit. Some features like in Compound allow you to buy the collateral of insolvent borrowers at a discounted rate.
We will take a look at two projects that offer a robust experience in gaining annual percentage yield (APY).
Aave Interest Incurring Deposits
- Go to the Aave website and click “Enter” to get to the market screen. If this is your first time visiting the screen, connect your wallet via the on screen options or through WalletConnect.
- Once you are connected, you will see a list of coin options with respective APYs. “Deposit APY” is the amount of yield you would receive while “Borrow APR” is the amount of interest charged to you on borrowing (which we will tackle in the Signature and Collateral Loan section of the guide). Select DAI.
- You will be sent to the DAI screen showing reserve stats like liquidity, average rates, and more. On the bottom of the page on “Your Information”, select “Deposit”.
- On the next screen, you will be asked how much DAI you wish to deposit. Take a look at the Reserve Overview portion of the screen to get information on your upcoming transaction including utilization rate, deposit APY, loan to value ratio (LTV), and more.
- For this mock example we will select 25% listed below the text field. Click “Continue”. You will then be asked to confirm and hit “Submit”. You will be asked to confirm this a final time on the wallet side of the transaction for the ETH gas fee.
- Once this is fully confirmed, you will receive a successful notification where you can then navigate to the dashboard to view your deposited assets.
- And that’s it! You have successfully deposited DAI to the Aave platform and you can view your interest in real time.
Compound Finance Deposit and Earning
- Go to the Compound Finance website and select “App” on the top right hand side of the screen to get to the application dashboard. Click on the “Connect Wallet” on the top of the screen and follow the instructions from Aave.
- Return to the dashboard and go to “Supply Markets”. Select DAI. You will be prompted to enable the supply followed with information on your deposit and also confirm on the wallet side to go forward with the gas fee transaction.
- There will be a pop-up screen to enter the amount you want to supply to the chain. Select 100 DAI that you have from the beginning tutorials on this page and click “Supply”. Confirm any request from your wallet and you the supply is complete.
- You can revisit the dashboard to see your total combined APY in addition to your supply balance.
Enabling DeFi For Creating “Signature” And Collateral Loans
Another feature that DeFi is known for is creating collateral loans where you can borrow from the assets you provide. In essence this works much like a signature loan that you can get at banks or credit unions but the usual friction like acceptance terms, credit lines, and being a member of that business. In addition, many of the rates can be lower than signature loans (which can range heavily from 5 to 36% interest!) or even enough for a car loan (which can range from 2.9 to 18% interest). You can also use one collateral like Ethereum and get DAI or USDC in return so you don’t spend your valuable positions to buy something you need.
It’s important to note from a technical standpoint that these borrowing types are not true lending services and more of a protocol oriented financial service. The details of this are a bit technical which Bankless HQ covered in an article about the lending being misused as a term instead of financial protocols. For the purposes of our mini-tutorial however, we will just show how it works.
Let’s take a look at Aave once again and discover how we can obtain a collateral loan to obtain some Ethereum while using DAI as collateral.
Borrowing on Aave
- Return to the Aave website and connect your wallet from the previous tutorial.
- Assuming that you completed the previous tutorial, go to the dashboard section on the side panel. On the Dashboard screen, click on “Borrowing” then select “Borrow”.
- You will be presented with a list of assets similar to the deposit section. Scroll and search for Ethereum.
- You will then be presented with an information chart that displays the utilization rate and liquidity information. You will also see a text input on how much Ethereum you wish to borrow. Click on 50% to auto fill and click enter. This means that from the previous tutorial, you will be borrowing from yourself using only half of the DAI deposited as collateral. Borrowing closer to 100% has risks like liquidation which we will avoid here.
- You will then be asked to choose between a stable interest rate or a variable one. Select “Stable Rate” and click “Continue”.
- A summary screen will appear to confirm all the details lie borrowing rates and amount to borrow. Make sure the information is correct and click “Submit’. This will connect to your wallet and you can confirm the network transaction on the wallet side.
- This borrowing is complete. You can now view the information on your dashboard. It’s important to note that if you borrowed here that you should pay back the loan.
As you can see, using platforms like Aave and Compound are fairly simple to use after you get a basic understanding of how they work.
One interesting note on the above examples is we started with Ethereum, then traded it for DAI, COMP, and USDC tokens then deposited the DAI on Aave while using that same DAI as collateral to borrow Ethereum. We ended up taking a variable and sometimes volatile asset (ETH), converted it to a more stable asset (DAI) to borrow a variable asset. In essence we created a hedge for ourselves by de-risking our exposure while still being exposed to the market, all while we collect an APY on our deposits.
”Mutual Funds” and Portfolio Management in Decentralized Finance
If you have made it this far in this practical applications guide, take a moment to reflect on everything you have learned and accomplished so far from adding money to wallets, trading assets, creating interest accounts, and taking our collateral loans. We managed all of this without any private or personal information; not so much as even a name or email address was used to accomplish any of these financial practices. This is where the potential of DeFi stands out – the ability to perform financial services without giving any personal information. All these things in the traditional world require tons of information and issues like borrowing limits, credit score or income requirements, asking you where you got your money, and even more heinous issues like discrimination.
We will go even farther with this by looking at a service that closely resembles mutual funds and portfolio management in the DeFi world. This is significant on three levels:
- Access to mutual funds and quality portfolio managers typically come with heavy KYC and AML information. Depending on what you want to do, you would need information like Social Security Numbers in addition to Brokerage Accounts. Some even require a minimum amount of money to start with.
- Mutual funds and hedge funds require money managers that not only need to know what they are doing, but they need to gather market data, set up shop, and network with other businesses for insights and data. Doing this requires lots of time and also lots of funding for them – which also translates to higher fees to you. DeFi based hedge funds are cheaper and require a lot less time which benefits both the consumer and managers.
- Decentralized mutual funds show the real power of what DeFi can do. With services like this, it helps create a decentralized ecosystem where a broad range of services can be done by ourselves or by services we don’t need to trust our money with, including services that we’ve been told previously can only be done by experts. Now it can mostly be done by protocols.
We will take a look at one example of a service that lines up with this model – Melon Protocol. This may be a little advanced if you’re not used to dealing with management funds due to its close relationship in asset management. Here is a decent primer on the topic to get some basics on fund management.
Setting Up A Melon Protocol Fund
- Navigate to the Melon Protocol website. In the top right hand corner, select “Visit Melon Terminal. (You can also read all the documentation on the main page before you access the terminal if you wish.)
- The main dashboard will show, highlighting the network metrics and the leaderboard, including how much money is being managed at this time. You will also see a list of funds. On the top right, click “Login”. (Don’t worry, there are no KYC or AML requirements.) Connect your wallet by following the prompts.
- Once the wallet is connected, you will automatically be taken back to the dashboard screen. On the top right corner there is a new button that says “Create a Fund”.
- Give your fund a name. There are options for a management fee, performance fee, and performance fee period. Set the fees to 0% (yes, this is allowed) and keep the fee period at the default value. Accept the terms and conditions and hit enter.
- A pop-up will appear to begin the network setup process which is a series of contracts. Select the free choice that you prefer and click confirm. You will need to do this for each contract (there should be nine contracts total).
- Once the contract signing is completed, go to your dashboard and go to your wallet on the Melon Terminal. In order to invest in your own fund, you will need to use Wrapped Ethereum, or WETH, which was explained in the Ultimate Beginner’s Guide to DeFi. Take the ETH from the Aave Lending tutorial and trade it for WETH.
- After obtaining WETH, click on “Invest & Redeem”. On the options in the Invest & Redeem tab you can enter the amount of WETH you wish to invest. Choose the amount you wish, hit “Invest”, and complete the network fee prompts that follow.
- You are not able to be a fund manager for your own fund! You can navigate to the trade tab to begin trading or to the overview tab to see the details of your fund.
- If you want to invest in a fund that you didn’t create, go to the main dashboard and select a fund of your preference from the list below. You will then be shown their statistical overview with an option on the upper right corner that says “Invest”. Click that. You will be taken to their investment screen where you can select the WETH you want to invest with from Step 6. Click “Invest” and sign the contacts involved.
You have just set up your own private fund with no fees and a short walkthrough of investing in a fund. Setting up a fund without any KYC or AML is a fairly big deal and has large implications on the current space of money managers today. Fund managers can create their own funds on Melon Protocol for their clients or if you want to create a fund for others to use by charging a fee.
Broader Investment Applications in Decentralized Finance
The DeFi space is really just beginning yet there are already so many working projects. You can save, invest, start funds, and with only the amount of money you wish to use for these services. It doesn’t stop there however as the future is awaiting for more complex DeFi services that will only get better and cheaper, in addition to better interfaces and UI.
Resources and Links
- Creating an Automated Liquidity Pool with 1inch Exchange and Balancer
- Calculating Value, Loss, and Slippage with Balancer Pools
- What are DEX Aggregators in Crypto?
- Everything You Need to Know About Non-Fungible Tokens
- How Do Ethereum Token Swaps Work?
- How Aave’s DeFi Protocols and Deposits Gain Interest
- Guides to Compound Finance Functionality
- Stanford University: Operational Concerns and Best Practices in Emergent Investments of Crypto Hedge Funds