The tide and feed contracts are fork-tested; the Elysium deploy is next.Read the log ›
Docs / Mechanism

Rebalance and the bounty

rebalance() is public. status() tells anyone whether it would run now and why not. The reasons, in the order the contract checks them:

CodeMeaning
5The tide is not open yet (no first deposit).
2The reference is older than 900 s of HyperCore time.
3The pool trades more than maxDeviationTicks away from the reference (100 on HYPE/USDC, 150 on HYPE/KNTQ).
1Less than 1800 s since the last rebalance.
4The reference is still inside the inner band.
0Ready.

What it does

  1. Collects the swap fees of the position and takes the protocol share.
  2. Removes the whole position.
  3. Swaps the minimum through the same pool to reach the mix the new range needs at the reference, with a price limit at the reference ± slippageBps (50 bps on HYPE/USDC, 75 on HYPE/KNTQ). If the pool cannot fill the whole swap inside that limit, it fills what it can and the rest stays idle.
  4. Adds the largest position the balances allow on the new range. What does not fit stays idle and is counted in every share.

The bounty

The caller receives 5 % of the swap fees collected by that call, after the protocol share, in both tokens. The cap in code is 10 %. The bounty comes from fees only, never from depositors' principal, so calling it to farm the bounty costs more in pool fees than it pays.

Compound

compound() puts idle balances into the current range. Anyone may call it under the same freshness and pool checks as a rebalance, without the interval.