function balanceToShares should handle a case when pricePerShare drops to 0. Currently, this will produce a runtime division by zero error. While in theory, this is an unlikely scenario but in practice, you should consider returning 0 in such a case.
Handle
pauliax
Vulnerability details
Impact
function balanceToShares should handle a case when pricePerShare drops to 0. Currently, this will produce a runtime division by zero error. While in theory, this is an unlikely scenario but in practice, you should consider returning 0 in such a case.
Recommended Mitigation Steps
Return 0 if pricePerShare is 0.