Open code423n4 opened 2 years ago
decimals()
Affected code
newWeight != 0
newWeight > 0
_totalSupply != 0
_totalSupply > 0
uint _balance = oldShares
uint _balance = _NAV.balanceOf[_account]
Proof of concept
maxCapitalization
_capitalization[0]
_capitalizations[i] > maxCapitalization
i == 0
Use memory variable to store
decimals()
Affected code
Use
newWeight != 0
instead ofnewWeight > 0
Affected code
Use
_totalSupply != 0
instead of_totalSupply > 0
Affected code
Use
uint _balance = oldShares
instead ofuint _balance = _NAV.balanceOf[_account]
Affected code
Add condition (i != 0) to if block
Affected code
Proof of concept
maxCapitalization
is initialized with value_capitalization[0]
, so we don't need to check if_capitalizations[i] > maxCapitalization
ifi == 0