Dynamically shift capital from one protocol to another to optimize yield
export async function rebalanceYearnToMorphoKatana(): Promise<{ route: any; tx: any }> { const yvvbUSDC: Address = "0x80c34bd3a3569e126e7055831036aa7b212cb159"; const steakUSDC: Address = "0x61d4f9d3797ba4da152238c53a6f93fb665c3c1d"; const routeParams: RouteParams = { fromAddress: userAddress, receiver: userAddress, chainId: KATANA_CHAIN, amountIn: ["100000000"], // 100 yvvbUSDC tokenIn: [yvvbUSDC], tokenOut: [steakUSDC], routingStrategy: 'router' }; happyPathLog(routeParams); const route = await client.getRouteData(routeParams); await sendEoa(route.tx, route.gas); return route; }
Was this page helpful?