aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol')
-rw-r--r--test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol b/test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol
index 1529129d..344dd8d2 100644
--- a/test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol
+++ b/test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol
@@ -95,7 +95,7 @@ contract LMSRMarketMaker is MarketMaker {
// The price function is exp(quantities[i]/b) / sum(exp(q/b) for q in quantities)
// To avoid overflow, calculate with
// exp(quantities[i]/b - offset) / sum(exp(q/b - offset) for q in quantities)
- var (sum, , outcomeExpTerm) = sumExpOffset(logN, netOutcomeTokensSold, funding, outcomeTokenIndex);
+ (uint256 sum, , uint256 outcomeExpTerm) = sumExpOffset(logN, netOutcomeTokensSold, funding, outcomeTokenIndex);
return outcomeExpTerm / (sum / ONE);
}
@@ -116,7 +116,7 @@ contract LMSRMarketMaker is MarketMaker {
// The cost function is C = b * log(sum(exp(q/b) for q in quantities)).
// To avoid overflow, we need to calc with an exponent offset:
// C = b * (offset + log(sum(exp(q/b - offset) for q in quantities)))
- var (sum, offset, ) = sumExpOffset(logN, netOutcomeTokensSold, funding, 0);
+ (uint256 sum, int256 offset, ) = sumExpOffset(logN, netOutcomeTokensSold, funding, 0);
costLevel = Math.ln(sum);
costLevel = costLevel.add(offset);
costLevel = (costLevel.mul(int(ONE)) / logN).mul(int(funding));