You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can see 3 occurrences in the source code of MiniMeToken.sol where this pattern should be used to avoid improper situations :
doTransfer (l.239) : the check overflow is done too late and if the condition is met, amount can be deduced from sender and not credited to receiver : the account balance is not respected.
generateTokens (l.425) : totalSupplyHistory can be updated without balances to be : possible owner account balance value error.
destroyTokens (l.442) : again totalHistory can be decremented without owner balance to be.
Each checks/throw should be done before doing any update of variable.
The text was updated successfully, but these errors were encountered:
Yes you are right for transactions but my point was more for the internal contract variables (totalSupplyHistory, balances) that can be corrupted. In case of a throw, do these variables stay in their previous state?
I was concerned because these variables are used for other computations and contracts.
As stated in the Solidity docs (http://solidity.readthedocs.io/en/develop/security-considerations.html#use-the-checks-effects-interactions-pattern), it is much safer to use the Checks-Effects-Interactions Pattern.
We can see 3 occurrences in the source code of MiniMeToken.sol where this pattern should be used to avoid improper situations :
doTransfer (l.239) : the check overflow is done too late and if the condition is met, amount can be deduced from sender and not credited to receiver : the account balance is not respected.
generateTokens (l.425) : totalSupplyHistory can be updated without balances to be : possible owner account balance value error.
destroyTokens (l.442) : again totalHistory can be decremented without owner balance to be.
Each checks/throw should be done before doing any update of variable.
The text was updated successfully, but these errors were encountered: