Dabbling with Crypto:

Part 2. Aave and Uniswap




 

Katya Malinova

Please visit part 1 first!

These are slightly outdated instructions on how to borrow/lend on Aave and to trade on Uniswap. I outline the main changes for October 2023 below.

  •  The guide (mostly) uses "Goerli" test network, but we now use "Sepolia."
    • I have changed this in some steps, but not everywhere!
  • Also, in the past, it was much easier to see that you are on a test network on Uniswap. As of October 2023, it is not explicit.
  • However, you can still see that you are on a test network but comparing the max available ETH to send with the balance  in your wallet (or simply use a wallet that only has Sepolia ETH!)

Step 4:
borrowing and lending in Aave

  1. navigate to aave.com

2. launch app

press on either to connect your wallet

Make sure your MetaMask wallet shows "Sepolia test network", not the Ethereum Mainnet

You are connecting your browser wallet

 

If multiple options, then search for MetaMask

Click the "gearbox" - top right corner on Aave to turn the "testnet mode" on

Click here to check that you are on the Ethereum Goerli Sepolia network

Click on this Faucet to get more assets to supply (it's free but you may need to have Sepolia ETH to get these)

Supply liquidity & provide collateral so that you may borrow. 

Fall 2023: you need not supply the ETH, you can supply whatever you just got from the Faucet

Supply liquidity & provide collateral so that you may borrow

Confirm in your wallet

By default, the receipt token is not showing up in your MetaMask.

Then, "ok, close"

Add the receipt token to your wallet so that the MetaMask wallet shows the balance.

The receipt token is now in your MetaMask

What to do if you forgot to "add token"

I illustrate this on USDT that I have just supplied to Aave

Go to "Activity" in your wallet

Click here (this is the last transaction, where I have supplied USDT)

What to do if you forgot to "add token"

You should see this screen instead after the "click"

Visit the "view on the block explorer"

Visit the "view on the block explorer"

You can click on the token contracts to get the addressed for the aUSDT (receipt) and also for USDT if you don't have it. You can then add them to your wallet

Click here for USDT

Text

Click here for aUSDT

Click here for USDT

This is an illustration for aUSDT

Click here to copy the contract address

Next, return to your wallet (next slide)

Open the wallet, go to "Tokens", and scroll to the bottom

Click on "import tokens

Copy-paste the aUSDT address in here

Copy-paste the aUSDT address 

Click import

and here is your token!

Now that you have supplied liquidity and it can be used as collateral, you may borrow.

Same steps. Borrow, confirm, add token.

Borrow something. Say, DAI or USDC.

You should see smth like this:

Next. Supply some or all of the DAI that you borrowed to Aave.

You would need to first approve the access to DAI in your wallet.

You would need to first approve the access to DAI in your wallet.

You may need to scroll down for the "sign" to become clickable

Next, supply. Don't forget to add the token so that you can track the totals

Next, let's find this transaction

Click on it

Let's view 

This is the report on the last transaction. 

If using this in lieu of the quiz, I need the "Transaction Hash" and "block" number

navigate to app.compound.finance and connect your wallet

NB: you may want/have to request more ETH from the faucet and you may want to purchase some other tokens on UniSwap, such as the UNI token

as with UniSwap liquidity supply, you first need to allow the app to use tokens (I am allowing the use of the UNI token) on your behalf 

unfortunately, I don't have the UNI token ... but Compound has a faucet to try it out - so click there 

which generously gave me 0.35 UNI

click max and supply

confirm

congrats: you are now a supplier of liquidity!

Now on to borrowing: 

  • one trick: for testnet in Compound, you need to enable your supplied liquidity as collateral
  • We can now borrow against our collateral (provided in UNI)
  • We will borrow 1 DAI

Step 5:
using crypto on Uniswap

we will trade testnet ETH using uniswap, a decentralized, automated market maker protocol

  1. navigate to uniswap.org

2. launch app

you need to connect your wallet to use the app

Step 1: click on MetaMask

Step 2: authorize connection

It may show up as "browser wallet"

Again, make sure your wallet shows Goerli Sepolia test network

shows your wallet

shows we're in testnet mode

This is no longer visible

Check the balance here - if you are on a test network, it should match the Sepolia ETH balance in your wallet!

enter an amount to trade (not too much, like 0.001)

click here to select the token we want to buy

e.g., can use UNI (the governance token for Uniswap)

that's the projected amount that you get for 0.01 ETH

click here

click to confirm

NB: sometimes it doesn't directly go to "confirm"; you may have to navigate to your wallet app (which will show a small notification indicator)

(there may be another step)

by default, the new token does not show up in your wallet

\(\to\) click on add UNI to Metamask

The add token may not longer show up on Sepolia (fall 2023). You may use the "add token process" discuss on the Aave set

should now show up in your wallet

Step 5a:
advanced dabbling: liquidity supply in UniSwap

Part 1 of advanced dabbling: we will now put our ETH and DAI to good use and become UniSwap liquidity providers

1. navigate to "pool"

2. establish a new position

First, select a token - say, UNI, unless you have other ones

There are lots of options here. I'll keep it simple:

  • select the fee tier
     
  • select the amount of ETH or UNI
     
  • select the "Full Range" for liquidity supply

before we can use the UNI tokens, we need to give the app the permission to access the UNI on your behalf \(\to\) you need to sign this as a transaction with your wallet. May need to scroll to get there.

you are now ready to supply liquidity:

Step 1

Step 2

Step 3: sign with wallet

details on Etherscan

your wallet also tells you what you did

the UniSwap App tells you what you have; click on the field to get: