Contract Split
For the WikiMarket plugin, we plan to use IEM-style baskets (IEM calls them "bundles"). In our case, each basket is made up of one contract for each version of a Wiki page. The highest-priced contract is the page that is the "default viewable" page.
We'll have an additional work-in-progress (WIP) contract which represents all future page versions. WIP is there so that the market has a way of saying "none of the above". There is precedent for this in the way many IEM contracts work -- see, for example, the DCROF contract in http://www.biz.uiowa.edu/iem/closed/pr_dconv00.html.
Problem
When a new version of a Wiki page gets created, we need to be able to create a new contract to represent it. But because the total value of the basket needs to remain constant, one or more of the existing contracts in the basket need to split. Depending on how this is done, traders may or may not suffer adverse effects. For instance, we could split the WIP contract. But splitting the WIP contract will cause traders to prefer to hold the WIP contract, so they can take advantage of the inevitable split each time a new page version is created. This will likely overinflate the WIP price at the expense of all other contracts. Likewise, splitting the highest priced contract will inflate that contract price in the same way.
IEM buffers some of the adverse effects of splits by using the procedure shown in "CONTRACT SPIN-OFFS" at the above URL. The IEM method essentially means announcing 2 days ahead of time that there's going to be a split. We don't want to do this for Wiki pages though, because forcing a publishing delay for new versions would slow down the rate of development -- imagine the negative impact if a similar delay were to be built into a source code control system, instance.
If we were to close the market upon creation of each new contract in an existing basket, then we wouldn't need to split anything. We simply create a new basket, and let people enter new orders equal to what they think the new valuation of each contract should be. But if we close the market at each new version, then all traders would then need to enter new orders to resume activity. Experience with our beta market (http://t7a.org/) tells us that getting people to enter orders at all is a big hurdle. If they have to re-enter the same orders over and over again for the same contracts, participation will be low.
Solution A
Allocate fractional quantities of new contracts to all traders in proportion to how many fractional baskets they each held before the split.
When a new contract Bn is created in basket B, we add a quantity of Bn to each trader's portfolio. We do not change the quantity of any existing contracts in any trader's portfolio. We determine the quantity Q of new contracts each trader receives by using these formulas:
P == total quantity of B contracts in the trader's portfolio before the split
C == number of contracts in B before the split
Q = P/C
For example, let's say there is a basket named ContractSplit, representing all versions of a Wiki page by the same name. In that basket are four contracts, named v1, v2, v3, and WIP. Each of these contracts represents a single version of the ContractSplit page, in addition to WIP.
Before the split, traders Alice and Bob have these quantities of each contract in their portfolios:
| Trader | v1 | v2 | v3 | WIP |
| Alice | 3 | 1 | 0 | 3 |
| Bob | 1 | 3 | 4 | 1 |
Now Alice edits the ContractSplit page, creating a new version. We create a contract for that new version, named v4. We apply the above formula to both Alice and Bob, creating this:
| Trader | v1 | v2 | v3 | v4 | WIP |
| Alice | 3 | 1 | 0 | 1.75 | 3 |
| Bob | 1 | 3 | 4 | 2.25 | 1 |
Note that:
- The number of baskets in circulation (4) has not changed.
- This method is completely blind to market prices, parentage of the text of v4, and many other manipulable influences.
Solution A Manipulation
Solution A might be manipulated like so: Let's say that v3 is a worthless contract, trading at around $0.05. Bob owns 4, Alice owns 0. And let's say that v2 is a high-priced contract, trading at $0.70. Alice wants to fix a typo in v2, creating v4, and wants a large proportion of the v4 contracts for her trouble. She buys all four of Bob's v3 contracts for a total of $0.20, giving her a larger number of fractional baskets. Then she creates v4. After the split, everyone's portfolios look like this:
| Trader | v1 | v2 | v3 | v4 | WIP |
| Alice | 3 | 1 | 4 | 2.75 | |3 |
| Bob | 1 | 3 | 0 | 1.25 | 1 |
If Alice did not first buy the v3 contracts from Bob, she would only have 1.75 v4 contracts after the split. She has in effect bought 1 additional v4 contract for $0.20. Assuming v4 is really a better version of v2, and as a result trades above $0.70, Alice has made a paper profit of at least (0.7*2.75)-0.20 = $1.73 for fixing a typo. If she had not first bought the v3 contracts, her profit instead would have only been (0.7*1.75) = $1.23, so she's made an extra $0.50 via her manipulation.
Bob could have prevented this manipulation by refusing to sell the v3 contracts for less than $0.14. This property of Solution A will tend to inflate the value of "junk" contracts; the minimum value of a contract will always be M/(N+1), where M is the value of the highest-priced contract, and N is the number of contracts in the basket before the split. The fact that we can calculate this tells me (Steve) that we should be able to simply factor that into the Solution A formula, and remove this source of manipulation. But to do that we'd have to not be blind to prices...
Solution B
Same as Solution A above, but use market prices to weight each contract in the basket; i.e. allocate the new shares by total portfolio value rather than total portfolio quantity. So Solution B can be stated as:
Allocate fractional quantities of new contracts to all traders in proportion to the market value of their portfolios before the split.
When a new contract Bn is created in basket B, we add a quantity of Bn to each trader's portfolio. We do not change the quantity of any existing contracts in any trader's portfolio. We need to normalize the last trade prices for each contract in the basket because they will rarely add up to 1. We determine the quantity Q of new Bn contracts each trader receives by using these formulas:
Lv == last trade price for contract V
T = L1 + L2 + L3 + ... == total of the last trade price of all contracts in B
Av = Lv/T == adjusted (normalized) price of V
Pv == quantity of contract V in trader's portfolio
Wv = Av * Pv == weighted quantity of contract V in trader's portfolio
Q = W1 + W2 + W3 + ... == quantity of new Bn contracts to place in trader's portfolio
For example, let's say there is a basket named ContractSplit, representing all versions of a Wiki page by the same name. In that basket are four contracts, named v1, v2, v3, and WIP. Each of these contracts represents a single version of the ContractSplit page, in addition to WIP. These contracts last traded at $0.15, $0.70, $0.05, and $0.09, respectively.
Before the split, traders Alice and Bob have these quantities of each contract in their portfolios:
| Trader | v1 | v2 | v3 | WIP |
| Alice | 3 | 1 | 0 | 3 |
| Bob | 1 | 3 | 4 | 1 |
Now Alice edits the ContractSplit page, creating a new version. We create a contract for that new version, named v4. We apply the above formulas:
T = 0.15 + 0.70 + 0.05 + 0.09 = 0.99
A1 = 0.15/0.99 = 0.152
A2 = 0.70/0.99 = 0.717
A3 = 0.05/0.99 = 0.051
Awip = 0.09/0.99 = 0.091
Qalice = (0.152*3) + (0.717*1) + (0.051*0) + (0.091*3) = 1.43
Qbob = (0.152*1) + (0.717*3) + (0.091*4) + (0.091*1) = 2.57
After the split, the portfolios now look like:
| Trader | v1 | v2 | v3 | v4 | WIP |
| Alice | 3 | 1 | 0 | 1.43 | 3 |
| Bob | 1 | 3 | 4 | 2.57 | 1 |
Note that:
- The number of baskets in circulation (4) has not changed.
- This method is completely blind to parentage of the text of v4 and many other manipulable influences.
Solution B Manipulation
Let's try Alice's Solution A attack against solution B: Let's say that v3 is a worthless contract, trading at around $0.05. Bob owns 4, Alice owns 0. And let's say that v2 is a high-priced contract, trading at $0.70. Alice wants to fix a typo in v2, creating v4, and wants a large proportion of the v4 contracts for her trouble. She buys all four of Bob's v3 contracts for a total of $0.20, giving her a larger number of fractional baskets. Then she creates v4. After the split, everyone's portfolios look like this:
| Trader | v1 | v2 | v3 | v4 | WIP |
| Alice | 3 | 1 | 4 | 1.64 | 3 |
| Bob | 1 | 3 | 0 | 2.36 | 1 |
If Alice did not first buy the v3 contracts from Bob, she would only have 1.43 v4 contracts after the split. She has in effect bought an additional 0.21 v4 contracts for $0.20. Assuming v4 is really a better version of v2, and as a result trades above $0.70, Alice has made a paper profit of at least (0.7*1.64)-0.20 = $0.95 for fixing a typo. If she had not first bought the v3 contracts, her profit instead would have been (0.7*1.43) = $1.00, so she's lost $0.05 by attempting to manipulate the market.
Bob could not have made Alice's manipulation profitable even if he had sold her the v3 contracts for less, because doing so lowers the "last trade" price for v3, which in turn lowers Alice's total portfolio value proportionally.
Solution B (currently) has no known vulnerabilities.
