Low impact, since this is just how to better implement getEffectiveDistributionSpeed() to cover more valid edge cases.
Take a look at getEffectiveDistributionSpeed():
As seen, the above function is used to get the rewards per block for a specific token; the issue is that an assumption is made that balance >= accrued is always true, which is not the case.
To support my argument above, note that the PrimeLiquidityProvider.sol also employs functions like sweepTokens() and releaseFunds. Whereas the latter makes an update to the accrual during its execution (i.e., setting the tokenAmountAccrued[token_] to 0), the former does not. This can be seen below:
Now, in a case where a portion of a token has been swept and the accrual is now more than the balance of said token, the getEffectiveDistributionSpeed() function reverts due to an underflow from the check here:
Make an addition to cover up the edge case in the getEffectiveDistributionSpeed() function, i.e., if accrued is already more than the balance then the distribution speed should be the same as if the difference is 0.
An approach to the recommended fix can be seen from the diff below:
