Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setDecimals can be set by anyone and not used #78

Open
code423n4 opened this issue Jun 30, 2021 · 2 comments
Open

setDecimals can be set by anyone and not used #78

code423n4 opened this issue Jun 30, 2021 · 2 comments

Comments

@code423n4
Copy link
Contributor

Handle

0xRajeev

Vulnerability details

Impact

The setDecimals() in the sample Gas Price Oracle implementation allows anyone to set the decimals value used by the contract but is not used anywhere.

Impact: It is unclear if this should be set by anyone and if that value should be used in determining the precision of the values returned.

Proof of Concept

https://github.com/code-423n4/2021-06-tracer/blob/74e720ee100fd027c592ea44f272231ad4dfa2ab/src/contracts/oracle/GasOracle.sol#L64-L66

Tools Used

Manual Analysis

Recommended Mitigation Steps

Evaluate if this access and missing logic is correct.

@raymogg
Copy link
Collaborator

raymogg commented Jul 5, 2021

Lower severity as the setDecimals function is not used by anything within the GasOracle. This can just be considered redundant code

@cemozerr
Copy link
Collaborator

Marking this as non-critical as the code is redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants