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

Cast to uint192 is unsafe #271

Closed
CloudEllie opened this issue Apr 28, 2022 · 1 comment
Closed

Cast to uint192 is unsafe #271

CloudEllie opened this issue Apr 28, 2022 · 1 comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working duplicate This issue or pull request already exists

Comments

@CloudEllie
Copy link
Contributor

Judge @GalloDaSballo has assessed the 3rd item in QA Report #197 as Medium risk. The relevant finding follows:

Cast to uint192 is unsafe, user trying to deposit more than 2^192 would recevie less deposits balance.

https://github.com/code-423n4/2022-02-concur/blob/72b5216bfeaa7c52983060ebfc56e72e0aa8e3b0/contracts/ConvexStakingWrapper.sol#L235

deposits[_pid][msg.sender].amount += uint192(_amount);
@CloudEllie CloudEllie added bug Something isn't working duplicate This issue or pull request already exists 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Apr 28, 2022
@CloudEllie
Copy link
Contributor Author

Duplicate of #194

@CloudEllie CloudEllie marked this as a duplicate of #194 Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

1 participant