> For the complete documentation index, see [llms.txt](https://learn.charm.fi/charm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.charm.fi/charm/manage-liquidity/user-guides/walkthroughs/automating-rebalance.md).

# Automating Rebalance

An automation provider (eg [Gelato Functions](https://app.gelato.network/functions)) can be used to trigger rebalance on your behalf. Here is how to do it:

1. **Top up your balance in Gelato's** [**1Balance**](https://app.gelato.network/1balance) **app - see** [**here**](https://docs.gelato.network/web3-services/1balance) **for further guidance.**

2. **Set the** [**Rebalance Delegate**](/charm/manage-liquidity/user-guides/walkthroughs/edit-vault.md#public-rebalancing) **to the Zero Address** (`0x0000000000000000000000000000000000000000`) and press Submit:

<figure><img src="/files/y3U6Bd3zv6lIOOO49iwt" alt=""><figcaption></figcaption></figure>

3. **Copy the** [**Rebalancing Period**](/charm/manage-liquidity/user-guides/walkthroughs/edit-vault.md#changing-the-rebalance-period) **from** [**Edit Vault**](/charm/manage-liquidity/user-guides/walkthroughs/edit-vault.md)**:**

<figure><img src="/files/6IomDh5NjLUpVVaRytlg" alt=""><figcaption></figcaption></figure>

4. **Add&#x20;*****extra 10 seconds*****&#x20;to Rebalancing Period, and paste the total as the Time Interval in** [**New Task** ](https://app.gelato.network/new-task)**in Gelato Functions:**

<figure><img src="/files/USB1lP0uB3vjQ7kEKsAh" alt=""><figcaption></figcaption></figure>

5. **If you are doing rebalance for the first time, click Start Immediately:**

<figure><img src="/files/N9cpPv2N4BdjrI01NqrI" alt=""><figcaption></figcaption></figure>

6. **Otherwise, un-click Start Immediately and input when you want the next rebalance to happen.** The difference between the next start date and time and the last rebalance must be larger than [**Rebalancing Period**](/charm/manage-liquidity/user-guides/walkthroughs/edit-vault.md#changing-the-rebalance-period)**.**

<figure><img src="/files/I4lJsNXZp1NkHvqWgx0T" alt=""><figcaption></figcaption></figure>

7. **Click Transaction in the next section:**

<figure><img src="/files/P8BYKxK6x2XZIVzxBr27" alt=""><figcaption></figcaption></figure>

8. **Get your vault's contract address from the address bar:**

<figure><img src="/files/jHkesRtILuYrgHuJjI3x" alt=""><figcaption></figcaption></figure>

9. **Paste in the contract address:**

<figure><img src="/files/VvQ598Am0IvOdTgsTw2P" alt=""><figcaption></figcaption></figure>

10. **Select rebalance() as the function to be automated:**

<figure><img src="/files/7Dm3EJJPO0yM9fGAxDcu" alt=""><figcaption></figcaption></figure>

10. **Give your task a name, and click Create Task:**

<figure><img src="/files/8WYjMYhaw2Fh74wgvvqn" alt=""><figcaption></figcaption></figure>

11. **When the transaction confirms, the vault begin rebalancing automatically!** You can see it in your vault on Charm:

<figure><img src="/files/Crhbrp1SWpNyFtVgLM5E" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
You vault is now fully automated!

You don't need to do anything else to earn fees income and increase liquidity, apart from making sure you have enough balance in step 1 to pay for gas fees.
{% endhint %}

{% hint style="danger" %}
Even though your vault is fully automated, you still need to [monitor its performance](/charm/provide-liquidity/user-guides/performance-page.md), and [change the strategy](/charm/manage-liquidity/user-guides/walkthroughs/edit-vault.md#managing-liquidity) if it is not performing.

\
If you change the [Rebalancing Period](/charm/manage-liquidity/user-guides/vault-parameters.md#rebalance-period-period), the old task needs to be cancelled, and steps 3 to 10 need to be repeated.
{% endhint %}
