# Rebalancers

Rebalancers manage concentrated liquidity positions dynamically, solving the challenge of maintaining optimal liquidity ranges in rapidly changing market conditions. They automatically adjust position ranges to maximize fee-earning.

Detailed insights into our Rebalancer's innovative approach can be found in [our in-depth technical deep dive](https://docs.arcadia.finance/deep-dives/rebalancers).

## Properties

Rebalancers are:

* Immutable.
* Non-Custodial but triggering is Permissioned.
* The contract relies on economic incentives, with the initiator of the rebalance earning a small reward.

A unique feature of Arcadia's Rebalancers is the innovative Hook structure. This extensible design allows account owners to implement custom logic and additional checks for their rebalancing strategies. The Hook system is open for development by both protocol users and third-party developers.

## Strategies

Rebalancing is always a tradeoff between the opportunity cost of being out of range and the costs of rebalancing the position.

Finding the optimal strategy that determines when to rebalance, and which new lower and upper price to use, is a complex problem to solve, and it depends on multiple factors:

* Type of liquidity pool (stable pool, correlated assets, volatile assets…)
* Market conditions (bullish, bearish, flat)
* Objectives of the position owner
* Chain conditions e.g. gas price
* …

The Rebalancer is made in such a way that it works with any rebalance strategy. The main logic is strategy agnostic: it takes as input an old position, the new upper price and the new lower price.

## Trust Assumptions

The Rebalancer is a smart contracts that can only perform a single atomic action (rebalancing CLPs), it never holds assets.

