IrcBook

IrcBook
Login

What is IrcBook?

IrcBook is a prediction market on IRC operating with play money. The cash referred to in this site is not legal tender or redeemable for anything. IrcBook is a game.

This is a quick introduction. If you know how prediction markets work, you can go straight to the command set.

What's a prediction market?

Prediction markets are a type of market (like a stock market) design to help people make predictions. Instead of company shares or commodities, people buy and share coupons which pay back if the prediction is accurate.

For every claim that trades, people can place orders to buy or sell "yes" or "no" coupons, so that they can benefit whether they think it will happen or not. Claims are uncertain future events such as "Sanders will be inaugurated president of the US". If the claim turns out to be true, every "yes" coupon yields 100 cash, and every "no" coupon is worthless. Otherwise, if it turns out false, every "no" coupon yields 100 cash and every "yes" coupon yields 0.

The price of coupons is set by the orders users are willing to place. Unlike other betting mechanisms where bookies set odds, users' orders entirely determine the potential profits from coupons.

What is IRC?

IRC, or Internet Relay Chat, is a protocol for textual real-time chat. It has a long history, and it is often used by programmers, system administrators and the like.

There is no single IRC network. Anyone can set up their own. Each network has 1 or more servers to which users connect. Users may send each other private messages, or join channels and talk there. Channels are the main feature of IRC, and allow strangers with common interests to find each other and talk in a public setting about a given topic.

IrcBook uses Libera, which is an IRC network for free software development and other peer-directed projects.

How it works

IrcBook is used through an IRC bot. A bot is a program which connects to IRC and receives commands and provides services through the chat interface. On Libera, IrcBook is its nickname, and you can find it on its own channel, #ircbook.

Commands to IrcBook start with the $ prefix. They may be sent through private message or on the channels where IrcBook is both present and active. Commands may be abbreviated to the minimum unambiguous prefix, so for example, the command for coupons may be abbreviated as $cou, as there are other commands that begin with "c", such as cash, and "co", such as confirm; but none other which begins with "cou".

For a list of commands, you may use $help. For more details, $help command will produce a short description of the command and which parameters it permits or requires.

Registration

In order to use IrcBook your nick must be registered with services. If you're new to IRC or Libera, consult the help on services, and NickServ in particular.

It is best if you have a cloak, since IrcBook tracks your user by its hostmask to avoid sock puppets. You can get an automatic cloak on Libera by joining #libera-cloak and sending !cloakme

In addition, you must also register with IrcBook itself, so that it can credit you with some starting points. To register, simply send:

$register

You may send it as a private message, or on one of IrcBook's active channels. As a registered user, you get 1000000 starting credits. You must wait for an owner of IrcBook to manually verify you. The purpose of verification is avoiding so-called sock puppet accounts and market manipulation.

Getting information about claims

Before you trade, you need to know which markets are available, and what the meaning of the claims is. You can get information on open claims by sending:

$claims

To find out information about a specific claim, use:

$claims symbol

For example, "$claims panamaleaks2" produces:

panamaleaks2: (2016-04-05--2016-06-01) - second ministerial level politician resigns due to panama leaks. includes eu commissioners.

The claim is at the start, followed by a colon. After that, you get the date the claim opened for trade, followed by the date the claim expires. Claims may expire before their due date if they can be judged earlier. Finally, following the hyphen, the claim content is described. This is what has to happen for the "yes" coupons to pay, or what must not happen for the "no" coupons to pay.

Now you know what a claim is about, if you're interested in trading in it you must know what prices the market is offering. You can get ticker information on the claim with $ticker:

$ticker trump

Claim: trump. Highest bid: 7, lowest ask: 10, last price: 7, volume: 2100, average: 12.95, weighted: 13.58, coupons: 2100.

This requires a little explanation:

Some further considerations:

Buying and selling

You can buy and sell coupons for a claim. Let us say that sanders is trading at 30, and you think it is worth buying for a potential upside of 70 cash per coupon.

$buy sanders y 30 1

