yieldaggregator

Transfer Liquidity

Moves liquidity between markets, specifying source/destination addresses plus amounts of LP, principal, and yield tokens. Optional parameters (slippage, redeemRewards, zeroPriceImpact) fine-tune the transaction, with a reference ID for tracking.

💡 Compute Unit Value: 125 (Fixed)

post/defi/v1/yieldaggregator/transferliquidity

Request

  • Base URL
    https://svc.blockdaemon.com
  • URL
    https://svc.blockdaemon.com/defi/v1/yieldaggregator/transferliquidity
  • Auth
    API key in header X-API-Key

Request body

yieldAggregatorId'5200' | '5201' | '5202' | '5203' | '5204'

A unique identifier to route the transaction to the correct yield aggregator instance. This parameter is optional if a default aggregator is used.

marketAddressstring required

The blockchain address of the source market from which liquidity is being transferred.

fromstring required

Blockchain address of the sender. For EVM chains, use a checksummed hex address (e.g., 0xABCDEF...). This address must hold sufficient balance and will sign the transaction.

dstMarketAddressstring required

The blockchain address of the destination market where the liquidity will be deposited.

lpAmountstring required

Amount of liquidity provider (LP) tokens to transfer, specified in the token's smallest denomination (base units). Example: 1 LP token (18 decimals) = "1000000000000000000".

ptAmountstring required

Amount of principal tokens (PT) involved in the transfer, specified in the token's smallest denomination (base units). Principal tokens represent the original asset value deposited in the yield aggregator. Example: 1 PT token (18 decimals) = "1000000000000000000".

ytAmountstring required

Amount of yield tokens (YT) to transfer, specified in the token's smallest denomination (base units). Yield tokens represent the accrued yield from the user's deposit. Example: 1 YT token (18 decimals) = "1000000000000000000".

slippagestring

Specifies the maximum acceptable percentage deviation between the expected and actual execution price during the liquidity removal. This helps protect against unfavorable price movements. The value is expressed as a percentage (e.g., 1 for 1%). Valid range: 0 to 100 (e.g., 1 = up to 1% slippage).

gasstring

Maximum number of gas units to allocate for the transaction, as an integer string (e.g., '200000'). If omitted, gas is estimated automatically. Note: this is gas units, not wei or gwei.

redeemRewardsboolean

An optional flag indicating whether accrued rewards should be redeemed as part of the liquidity transfer transaction.

zeroPriceImpactboolean

When set to true, the transaction is executed to avoid any change in the asset’s price, resulting in the user receiving both LP and YT tokens, though the LP amount will be lower than in standard mode.

gasPrioritystring

Specifies the desired gas fee priority (e.g., 'low', 'medium', or 'high'), which influences the transaction speed and cost.

enableFeeboolean

Flag to include a basis points fee transaction alongside the main transaction when set to true.

Example request

{
  "yieldAggregatorId": "5200",
  "marketAddress": "0xcdd26eb5eb2ce0f203a84553853667ae69ca29ce",
  "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
  "dstMarketAddress": "0xcdd26eb5eb2ce0f203a84553853667ae69ca29ce",
  "lpAmount": "1000000000000000000",
  "ptAmount": "1000000000000000000",
  "ytAmount": "1000000000000000000",
  "slippage": "10",
  "gas": "100000",
  "redeemRewards": false,
  "zeroPriceImpact": false,
  "gasPriority": "low",
  "enableFee": false
}

Response

Successful response

statusinteger
msgstring
dataobject

Example response

{
  "status": 200,
  "msg": "success",
  "data": {
    "chainId": "1",
    "from": "0xdae2f6eddda6fb4fb60cc02633de27e2b431b402",
    "to": "0x888888888889758F76e7103c6CbF23ABbF58F946",
    "value": "0",
    "gas": "1000000",
    "data": "0x9fa02c860000000000000000000000005039da22e5126e7c4e9284376116716a91782faf000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000003247036e0520000000000000000000000005039da22e5126e7c4e9284376116716a91782faf000000000000000000000000b451a36c8b6b2eac77ad0737ba732818143a0e250000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000002200000000000000000000000004c9edd5852cd905f086c759e8383e09bff1e68b30000000000000000000000000000000000000000000000002844adcdc8f57fb00000000000000000000000004c9edd5852cd905f086c759e8383e09bff1e68b3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056412599ac6000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b402000000000000000000000000cdd26eb5eb2ce0f203a84553853667ae69ca29ce0000000000000000000000000000000000000000000000001359ce887f24a97800000000000000000000000000000000000000000000000013cfba812d8cb8c000000000000000000000000000000000000000000000000031875242f1dfcde0000000000000000000000000000000000000000000000000279f75025b197180000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000004600000000000000000000000004c9edd5852cd905f086c759e8383e09bff1e68b30000000000000000000000000000000000000000000000002a633db031d9ffac0000000000000000000000009d39a5de30e57443bff2a8307a4256c8797a34970000000000000000000000007ae5c4cf5cddfbda870a80d021997d8a04f4ff1100000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000cf5540fffcdc3d510b18bfca6d2b9987b07725590000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001c43b635ce40000000000000000000000004c9edd5852cd905f086c759e8383e09bff1e68b30000000000000000000000000000000000000000000000002b3c440ac2356610000000000000000000000000b28ca7e465c452ce4252598e0bc96aeba553cf820000000000000000000000009d39a5de30e57443bff2a8307a4256c8797a349700000000000000000000000000000000000000000000000025d59e349e70800000000000000000000000000000000000000000000000000025b88fa6a3158a00000000000000000000000000888888888889758f76e7103c6cbf23abbf58f9460000000000000000000000000000000000000000000000000000000000000140000000000000000000000000b28ca7e465c452ce4252598e0bc96aeba553cf820000000000000000000000000000000000000000000000000000000035d39ebf000000000000000000000000000000000000000000000000000000000000005c0102040046010101020301ff00000000000000000000000000000000000000009d39a5de30e57443bff2a8307a4256c8797a34974c9edd5852cd905f086c759e8383e09bff1e68b39d39a5de30e57443bff2a8307a4256c8797a349700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "estimationCheck": "Returned error: execution reverted: ERC20: insufficient allowance",
    "referenceId": "5b86393c4dc74d9bb0fee01660829e5a"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.