Skip to content

Commit 4fc9629

Browse files
committed
add PR comments - Dessy
1 parent d53ce3f commit 4fc9629

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contracts/reserves/fprConversionRate/ConversionRateEnhancedSteps.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import "./ConversionRates.sol";
1212

1313
contract 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);

0 commit comments

Comments
 (0)