The syntax of buy is the same as of sell, and requires:

In the case we are describing, this order will result in you buying 1 yes coupon for 30 cash. It will set the last price to 30, increase volume by 1, and if it wasn't the only offer at that price it will change the highest bid to the next best offer.

After a while, Sanders wins a few primaries and people think it's more likely he will win, so the price is now at 45. You think people are being too optimistic about his chances, and someone is offering to buy a YES coupon for 43.

$sell sanders y 43 1

This will get rid of the coupon and get you 43 cash. You paid 30 and got 43, so you got profits of 13 cash. There are two ways to make money:

  1. Buy coupons and wait until your prediction is correct.
  2. Buy low, sell high.

Conversely you can lose money by making the wrong prediction, or selling lower than you bought.

No coupons

We've been using "yes" coupon examples because no coupons are a bit more complicated. IrcBook represents ticker prices and orders in terms of yes coupons, but as you'll see this doesn't mean you can't operate with "no" coupons.

Let's consider this ticker:

Claim: trump. Highest bid: 7, lowest ask: 10...

This means someone's buying yes coupons for 7, and someone's selling coupons for 10. It also means someone's buying no coupons for 90 (100 minus lowest ask) and selling them for 93 /100 minus highest bid).

So if you want to buy or sell no coupons:

There are two ways you can do this. Some people find it easier to think always in terms of yes coupons, and some people prefer to use both when placing orders. Let's imagine you want to buy 1 no coupon:

$buy trump n 93 1

$sell trump y 7 1

These two orders are exactly equivalent. They're represented the same way internally by the matching system.

Is this selling coupons you don't have? Yes, in a sense. You can think of it as shorting if you like. Or you can simply think of selling yes as buying no, at least after you sell all your yes coupons.

Order cost and revenue

When you don't hold any coupons, the cost of a buy order is equal to price times amount, if it is expressed in terms of the coupons it is buying. Let's deal with some examples:

$b sanders y 30 100

For a user without coupons, this order will cost, if executed fully, 3000 cash. Likewise, consider this order:

$b sanders n 30 100

For a user without coupons, the cost of this order is also 3000. However, you may remember that orders and prices are expressed in terms of "yes" coupons, so when viewing such an order it would appear as an ask order for 70 (100 minus price).

Sell orders, when executed over coupons one holds, also produce a revenue equal to price times amount.

$s sanders y 30 100

This order yields 3000 cash for a user with 100 or more yes coupons for this claim. The same situation applies to the no side.

The special cases take place when an order is executed by a user which has coupons of the opposite side. In these instances, the effects are different.

Let's say you have 10 "no" trump coupons and you place the following order:

$b trump y 31 20

When this order is matched, the following takes place:

  1. You pay price times amount for the acquired coupons (620).
  2. 10 of the acquired yes coupons cancel out with your previous no coupons, resulting in 100 cash each (1000).
  3. 10 remaining yes coupons are added to your assets.

As a result, such an order would produce 380 cash, get rid of your 10 no coupons, and get you 10 yes coupons. This may be slightly counter-intuitive (a buy order is producing rather than costing money), but it's a logical result of executing it when you have coupons of the opposite side. When you have both a yes and a no coupon for a given claim, this is worth 100, since one of them will be paid no matter what, hence whenever coupons cancel out you recover the 100 cash which were placed with the exchange to create it. For a bit more detailed worked examples you can check the article on modelling trades.

The other side of this is how selling coupons you don't have also costs you money, instead of producing it. On the section above we explain how you can place a sell order of yes coupons to effectively buy no coupons, but this is also true the other way round. Consider this order:

$s trump n 29 10

Assuming you don't have any coupons for this claim, or that you have yes coupons, if this order executes you will gain 10 yes coupons, and pay (100-29)*10 = 710 cash for them. Thus, such an order is equivalent to $b sanders y 71 10, and in fact they are represented the same way by the matching engine.

Where coupons come from

