-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add assumption about the max value of exponent
#921
Comments
exponent
exponent
Agree that we should document this as an assumption, but there should be no need for exponents that large. When you get that to double-digit ranges and above, the streaming function is so slow that it becomes effectively equivalent to a timelock (within that segment). From the docs: Warning Because x is a percentage, the streaming rate is inversely proportional to the exponent. For example, if the exponent is 0.5, the rate is quadratically faster compared to the baseline when the exponent is 1. Conversely, if exponent is 2, the rate is quadratically slower compared to baseline. |
A Codehawk auditor asked a really good question about the max value of
UD2x18
.Since its max value is capped by
type(uint64).max
, the exponent cannot represent a value bigger than18.446744073709551615
. Thus, we should add this in the Assumptions section of SECURITY.md:In Lockup dynamic, the fixed-point representation of a segment's
exponent
does not exceed18.446744073709551615
.The text was updated successfully, but these errors were encountered: