Rebalancing
Rebalancing moves a vault's range to where the price is. The agent does it when it expects the move to pay for itself, and often it waits instead.
What a rebalance does
- HarvestThe vault collects what it has earned, as in any harvest.
- Take the position outIt takes all of its money out of the pool.
- Swap to the new mixA range around the current price needs both tokens, so the vault swaps part of the token it has too much of.
- Put it backIt adds everything back to the pool, in the new range.
All of this happens in a single transaction. Your number of shares stays the same.
What moving costs
- The swap. The vault pays the pool's trading fee on the part it swaps, and a large swap moves the price against it a little.
- A loss made permanent. While the price is outside the range, the vault holds just one token. If the price comes back, the vault's mix comes back with it. After a move, part of that token has been swapped at the new price, and a price that comes back doesn't undo that.
- The network fee. Aurum pays it for the agent's moves; it doesn't come out of the vault.
That's why the agent doesn't move a range every time the price leaves it.
Moving or waiting
When the price leaves a vault's range, the agent first looks at how it left:
| Situation | What the agent usually does |
|---|---|
| The price is inside the range | Leaves it alone. The vault is earning, and moving would only cost money. |
| The price spiked out | Waits for it to come back. Sudden spikes often reverse. |
| The price keeps crossing the edge | Waits. Moving back and forth would cost more than it earns. |
| The price has clearly moved on | Moves the range, and may pick a new width. |
| Trading has slowed down a lot | Rethinks the width, instead of just following the price. |
| The vault holds less than $10 | Watches, but doesn't act. A move would cost more in network fees than it could earn. |
When the agent waits, it sets itself a deadline, from two hours to three days, and notes why it's waiting. The vault's page shows both. When the deadline passes, it decides again.
While the price is inside the range, the agent doesn't move the range just to re-center it. It may still change the width, when trading or prices change a lot.
Every move shows up in Activity, with the agent's reason. How it decides goes deeper into its reasoning.
Limits on every move
Each vault's contract sets limits on moves. The agent can't change them or get around them:
- At most once an hour. After a move, the next one has to wait an hour. The vault's page calls this the rebalance cooldown.
- Only when the price is calm. The price must be within about 8% of a recent reference price, or the move is refused. A price that someone pushes up or down for a moment can't be used against the vault.
- The new range must include the current price.
- Not too narrow. For today's vaults, a range has to be at least about 2.4% wide.
The reference price depends on the exchange, and the vault's page shows it under price protection. On up33, it's the average price over the last minute, shown as a 1 minute TWAP (time-weighted average price). On Uniswap V4, the vault keeps its own reference price, which can only follow the market slowly. That's shown as Checkpoint.
If the agent doesn't act
A vault can't be left out of range forever. Once its contract has recorded it as out of range for three days, anyone can move its range, within the same limits. That works even if the agent has stopped altogether. The vault's page lists this as the fallback rebalance.
The three days start when the contract records that the price has left the range. Every harvest checks this, and anyone can trigger a harvest, so anyone can start the clock.
Every move comes with a forecast
Each time the agent moves a range, it writes down what it expects: how much of the time the price will stay in the new range, and what the vault will earn over the next seven days, after costs. Afterwards, those forecasts are checked against what really happened. Track record shows how they score.