Betting - Equal/NotEqual vs Less/NotLess

Betting currently only support Equal / NotEqual bets. This is suitable for some use cases, e.g.

  • Oracle broadcasts value 0 if Man U wins, 1 if tie, 2 if Chelsea wins. Three separate games can be played on this feed.
  • Oracle broadcasts winner of 2018 Stanley Cup; 0 if Penguins, 1 if Predators, 30 if Golden Knights. This gives 31 different markets from just one feed.

In other cases, however, a Less / NotLess bet type would be the only practical choice. This is the case when there’s not a limited discrete set of possible values.

A random number oracle would ideally broadcast a decimal value between 0 and 1. With Less/NotLess betting any probability could be played on. Play on coin flip; value<0.50000000. Play on dice roll 6; value<0.16666667. Play on a 1/1000 chance lottery; value<0.00100000.

Other examples are bet on a stock price above a certain level (oracle broadcasts the price), election result in percentage, and world record time.


I consider upgrading the Instant Lottery CIP Draft to introducing Less/NotLess bets. The randomness oracle will serve as a fundamental building block for all sorts of contracts when a VM is launched.

Having the oracle broadcast a decimal 0-1 will thus be much more useful than the current proposal of value 2 (prob 1/2), value 4 (prob (1/4), etc. This was just a workaround to enable betting with Equal/NotEqual.

I believe adding bet types Less and NotLess won’t require much work, nor add much complexity. The bet transaction already specifies bet types 2=Equal, 3=NotEqual. Types 0 and 1 were used CFDs but are now disabled.

Do you remember why CFDs were disabled? Would it make more sense to bring back Bullish/Bearish CFD options?

CFDs had some serious issues with how payouts were calculated. I think they never found a perfect solution, prioritized other things, thus disabled it.

Equal/NotEqual is much simpler. Less/NotLess will be too.