Compound

Compound supports lending and borrowing against crypto collateral

Compound is a crypto lending protocol that pools supplied assets and supports borrowing against collateral. Compound III separates an interest-earning base asset from collateral that doesn't earn protocol interest. Rates change with utilization, which measures borrowing relative to supply. Available liquidity constrains withdrawals, and falling collateral values can expose debt to liquidation. The older v2 architecture uses cTokens and different collateral rules. The selected version and market determine what earns interest, what supports a loan and how balances appear.

- last updated

Base assets and collateral have different jobs

In Compound III, the market's base asset determines what borrowers receive and what lenders supply for interest. Other supported assets secure borrowing, and each deployment defines its own collateral list.

Lending the base asset

A positive base-asset balance earns interest when the configured supply rate is above zero. That balance remains exposed to the supplied token's value and the market's ability to return funds. A lender doesn't need an outstanding loan to supply the base asset. The protocol records supplied funds separately from tokens held in the wallet.

Collateral for a loan

Eligible collateral increases borrowing capacity based on its configured factor and oracle price. Compound III collateral doesn't earn lending interest, so collateral deposits shouldn't be treated as interest-bearing base-asset supplies. The collateral supply cap limits how much of each asset the market accepts. Borrowers receive that market's base asset, even when several collateral assets support the position. Collateral held in another deployment doesn't automatically increase this market's borrowing capacity.

cToken accounting separates v2 from Compound III

Compound v2 represents supplied assets with cTokens. Each cToken exchange rate specifies how much of the underlying asset one cToken represents. An interest-earning balance can also support borrowing when the account enables the market as collateral and its collateral factor permits it. The Comptroller checks those balances against oracle prices and risk parameters. New supply and borrowing remain subject to the selected market's permissions and limits.

Compound III uses Comet contracts and a net base-asset balance: positive means supplied funds and negative means borrowing. Its collateral accounting is separate. Holding v2 cTokens doesn't automatically create a supplied balance in a III market. Switching an interface's selected version won't move an existing position between contracts.

How are lending and borrowing rates determined?

Supply and borrowing rates follow the selected market's utilization-based interest model. Compound III uses separate utilization-based curves for supply and borrowing rates. Each curve has a configured kink where its slope changes. The rate can increase more sharply beyond that point. A rate shown at one moment doesn't fix the borrowing cost or lending return for the full holding period.

Interest on III base balances accrues with elapsed time using the block timestamp. Supply and borrowing indices translate principal into interest-adjusted balances. In v2, the supply rate derives from borrowing interest, utilization and the reserve factor; cToken exchange rates express accumulated interest. Any incentive component is separate from interest paid in the base or underlying asset. Reward eligibility and distribution depend on the market's configuration.

Borrowing capacity combines prices with collateral factors

Both the borrowed asset's price and the collateral prices affect borrowing capacity. Accrued debt and changing risk parameters can shrink the room for additional borrowing.

The borrowing limit and liquidation threshold

A collateral factor defines the fraction of an asset's oracle value that supports debt. Adding the contributions across eligible assets gives the collateral side of the borrowing limit. Compound III values debt using its accrued base-asset balance and the base asset's oracle price. Compound III uses separate collateral factors for borrowing capacity and liquidation eligibility. An account can lose room to borrow more without immediately qualifying for liquidation. In III liquidation, the protocol takes the account's collateral and clears its debt under configured penalty rules. The account receives any excess collateral value after penalties and debt settlement as a positive base-asset balance. Falling collateral prices or a rising debt value can consume the buffer between borrowing and liquidation limits.

Compound: Borrowing capacity combines prices with collateral factors

View image file

Minimum debt and available funds

An opening Compound III borrow must meet the market's configured minimum base-asset debt; otherwise, the withdrawal reverts. Sufficient collateral doesn't guarantee that the pool can transfer the requested tokens; available liquidity matters too. In Comet, withdrawing base assets can create borrowing when the resulting account balance becomes negative. The contract then checks the new debt against its requirements. A collateral price increase expands capacity when other inputs stay unchanged, while borrowed token units remain owed and continue accruing interest.

Check a base-asset supply before submitting it

