I think maybe I can understand it better with examples.
Oil is at 10 btc, I want an oilCoin and you want and anti-oilCoin.
What's next? How much each of us put in escrow?
Oil rises to 11 btc. Does anything happen to the escrow? Do I get 1 btc or something?
Although you gave the direction, here we still have to resolve the problem (define the solution in a more concrete manner) of how the system knows the spot price of oil.
You said somewhere that the spot price of oil is not the same as the price of an oilCoin. Then how are oilcoins related to oil in any meaningful way?
In your example, you and I would both buy the tokens we want on the open market (run within the network). There is no way for us to know where the tokens came from - we may have bought them from other users, or one of us may be buying tokens which were generated from thin air by the protocol in order to keep the tokens balanced and the escrow fund solvent.
Ok, we don't know who I buy the tokens from. I just wanted a detailed example of the tokens creation.
The number of oilcoins will always be equal to the number of anti-oilcoins, right?
When oil rises by 10%, the protocol will buy oiltokens and/or sell antioiltokens until funds in escrow are balanced. The exact combination of buying and selling would be determined by what keeps the escrow fund the healthiest.
Isn't the system losing money on the process? If oil rises 10%, then drops 10%, then rises again...
The system is buying high and selling low.
You and I can't realize profits/losses until we sell our tokens, at which point we may be selling to other users and/or the escrow fund.
The price we buy and sell at is determined by us and the market. We have an incentive to trade close to the external spot price of oil, because the protocol charges an increasing fee the further we trade from the external spot price. The external spot price is imported into the block chain by miners, and their blocks are accepted or rejected by the rest of the network in exactly the same way that the distributed timestamps work.
And what's the spot price of an anti-oilcoin?