Curve action reference
This page is generated from the plugin registry. Do not edit it by hand.
Curve Finance: stableswap pools, token exchanges, liquidity management, and CRV token operations
For guidance and examples see the Curve 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 |
|---|---|
| Curve: Get Expected Output | curve/get-dy |
| Curve: Get Virtual Price | curve/get-virtual-price |
| Curve: Get Coin Address | curve/get-coin |
| Curve: Get Pool Balance | curve/get-pool-balance |
| Curve: Calculate Withdraw One Coin | curve/calc-withdraw-one-coin |
| Curve: Exchange Tokens | curve/exchange |
| Curve: Remove Liquidity (Single Coin) | curve/remove-liquidity-one-coin |
| Curve: Get CRV Balance | curve/crv-balance-of |
| Curve: Approve CRV | curve/crv-approve |
| Curve: Transfer CRV | curve/crv-transfer |
Curve: Get Expected Output
Action type: curve/get-dy. Connection: not required.
Get the expected output amount for a token exchange in a Curve pool
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 10, 8453, 42161 | Network. | |
contractAddress | string | Yes | Curve Pool Address. | ||
i | int128 | Yes | Input Coin Index (int128). | ||
j | int128 | Yes | Output Coin Index (int128). | ||
dx | uint256 | Yes | Input Amount (wei) (uint256). |
Outputs
| Output | Description |
|---|---|
result | Expected Output (wei) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Curve: Get Virtual Price
Action type: curve/get-virtual-price. Connection: not required.
Get the virtual price of the pool’s LP token
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 10, 8453, 42161 | Network. | |
contractAddress | string | Yes | Curve Pool Address. |
Outputs
| Output | Description |
|---|---|
result | Virtual Price |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Curve: Get Coin Address
Action type: curve/get-coin. Connection: not required.
Get the token address at a specific index in the pool
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 10, 8453, 42161 | Network. | |
contractAddress | string | Yes | Curve Pool Address. | ||
arg0 | uint256 | Yes | Coin Index (uint256). |
Outputs
| Output | Description |
|---|---|
result | Token Address |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Curve: Get Pool Balance
Action type: curve/get-pool-balance. Connection: not required.
Get the pool’s balance of a specific coin by index
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 10, 8453, 42161 | Network. | |
contractAddress | string | Yes | Curve Pool Address. | ||
arg0 | uint256 | Yes | Coin Index (uint256). |
Outputs
| Output | Description |
|---|---|
result | Coin Balance (wei) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Curve: Calculate Withdraw One Coin
Action type: curve/calc-withdraw-one-coin. Connection: not required.
Calculate the amount received when withdrawing a single coin from the pool
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 10, 8453, 42161 | Network. | |
contractAddress | string | Yes | Curve Pool Address. | ||
_token_amount | uint256 | Yes | LP Token Amount (wei) (uint256). | ||
i | int128 | Yes | Output Coin Index (int128). |
Outputs
| Output | Description |
|---|---|
result | Withdraw Amount (wei) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Curve: Exchange Tokens
Action type: curve/exchange. Connection: required (web3).
Swap tokens in a Curve pool
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 10, 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 | Curve Pool Address. | ||
i | int128 | Yes | Input Coin Index (int128). | ||
j | int128 | Yes | Output Coin Index (int128). | ||
dx | uint256 | Yes | Input Amount (wei) (uint256). | ||
min_dy | uint256 | Yes | Minimum Output (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. |
Curve: Remove Liquidity (Single Coin)
Action type: curve/remove-liquidity-one-coin. Connection: required (web3).
Withdraw liquidity from a Curve pool as a single token
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 10, 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 | Curve Pool Address. | ||
_token_amount | uint256 | Yes | LP Token Amount (wei) (uint256). | ||
i | int128 | Yes | Output Coin Index (int128). | ||
_min_amount | uint256 | Yes | Minimum Output (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. |
Curve: Get CRV Balance
Action type: curve/crv-balance-of. Connection: not required.
Check CRV token balance of an address
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 10, 42161 | Network. | |
account | address | Yes | Wallet Address (address). |
Outputs
| Output | Description |
|---|---|
result | CRV Balance |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Curve: Approve CRV
Action type: curve/crv-approve. Connection: required (web3).
Approve an address to spend CRV tokens
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 10, 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. | |
spender | address | Yes | Spender 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. |
Curve: Transfer CRV
Action type: curve/crv-transfer. Connection: required (web3).
Transfer CRV tokens to an address
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 10, 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. | |
to | address | Yes | Recipient 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. |
Contracts
| Contract | Chain ids |
|---|---|
| Curve Pool | any (the address is set on the node) |
| CRV Token | 1, 10, 42161 |