The list of denominations for units of ETH included in the reserved keywords list is different from the list of accepted denominations when converting between units. This leads to some reserved keywords that should not be, and some non-reserved keywords that should be.
Vulnerability Details
The list of reserved keywords for denominations is as follows:
Submitted by obront.
Relevant GitHub Links
https://github.com/vyperlang/vyper/blob/3b310d5292c4d1448e673d7b3adb223f9353260e/vyper/semantics/namespace.py#L207-L220
Summary
The list of
denominations
for units of ETH included in the reserved keywords list is different from the list of accepted denominations when converting between units. This leads to some reserved keywords that should not be, and some non-reserved keywords that should be.Vulnerability Details
The list of reserved keywords for denominations is as follows:
The list of denominations accepted when converting between values is:
Comparing the two lists:
ada, twei, pwei
milliether, microether, nanoether, picoether, femtoether, grand, kether
Impact
Some denominations that should be reserved are not, while others that should not be reserved are.
Tools Used
Manual Review
Recommendations
Line up the two lists so that the reserved keywords reflects the denominations that are used for conversions.