# Migrations

Migrations utilize smart routing to optimse the exit from one vault and entry to another vault using the best possible combination of swap price, slippage and gas fees.

{% hint style="info" %}
To ensure that correct calculations of exist price and entry price of each vault, migrations will always sell your assets and purchase new assets. This is the only way that entry can be guaranteed. Fine grained control can be achieved with asset deposits / withdrawals.
{% endhint %}

### Performing a Migration

**Step 1**: Open an existing vault that you have a position in

**Step 2**: Locate the section on migrations

<figure><img src="https://1504354508-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaJ9zaMmYII8SHKLkEZUN%2Fuploads%2FchhwMXobWzatiY7kJzgX%2Fimage.png?alt=media&#x26;token=21f9d7c5-c3d2-4c9f-bce8-21680da1a7f9" alt="" width="339"><figcaption></figcaption></figure>

**Step 3**: Choose the vault you would like to migrate to

{% hint style="info" %}
All vaults are all vaults published any user. My vaults are other vaults you have published.
{% endhint %}

**Step 4**: Choose how much you would like to migrate

<figure><img src="https://1504354508-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaJ9zaMmYII8SHKLkEZUN%2Fuploads%2FNRcAkYflgfSZTfXbODEq%2Fimage.png?alt=media&#x26;token=dc79e588-e50b-473d-b221-667fa2676254" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
Vault tokens are being used to calculate how much is being migrated and not the number  of tokens of the underlying asset in the vault. The USD conversion gives the best estimate of how much of the underlying assets will be migrated.
{% endhint %}

**Step 5**: Review the price impact and optionally configure the slippage tolerance

**Step 6**: Press migrate and approve the tranasction

**Step 7**: Head to My Vaults to see your new position


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dexfi.com/dexfi-products/dexvaults/migrations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
