Started with a more concrete draft for Prediction Markets on SN. But while going through some scenarios, I realized that market makers are needed if I want to go with the contract model which allows buying and selling and not only buying.
For example, I wrote down this:

How to Prediction Market
  • k = amount of options
  • expiration_price = payout per winning contract
  • total = A_total + B_total
  • A_price = A_total / total
  • B_price = B_total / total
  • A_p = A_price / (A_price + B_price)
  • B_p = B_price / (A_price + B_price)
t = 0: [event] funding
Creator buys equal amounts of contracts from every option such that every option will cost the same. Creator will receive n contracts with n = funding * k / expiration_price. n must be equally distributed across all options.
Example k = 2, funding = 1000, expiration_price = 10 Creator receives 200 contracts (100 for option A, 100 for option B). After expiration, contracts of one option will expire at 0 while the other option expires at 10 sats. Therefore, creator receives his funding back.
ttotalA_totalA_priceA_contractsB_totalB_priceB_contracts
0100050051005005100
t = 1: [event] ekzyis buys 1 contract of B @ 5
ttotalA_totalA_priceA_contractsB_totalB_priceB_contracts
110055004.9751005055.025101
error: if B wins, we need to payout 101 * 10 = 1010 but we only have 1005 ?

So my approach is too naive. Someone has to continously fund the market to make the market possible. That's where market makers come into play, I think.
While doing some research about Augur and other related stuff, I found this link. The stuff about AAM seems to be the piece that I was missing the whole time.
But since implementing prediction markets definitely seems to involve a lot (more than expected?), it probably makes the most sense to start with what @Undisciplined mentioned in the Github ticket:
Conceptually, I love the contracts model, because it allows for something like in-game wagering. However, it seems like it would be much more difficult to implement and would need a much larger user base than sn currently has in order for its benefits to really manifest. The betting model also seems much easier to understand for users.
One aspect of the betting model I've been wondering about is whether you want to reveal the current pools or not. Initially, I had the same idea as you of letting people see the current odds. However, since these odds change as more bets come in, there would be an incentive for everyone to delay placing their bets until as much information as come in as possible. If the current pools were not shown, then people would simply be betting on what they expect to happen, while maybe incorporating their own expectations about what other people are doing. This actually strikes me as a more natural way of allowing odds to naturally develop and it doesn't penalize early movers.
reply
The stuff about AAM
Correction: I meant AMM, not AAM.
reply