V2 DEX Remove Liquidity logo

Catalog action EVM Onchain wallet Gas receive

Remove liquidity from V2-compatible DEX pools (Uniswap V2, SushiSwap, PancakeSwap). Burns LP tokens and returns underlying token pair. Supports token/token and token/ETH pairs. Configurable slippage and deadline. Ideal for: exiting positions, rebalancing, withdrawing from yield farms, LP management.

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-remove-liquidity
CategoryEVM Onchain
Connectorwallet
Requires gasYes
Funds movementreceive
Tagsblockchain, evm, dex, liquidity, lp, amm, defi, withdraw, v2

Payload Schema

FieldTypeRequiredDescription
chainIdnumberYesChain
tokenAstringYesFirst token address (use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH)
tokenBstringYesSecond token address (use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH)
liquiditystringYesAmount of LP tokens to remove (in wei)
amountAMinstringNoMinimum amount of tokenA to receive. If not provided, calculated from slippage.
amountBMinstringNoMinimum amount of tokenB to receive. If not provided, calculated from slippage.
slippageBpsnumberNoSlippage tolerance in basis points (100 = 1%). Default: 50 (0.5%). Used when amountAMin/amountBMin not provided.
deadlineMinutesnumberNoTransaction deadline in minutes from now. Default: 20
routerAddressstringNoOptional custom router address. If not provided, uses default V2 router for the chain.
pairAddressstringNoOptional LP pair contract address. If not provided, will be fetched from factory.

Result Schema

FieldTypeRequiredDescription
statusstringYes-
transactionHashstringYesThe transaction hash
amountAstringNoAmount of tokenA received
amountBstringNoAmount of tokenB received
liquidityRemovedstringNoAmount of LP tokens removed

Examples

json
{ "type": "v2-remove-liquidity", "payload": { "tokenA": "ETH", "tokenB": "ETH", "liquidity": "example-liquidity", "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