getVotingPower
division by zero
#191
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
duplicate
This issue or pull request already exists
Handle
cmichel
Vulnerability details
The
sNOTE.getVotingPower
function divides by zero and reverts if no sNOTE tokens have been minted yet (totalSupply() == 0
).Recommended Mitigation Steps
Return a voting power of 0 if
totalSupply() == 0
.The text was updated successfully, but these errors were encountered: