I am trying to understand slashing and rewarding funds from the recipe example.
https://substrate.recipes/currency-imbalances.html
For slashing funds it doesn't require initialization with <NegativeImbalanceOf>::zero() whereas for rewarding funds it requires initializing <PositiveImbalanceOf>::zero()
//slash fund
let imbalance = T::Currency::slash_reserved(&to_punish, collateral).0;
T::Slash::on_unbalanced(imbalance);
//reward funds
let mut total_imbalance = <PositiveImbalanceOf<T>>::zero();
let r = T::Currency::deposit_into_existing(&to_reward, reward).ok();
total_imbalance.maybe_subsume(r);
T::Reward::on_unbalanced(total_imbalance);
What does the two extra lines of code do in reward funds, do I have to use it every time I reward funds??