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

[OZ] L-02 Collision between constants #145

Closed
binpmxstn opened this issue Sep 3, 2022 · 0 comments · Fixed by #161
Closed

[OZ] L-02 Collision between constants #145

binpmxstn opened this issue Sep 3, 2022 · 0 comments · Fixed by #161
Assignees
Labels

Comments

@binpmxstn
Copy link
Contributor

Please note that OpenZeppelin reported this issue.

The NS_POOL_MAX_STAKE and NS_POOL_REWARD_TOKEN constants are defined to be the same string, which introduces the possibility of unexpected storage collisions. In the current code base they are used with non-overlapping data types, which are saved in different mappings. Nevertheless, in the interest of predictability, consider redefining the NS_POOL_MAX_STAKE constant to a unique string.

@binpmxstn binpmxstn self-assigned this Sep 3, 2022
@binpmxstn binpmxstn added bug Something isn't working confirmed labels Sep 6, 2022
binpmxstn pushed a commit that referenced this issue Sep 6, 2022
- Refactored the value of the constant `NS_POOL_MAX_STAKE`
- Refactored the `key.js file`
binpmxstn added a commit that referenced this issue Sep 6, 2022
…e-lib-storage-collision

Fixes Issue #145 - Collision between constants
@binpmxstn binpmxstn linked a pull request Sep 6, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant