Skip to content

Commit

Permalink
Require outcome count to be 2
Browse files Browse the repository at this point in the history
  • Loading branch information
cag committed Aug 23, 2017
1 parent b2627db commit 1c033c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contracts/Markets/StandardMarketWithPriceLogger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ contract StandardMarketWithPriceLogger is StandardMarket {
public
StandardMarket(_creator, _eventContract, _marketMaker, _fee)
{
require(eventContract.getOutcomeCount() == 2);

if (_startDate == 0)
startDate = now;
else {
Expand All @@ -42,7 +44,7 @@ contract StandardMarketWithPriceLogger is StandardMarket {

lastTradeDate = startDate;
// initialize lastTradePrice to assuming uniform probabilities of outcomes
lastTradePrice = ONE / eventContract.getOutcomeCount();
lastTradePrice = ONE / 2;
}

/// @dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator
Expand Down

0 comments on commit 1c033c5

Please sign in to comment.