This use case demonstrates providing concentrated liquidity to a Uniswap V3 pool by automatically splitting a single token input. Route Mechanics:
  • Split the input AAVE token into two equal parts using Enso’s internal routing
  • Convert the first half to WETH to match the pool’s token pair requirements
  • Deposit both tokens into the Uniswap V3 AAVE/WETH pool with specified tick ranges
  • Receive NFT position representing the concentrated liquidity position
const chainId = 42161; // Arbitrum
const fromAddress = "0xd8da6bf26964af9d7eed9e03e53415d37aa96045";

// Token and Protocol Addresses
const tokenIn_AAVE = "0xba5ddd1f9d7f570dc94a51479a000e3bce967196";
const tokenOut_WETH = "0x82af49447d8a07e3bd95bd0d56f35241523fbab1";
const uniswapManager = "0xc36442b4a4522e871399cd717abdd847ab11fe88";

// Define amount
const amountIn = parseUnits("10", 18); // 10 AAVE

const bundle = await client.getBundleData(
  {
    chainId,
    fromAddress,
    routingStrategy: "router",
  },
  [
    {
      // Split AAVE into 2 equal parts
      // Converts the first half into WETH
      // needed for AAVE/WETH pool
      protocol: "enso",
      action: "split",
      args: {
        tokenIn: tokenIn_AAVE,
        tokenOut: [tokenOut_WETH, tokenIn_AAVE],
        amountIn: amountIn.toString(),
      },
    },
    {
      protocol: "uniswap-v3",
      action: "depositclmm",
      args: {
        tokenOut: uniswapManager,
        ticks: [25320, 25980],
        tokenIn: [tokenOut_WETH, tokenIn_AAVE],
        poolFee: "3000",
        amountIn: [
          // use output from the split call
          { useOutputOfCallAt: 0, index: 0 },
          { useOutputOfCallAt: 0, index: 1 },
        ],
      },
    },
  ]
);

const approvalData = await client.getApprovalData({
  amount: amountIn.toString(),
  chainId,
  fromAddress,
  tokenAddress: tokenIn_AAVE,
});
Important Considerations:
  • Tick ranges determine the price range for concentrated liquidity
  • Pool fee tier affects trading volume and potential returns
  • Position requires active management as price moves outside the range

Updated