You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our CFMM solvers (even the simplified ones) have extremely large terms (^8) in them that cause int overflows for relatively small pools. It likely isn't possible to simplify the solvers much further in a way that would bound the largest term, so we will have to find another way to deal with extremely large intermediate terms.
Suggested Design
Some options might be:
Find a way to shift around terms such that the largest one is always bounded
Add a switch that, for very large inputs, removes extremely small terms to simplify logic and minimize large exponents
Acceptance Criteria
A stableswap pool with $100M in each asset should not overflow
The text was updated successfully, but these errors were encountered:
AlpinYukseloglu
changed the title
[stableswap]: Bound int overflows in intermediate CFMM calculations
[stableswap]: Prevent int overflows in intermediate CFMM calculations
Sep 12, 2022
Background
Our CFMM solvers (even the simplified ones) have extremely large terms (^8) in them that cause int overflows for relatively small pools. It likely isn't possible to simplify the solvers much further in a way that would bound the largest term, so we will have to find another way to deal with extremely large intermediate terms.
Suggested Design
Some options might be:
Acceptance Criteria
The text was updated successfully, but these errors were encountered: