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”​
- First you need some ETH, navigate to the faucet to get some: Linea Faucet
- Once you have some ETH, navigate to Compound Finance
- Connect your wallet.
- Make sure your wallet is connected to Linea Goerli and funded with ETH
- Make sure that “Linea Goerli” is selected in the networks list on the top right
- Click on the “+” sign next to the collateral “Ether”
- Add the amount of ETH you want to deposit and then click on “Add Action”
- Click on the purple button “Borrow USDC”
- Add the amount of USDC you want to borrow and then click on “Add Action”
- Click on “Submit Transaction”
- In the popup click on “Confirm”
- Wait for the transaction to be confirmed
- Click on “Complete Transaction”
- In the popup click on “Confirm”
- Wait for the transaction to be confirmed
- You now have borrowed USDC from compound!
How to supply USDC on compound to earn interest​
- You first need to repay the amount of USDC you borrowed
- Click on “Repay USDC”
- Click on “Max” and “Approve & Add”
- Click on “Submit Transaction”
- In the popup click on “Use default”, “Next” and “Approve”
- Wait for the transaction to be completed then click on “Submit Transaction” again
- In the popup click on confirm
- Wait for the transaction to be completed
- You now need USDC to supply USDC, navigate to Linea Faucet
- Get some USDC from the faucet
- Come back to the compound website, you should see a USDC balance and a “Supply USDC” button
- Click on “Supply USDC”
- Enter the amount of USDC you want to supply and click on “Approve & Add”
- Click on “Use default” then “Next” and “Approve”
- Wait for the transaction to be completed
- Click on “Submit Transaction”
- In the popup click on “Confirm”
- Wait for the transaction to be completed
- You have supplied USDC in compound and are starting to earn interest!