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

Lack of precision vuln updated to precision loss. #86

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

0xSandyy
Copy link
Contributor

Related Issue

Checklist

Describe the changes you've made:

I added precision loss due to solidity decimal truncation vulnerability including various ways this can occur.

Type of change

Select the appropriate checkbox:

  • Bug fix (fixing an issue with existing vulnerability data)
  • New feature (adding a new vulnerability or category)
  • Documentation update (improving existing information)

Additional Information

I thought the title needed some change so I changed it to Precision Loss . You suggested Integer Rounding and Integer truncation which are good for root cause but precision loss and rounding errors represent the actual vulnerability. Let me know if I should revert back to the root cause titles.

```
and ``funcB()`` returns:
```solidity
11 * 2 / 10 = 55
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should actually return 2. I think your example is mixed up

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, Fixed in the latest commit!

@@ -0,0 +1,44 @@
# Using ``msg.value`` in a Loop
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will have to merge/rebase to remove this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the latest commit!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it's still included for some reason. Just me?

Copy link
Contributor Author

@0xSandyy 0xSandyy Jun 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no changes in the latest commit for msgvalue-loop.md file but file changes shows msgvalue-loop.md file being updated.

Also, Nothing seems to work even after merging and rebasing with both msgValue and master branch. I think it is because one commit from msgValue got included here and it is causing the problem. As this PR has no conflicts with the base branch, and msgvalue-loop.md content hasn't been changed and is similar to the master branch, it can be merged without any issues.

Or we can close this PR and create a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Divide before multiply
2 participants