What you can do
| withdraw-supply | Withdraw supplied assets from a V2 market | cToken.redeemUnderlying(amount in underlying units) or cToken.redeem(cTokenAmount). Check Comptroller.getHypotheticalAccountLiquidity(account, cToken, redeemTokens, 0) if you also borrow, and cToken.getCash() for available liquidity. Check the uint return value: 0 = success. |
| repay | Repay a V2 borrow | ERC-20 markets: underlying.approve(cToken, amt) then cToken.repayBorrow(amt) (2^256-1 = full). cETH: Maximillion.repayBehalf(borrower) with a little more ETH than borrowBalanceCurrent (excess refunded). |
| check-health | Read an account's position | Comptroller.getAccountLiquidity(account) -> (err, liquidity, shortfall) in USD 1e18; per market cToken.getAccountSnapshot(account); collateral factors via Comptroller.markets(cToken). |
| liquidate | Liquidate an account with shortfall | When getAccountLiquidity shows shortfall > 0: approve the borrowed underlying, then cTokenBorrowed.liquidateBorrow(borrower, repayAmount <= closeFactor x borrow, cTokenCollateral); you receive collateral cTokens, then redeem them. |
| claim-comp | Claim accrued COMP | Comptroller.claimComp(holder) (or claimComp(holder, [cTokens])). Read Comptroller.compAccrued(holder) first; new COMP emissions on V2 are zero. |
| exit-collateral | Remove a market from collateral | Comptroller.exitMarket(cToken) once nothing is borrowed from it and the account stays healthy. |
Legacy version: Compound V2 is being wound down; the current product is Compound III (Comet), which has separate per-base-asset deployments not covered here.
On-chain state checked 2026-11-25: mintGuardianPaused and borrowGuardianPaused are true for all 20 listed markets, so mint() and borrow() revert; redeem, repay and liquidation still work. COMP supply/borrow speeds are 0 on every market.
Deprecated markets (isDeprecated = true: cUSDT, cZRX, cCOMP, cTUSD, cUSDP, cFEI, cREP, cSAI) have collateral factor 0 and 100% reserve factor, so open borrows there can be liquidated in full.
Collateral factors on the remaining markets (e.g. cUSDC 84.5%, cDAI 83.5%, cETH 82.5% on 2026-11-25) can be cut by governance at any time, which can push accounts into shortfall; closeFactor is 50% and liquidation incentive 8%.
Contracts
Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).Comptroller (Unitroller proxy)other on ethereum0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B
write enterMarkets(address[])
Mark the given cTokens as collateral (needed before borrowing against them). Returns one error code per market (0 = ok).
write exitMarket(address)
Stop using a cToken as collateral. Fails if the account still borrows from that market or exiting would leave it short.
read getAccountLiquidity(address)
Returns (error, liquidity, shortfall) in USD scaled 1e18. shortfall > 0 means the account can be liquidated.
read getHypotheticalAccountLiquidity(address,address,uint256,uint256)
(account, cTokenModify, redeemTokens, borrowAmount) -> (error, liquidity, shortfall) after a hypothetical redeem/borrow.
read getAssetsIn(address)
cTokens the account has entered as collateral.
read markets(address)
Returns (isListed, collateralFactorMantissa (1e18 = 100%), isComped).
read getAllMarkets()
All listed cToken addresses.
read mintGuardianPaused(address)
True if minting in that cToken is paused (true for every market as of 2026-11-25).
read borrowGuardianPaused(address)
True if borrowing in that cToken is paused (true for every market as of 2026-11-25).
read isDeprecated(address)
True if the market is deprecated (collateral factor 0, borrow paused, reserve factor 100%): any borrow there can be fully liquidated.
read closeFactorMantissa()
Max share of a borrow repayable in one liquidation (0.5e18 = 50% on 2026-11-25).
read liquidationIncentiveMantissa()
Collateral bonus to liquidators, 1e18-scaled (1.08e18 = 8% on 2026-11-25).
read liquidateCalculateSeizeTokens(address,address,uint256)
(cTokenBorrowed, cTokenCollateral, repayAmount) -> (error, cTokens seized).
read compAccrued(address)
COMP already accrued but not yet claimed (excludes amounts since the last index update).
write claimComp(address)
Claim accrued COMP for a holder across all markets (anyone may call; COMP goes to the holder). V2 COMP supply/borrow speeds are 0, so only past accruals remain.
write claimComp(address,address[])
Claim accrued COMP for a holder in the given markets only (cheaper).
read oracle()
Price oracle used by the Comptroller (currently the Compound v2 Price Feed).
cETH - Compound V2 market for ETHpool on ethereum0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5
write mint()
Supply ETH (msg.value) for cETH. Reverts on failure. Guardian-paused as of 2026-11-25.
write redeem(uint256)
Burn cETH (8 decimals) for ETH. Reverts on failure.
write redeemUnderlying(uint256)
Withdraw an exact amount of ETH (wei).
write repayBorrow()
Repay own ETH borrow with msg.value. Sending more than owed reverts; use Maximillion.repayBehalf to repay exactly in full.
write repayBorrowBehalf(address)
Repay another account's ETH borrow with msg.value.
write liquidateBorrow(address,address)
Liquidate (borrower, cTokenCollateral) repaying msg.value ETH.
cUSDC - Compound V2 market for USDCpool on ethereum0x39AA39c021dfbaE8faC545936693aC917d5E7563
write mint(uint256)
Supply underlying (approve the cToken first; amount in underlying base units) and receive cTokens (8 decimals). Returns 0 on success, a non-zero Compound error code on failure (it does not always revert, so check the return value / Failure event). NOTE: mint is guardian-paused on every V2 market as of 2026-11-25, so this reverts.
write redeem(uint256)
Burn an exact number of cTokens (8 decimals) for underlying. Returns 0 on success, error code otherwise. Fails if the withdrawal would leave the account short of liquidity or the market lacks cash (getCash()).
write redeemUnderlying(uint256)
Withdraw an exact amount of underlying (underlying decimals), burning the needed cTokens. Returns 0 on success, error code otherwise.
write borrow(uint256)
Borrow underlying against collateral in entered markets. Returns 0 on success. NOTE: borrow is guardian-paused on every V2 market as of 2026-11-25.
write repayBorrow(uint256)
Repay own borrow in underlying (approve first). Pass type(uint256).max (2^256-1) to repay the full balance including interest accrued this block. Returns 0 on success.
write repayBorrowBehalf(address,uint256)
Repay another account's borrow: (borrower, amount). Max uint repays all.
write liquidateBorrow(address,uint256,address)
Liquidate an underwater account: (borrower, repayAmount in this market's underlying, cTokenCollateral to seize). Max repay per call = closeFactor x borrow; liquidator receives collateral cTokens plus the liquidation incentive. Returns 0 on success.
write balanceOfUnderlying(address)
Non-view (accrues interest) - call with eth_call/simulate. Returns the account's supplied balance in underlying units.
write exchangeRateCurrent()
Non-view, accrues interest; call via eth_call. Underlying per cToken scaled by 1e(18 + underlyingDecimals - 8).
read exchangeRateStored()
Exchange rate as of the last accrual (same scaling as exchangeRateCurrent). underlying = cTokens * rate / 1e18.
write borrowBalanceCurrent(address)
Non-view, accrues interest; call via eth_call. Outstanding borrow incl. interest, in underlying units.
read borrowBalanceStored(address)
Borrow balance as of the last accrual, in underlying units.
read getAccountSnapshot(address)
Returns (errorCode, cTokenBalance, borrowBalance, exchangeRateMantissa) for an account in one call.
read supplyRatePerBlock()
Supply interest rate per Ethereum block, scaled 1e18. APY ~ (1 + rate * 7200)^365 - 1 (12 s blocks).
read borrowRatePerBlock()
Borrow interest rate per block, scaled 1e18.
read getCash()
Underlying held by the market, i.e. liquidity available for redeems and borrows.
read underlying()
Address of the underlying ERC-20 (not present on cETH).
cDAI - Compound V2 market for DAIpool on ethereum0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643
cUSDT - Compound V2 market for USDT (deprecated market)pool on ethereum0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9
cWBTC2 - Compound V2 market for WBTC (current WBTC market; on-chain symbol cWBTC)pool on ethereum0xccF4429DB6322D5C611ee964527D42E5d685DD6a
cWBTC (legacy) - Compound V2 market for WBTC (original market, superseded by cWBTC2)pool on ethereum0xC11b1268C1A384e55C48c2391d8d480264A3A7F4
cCOMP - Compound V2 market for COMP (deprecated market)pool on ethereum0x70e36f6BF80a52b3B46b3aF8e106CC0ed743E8e4
cUNI - Compound V2 market for UNIpool on ethereum0x35A18000230DA775CAc24873d00Ff85BccdeD550
cLINK - Compound V2 market for LINKpool on ethereum0xFAce851a4921ce59e912d19329929CE6da6EB0c7
cAAVE - Compound V2 market for AAVEpool on ethereum0xe65cdB6479BaC1e22340E4E755fAE7E509EcD06c
cMKR - Compound V2 market for MKRpool on ethereum0x95b4eF2869eBD94BEb4eEE400a99824BF5DC325b
cSUSHI - Compound V2 market for SUSHIpool on ethereum0x4B0181102A0112A2ef11AbEE5563bb4a3176c9d7
cYFI - Compound V2 market for YFIpool on ethereum0x80a2AE356fc9ef4305676f7a3E2Ed04e12C33946
cBAT - Compound V2 market for BATpool on ethereum0x6C8c6b02E7b2BE14d4fA6022Dfd6d75921D90E4E
cZRX - Compound V2 market for ZRX (deprecated market)pool on ethereum0xB3319f5D18Bc0D84dD1b4825Dcde5d5f7266d407
cTUSD - Compound V2 market for TUSD (deprecated market)pool on ethereum0x12392F67bdf24faE0AF363c24aC620a2f67DAd86
cUSDP - Compound V2 market for USDP (deprecated market)pool on ethereum0x041171993284df560249B57358F931D9eB7b925D
cFEI - Compound V2 market for FEI (deprecated, fixed oracle price)pool on ethereum0x7713DD9Ca933848F6819F38B8352D9A15EA73F67
cREP - Compound V2 market for REP (deprecated, fixed oracle price)pool on ethereum0x158079Ee67Fce2f58472A96584A73C7Ab9AC95c1
cSAI - Compound V2 market for SAI (single-collateral DAI; deprecated, fixed oracle price; on-chain symbol cDAI)pool on ethereum0xF5DCe57282A584D2746FaF1593d3121Fcac444dC
Compound v2 Price Feed (PriceOracle, Chainlink-based)other on ethereum0x8CF42B08AD13761345531b839487aA4d113955d9
read getUnderlyingPrice(address)
USD price of a cToken's underlying, scaled 1e(36 - underlyingDecimals) (e.g. USDC price ~1e30, ETH price ~ price*1e18). Deprecated FEI/REP/SAI return fixed prices.
Maximillion (repay full cETH borrow)router on ethereum0xf859A1AD94BcF445A406B892eF0d3082f4174088
write repayBehalf(address)
Repay a borrower's entire cETH borrow with msg.value; any excess ETH is refunded to the caller. Send slightly more than borrowBalanceCurrent.
COMP tokentoken on ethereum0xc00e94Cb662C3520282E6f5717214004A7f26888
read balanceOf(address)
COMP balance (18 decimals).
write delegate(address)
Delegate voting power (votes only count once delegated, including to yourself).
read getCurrentVotes(address)
Current votes delegated to an account.
GovernorBravo (Compound governance)governance on ethereum0xc0Da02939E1441F497fd74F78cE7Decb17B66529
Timelock (admin of the Comptroller and markets)governance on ethereum0x6d903f6003cca6255D85CcA4D3B5E5146dC33925