V2 DEX Add Liquidity logo

Catalog action EVM Onchain wallet Gas send

Add liquidity to V2-compatible DEX pools (Uniswap V2, SushiSwap, PancakeSwap). Supports token/token and token/ETH pairs. Returns LP tokens representing pool share. Configurable slippage protection and deadline. Ideal for: liquidity provision, yield farming, earning trading fees, LP token strategies.

This action can require a wallet connector, gas, token movement, or an external side effect. Test with simulation or a controlled amount before using it in a live workflow.

At a Glance

FieldValue
Action IDv2-add-liquidity
CategoryEVM Onchain
Connectorwallet
Requires gasYes
Funds movementsend
Tagsblockchain, evm, dex, liquidity, lp, amm, defi, v2

Payload Schema

FieldTypeRequiredDescription
chainIdnumberYesChain
tokenAstringYesFirst token address (use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH)
amountADesiredstringNoDesired amount of tokenA to add (in wei/smallest unit). At least one of amountADesired or amountBDesired must be provided. If only one is provided, the other will be auto-calculated from pool reserves. Both required when creating a new pool.
tokenBstringYesSecond token address (use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH)
amountBDesiredstringNoDesired amount of tokenB to add (in wei/smallest unit). At least one of amountADesired or amountBDesired must be provided. If only one is provided, the other will be auto-calculated from pool reserves. Both required when creating a new pool.
slippageBpsnumberNoSlippage tolerance in basis points (100 = 1%). Default: 50 (0.5%)
deadlineMinutesnumberNoTransaction deadline in minutes from now. Default: 20
routerAddressstringNoOptional custom router address. If not provided, uses default V2 router for the chain.

Result Schema

FieldTypeRequiredDescription
statusstringYes-
transactionHashstringYesThe transaction hash
amountAstringNoActual amount of tokenA added to the pool
amountBstringNoActual amount of tokenB added to the pool
liquiditystringNoAmount of LP tokens received
pairAddressstringNoAddress of the liquidity pair

Examples

json
{ "type": "v2-add-liquidity", "payload": { "tokenA": "ETH", "tokenB": "ETH", "chainId": 8453 }, "children": [], "connector": { "type": "wallet", "id": "conn_wallet" }}

Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.

Ask a question... ⌘I