Rebalance Window & Cooldown

The Node implements a time-based control system that determines when rebalancing operations can occur:

uint64 public rebalanceCooldown = 23 hours;  // Default
uint64 public rebalanceWindow = 1 hours;     // Default
uint64 public lastRebalance;

Purpose

  • Enables Node owners to optimize transaction costs by batching investment and withdrawal transactions

  • Window provides predictable timeframe for operations

  • Rebalancer has discretion on when to start new window

  • Owner can adjust periods based on strategy needs

Permissions

  • The Node Owner has exclusive permission to set rebalance cooldown & duration

  • Whitelisted Rebalancers have exclusive rights to call startRebalance()

Configuration

// Only owner can modify
function setRebalanceCooldown(uint64 newRebalanceCooldown)
function setRebalanceWindow(uint64 newRebalanceWindow)

Timing Rules

  • Must wait rebalanceCooldown between rebalance windows

  • Rebalancing actions only valid for rebalanceWindow duration

  • Window starts when rebalancer calls startRebalance()

Modifiers

modifier onlyWhenRebalancing()     // Must be within window
modifier onlyWhenNotRebalancing()  // Must be outside window

Last updated