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

Misleading variable names #302

Open
code423n4 opened this issue Dec 1, 2021 · 1 comment
Open

Misleading variable names #302

code423n4 opened this issue Dec 1, 2021 · 1 comment
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons

Comments

@code423n4
Copy link
Contributor

Handle

WatchPug

Vulnerability details

https://github.com/code-423n4/2021-11-malt/blob/c3a204a2c0f7c653c6c2dda9f4563fd1dc1cecf3/src/contracts/Auction.sol#L1000-L1006

function setAuctionEndReserveBps(uint256 _bps)
    external
    onlyRole(ADMIN_ROLE, "Must have admin privilege")
  {
    require(_bps > 0 && _bps < 1000, "Must be between 0-100%");
    auctionEndReserveBps = _bps;
  }

Basis points (BPS) refers to a common unit of measure for interest rates and other percentages in finance. One basis point is equal to 1/100th of 1%, or 0.01%, or 0.0001.

auctionEndReserveBps is actually using 1 to represent 1/1000th while with bps in the name.

@code423n4 code423n4 added 0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working labels Dec 1, 2021
code423n4 added a commit that referenced this issue Dec 1, 2021
@0xScotch 0xScotch added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label Dec 6, 2021
@GalloDaSballo
Copy link
Collaborator

Absolutely agree with finding, would highly recommend the sponsor to implement this fix to avoid potential further confusion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Projects
None yet
Development

No branches or pull requests

3 participants