File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
contracts/reserves/fprConversionRate Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import "./ConversionRates.sol";
1212
1313contract ConversionRateEnhancedSteps is ConversionRates {
1414
15- uint constant internal MAX_RATE = (PRECISION * 10 ** 7 ); // up to 10M tokens per ETH
15+ uint constant internal MAX_RATE = (PRECISION * 10 ** 7 ); // up to 10M tokens per ETH
1616 uint constant internal MAX_STEPS_IN_FUNCTION = 16 ;
1717 int constant internal MAX_IMBALANCE = 2 ** 255 - 1 ;
1818 uint constant internal POW_2_128 = 2 ** 128 ;
@@ -276,6 +276,7 @@ contract ConversionRateEnhancedSteps is ConversionRates {
276276 change += (stepXValue - fromVal) * stepYValue;
277277 fromVal = stepXValue;
278278 }
279+ // max change < MAX_QTY * BPS * 16 = (10 ** 28) * 10000 * 16 = 1.6e33
279280 }
280281
281282 return change / (to - from);
You can’t perform that action at this time.
0 commit comments