This redemption workflow enables users to exit their Reservoir rUSD positions they hold on Katana by bridging back to Ethereum and converting to USDC, completing the stablecoin lifecycle and providing liquidity flexibility. Route Mechanics:
  • Bridge rUSD from Katana to Ethereum using Stargate protocol
  • Check rUSD balance on Ethereum after bridge completion
  • Convert rUSD back to USDC using Enso’s routing aggregation
  • Receive USDC on Ethereum for maximum liquidity and utility
The redemption process reverses the minting workflow, allowing users to realize profits from Katana DeFi strategies or simply exit their cross-chain positions back to the more liquid Ethereum ecosystem.
const KATANA_ID = 747474;
const ETHEREUM_ID = 1;

// Common addresses
const WALLET_ADDRESS = "0x93621DCA56fE26Cdee86e4F6B18E116e9758Ff11"; // User wallet

const rUSDAmount = parseUnits("1000", 18).toString();
// Token addresses
const rUSD_ETHEREUM = "0x09D4214C03D01F49544C0448DBE3A27f768F2b34";
const rUSD_KATANA = "0x09D4214C03D01F49544C0448DBE3A27f768F2b34";
const USDC_ETHEREUM = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48";

const client = new EnsoClient({
  apiKey: process.env.ENSO_API_KEY!,
});

// LayerZero pool addresses
const rUsdKatanaToEthPool = await client.getLayerZeroPool({
  chainId: KATANA_ID,
  token: rUSD_KATANA,
  destinationChainId: ETHEREUM_ID,
  destinationToken: rUSD_ETHEREUM,
});

console.log(JSON.stringify(rUsdKatanaToEthPool), !rUsdKatanaToEthPool.length);

if (!rUsdKatanaToEthPool.length) {
  throw new Error("Required pools not available");
}

const bundle = await client.getBundleData(
  {
    chainId: KATANA_ID,
    fromAddress: WALLET_ADDRESS,
    spender: WALLET_ADDRESS,
    routingStrategy: "router",
  },
  [
    {
      protocol: "stargate",
      action: "bridge",
      args: {
        primaryAddress: rUsdKatanaToEthPool[0].pool as Address,
        destinationChainId: ETHEREUM_ID,
        tokenIn: rUSD_ETHEREUM,
        amountIn: rUSDAmount,
        receiver: WALLET_ADDRESS,
        callback: [
          // Step 1: Check rUSD balance on Ethereum after bridge
          {
            protocol: "enso",
            action: "balance",
            args: {
              token: rUSD_ETHEREUM,
            },
          },
          // Step 2: redeem rUSD for USDC
          {
            protocol: "enso",
            action: "route",
            args: {
              tokenIn: rUSD_ETHEREUM,
              tokenOut: USDC_ETHEREUM,
              amountIn: { useOutputOfCallAt: 0 }, // Use rUSD from balance check
              receiver: WALLET_ADDRESS,
            },
          },
        ],
      },
    },
  ]
);
Important Considerations
  • Bridge timing depends on LayerZero network congestion between Katana and Ethereum
  • Bridge fees are deducted from the rUSD amount before conversion to USDC
  • Gas costs for Ethereum operations are paid via LayerZero’s native drop feature

Updated