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.
If during this tutorial you encounter the transaction pending issue, please see : Clear pending transactions
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
- Make sure that you have not supplied any USDC to compound(You can not supply and borrow USDC at the same time), if you have, click on "Withdraw USDC" otherwise skip step 7
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.
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!
Clear pending transactionsâ
It can occur that sometimes, the pending transactions displayed on the website are never completed even though they have been completed on chain (Usually it is displayed directly on your wallet), if that happens you can clear the transactions displayed on the website as below:
- Click on "Pending" at the top right of the screen
- Then click on "Clear" in the popup