Say there’s a game Man Utd - Liverpool this Saturday, starting at 4pm.
Counterparty is an excellent platform for betting on this game PRIOR to the game. However, DURING the game CP won’t be practical. It’s too slow.
Like if Alice has an unmatched bet on Liverpool winning, then United scores, Bob can place a matching bet at very good odds. Alice cannot prevent this (the best she can do is also place a matching bet - if’s she’s lucky she’ll get before Bob in a block - this is not a solution). However if Liverpool seems to win, that bet will not be matched, so it’s meaningless to play during the game.
How to disable betting during the game?
- The GUI should disable placing bets on this game some time before the game, like 1-2 hours before.
- Unmatched bets should expire right before the game begins. The client should automatically estimate number of blocks until the game starts.
- If still any unmatched bets when the game starts, the oracle should cancel them by broadcasting value -3.
This is the best solution I can come up with. If you know a better way, please comment.
Estimating the number of blocks until the game begins is a very unreliable method. You don’t know when a bet tx will be included in a block and there’s also variability in block times. To limit the likelihood of a bet staying open during a game, you should err on the early side, i.e. expect it to expire some time before the game starts. However, you also want unmatched bets to stay open as long as possible to make the bet market more liquid (similar to DEX order book) .
Using a -3 feed broadcast to disable bets is only needed when some bets still are open, which will happen occasionally (and mathematically you can estimate how often this shall occur). For you, the operator, this is a tradeoff and you are free to tweak the parameters. It’s just essential that you do cancel unmatched bets when needed, so your clients won’t lose unnecessary.
Note that even if your client won’t allow new bets during the game, it’s possible on a protocol level to place bets unless the oracle has disabled it. If someone using your client has an unmatched bet still, he’ll be an easy victim if the game goes against him.
P.S. Setting the deadline at 4pm when the game starts won’t work. Bet timestamps are not linked to real time, nor the block timestamp. Games can still be played until the oracle publishes a feed with a higher timestamp.