Compound V3 action reference
This page is generated from the plugin registry. Do not edit it by hand.
Compound V3 (Comet) lending protocol: supply assets, borrow base tokens, and monitor balances across isolated markets
For guidance and examples see the Compound V3 guide.
Set actionType in a node’s config to the action type shown under each heading. See the workflow definition page for the node format.
Read actions return the value under result: a single unnamed output is result, a named one is result.<name>, and several outputs are result.<name> each. Reference it as {{@nodeId:Label.result}}. Integer Solidity types are passed as decimal strings.
| Action | Action type |
|---|---|
| Compound V3: Supply Asset | compound/supply |
| Compound V3: Withdraw Asset | compound/withdraw |
| Compound V3: Get Base Balance | compound/get-balance |
| Compound V3: Get Collateral Balance | compound/get-collateral-balance |
| Compound V3: Get Borrow Balance | compound/get-borrow-balance |
| Compound V3: Get Utilization | compound/get-utilization |
| Compound V3: Get Supply Rate | compound/get-supply-rate |
| Compound V3: Get Borrow Rate | compound/get-borrow-rate |
| Compound V3: Get Total Supply | compound/get-total-supply |
| Compound V3: Get Total Borrow | compound/get-total-borrow |
| Compound V3: Is Liquidatable | compound/is-liquidatable |
| Compound V3: Get Number of Assets | compound/get-num-assets |
Compound V3: Supply Asset
Action type: compound/supply. Connection: required (web3).
Supply base or collateral assets to a Compound V3 Comet market. Requires prior ERC-20 approval for the Comet contract.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 8453, 42161 | Network. | |
sendMode | string | No | transaction, private-relay | Send as. How the transaction goes out. “transaction” (the default) sends it to the public mempool. “private-relay” sends it through the network’s private relay (Flashbots Protect on Ethereum), only on networks that have one, and is never gas-sponsored. A config with usePrivateMempool: true and no sendMode uses the private relay where the network has one and the public mempool elsewhere, never sponsored. | |
contractAddress | string | Yes | Comet Market Address. | ||
asset | address | Yes | Asset Token Address (address). | ||
amount | uint256 | Yes | Amount (wei) (uint256). | ||
gasLimitMultiplier | string | No | Gas Limit. | ||
sponsorGas | boolean | No | true | Sponsor gas. When on, the transaction goes through gas sponsorship first and falls back to your own wallet if sponsorship is unavailable on this network or your credits are spent. Turn it off to always pay gas from your own wallet. Sponsorship is never used when Send as is not Normal transaction or the node signs through a Safe, and on Write Contract when Simulate at is set to Next block. Shown when the network supports gas sponsorship. |
Outputs
| Output | Description |
|---|---|
success | Whether the operation succeeded |
error | Error message if the operation failed |
transactionHash | Transaction hash |
transactionLink | Explorer link to transaction |
route | How KeeperHub routed the send on an EVM network: public (the public mempool, through your RPC or the chain’s default RPC), private-relay (accepted by the private relay chosen in Send as), sponsored (gas-sponsored), bundle (Write Contract sent as a bundle to block builders), bundle-and-public (sent as a bundle and to the public mempool), skipped-in-flight (Write Contract with Send as Bundle sent nothing because this workflow’s earlier bundle could still land, or an earlier run’s public copy is not mined yet: KeeperHub checks it every few minutes and stops waiting after a day) or waiting (Write Contract with Send as Bundle sent nothing because its Not before time is still too far ahead, Max Fee held back the targets ahead, or KeeperHub had paused bundle sends, with paused true, or could not check whether they are on, with switchUnread true). Through a Safe, the route of the transaction your wallet sent to the Safe. Absent when nothing was sent (except skipped-in-flight and waiting), or when only the private relay was tried and it never confirmed taking the transaction; more values may be added. |
included | True when the transaction was seen in a block (one confirmation, not final); it may have reverted, so check error too. False when it was sent but is not in a block, and on a skipped-in-flight or waiting bundle step (a paused one included). Absent when route is absent. |
Compound V3: Withdraw Asset
Action type: compound/withdraw. Connection: required (web3).
Withdraw base or collateral assets from a Compound V3 Comet market
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 8453, 42161 | Network. | |
sendMode | string | No | transaction, private-relay | Send as. How the transaction goes out. “transaction” (the default) sends it to the public mempool. “private-relay” sends it through the network’s private relay (Flashbots Protect on Ethereum), only on networks that have one, and is never gas-sponsored. A config with usePrivateMempool: true and no sendMode uses the private relay where the network has one and the public mempool elsewhere, never sponsored. | |
contractAddress | string | Yes | Comet Market Address. | ||
asset | address | Yes | Asset Token Address (address). | ||
amount | uint256 | Yes | Amount (wei) (uint256). | ||
gasLimitMultiplier | string | No | Gas Limit. | ||
sponsorGas | boolean | No | true | Sponsor gas. When on, the transaction goes through gas sponsorship first and falls back to your own wallet if sponsorship is unavailable on this network or your credits are spent. Turn it off to always pay gas from your own wallet. Sponsorship is never used when Send as is not Normal transaction or the node signs through a Safe, and on Write Contract when Simulate at is set to Next block. Shown when the network supports gas sponsorship. |
Outputs
| Output | Description |
|---|---|
success | Whether the operation succeeded |
error | Error message if the operation failed |
transactionHash | Transaction hash |
transactionLink | Explorer link to transaction |
route | How KeeperHub routed the send on an EVM network: public (the public mempool, through your RPC or the chain’s default RPC), private-relay (accepted by the private relay chosen in Send as), sponsored (gas-sponsored), bundle (Write Contract sent as a bundle to block builders), bundle-and-public (sent as a bundle and to the public mempool), skipped-in-flight (Write Contract with Send as Bundle sent nothing because this workflow’s earlier bundle could still land, or an earlier run’s public copy is not mined yet: KeeperHub checks it every few minutes and stops waiting after a day) or waiting (Write Contract with Send as Bundle sent nothing because its Not before time is still too far ahead, Max Fee held back the targets ahead, or KeeperHub had paused bundle sends, with paused true, or could not check whether they are on, with switchUnread true). Through a Safe, the route of the transaction your wallet sent to the Safe. Absent when nothing was sent (except skipped-in-flight and waiting), or when only the private relay was tried and it never confirmed taking the transaction; more values may be added. |
included | True when the transaction was seen in a block (one confirmation, not final); it may have reverted, so check error too. False when it was sent but is not in a block, and on a skipped-in-flight or waiting bundle step (a paused one included). Absent when route is absent. |
Compound V3: Get Base Balance
Action type: compound/get-balance. Connection: not required.
Get the balance of the base asset (e.g. USDC) for an account in a Comet market
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 8453, 42161 | Network. | |
contractAddress | string | Yes | Comet Market Address. | ||
account | address | Yes | Account Address (address). |
Outputs
| Output | Description |
|---|---|
result | Base Asset Balance |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Compound V3: Get Collateral Balance
Action type: compound/get-collateral-balance. Connection: not required.
Get the collateral balance of a specific asset for an account in a Comet market
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 8453, 42161 | Network. | |
contractAddress | string | Yes | Comet Market Address. | ||
account | address | Yes | Account Address (address). | ||
asset | address | Yes | Collateral Asset Address (address). |
Outputs
| Output | Description |
|---|---|
result | The contract function return value |
result.balance | Collateral Balance |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Compound V3: Get Borrow Balance
Action type: compound/get-borrow-balance. Connection: not required.
Get the borrow balance of the base asset for an account in a Comet market
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 8453, 42161 | Network. | |
contractAddress | string | Yes | Comet Market Address. | ||
account | address | Yes | Account Address (address). |
Outputs
| Output | Description |
|---|---|
result | Borrow Balance |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Compound V3: Get Utilization
Action type: compound/get-utilization. Connection: not required.
Get the current utilization rate of a Comet market (ratio of borrows to supply, scaled to 1e18)
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 8453, 42161 | Network. | |
contractAddress | string | Yes | Comet Market Address. |
Outputs
| Output | Description |
|---|---|
result | Utilization Rate |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Compound V3: Get Supply Rate
Action type: compound/get-supply-rate. Connection: not required.
Get the per-second supply rate for a given utilization level. Multiply by seconds in a year (31536000) for APR.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 8453, 42161 | Network. | |
contractAddress | string | Yes | Comet Market Address. | ||
utilization | uint256 | Yes | Utilization (from Get Utilization) (uint256). |
Outputs
| Output | Description |
|---|---|
result | Supply Rate Per Second |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Compound V3: Get Borrow Rate
Action type: compound/get-borrow-rate. Connection: not required.
Get the per-second borrow rate for a given utilization level. Multiply by seconds in a year (31536000) for APR.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 8453, 42161 | Network. | |
contractAddress | string | Yes | Comet Market Address. | ||
utilization | uint256 | Yes | Utilization (from Get Utilization) (uint256). |
Outputs
| Output | Description |
|---|---|
result | Borrow Rate Per Second |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Compound V3: Get Total Supply
Action type: compound/get-total-supply. Connection: not required.
Get the total base asset supplied to a Comet market across all users
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 8453, 42161 | Network. | |
contractAddress | string | Yes | Comet Market Address. |
Outputs
| Output | Description |
|---|---|
result | Total Supply |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Compound V3: Get Total Borrow
Action type: compound/get-total-borrow. Connection: not required.
Get the total base asset borrowed from a Comet market across all users
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 8453, 42161 | Network. | |
contractAddress | string | Yes | Comet Market Address. |
Outputs
| Output | Description |
|---|---|
result | Total Borrow |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Compound V3: Is Liquidatable
Action type: compound/is-liquidatable. Connection: not required.
Check if an account is currently liquidatable in a Comet market
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 8453, 42161 | Network. | |
contractAddress | string | Yes | Comet Market Address. | ||
account | address | Yes | Account Address (address). |
Outputs
| Output | Description |
|---|---|
result | Is Liquidatable |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Compound V3: Get Number of Assets
Action type: compound/get-num-assets. Connection: not required.
Get the number of collateral assets supported by a Comet market
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 8453, 42161 | Network. | |
contractAddress | string | Yes | Comet Market Address. |
Outputs
| Output | Description |
|---|---|
result | Number of Collateral Assets |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Contracts
| Contract | Chain ids |
|---|---|
| Comet Market | any (the address is set on the node) |