compound

Implements Compound V3 Comet lending, borrowing, liquidation, and governance operations across EVM chains.

1|1|Updated May 21, 2026
One-click install
npx skills add https://github.com/naruto11eth/cryptoskills --skill compound-naruto11eth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compound
Source: https://github.com/naruto11eth/cryptoskills/tree/main/skills/compound
Command: npx skills add https://github.com/naruto11eth/cryptoskills --skill compound-naruto11eth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires viem.

What problem does it solve? AI agents frequently confuse Compound V2 and V3 architectures, producing code with nonexistent cTokens, wrong liquidation flows, and hallucinated contract addresses. This Skill provides verified Compound V3 (Comet) interfaces, deployment addresses, and working code patterns so agents generate correct lending protocol integrations. ## Core Features & Use Cases - Supply, Borrow, Repay, Withdraw: Complete viem and Solidity patterns for interacting with Comet markets, including the critical distinction between supplying base assets (earning interest) and collateral (backing borrows). - Liquidation Workflows: Two-step absorb() and buyCollateral() implementation with profit calculation and slippage protection for liquidation bots. - Verified Multi-Chain Addresses: Checksummed Comet market, Configurator, CometRewards, and Bulker addresses for Ethereum, Arbitrum, Base, Optimism, and Polygon. - Use Case: Build a position monitoring tool that reads a user's collateral balances, borrow capacity, health ratio, and accrued COMP rewards across Compound V3 markets, then alerts before liquidation thresholds are breached. ## Quick Start Ask the agent to supply 1000 USDC to the Compound V3 USDC market on Ethereum mainnet using viem.

Frequently Asked Questions about compound

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I supply and borrow on Compound V3 with viem?

Approve the Comet contract to spend your token, then call supply(asset, amount) for collateral or base assets. To borrow, call withdraw() on the base asset after supplying collateral; to repay, call supply() with the base asset.

What is the difference between Compound V2 and V3?

Compound V3 (Comet) has one borrowable base asset per market with no cTokens, mint, or redeem functions. V2 used shared pools where every asset was borrowable. V3 uses supply/withdraw directly on the Comet contract with per-second interest accrual.

How does Compound V3 liquidation work?

Liquidation is a two-step process: anyone calls absorb() on an underwater account to seize its position into protocol reserves, then buyers purchase the seized collateral at a discount via buyCollateral() by paying the base asset.

Why does my Compound V3 supply transaction revert with TransferInFailed?

TransferInFailed means the ERC-20 transferFrom into Comet failed. Verify you approved the Comet proxy address (not Configurator or CometRewards), have sufficient token balance, and for USDT reset the allowance to zero before setting a new value.

Which chains does Compound V3 support?

Compound V3 Comet markets are deployed on Ethereum mainnet, Arbitrum, Base, Optimism, and Polygon. Each chain has its own Comet market proxies, Configurator, CometRewards, and Bulker contracts with distinct addresses.

How do I claim COMP rewards from Compound V3?

Call claim(comet, account, true) on the CometRewards contract, not on the Comet contract itself. Each chain has its own CometRewards address, and rewards accrue per-second based on tracking speeds set by governance.