You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
valueInETH can be 0 when the token is not native but oracle is not set for it. Consider skipping all the expensive calculations in recordKeyPurchase to save gas when valueInETH is 0. Also, in special cases, this can invoke a division by zero runtime error when calculating maxTokens and dividing by grossNetworkProduct.
The text was updated successfully, but these errors were encountered:
Handle
pauliax
Vulnerability details
Impact
valueInETH can be 0 when the token is not native but oracle is not set for it. Consider skipping all the expensive calculations in recordKeyPurchase to save gas when valueInETH is 0. Also, in special cases, this can invoke a division by zero runtime error when calculating maxTokens and dividing by grossNetworkProduct.
The text was updated successfully, but these errors were encountered: