Rebalancing checks

The Agent checks daily to determine the best position to place your liquidity and follows 5 detailed checks:

1/ TVL Safety

  • The target pool’s TVL must be at least 10x the wallet balance. This is checked every day for every wallet.

  • ZyFAI’s Agent’s share in the pool should remain under 15%. This ensures strong safety under all conditions.

  • If a pool’s TVL drops by more than 50% from the previous day, the Agent will automatically withdraw your position.

2/ Delta APY

  • The Agent compares the current APY with the potential new APY and calculates the delta (difference) between the two.

  • It will only rebalance if delta APY ≥ 1.0%.

  • Example: Current APY is 5%, target APY is 5.8% → Delta = 0.8% → Rebalance skipped.

3/ APY Stability Analysis

  • The Agent checks the 7-day APY history of the target pool.

  • If it stays within the +50% / -30% range, it’s considered stable.

  • This avoids major yield spikes downward while remaining more flexible on the upside.

4/ Profit vs. Cost Analysis

  • The Agent first calculates the daily profit of the target pool: Daily profit = (wallet balance × delta APY) / 365

  • Then, it calculates the fees associated with rebalancing (including price impact, gas fees, and slippage from withdrawal and re-deposit).

  • Next, the Agent determines the break-even period: Break-even = slippage cost ÷ daily profit

  • If break-even is less than 10 days, the Agent proceeds with the rebalance.

5/ Money Market

  • If a lending market’s utilization rate is high and the available liquidity is less than 5% of the total ZyFAI agent TVL in the underlying pool, it will automatically trigger a rebalance.

Last updated