Here we introduce two adjustments to the moving funds proposal generator.
First, we introduce a moving funds safety margin of 24 hours. Wallets that just entered the MovingFunds state may have received some last minute deposits just before. Even though deposit sweep task typically occurs before the moving funds task, such deposits may not be mature enough or have enough confirmations to be swept. We know that MovingFunds wallets cannot receive new deposits so, it makes sense to preserve a safety margin before moving funds to give the last minute deposits a chance to become eligible for sweeping by the deposit sweep task.
Second, we slightly optimize the unswept deposit check at the beginning of the moving funds task. It's enough to find one unswept deposit to abort the moving funds task.
Here we introduce two adjustments to the moving funds proposal generator.
First, we introduce a moving funds safety margin of 24 hours. Wallets that just entered the
MovingFunds
state may have received some last minute deposits just before. Even though deposit sweep task typically occurs before the moving funds task, such deposits may not be mature enough or have enough confirmations to be swept. We know thatMovingFunds
wallets cannot receive new deposits so, it makes sense to preserve a safety margin before moving funds to give the last minute deposits a chance to become eligible for sweeping by the deposit sweep task.Second, we slightly optimize the unswept deposit check at the beginning of the moving funds task. It's enough to find one unswept deposit to abort the moving funds task.