Skip to content

Rebalancing

Rebalancing is how SAM keeps your money in the best-yielding markets over time. As rates change, it shifts liquidity from where returns have fallen to where they have risen.

Anyone can trigger a rebalance, and the amounts are computed entirely on-chain. No admin decides where your money goes. In practice a keeper pokes it regularly, but the rules are fixed in the contract, so a rebalance can only ever move funds between the registered markets and the idle buffer, never to a person.

Each market’s target share of the pool is set by the yield SAM has actually measured there (its learned APR): higher measured yield earns a larger target. That target is then held back by two safety caps:

  • Exposure cap. No single market gets more than a set fraction of the pool (default 70%), so the vault always stays diversified.
  • Depth cap. No market gets more than a fraction (default 50%) of its own available liquidity, the unborrowed cash actually sitting in that market. This keeps the vault inside what it could realistically withdraw.

So the rule is: chase the measured yield, but never become too large a share of any one market.

If SAM piled most of a vault into a small, shallow market chasing a high rate, you might not be able to get out later, because that money would be most of the market’s liquidity. The depth cap prevents that. And if a market’s available cash shrinks (lots of people borrowing), its cap shrinks too, so the next rebalance pulls the vault back toward safer ground. It is a built-in exit-safety rail. The exact formula is in Rebalancing math.

This is the adaptive loop in action: a market starts paying more (say, after a reward harvest lifts its measured yield) → its target rises → the next rebalance moves more of the pool in, up to the caps. When its yield fades, the flow reverses. You get the benefit automatically, without watching rates yourself.