What you can do
| supply | Lend the base token or deposit collateral | Approve the token, then Comet.supply(asset, amount) |
| withdraw | Withdraw lent base token or collateral | Comet.withdraw(asset, amount). Use balanceOf or collateralBalanceOf for the full amount. |
| borrow | Borrow the base token against collateral | Comet.withdraw(baseToken, amount) for more than the account supply balance |
| repay | Repay base token debt | Approve the base token, then Comet.supply(baseToken, amount). Supply slightly more than borrowBalanceOf to clear interest accrued after the read; the excess is credited as supply. |
| claim rewards | Claim COMP rewards for an account | CometRewards.claim(comet, account, true) |
| delegate | Let another address manage the account | Comet.allow(manager, true) |
| liquidate | Absorb underwater accounts and buy the collateral | Comet.absorb(absorber, [accounts]) then Comet.buyCollateral(asset, minAmount, baseAmount, recipient) |
Each market has one base asset. Lending and borrowing are both in that token, so exposure to other tokens only comes through collateral.
Withdrawing more base token than supplied silently opens a borrow. Check the amount against balanceOf first.
Underwater accounts are absorbed and their collateral is sold at a discount through buyCollateral.
Supply caps, pauses and borrow limits are set by governance per market and can change.
Contracts
Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).Comet USDC market (Ethereum)pool on ethereum0xc3d688B66703497DAA19211EEdff47f25384cdc3
write supply(address,uint256)
Supply the base token (USDC) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
Comet WETH market (Ethereum)pool on ethereum0xA17581A9E3356d9A858b789D68B4d866e593aE94
write supply(address,uint256)
Supply the base token (WETH) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
Comet USDT market (Ethereum)pool on ethereum0x3Afdc9BCA9213A35503b077a6072F3D0d5AB0840
write supply(address,uint256)
Supply the base token (USDT) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
Comet USDS market (Ethereum)pool on ethereum0x5D409e56D886231aDAf00c8775665AD0f9897b56
write supply(address,uint256)
Supply the base token (USDS) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
Comet USDC market (Base)pool on base0xb125E6687d4313864e53df431d5425969c15Eb2F
write supply(address,uint256)
Supply the base token (USDC) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
Comet WETH market (Base)pool on base0x46e6b214b524310239732D51387075E0e70970bf
write supply(address,uint256)
Supply the base token (WETH) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
Comet USDC market (Arbitrum)pool on arbitrum0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf
write supply(address,uint256)
Supply the base token (USDC) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
Comet WETH market (Arbitrum)pool on arbitrum0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486
write supply(address,uint256)
Supply the base token (WETH) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
Comet USDT market (Arbitrum)pool on arbitrum0xd98Be00b5D27fc98112BdE293e487f8D4cA57d07
write supply(address,uint256)
Supply the base token (USDT) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
Comet USDC market (Polygon)pool on polygon0xF25212E676D1F7F89Cd72fFEe66158f541246445
write supply(address,uint256)
Supply the base token (USDC) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
Comet USDC market (Optimism)pool on optimism0x2e44e174f7D53F0212823acC11C01A11d58c5bCB
write supply(address,uint256)
Supply the base token (USDC) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
Comet WETH market (Optimism)pool on optimism0xE36A30D249f7761327fd973001A32010b521b6Fd
write supply(address,uint256)
Supply the base token (WETH) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
Comet USDC market (Scroll)pool on scroll0xB2f97c1Bd3bf02f5e74d13f02E3e26F93D77CE44
write supply(address,uint256)
Supply the base token (USDC) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
Comet USDC market (Linea)pool on linea0x8D38A3d6B3c3B7d96D6536DA7Eef94A9d7dbC991
write supply(address,uint256)
Supply the base token (USDC) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
Comet USDC market (Unichain)pool on unichain0x2c7118c4C88B9841FCF839074c26Ae8f035f2921
write supply(address,uint256)
Supply the base token (USDC) or a collateral asset. Approve the Comet contract for the token first. Amount in the token's smallest unit. Supplying the base token also repays any debt. Reverts if supply is paused or a collateral supply cap would be exceeded.
write supplyTo(address,address,uint256)
Supply on behalf of another account: (dst, asset, amount). Same token approval and rules as supply. The position is credited to dst.
write withdraw(address,uint256)
Withdraw the base token or a collateral asset: (asset, amount). Withdrawing more base token than the account supplies opens a borrow of the difference. Reverts if the account would be undercollateralized or the market lacks base liquidity.
write withdrawTo(address,address,uint256)
Withdraw and send the asset to another address: (to, asset, amount). Same rules as withdraw.
read balanceOf(address)
Base token supply balance of an account, including accrued interest, in base token units. Zero when the account has no supply.
read borrowBalanceOf(address)
Current base token debt of an account, including accrued interest, in base token units. Zero when there is no debt.
read collateralBalanceOf(address,address)
Collateral balance of an account for one asset: (account, asset), in the asset's units. Served by the extension delegate through the Comet proxy fallback.
read isLiquidatable(address)
True if the account is underwater and can be absorbed by the protocol.
write absorb(address,address[])
Liquidation step one: (absorber, accounts). Anyone can call it. Moves the collateral and debt of underwater accounts into protocol reserves. Accounts that are not liquidatable are skipped.
write buyCollateral(address,uint256,uint256,address)
Liquidation step two: buy absorbed collateral at a discount: (asset, minAmount, baseAmount, recipient). Approve the base token first and pay baseAmount. Reverts if less than minAmount of the asset would be received.
read quoteCollateral(address,uint256)
Amount of an absorbed collateral asset received for a given baseAmount in buyCollateral, after the discount.
read getUtilization()
Current utilization of the base token, scaled by 1e18 (1e18 equals 100 percent).
read getSupplyRate(uint256)
Supply rate per second for a utilization value scaled by 1e18. Multiply by seconds per year for an APR estimate.
write allow(address,bool)
Allow or revoke a manager that can withdraw or borrow on msg.sender's behalf: (manager, isAllowed). Use allowBySig for signed approvals.
read baseToken()
Address of this market's base token.
CometRewards (Ethereum)other on ethereum0x1B0e765F6224C21223AeA2af16c1C46E38885a40
write claim(address,address,bool)
Claim accrued COMP rewards for src on a Comet market: (comet, src, shouldAccrue). Anyone can call it, and the rewards are sent to src. shouldAccrue true accrues the account first. Reverts if the market has no reward config.
write claimTo(address,address,address,bool)
Claim rewards for src and send them to a receiver: (comet, src, to, shouldAccrue). The caller must have permission on src (see allow). Reverts with NotPermitted otherwise.
CometRewards (Base)other on base0x123964802e6ABabBE1Bc9547D72Ef1B69B00A6b1
write claim(address,address,bool)
Claim accrued COMP rewards for src on a Comet market: (comet, src, shouldAccrue). Anyone can call it, and the rewards are sent to src. shouldAccrue true accrues the account first. Reverts if the market has no reward config.
write claimTo(address,address,address,bool)
Claim rewards for src and send them to a receiver: (comet, src, to, shouldAccrue). The caller must have permission on src (see allow). Reverts with NotPermitted otherwise.
CometRewards (Arbitrum)other on arbitrum0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae
write claim(address,address,bool)
Claim accrued COMP rewards for src on a Comet market: (comet, src, shouldAccrue). Anyone can call it, and the rewards are sent to src. shouldAccrue true accrues the account first. Reverts if the market has no reward config.
write claimTo(address,address,address,bool)
Claim rewards for src and send them to a receiver: (comet, src, to, shouldAccrue). The caller must have permission on src (see allow). Reverts with NotPermitted otherwise.