-
Notifications
You must be signed in to change notification settings - Fork 0
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
Distribution of tokens in recordKeyPurchase #230
Comments
It is a good point, but also almost impossible to achieve
|
I am not sure I understand this comment. What is "missing"? |
I think the warden has provided useful information, however, it is more in line with a
|
Handle
pauliax
Vulnerability details
Impact
function recordKeyPurchas does not distribute the tokens on chainId > 1 when the balance is not sufficient:
I see at least 2 problems here. First, the check should be inclusive >=, because now when balance = tokensToDistribute, it will still skip the distribution.
Another problem, I think it is not fair when only a small fraction is missing, you should consider distributing the whole balance in this case.
Recommended Mitigation Steps
Here is my prosposed solution:
The text was updated successfully, but these errors were encountered: