DEV Community

Helena Chandler
Helena Chandler

Posted on

A Technical Guide to Compound Finance: Supplying and Borrowing Assets

Compound Finance Official is one of DeFi's foundational protocols, creating an autonomous money market on Ethereum. This guide provides a step-by-step process for developers and users on how to perform the two core actions: lending and borrowing.

Core Concept: cTokens
Before we start, it's crucial to understand cTokens. When you supply an asset to Compound, you receive a corresponding cToken (e.g., supplying ETH gives you cETH). This is the token that earns interest. A deeper dive into cTokens Explained shows they are your claim on the underlying assets in the pool. They are your collateral.

Step 1: Supplying Assets (Lending)
This is the entry point into the Compound ecosystem.

Connect Your Wallet: Navigate to the Compound app and connect a Web3 wallet.

Select an Asset: From the list of Compound Finance Supported Assets, choose the one you wish to supply (e.g., USDC).

Enable the Asset: You'll first need to send a transaction to approve the Compound smart contract to interact with your chosen asset.

Supply: Enter the amount you wish to lend. After the transaction is confirmed, your wallet will be credited with the corresponding cToken, and you will start earning interest immediately. This is the essence of Compound Finance Lending.

Step 2: Borrowing Assets
Your supplied assets act as collateral, allowing you to borrow other assets.

Use as Collateral: Ensure the asset you supplied is enabled as collateral.

Monitor Your Borrow Limit: Your borrow limit is determined by the value of your collateral and the Compound Collateral Factor of that asset. Never exceed this limit to avoid liquidation.

Select an Asset to Borrow: Choose an asset from the "Borrow Market."

Execute Borrow: Enter the amount you wish to borrow and confirm the transaction.

This Compound Finance Borrowing process is seamless and entirely on-chain. For a complete overview of the protocol architecture and the improvements in Compound III Explained, refer to the Full Official Documentation.

Top comments (0)