code-423n4 / 2021-04-vader-findings

1 stars 0 forks source link

ERC20 specification declares decimals as uint8 type #283

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

paulius.eth

Vulnerability details

Impact

iERC20 decimals field is declared as uint, but to be exact, ERC20 specification declares decimals as uint8. Anyway, this has no security impact as 18 decimals is set which fits in uint8.

Recommended Mitigation Steps

You can refactor to uint8 or just be informed about such compatibility guidelines.

0xBrian commented 3 years ago

https://github.com/vetherasset/vaderprotocol-contracts/commit/35908c629eed86dac62b1baee3cb247c38f2a5a0