From f9aca492cf493560d483d4e320ff2f0b77423db8 Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Thu, 3 Nov 2022 16:24:57 -0500 Subject: [PATCH 1/2] fix typo in divide before multiply fixes https://github.com/trailofbits/slither-private/issues/208 --- slither/detectors/statements/divide_before_multiply.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slither/detectors/statements/divide_before_multiply.py b/slither/detectors/statements/divide_before_multiply.py index 7691c3a17..3baea5ece 100644 --- a/slither/detectors/statements/divide_before_multiply.py +++ b/slither/detectors/statements/divide_before_multiply.py @@ -152,7 +152,7 @@ class DivideBeforeMultiply(AbstractDetector): WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#divide-before-multiply" WIKI_TITLE = "Divide before multiply" - WIKI_DESCRIPTION = """Solidity integer division might truncate. As a result, performing multiplication before division can sometimes avoid loss of precision.""" + WIKI_DESCRIPTION = """Solidity integer division might truncate. Thus, performing multiplication before divison might lead to loss of precision.""" # region wiki_exploit_scenario WIKI_EXPLOIT_SCENARIO = """ From 827ee1566378698ef0d8207b26fdd3af2c659088 Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Thu, 3 Nov 2022 16:33:43 -0500 Subject: [PATCH 2/2] correction --- slither/detectors/statements/divide_before_multiply.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slither/detectors/statements/divide_before_multiply.py b/slither/detectors/statements/divide_before_multiply.py index 3baea5ece..47d3ed3c6 100644 --- a/slither/detectors/statements/divide_before_multiply.py +++ b/slither/detectors/statements/divide_before_multiply.py @@ -152,7 +152,7 @@ class DivideBeforeMultiply(AbstractDetector): WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#divide-before-multiply" WIKI_TITLE = "Divide before multiply" - WIKI_DESCRIPTION = """Solidity integer division might truncate. Thus, performing multiplication before divison might lead to loss of precision.""" + WIKI_DESCRIPTION = """Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.""" # region wiki_exploit_scenario WIKI_EXPLOIT_SCENARIO = """