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

Style issues #108

Open
code423n4 opened this issue Sep 29, 2021 · 0 comments
Open

Style issues #108

code423n4 opened this issue Sep 29, 2021 · 0 comments
Labels

Comments

@code423n4
Copy link
Contributor

Handle

pauliax

Vulnerability details

Impact

Style issues that you may want to apply or reject, no impact on security. Grouping them together as one submission to reduce waste. Consider fixing or ignoring them, up to you.

  • Should be UniswapV3Oracle, not LinkPriceOracle:
    require(latestAnswer > 1, "LinkPriceOracle: invalid oracle value");

  • Should be _value < highRate:
    require(_value < highRate, "InterestRateModel: _value < lowRate");

  • There are hardcoded magic numbers, e.g.:
    require(decimals[tokenA] >= 6 && decimals[tokenB] >= 6, "LendingPair: min 6 decimals");
    It would make code more readable and maintanable if you extract such numbers as constants:
    uint public constant MIN_DECIMALS = 6;
    require(decimals[tokenA] >= MIN_DECIMALS && decimals[tokenB] >= MIN_DECIMALS, "LendingPair: MIN_DECIMALS");

  • contract UniswapV3Helper should explicitly implement IUniswapV3Helper to ensure that the interface and implementation are coherent:
    contract UniswapV3Helper is IUniswapV3Helper, ERC721Receivable

@code423n4 code423n4 added 0 (Non-critical) bug Something isn't working labels Sep 29, 2021
code423n4 added a commit that referenced this issue Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants