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

OptionsContract.isSafe(uint256,uint256) (OptionsContract.sol#847-885) performs a multiplication on the result of a division #153

Open
ghost opened this issue Aug 11, 2020 · 0 comments
Labels
crytic Create by crytic security report

Comments

@ghost
Copy link

ghost commented Aug 11, 2020

OptionsContract.isSafe(uint256,uint256) performs a multiplication on the result of a division:
-rightSideVal = (collateralAmt.mul(collateralToEthPrice)).div(strikeToEthPrice)
-stillSafe = leftSideVal <= rightSideVal.mul(10 ** exp)

Consider ordering multiplication prior division.

@antoncoding antoncoding added the crytic Create by crytic security report label Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crytic Create by crytic security report
Projects
None yet
Development

No branches or pull requests

1 participant