code-423n4 / 2021-07-sherlock-findings

0 stars 0 forks source link

`initializeSherXERC20` can be called more than once #116

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

cmichel

Vulnerability details

The SherXERC20.initializeSherXERC20 function has initialize in its name which indicates that it should only be called once to initialize the storage. But it can be repeatedly called to overwrite and update the ERC20 name and symbol.

Recommendation

Consider an initializer modifier or reverting if name or symbol is already set.