Example: cross-chain LPing on Aave

Lets imagine we want to bridge and provide liquidity in USDC on Aave v3. We can set aUSDC (the LP token of the Aave USDC market) as the output token in the order struct and call the OrderHub on the source chain.

{
  sourceChainId: "8453", // Base
  destinationChainId: "42161", // Arbitrum
  inputs: [
    // WETH
    { tokenType: "FUNGIBLE_TOKEN", tokenAddress: "0x0000000000000000000000004200000000000000000000000000000000000006", tokenId: "0", amount: "10000000" }
  ],
  outputs: [
    { tokenType: "FUNGIBLE_TOKEN", tokenAddress: "0x...", tokenId: "0", amount: "9000000" }
  ],
  ...
}

The solvers will then pick up the order and obtain the relevant tokens by staking on Aave.

Last updated