But it does require input from a permissioned (whitelisted by the Owner, not Arcadia) user, further called the Initiator. ![Initiator](https://1842996165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCZEtaA6yEHQp1bLQVU4p%2Fuploads%2Fgit-blob-90cd95dea32103436d18cfaa2408f70e8e837dde%2Finitiator.png?alt=media)

The initiator has to call the Rebalancer contract and has to determine:

* When to rebalance
* The range of the new Liquidity Position

A malicious initiator can still only rebalance via the Rebalancer, while it is a trusted role, they can never steal funds or Liquidity from the Account Owner.

The worst a malicious/incompetent Rebalancer can do, is trigger Rebalances at bad moments and move liquidity to non-optimal ranges, resulting in value lost due to swap fees, slippage and opportunity cost. But they can never “rug” the assets of an Account.

Since Initiators can be revoked/replaced at any time by the Account Owner, they are incentivised to rebalance optimally, to keep earning fees for their services.

The Rebalancer is permissioned, but that does not mean it is centralised. Each Account Owner can choose if they enable the Rebalancer at all. And if they do, they can choose who they set as initiator. Different initiators can for instance run different rebalance strategies, or ask different fee amounts for their services.

## Rebalancing Limits and Economic Filters

To ensure economic sustainability and prevent abuse, the rebalancer implements a multi-tier filtering system that evaluates positions before executing rebalances. This system balances profitability for the protocol with quality service for users, allowing new users to try out the rebalancer without committing capital while preventing abuse.

### Decision Logic

When a position meets its strategy-based rebalancing criteria (e.g., price moved out of range), it passes through the following checks **in order**. If any check passes, the position is rebalanced immediately:

#### 1. Whitelist Bypass

Certain account owners (VIP users, protocol partners, protocol-owned liquidity) are whitelisted for unlimited rebalancing without any restrictions.

#### 2. Gas-based Profitability Check

The protocol evaluates whether the expected revenue from pending fees exceeds the estimated gas cost by a factor of 2. Positions with significant accumulated fees get gas-sponsored rebalances regardless of rate limits.

**Calculation:**

* Gas cost = 4,000,000 gas units × current gas price × ETH price (USD)
* Expected revenue = pending fees (USD) × initiator fee percentage
* Required: revenue ≥ 2 × gas cost

#### 3. Large Position Threshold (≥ $50,000 USD)

High-value positions (≥ $50,000 USD in total liquidity) are always rebalanced, regardless of pending fees or rate limits. The total USD value is computed from the liquidity amounts of both tokens at current market prices.

#### 4. Rate Limiting with stAAA Token Benefits

For positions that don't meet the above criteria, rebalancing is subject to usage quotas.

**Base Quota (everyone gets this):**

* 1 gas-sponsored rebalance per day (rolling 24-hour window)
* 3 gas-sponsored rebalances per week (rolling 7-day window)

**stAAA Token Holder Benefits:** Account Owners holding stAAA tokens receive additional rebalancing quota:

* **+1 additional rebalance per day** for every **3,000 stAAA** tokens held
* Weekly limit scales proportionally: base + (daily bonus × 7)

| stAAA Held | Daily Limit | Weekly Limit |
| ---------- | ----------- | ------------ |
| 0          | 1           | 3            |
| 3,000      | 2           | 10           |
| 6,000      | 3           | 17           |
| 9,000      | 4           | 24           |
| 30,000     | 11          | 73           |

**Important:** AAA holders need to **stake their AAA tokens into stAAA** to benefit from increased quotas. The rate limit counts all rebalances across **all of an owner's accounts**, preventing circumvention through multiple accounts.

#### 5. Pay Gas Costs with AAA

If you've exceeded your gas-sponsored quota but still want rebalancing, you can **approve AAA tokens to the Gas Relayer**. When a rebalance is triggered:

* The estimated gas cost is calculated in AAA tokens
* If your approval **and balance** cover the gas cost, the rebalance executes
* The gas cost (in AAA) is deducted from your balance

This allows unlimited rebalancing for users willing to pay gas costs in AAA tokens.

**Gas Relayer Address:** `0xD938C8d04cF91094fecAF0A2018EAac483a40137`

To enable this: approve AAA tokens to the Gas Relayer address through the dApp. We recommend approving enough for multiple rebalances.

### Summary

| Situation                             | Solution                                                |
| ------------------------------------- | ------------------------------------------------------- |
| Position has significant pending fees | Automatic - gas profitability check passes              |
| Position is worth $50k+               | Automatic - always rebalanced                           |
| You hold stAAA tokens                 | You get increased gas-sponsored quota based on holdings |
| You've used your gas-sponsored quota  | Approve AAA to the Gas Relayer to pay for gas           |
| You need unlimited rebalances         | Contact the team about whitelisting                     |

### Configuration

| Parameter                | Value              | Description                                     |
| ------------------------ | ------------------ | ----------------------------------------------- |
| Position Value Threshold | $50,000 USD        | Minimum position size for priority treatment    |
| Base Daily Limit         | 1 rebalance        | Gas-sponsored rebalances per 24-hour period     |
| Base Weekly Limit        | 3 rebalances       | Gas-sponsored rebalances per 7-day period       |
| stAAA Bonus Rate         | +1 per 3,000 stAAA | Additional daily rebalances per 3k stAAA tokens |
| Gas Estimate             | 4,000,000 units    | Estimated gas per rebalance transaction         |
| Profitability Multiplier | 2×                 | Minimum revenue-to-gas-cost ratio               |

### Checking Your Status

When opening the asset manager modal in the dApp, you can see your current rebalancing status including:

* Your daily/weekly usage and remaining quota
* Your stAAA balance and resulting limits
* Your AAA relayer approval status
* Whether additional AAA approval is recommended

## Costs and Fees

When rebalancing there are a number of costs/inefficiencies involved:

* **1. Initiator Fee:** The initiator of the rebalance (who triggers it) receives an initiator fee ($$fee\_{initiator}$$) based on the pending yield earned of the position.
* **2. Slippage & leftovers:** Both slippage and leftovers result in a less than optimal amount of liquidity minted (Leftovers are not really a cost since they are deposited back into the account, but they no longer earn yield). Slippage & Leftovers are capped by the maximal decrease in liquidity ($$MDL$$), which compares the optimal rebalance (i.e., assuming no slippage and leftovers) to the current rebalance.
* **3. Impermanent Loss:** Rebalancing realizes impermanent loss. It is not a cost due to rebalancing, but a loss in value compared to the initial position that is realized by rebalancing.

Note that **2.** is capped to the downside (if exceeded the transaction reverts) but is most of the time much smaller or even positive (the swap can be done with a lower average fee than that of the pool and slippage can be positive as well).

Both the initiator $$fee\_{initiator}$$ and the $$MDL$$ are set by the Account Owner, they can differ for different strategies and different pools. The Initiator can change the rebalance parameters, but only advantageous to the Account Owner (lower fees, lower max slippage).

The fees and settings for the current initiators are set to:

| Rebalancer                                                                                          | Initiator                                                                                                             | Strategy | $$fee\_{initiator}$$ | $$MDL$$ |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -------- | -------------------- | ------- |
| [Slipstream V1 Rebalancer](https://basescan.org/address/0x5802454749cc0c4A6F28D5001B4cD84432e2b79F) | [0xDc9B596ce15F859673D1Be72e2Aadd41DD3aC4fE](https://basescan.org/address/0xDc9B596ce15F859673D1Be72e2Aadd41DD3aC4fE) | Any      | 7.5% of yield earned | 1%      |
| [Slipstream V2 Rebalancer](https://basescan.org/address/0x953Ff365d0b562ceC658dc46B394E9282338d9Ea) | [0xDc9B596ce15F859673D1Be72e2Aadd41DD3aC4fE](https://basescan.org/address/0xDc9B596ce15F859673D1Be72e2Aadd41DD3aC4fE) | Any      | 7.5% of yield earned | 1%      |
| [Uniswap V3 Rebalancer](https://basescan.org/address/0xbA1D0c99c261F94b9C8b52465890Cca27dd993Bd)    | [0xDc9B596ce15F859673D1Be72e2Aadd41DD3aC4fE](https://basescan.org/address/0xDc9B596ce15F859673D1Be72e2Aadd41DD3aC4fE) | Any      | 7.5% of yield earned | 1%      |
| [Uniswap V4 Rebalancer](https://basescan.org/address/0x01EDaF0067a10D18c88D2876c0A85Ee0096a5Ac0)    | [0xDc9B596ce15F859673D1Be72e2Aadd41DD3aC4fE](https://basescan.org/address/0xDc9B596ce15F859673D1Be72e2Aadd41DD3aC4fE) | Any      | 7.5% of yield earned | 1%      |

Note: all rebalances will be subject to the Yield Success Fee of the protocol, as can be found in the [Fees](https://docs.arcadia.finance/protocol/fees) section.
