Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.enso.build/llms.txt

Use this file to discover all available pages before exploring further.

These routes automate complex leverage strategies, where an asset is used as collateral to borrow another asset, which is then re-deposited to amplify yield, all within a single transaction.
Note on Route Mechanics: The steps listed below are illustrative of a possible path. Enso’s API dynamically calculates the most efficient route at the moment of execution, so the exact swaps and bridges may vary based on real-time market conditions.

WBETH to USDT Vault Leverage Loop

Execute a leverage loop on Katana by supplying WBETH as collateral to borrow and deposit stablecoins into a Yearn USDT vault. Try this route →
const WBETH = "0xee7d8bcfb72bc1880d0cf19822eb0a2e6577ab62" as Address;
const yvvbUSDT = "0x9a6bd7b6fd5c4f87eb66356441502fc7dcdd185b" as Address;

const routeParams: RouteParams = {
  fromAddress: userAddress,
  receiver: userAddress,
  chainId: KATANA_MAINNET,
  amountIn: ["1000000000000000000"], // 1 WBTC
  tokenIn: [WBETH],
  tokenOut: [yvvbUSDT],
  routingStrategy: "delegate",
  slippage: "400", // 4% slippage for complex loop
  referralCode: "wbtc-loop",
};
const route = await client.getRouteData(routeParams);
await sendEoa(route.tx, route.gas);
Route Mechanics:
  • Use WBETH as collateral in lending protocols.
  • Borrow stablecoins against WBETH collateral.
  • Deposit borrowed assets into Yearn USDT vault.
  • Create leveraged yield farming position.

Create steakAUSD Leverage Loop

Execute a leverage loop on Katana by supplying steakAUSD as collateral to borrow and deposit ETH into a Yearn ETH vault. Try this route →

const steakAUSD = "0x82c4c641ccc38719ae1f0fbd16a64808d838fdfd" as Address;
const yvvbETH = "0xe007ca01894c863d7898045ed5a3b4abf0b18f37" as Address;

const routeParams: RouteParams = {
  fromAddress: userAddress,
  receiver: userAddress,
  chainId: KATANA_MAINNET,
  amountIn: ["2000000000000000000000"], // 2,000 steakAUSD
  tokenIn: [steakAUSD],
  tokenOut: [yvvbETH],
  routingStrategy: "delegate",
  slippage: "350", // 3.5%
  referralCode: "steak-loop",
};
const route = await client.getRouteData(routeParams);
await sendEoa(route.tx, route.gas);
Route Mechanics:
  • Use steakAUSD as collateral in lending protocols.
  • Borrow ETH against steakAUSD collateral.
  • Deposit borrowed ETH into Yearn ETH vault.
  • Create leveraged yield position with amplified returns.

Leverage WETH on Aave on Arbitrum

Creates a leveraged position by depositing WETH into Aave on Arbitrum. Try this route →
const WETH = "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" as Address;
const aWETH = "0xe50fA9b3c56FfB159cB0FCA61F5c9D750e8128c8" as Address;

const routeParams: RouteParams = {
  fromAddress: userAddress,
  receiver: userAddress,
  chainId: ARBITRUM_CHAIN,
  amountIn: ["100000000000000000000"],
  tokenIn: [WETH],
  tokenOut: [aWETH],
  routingStrategy: "router",
};


const route = await client.getRouteData(routeParams);
await sendEoa(route.tx, route.gas);
Route Mechanics:
  • Deposit WETH into the Aave v3 protocol to receive aWETH.

Leverage USDC to sAVAX on Avalanche

Creates a leveraged sAVAX position by supplying USDC as collateral on Avalanche. Try this route →
const USDC = "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E" as Address;
const sAVAX = "0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE" as Address;

const routeParams: RouteParams = {
  fromAddress: userAddress,
  receiver: userAddress,
  chainId: AVALANCHE_CHAIN,
  amountIn: ["100000000"],
  tokenIn: [USDC],
  tokenOut: [sAVAX],
  routingStrategy: "router",
};


const route = await client.getRouteData(routeParams);
await sendEoa(route.tx, route.gas);

Route Mechanics:
  • Swap USDC to sAVAX via Enso.

Leverage cbETH to Yearn Aerodrome LP on Base

Uses cbETH to enter a leveraged Yearn Aerodrome WETH/cbETH LP position on Base. Try this route →
const cbETH = "0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22" as Address;
const yvAeroEthCbEthLp =
"0x44Ecc644449fC3a9858d2007CaA8CFAa4C561f91" as Address;

const routeParams: RouteParams = {
  fromAddress: userAddress,
  receiver: userAddress,
  chainId: BASE_CHAIN,
  amountIn: ["100000000000000000000"],
  tokenIn: [cbETH],
  tokenOut: [yvAeroEthCbEthLp],
  routingStrategy: "router",
};


const route = await client.getRouteData(routeParams);
await sendEoa(route.tx, route.gas);
Route Mechanics:
  • The initial cbETH is split into WETH and cbETH.
  • A portion of cbETH is swapped to native ETH, which is then deposited to become WETH.
  • The WETH and cbETH are deposited into the Aerodrome protocol to get the LP token.

Leverage wstETH to Velodrome LP on Optimism

Creates a leveraged Velodrome wstETH/WETH LP position from wstETH on Optimism. Try this route →
const wstETH = "0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb" as Address;
const veloWstethWethLp =
"0xa3031D9FD5010496a2bAF8AFCE27Ef6f3849FB10" as Address;

const routeParams: RouteParams = {
  fromAddress: userAddress,
  receiver: userAddress,
  chainId: OPTIMISM_CHAIN,
  amountIn: ["100000000000000000000"],
  tokenIn: [wstETH],
  tokenOut: [veloWstethWethLp],
  routingStrategy: "router",
};


const route = await client.getRouteData(routeParams);
await sendEoa(route.tx, route.gas);
Route Mechanics:
  • The initial wstETH is split into WETH and wstETH.
    • Internal Route: A portion of wstETH is swapped for WETH via Enso.
  • The WETH and wstETH are deposited into the Velodrome v2 protocol to get the LP token.

Leverage WETH on Aave on Base

Creates a leveraged WETH position on Base using Aave v3. Try this route →
const WETH = "0x4200000000000000000000000000000000000006" as Address;
const stataBascbETH = "0x16a004065dfb11276dcb29dc03fb8a85f9a43c6e" as Address;

const routeParams: RouteParams = {
  fromAddress: userAddress,
  receiver: userAddress,
  chainId: BASE_CHAIN,
  amountIn: ["10000000000000000000"], // 100 WETH
  tokenIn: [WETH],
  tokenOut: [stataBascbETH],
  routingStrategy: "delegate",
};


const route = await client.getRouteData(routeParams);
await sendSmartWallet(route.tx, route.gas);
return route;
Route Mechanics:
  • Redeem WETH for native ETH.
  • Swap native ETH to cbETH.
  • Deposit cbETH into Aave to get stataBascbETH.