> ## 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.

# Position Migration

> Make it easy for users to migrate positions between different protocols and assets.

export const date_0 = "2025-09-29"

## Rebalance Nest Alpha Vault into Rooster LP on Plume

This use case rebalances a Nest Alpha Vault position into a Rooster Finance YAP (nALPHA/pUSD) liquidity pool.

[**Try this route →**](https://happypath.enso.build?chainId=98866\&tokenIn=0x593ccca4c4bf58b7526a4c164ceef4003c6388db\&tokenOut=0xfc3bd0e01b4e755aedd2a4087ccdb90c4d28f038)

**Route Mechanics**:

* The bundle first splits the input NestAlphaVault token
* A portion of the original token is paired with an equal value of pUSD obtained through a swap using the rooster protocol
* Both assets are then deposited into a rooster-yap liquidity pool to form the final LP position

```mermaid theme={null}
flowchart LR
    NEST((NEST)) --> SPLIT{enso.split}
    
    SPLIT -->|rooster<br/>swap| PUSD((PUSD))
    SPLIT -->|keep as<br/>NALPHA| NALPHA((NALPHA))
    
    PUSD -->|rooster-yap<br/>deposit| ROOSTER_LP((ROOSTER_LP))
    NALPHA -->|rooster-yap<br/>deposit| ROOSTER_LP

```

```ts theme={null}
const BERACHAIN_CHAIN = 80094;
const OPTIMISM_CHAIN = 10;
const ARBITRUM_CHAIN = 42161;
const ETHEREUM_CHAIN = 1;
const PLUME_CHAIN = 98866;
const userAddress = "0xd8da6bf26964af9d7eed9e03e53415d37aa96045" as Address;

/**
 * Rebalances a Nest Alpha Vault position into a Rooster Finance YAP (nALPHA/pUSD) liquidity pool on Plume.
 * @returns The route and transaction objects.
 */
export async function rebalanceNestToRoosterLp(): {
  const NestAlphaVault: Address = "0x593ccca4c4bf58b7526a4c164ceef4003c6388db";
  const RoosterYAPLP: Address = "0xfc3bd0e01b4e755aedd2a4087ccdb90c4d28f038";

  const routeParams: RouteParams = {
    fromAddress: userAddress,
    receiver: userAddress,
    chainId: PLUME_CHAIN,
    amountIn: ["1000000000"], // 1000 NALPHA tokens
    tokenIn: [NestAlphaVault],
    tokenOut: [RoosterYAPLP],
    routingStrategy: 'router'
  };

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

***

## Rebalance yHONEY Vault into Kodiak HONEY/WBERA LP

Redeem yHONEY vault shares and use the underlying assets to create a Kodiak BERA/HONEY LP position.

[**Try this route →**](https://happypath.enso.build?chainId=80094\&tokenIn=0xC82971BcFF09171e16Ac08AEE9f4EA3fB16C3BDC\&tokenOut=0x9659dc8c1565E0bd82627267e3b4eEd1a377ebE6)

```mermaid theme={null}
flowchart LR
    yHONEY((yHONEY)) -->|bearn<br/>redeem| HONEY((HONEY))
    HONEY --> SPLIT{enso.split}
    
    SPLIT -->|enso<br/>route| WBERA((WBERA))
    SPLIT -->|keep as<br/>HONEY| HONEY_KEPT((HONEY))
    
    WBERA -->|kodiak-islands<br/>deposit| LP((HONEY/WBERA LP))
    HONEY_KEPT -->|kodiak-islands<br/>deposit| LP
```

```javascript theme={null}
import { Address, EnsoClient, RouteParams } from "@ensofinance/sdk";

const BERACHAIN_MAINNET = 80094;
const userAddress = "your-wallet-address" as Address;

const yHONEY = "0xC82971BcFF09171e16Ac08AEE9f4EA3fB16C3BDC" as Address;
const HONEY_WBERA_POOL = "0x9659dc8c1565E0bd82627267e3b4eEd1a377ebE6" as Address; // HONEY/WBERA LP

const routeParams: RouteParams = {
 fromAddress: userAddress,
 receiver: userAddress,
 chainId: BERACHAIN_MAINNET,
 amountIn: ["1500000000000000000"], // 1.5 yHONEY
 tokenIn: [yHONEY],
 tokenOut: [HONEY_WBERA_POOL],
 routingStrategy: "delegate",
 slippage: "200", // 2% slippage for yield token pairing
 referralCode: "yhoney-island",
};

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

**Route Mechanics:**

* Redeem `yHONEY` vault shares to receive `HONEY`.
* Split `HONEY` into `HONEY` and `WBERA` through internal routing.
* Deposit balanced tokens into Kodiak Islands `HONEY/WBERA` pool.

***

<div className="text-right text-xs gray-200 font-semibold w-full" style={{marginTop: '0'}}>
  <p style={{
        color: "#b2b2b2"  
    }}>Updated {date_0}</p>
</div>
