This endpoint allows users to preview the results of removing liquidity before execution. It calculates the expected amounts of both assets that would be returned based on the current pool reserves and the LP tokens to be burned.
The simulation:
When removing liquidity:
Simulations are read-only operations and don’t require authentication. However, the provider’s public key is used to check their LP balance.
pool_id - LP public key of the poolprovider_public_key - Public key of the liquidity providerlp_tokens_to_remove - Amount of LP tokens to simulate burning200 OK with simulation results400 Bad Request if validation fails or insufficient balance500 Internal Server Error if simulation failsLiquidity removal simulation parameters
Request body for simulating liquidity removal without executing it.
Simulation allows users to preview how much of each asset they would receive when burning their LP tokens.
LP public key of the pool to simulate removing liquidity from. The pool must exist and have liquidity.
"03aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899"
Public key of the liquidity provider. Used to check current LP token balance.
"03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"
Amount of LP tokens to simulate burning, in decimal string format (smallest unit). Must be positive and not exceed the provider's balance.
"100000.00000000"
Simulation completed successfully
Response from liquidity removal simulation with expected outcomes.
Amount of Asset A that would be returned. Proportional to your share of the pool.
x >= 0"50000000"
Amount of Asset B that would be returned. Proportional to your share of the pool.
x >= 0"25000"
Current LP token balance of the provider. Shows how many tokens they have available to remove.
"200000"
Percentage of the pool being removed.
"50.0"
Warning message if the simulation detects potential issues. Common warnings include removing all liquidity or insufficient balance.
"Removing more than 10% of pool liquidity may impact price"