compoundtutorials
  • Chapter 1: Introduction to Compound
    • 1. What Is Compound?
    • 2. Introducing Comet (Compound V3)
    • 3. What’s Next?
  • Chapter 2: Markets, Utilization & Interest Rates
    • 1. What Is a Market in Comet?
    • 2. Utilization: Balancing Supply & Demand
    • 3. The Kink: A Flexible Threshold
    • 4. Interest Rate Parameters
    • 5. Supply and Borrow Interest Rates vs. Utilization Rate Chart
    • 6. Why This Matters
  • Chapter 3: Hands-On Tutorial (Step by Step)
    • 1. Environment Setup
    • 2. Getting Sepolia ETH and WETH
    • 3. Project Structure
    • 4. Creating the index.js Script
    • 5. Run the Script
    • 6. Next Steps
  • Chapter 4: Repaying, Withdrawing & Managing Your Position
    • 1. Updating index.js
    • 2. Example Usage in Your Main Execution
    • 3. Recap
    • 4. Summary & Best Practices
  • Chapter 5: Using the Compound.js SDK
    • Getting Started
    • Performing Common Actions
  • Chapter 6: Additional Resources
Powered by GitBook
On this page
  1. Chapter 3: Hands-On Tutorial (Step by Step)

5. Run the Script

  • Make sure your .env is correctly set with your RPC URL and private key.

  • Confirm you have enough test ETH in your wallet to cover transaction fees and that you have some WETH on Sepolia.

  • In your terminal, run:

node index.js

If successful, you’ll see logs indicating WETH was approved, supplied, and then some USDC was borrowed.

Previous4. Creating the index.js ScriptNext6. Next Steps

Last updated 5 months ago