Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

simulateWithdrawLiquidity

Simulate burning a given amount of LP tokens. Returns the base/quote coins the burn would yield.

Signature

function simulateWithdrawLiquidity(
  client: Client,
  parameters: {
    baseDenom: Denom
    quoteDenom: Denom
    lpBurnAmount: string
    height?: number
  },
): Promise<CoinPair>

Example

import { createPublicClient, createTransport, testnet } from "@left-curve/sdk"
 
const client = createPublicClient({ chain: testnet, transport: createTransport() })
const [base, quote] = await client.simulateWithdrawLiquidity({
  baseDenom: "dango",
  quoteDenom: "bridge/usdc",
  lpBurnAmount: "1000000",
})

Parameters

baseDenomDenom. Base asset of the pair.

quoteDenomDenom. Quote asset of the pair.

lpBurnAmountstring. Amount of LP tokens to burn, base units.

heightnumber, optional. Block height. Default 0 (latest).

Returns

CoinPair[Coin, Coin] tuple of [baseCoin, quoteCoin].

See also