Skip to content

@gala-chain/chaincodeAPI


API > getRemoveLiquidityEstimation

Function: getRemoveLiquidityEstimation()

getRemoveLiquidityEstimation(ctx, dto): Promise\<GetRemoveLiqEstimationResDto>

Parameters

ctx: GalaChainContext

GalaChainContext – The execution context providing access to the GalaChain environment.

dto: BurnDto

BurnDto – A data transfer object containing details of the liquidity position to be removed, including pool information, token amounts, and position ID.

Returns

array with estimated value recieved after burning the positions

Dev

The getRemoveLiquidityEstimation function estimates the amount of tokens a user will receive when removing liquidity from a Uniswap V3 pool within the GalaChain ecosystem. It calculates the expected token amounts based on the user's liquidity position and market conditions.

Source

chaincode/src/dex/burnEstimate.ts:26