sushiswap / miso

GNU General Public License v3.0
40 stars 104 forks source link

SushiToken template affected by delegation bug? #5

Closed Ro5s closed 3 years ago

Ro5s commented 3 years ago

Currently MISO includes a template for SushiToken that is essentially a mintable token with certain vote delegation functions. However, as this template also uses an OpenZeppelin base file (ERC20) for transfer functions without a coupled _moveDelegates function call, this template should have the same governance bug discussed in this article: https://cointelegraph.com/news/dev-finds-major-governance-bug-in-sushiswap-but-no-threat-to-the-project-yet

Suggestion:

Ro5s commented 3 years ago

I have also created a branch with a new template (4) for COMP-style token. This could be offered more simply, as there are also opinionated choices that users might want here (e.g., fixed-supply governance, using uint96 for balances under the hood...): https://github.com/sushiswap/miso-dev/blob/ross/CompToken/contracts/Tokens/CompToken.sol

Ro5s commented 3 years ago

more directly fixed by https://github.com/sushiswap/miso/pull/16