Before a Compound III base-asset supply, the destination account's existing balance determines whether the transfer funds lending or pays debt. Keep the request unsigned while reviewing that distinction.

  • Identify the market's base asset and the account that should receive the protocol balance.
  • Read that account's accrued debt or supplied balance, including interest that has accumulated.
  • Check the allowance to the Comet market, the wallet's token balance, network fee balance and supply pause status.
  • Confirm the amount and destination before signing and submitting the supply; token approval alone doesn't create a supply balance.
  • After successful execution, compare the transferred amount with the destination account's debt reduction or positive base balance.

An account without debt receives a positive base-asset balance from a successful supply. If the account already owes the base asset, transferred tokens reduce that debt first. Only the amount that exceeds accrued debt becomes an interest-bearing supply. A transaction identifier doesn't establish either result: successful execution and the destination balance do.

What can prevent a withdrawal or repayment?

Withdrawals can fail because liquidity is unavailable, collateral would become insufficient or withdrawals are paused. Repayment in Compound III uses the supply path, so a supply pause also affects repayment. Withdrawal and supply pauses are separate market settings.

Removing collateral must leave any remaining borrowing sufficiently collateralized. Repayment transfers the borrowed asset back into the market, and fully clearing the debt requires covering the accrued balance. Adding more collateral may increase borrowing capacity, subject to the collateral supply cap. It doesn't reduce the number of base tokens owed. Network congestion or higher gas costs can delay an intended transaction while debt continues to accrue.

A reverted transaction leaves its intended protocol state change unapplied, although it still consumes network fees for execution. Repeated submission won't fix a supply cap, a pause or insufficient market liquidity. An allowance change addresses permission to transfer wallet tokens; it doesn't restore pool liquidity or lift a protocol pause.

Governance changes market rules and risk exposure

COMP holders and delegates govern protocol upgrades and market parameters through proposals. A position's borrowing rules can change after funds enter the market.

Market configuration and pauses

Governance can change collateral factors, supply caps, rate curves and supported assets. The pause guardian can suspend specified operations under its authority. Different deployments have separate market states, so the same asset name doesn't establish the same terms everywhere. A pause or configuration change applies to the affected market and operations; it doesn't automatically describe every Compound deployment.

Market configuration and pauses (Compound)

View image file

Permissions and contract risk

Protocol code and price feeds determine how contracts account for assets and assess collateral. A coding error, compromised privileged control or inaccurate price can affect a position even when its owner hasn't increased debt. Past audits don't establish protection against every future failure. Suppliers remain exposed to shortfalls when repayments and recovered collateral fail to cover lending claims.

Token allowances authorize transfers by an approved spender. Comet manager permissions extend to actions on the protocol account, including withdrawals. Revoking a manager prevents future actions under that permission; it won't undo previous withdrawals. The Comet allow function controls that manager permission; it doesn't replace the underlying token's ERC-20 allowance.

Details worth knowing about Compound

Who can repay a Compound III loan on another account's behalf?

Another account can supply the market's base asset to the borrowing account to reduce its Compound III debt. The payer funds the transfer and grants the required token allowance. Taking tokens from someone else's wallet requires that owner's authorization. The credited protocol account and the paying wallet can differ.

Is holding COMP necessary to supply or borrow?

Holding COMP isn't a prerequisite for supplying or borrowing through the core protocol functions. COMP gives holders governance rights, while lending uses supported assets and borrowing requires sufficient eligible collateral. Network transaction fees remain separate from those lending and collateral requirements.

Can Compound III rewards be claimed without withdrawing supplied funds?

Compound III exposes reward claims through a separate Comet Rewards contract, without requiring withdrawal of the supplied base asset. The claimable token and amount depend on the reward configuration and accrued entitlement. Claiming doesn't turn a reward into lending interest or reduce an outstanding borrowing balance.

Are wallet-linked lending balances private?

Protocol balances and on-chain transactions are publicly visible, even when a wallet address doesn't reveal a person's name. The address alone doesn't establish a legal identity. Patterns across transfers and contract interactions can nevertheless connect the lending position with other activity and reveal how someone uses their assets.

What limits transfers of v2 cTokens that support a loan?

A v2 cToken transfer fails if the sender has entered that market and the transfer would leave negative account liquidity. The tokens represent supplied assets, so moving them also moves the lending claim. Holding enough cTokens in the wallet doesn't establish enough collateral headroom for the transfer.