When you try to buy a yes coupon, your order will execute fully if there's a matching sell order at the same or a lower price. But where do coupons come from?

They come from other orders.

In some cases, when orders match, one player is giving cash to the other in exchange for coupons. In other cases, though, cash is held by the exchange and coupons are created:

Player 1 wants to buy 1 yes coupon for sanders at 30. Player 2 wants to buy a no coupon for sanders at 70. These two orders match, and the 100 credits withdrawn from the accounts of players 1 and 2 are the same which will later fulfil the payment of the coupon, since only one of them will be payable. This is how coupons are introduced into play, through order matching. They're not created by the admins and there's no set number of coupons that may trade for a given claim.

A case of coupon destruction is as follows:

Player 1 has a yes coupon and is willing to sell it for 55. Player 2 has a no coupon and is willing to sell it for 45. Again these 2 orders match, the yes and no coupons are destroyed, and cash is given from the exchange.

Note that this is the only way coupons are created or destroyed during trading, so they are always in pairs, and the exchange doesn't make or lose money from issuing or cancelling them. When the claim is judged true or false, the cash set aside from coupon creation is paid to the holders of the correct coupons, and all coupons are cancelled. This is also neutral for the exchange.

Information on orders, coupons, and cancellation

This is pretty simple. To see your orders, use:

$orders

Orders are presented as "a" (ask) or "b" (bid) in terms of yes coupons. But remember they can also result in acquiring or selling no coupons.

To see your coupons, use:

$coupons

You can also use $coupons hostmask or $coupons nick to see someone else's.

If you want to cancel an order, use:

$cancel order#id

All orders have a unique ID made up by the claim symbol, a hash, and a number which is the order rank. So for example you might use:

$cancel trump#13

To cancel such an order. You can also cancel orders by issuing contrary orders, but it is easier to make mistakes.

Finally,, you can use gcan to cancel orders by a glob. For example, if you want to cancel all orders for petro_22, you can do:

$gcan petro_22*

This will cancel all orders beginning with petro_22 (note if there is a claim such as petro_22_coup it would also be affected).

Possible results of order execution

When you place an order in the system, several things may occur:

Order resources

In order to fill an order, you must have enough resources. The order of resource use goes like this:

  1. Contrary orders. If you try to sell a yes coupon for sanders at 30 and you have an order that matches it, (buy y 30), the system will interpret it as a cancellation.

  2. Coupons. If you buy a yes coupon, and you have a no coupon, they will cancel out. Your position in a given claim only allows you to have either yes or no coupons, or zero.

  3. Credits. Finally, in order to place an order, the amount times price will be withdrawn from your balance. (Remember prices for no coupons are flipped.)

IrcBook uses fully backed orders, so you may not place orders you lack resources to cover, even if you may get them later through execution of other orders.

Cash and locked cash

You can see your cash balance by using:

$cash

Or someone else's by adding their hostmask or nick. The result includes your total balance, and the available, or unlocked, cash in parentheses.

When you place an order, it may be executed immediately, in which case your assets will change. However, there may be no matching orders, in which case it will go to the orderbook, or queue. In these cases, IrcBook follows a series of rules to assure you cannot accrue negative assets.

The maximum size of an order you can place is given by the number of coupons you can use to fill it plus your available cash after execution over its price. For example, if you are placing buy sanders y 20 1000, and you have 100 sanders no coupons:

  1. You can place up to 100 because it's covered by your coupons. This part of the order wouldn't cost money to execute, but instead would result in money.

  2. Assuming you had no unlocked cash at the moment, executing on the 100 coupons would result in 100 * 80 (100 - 20). That makes 8000. 8000 over 20 is 400, so without cash you could place this order only up to 500 (100 + 400) coupons. The rest would not be allowed.

  3. If you had 200 available cash, you could add 200 over 20 which is 10. In that case you could place up to 510 coupons on the book.

When a claim is adjudicated, all orders are removed from the queue and all coupons are executed, yielding 100 or 0 credits, depending on the result. This releases all locked assets related to that claim.