An edge case can occur if notifyPnL is called from LendingTerm with an amount equal to the sum of _surplusBuffer and termSurplusBuffer. The result will be a revert because divide by zero will occur since loss -= _surplusBuffer that will prevent the bad debt realization:
While this is extremely rare scenario to occur, consider to handle the case when loss == 0 after the subtraction and take the appropriate actions, as this will indicate that loans are insolvent and term most likely will have to be off-boarded. 
