vol-coin/stable-coin applied to truthcoin

Previous topic - Next topic


The idea of vol-coin/stable-coin was recently re-invented by someone else in the crypto community, but I first read the idea in Paul's docs. The idea is that the blockchain should have at least 2 types of coins, and all the volatility is pushed into one of the two types. That way the users who dislike volatility can use the coins without having volatility.

Paul's way of solving the problem goes like this. Say you want to make an cryptographic asset that stays equal in value to a marmot. The current exchange rate is 100 truthcoin to buy a marmot.
I would make a bet at every price between 50 truthcoin per marmot to 200 truthcoin per marmot.
The bets are made so that if the price of truthcoin should change relative to marmots, I will still be able to afford the same number of marmots as I started with.

What is beautiful about truthcoin is that anyone can make stablecoins which maintain value with respect to anything. A ton of rice, a pound of gold, whatever. Each prediction market can only accept one type of money, and it pays out in the same type that you make bets in. If you bet in USD-linked coins, then the payout will be in USD-linked coins.


I emailed Vitalik about this idea, and he pointed out some major limitations in the truthcoin version of vol-coin/stable-coin.

"The whole point of volcoin/stablecoin architectures is that they're not _just_ CFDs - they're implicit CFDs packaged up into a form that makes them easily fungible and easy to transfer as currency units. CFDs don't really have that property since each CFD has both a value and a leverage."

stable-coins in truthcoin are not as fungible as cashcoins because you cannot use them to make a bet in a different market.
Stable-coins in truthcoin are actually a collection of many tiny bets. So you actually own hundreds of types of shares which, as a group, maintain value with USD.

I think that a small adjustment to truthcoin can fix this problem.
The creator of a prediction market currently has to choose between letting the market be priced in cashcoins, or any one type of share.
Instead, he should be able to choose any fixed ratio of cashcoins and shares.

For example, a market could require you to spend 1/4th in share type A, and 3/4ths in cashcoins.
So if you were spending 200 in this market, you would actually have to spend 50 of share type A, and 150 of cashcoins.
Such a market would pay out winnings as 1/4th of share type A, and 3/4ths in cashcoins.


There is an alternative way that truthcoin could gain the ability of vol-coin/stable-coin. Contracts for difference.
Say you wanted to create an asset that stays constant value against bitcoin.

We start by creating a prediction of the bitcoin/cashcoin price at a time in the future.
Next we create something analogues to the prediction market, which is called a contract for difference CFD.
The CFD uses an order book to let pairs of people spend cashcoin to buy stable-coin or vol-coin.
When the prediction expires, then the CFD will let people spend sell their stable-coins and vol-coins for cashcoins.

The stable-coins will be worth the same amount in bitcoin as when they were purchased. The vol-coins experience extra volatility in the same direction as cash-coins.

It depends on Sztorc Consensus, the same as the prediction market.


CFD does not require an order book. The creator of the PM should have an additional input. He should give an algebraic formula, using predictions for the variables. The algebraic formula shows how much each of the types of shares will be worth once all the predictions mature.

This means I will have to add a non-turing complete scripting language, like bitcoin has.
A valid script:
is a function and a rule for dividing output states into 2 piles.
uses unexpired predictions as input variables.
has one output which is in the range 0,1
Is built of these computational functions: +- * / log expt (lambda x: 1-x)
Also, hard-coding constants in the scripts should be allowed.

A prediction market with N outputs needs between log2(N) and N-1 scripts.
Each script divides the total money in 2 piles, and divides the output states into 2 piles.


Example, if we wanted to correlate the likelyhood obama's election with the price of pinto beans:

predictions: {'type':binary', 'txt':'obama wins the 2012 election', 'title':'obama'}, {'txt':'cost of pinto beans is >=80 cents in 2014', 'title':'pinto', 'type':'binary'}
prediction market: {'predictions':['obama', 'pinto'], 'functions':['swap drop', 'drop'], 'output states':['a', 'b', 'c', 'd'], 'algorithm':'(1, [a, b], (2, [a]), (2, [c]))'}

Example, if we wanted to make a stable-coin against the USD.

predictions: {'txt':'price of BTC in USD, within the range $100-$900', 'type':'scalar', 'title':'btc/usd'}
prediction market: {'predictions':['btc/usd'], 'functions':['800 * 100 + 1 swap /'], 'output states':['stable-coin', 'vol-coin'], 'algorithm':'(1, stable-coin)'}

Or maybe the function should look like this instead: '(/ 1 (+100 (* btc/usd 800)))'
No reason to prefer forth format over scheme format.


I programmed the examples, including an interpreter for a forth-like language.

EDIT*** I fixed that link which had been broken ^