Skip to main content

Use Compound

Compound has been deployed to showcase how Linea can be used to supply collateral and borrow tokens on L2, where users can benefit from cheaper gas fees. Compound has integrated those contracts in its website to let the user interact with the dapp on Linea.

This tutorial will can be done with either Fluvi Wallet or Metamask wallet to interact with Compound on Linea.

How to borrow USDC on compound in one “Bulk transaction”​

  1. First you need some ETH, navigate to the faucet to get some: Linea Faucet
  2. Once you have some ETH, navigate to Compound Finance
  3. Connect your wallet.

Make

  1. Make sure your wallet is connected to Linea Goerli and funded with ETH
  2. Make sure that “Linea Goerli” is selected in the networks list on the top right

Make

  1. Make sure that you have not supplied any USDC to compound(You can not not supply and borrow USDC at the same time), if you have, click on "Withdraw" otherwise go skip step 7

Make

  1. Then click on "Max", click on "Add Action". Then on "Submit Transaction" and in the popup click on "Confirm", wait for the transaction to be completed. Make

  2. Click on the “+” sign next to the collateral “Ether”

Make

  1. Add the amount of ETH you want to deposit and then click on “Add Action”
  2. Click on the purple button “Borrow USDC”
  3. Add the amount of USDC you want to borrow and then click on “Add Action”
  4. Click on “Submit Transaction”

Make

  1. In the popup click on “Confirm”

Make

  1. Wait for the transaction to be confirmed

Make

  1. Click on “Complete Transaction”

Make

  1. In the popup click on “Confirm”
  2. Wait for the transaction to be confirmed
  3. You now have borrowed USDC from compound!

How to supply USDC on compound to earn interest​

  1. You first need to repay the amount of USDC you borrowed
  2. Click on “Repay USDC”

Make

  1. Click on “Max” and “Approve & Add”
  2. Click on “Submit Transaction”
  3. In the popup click on “Use default”, “Next” and “Approve”

Make

  1. Wait for the transaction to be completed then click on “Submit Transaction” again
  2. In the popup click on confirm
  3. Wait for the transaction to be completed
  4. You now need USDC to supply USDC, navigate to Linea Faucet
  5. Get some USDC from the faucet
  6. Come back to the compound website, you should see a USDC balance and a “Supply USDC” button

Make

  1. Click on “Supply USDC”

Make

  1. Enter the amount of USDC you want to supply and click on “Approve & Add”

Make

  1. Click on “Use default” then “Next” and “Approve”
  2. Wait for the transaction to be completed
  3. Click on “Submit Transaction”

Make

  1. In the popup click on “Confirm”
  2. Wait for the transaction to be completed
  3. You have supplied USDC in compound and are starting to earn interest!