-
Notifications
You must be signed in to change notification settings - Fork 36
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
Rounding Error Analysis #112
Labels
enhancement
New feature or request
Comments
Closed
I don't get much time to work on this and I really don't understand code, I just need help to access the storage address's, I would like to leave the rest of the assets within the contract because I don't know how to maintain it by myself and I would like it to continue to function as it has been |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Understanding the impact of rounding error in a smart contract is a critical task for secure development.
There are two properties of interest:
For example in the case of a smart contract that holds a pool of tokens, it is a critical property that any rounding error is always in favour of the pool. If this property does not hold the pool will slowly bleed tokens as it is used.
We can allow users to specify properties relating to rounding by introducing a new operator (
exact
, ortoReal
), which would indicate that the numeric expression contained within should be expressed in various backends usingReal
's instead ofInt
's.For a manual example of a very similar procedure, see the uniswap v1 model produced by Runtime Verification.
For a little more discussion relating to some earlier syntax see: #35
The text was updated successfully, but these errors were encountered: