Deposit ETH into Curve stETH/ETH Pool and Stake in Convex

This use case automates the complete yield farming workflow for Curve’s liquid staking pool with Convex rewards. Try this route → Route Mechanics:
  • Deposit native ETH into the Curve stETH/ETH liquidity pool
  • Receive Curve LP tokens representing your pool share
  • Automatically stake the LP tokens in the corresponding Curve Gauge
  • Earn both trading fees from the pool and CRV rewards from the gauge
const chainId = 1; // Ethereum mainnet
const fromAddress = "0xd8da6bf26964af9d7eed9e03e53415d37aa96045";

// Token addresses
const tokenInEth = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
const lpTokenStethEth = "0x06325440d014e39736583c165c2963ba99faf14e"; // stETH/ETH Curve LP token
const stEthEthPool = "0xDC24316b9AE028F1497c275EB9192a3Ea0f67022"; // stETH/ETH Curve Pool
const stEthGauge = "0x182B723a58739a9c974cFDB385ceaDb237453c28"; // stETH/ETH Curve Gauge

const amountIn = parseUnits("1000", 6); // 1000 USDC

const bundle = await client.getBundleData(
  {
    chainId,
    fromAddress,
    routingStrategy: "delegate",
  },
  [
    {
      // Step 1: Deposit into Curve stETH/ETH pool using standard "deposit" action
      protocol: "curve",
      action: "deposit",
      args: {
        tokenIn: [tokenInEth],
        tokenOut: lpTokenStethEth, // stETH/ETH LP token
        amountIn: [amountIn.toString()],
        primaryAddress: stEthEthPool, // Curve stETH pool address
      },
    },
    {
      // Step 2: Stake LP tokens in Curve Gauge for CRV rewards
      protocol: "curve-gauge",
      action: "deposit",
      args: {
        tokenIn: lpTokenStethEth, // stETH/ETH LP token
        tokenOut: stEthGauge, // stETH/ETH Gauge
        amountIn: {
          useOutputOfCallAt: 0, // Use LP tokens from Curve deposit
        },
        primaryAddress: stEthGauge, // Gauge address
      },
    },
  ]
);

await sendEoa(bundle.tx, bundle.gas);

Updated