seize strategy is rly unsafe imo, consider removing. regardless, this line can cause underflow in totalHoldings.
should change to if (lockedProfit() > totalStrategyHoldings - strategyBalance)
|
if (strategyBalance > totalHoldings()) maxLockedProfit = 0; |