Smart rebalancing
Information on Phuture's rebalancing logic

## Rebalancing bands

Phuture has introduced rebalancing bands which prevent the rebalancing system from operating when an asset’s weight sits outside of an acceptable range. This functionality stops excessive rebalancing triggered by small movements in the underlying price and also provides safety to the system when prices move by a great magnitude.
Bands are split into upper and lower bounds. Upper and lower bounds exist above and below the intended weight for an asset. The bands are always centred to the intended weight of each asset on the platform. Therefore, rebalancing bands comprise four key points. In the context of rebalancing bands lower and upper are adjectives to describe the distance away from the intended weight rather than the direction of the weight change. Let's take a look at the key points above the intended weight. Let's assign the variable
$W$
as the intended weight. The above lower bound,
$ALB$
, would be equal to
$W*(1+x)$
, where
$x$
is a configurable parameter that defines the percentage increase in weight from the intended weight. The above upper bound,
$AUB$
, can be defined by
$W*(1+y)$
, where
$y$
is a configurable parameter that delineates the percentage increase in weight from the intended weight and which satisfies the inequality
$y>x$
. Thus, if we use
$NW$
for new weight, when
$NW>W$
and
$ALB
then
$NW$
sits in the interior of the rebalancing band and can trigger a rebalance. This process can be reversed to find the rebalancing band points below the intended weight.
What we describe above are essentially Bollinger Bands but for asset weights rather than price. The four key points of the rebalancing bands are calculated based on the volatility of each asset's weight over the previous month.
Spot prices used within the Phuture system are injected via oracles which aggregate pricing data from multiple sources and outputs a weighted average result. This ensures pricing data is robust against flash loan manipulation.

## Rebalancing surface

The Rebalancing surface is critical for proper rebalancing of an aggregated system. It maps the relationship between every asset held on Phuture and enforces these relationships during swaps. This prevents the system from rebalancing two assets that do not share any common indices; preventing value leakage from one asset to another. It also ensures that only the portion of the unbalanced delta, that is attributed to the two assets being rebalanced, is corrected.