Basically, a "mint" would create a coloured coin by sending you a coin from a particular address. Initial marking of colour requires the mint to formally give info on which tx outputs are coloured as "roots".
The software tracks the coins as they go through the network. They have rules for how to colour coins before and after a transaction.
For example, you might have
Inputs
0: 5 satoshi (mint1 colour)
1: 15 satoshi (mint1 colour)
2: 50 satoshi (mint2 colour)
3: 0.01 BTC (uncoloured - this is for the tx fee)
Outputs
0: 10 satoshi
2: 10 satoshi
1: 50 satoshi
If this is included in the block chain, the colour tracker will then mark the outputs as coloured to give
Output
0: 10 satoshi (mint1 colour)
1: 10 satoshi (mint1 colour)
2: 50 satoshi (mint2 colour)
If you want your coloured coin value to be preserved you need to make sure you have the right amounts for the coloured coins.
In this case, the first 2 inputs are the same colour and add up to 20. Similar the first two outputs add to 20. Your software would remember that those outputs are also coloured.
Likewise the 50 satoshi of mint2's colour are matched values.
These guys have defined a spec for this.
But how do we trade a basket of chicken eggs at the farmers market against a barrel of gasoline with colored coins / tokens ? Is it doable?
The mints act convert coloured coins to/from their backing. A mint might send you 100 satoshi coloured by them in exchange for $1. Likewise, they would do the reverse transaction. There would be a fee in both directions.
This also works with other things like barrels of oil. The farmer would sell the eggs for BTC and then buy the oil.
All kinds of problems here, specifically AML KYC. The mint can't control who receives the coins, and will have coins presented that may have been issued against a reverse deposit etc.
Forget the colored coin, you're shoehorning something into the block chain that doesn't need to be there. The blockchain is slow 1 hour def-confirms. NO NO NO.
I open account at gox with $1000. You open account at bitinstant with 10 BTC. In this brave new future the gox and instant are both running our open source server version. we as clients are running the client version (which might include a background miner),
Gox inputs the $1000 deposit into his system and credits my account. i query my account balance by loading the trading client and inputting my user/pass, results supplied by gox. When i want to buy coins i submit an order to Gox to buy 10 coins at $100. Gox sees the $1000 in my account, and then tx a signed message to the miner/exchange network that GOX wants to buy 10 coins @ $100 to be matched in block 2500 only (fill or kill). There will be no HFT, cause miners will not let you cancel the contract. Miners/exchanges are paid a fee, denominated in BTC (more on that later).
You see an order from gox to buy, and you decide to hurry up and submit your sell order before the next hash is found and the order book resets (who knows if i come back with a buy order next block or if some one else don't sell me the coins ahead of you, so you want to jump in now with a sell order).
Now Bitinstant sends a signed message to sell 10 btc for $100 to all the miners. The miners have copies of the Distributed Exchange Web of Trust Table. Miners see that Bitinstant has endorsed MT Gox's Pubkey, and vice-versa. They now know that they can match the orders. They also keep track of the net flow of funds between these two companies, bc in Distributed WoT Table Bitinstant puts a limit of $10,000 as the max amount of money that Gox can wind up owing them before Gox has to "settle up." This limit will stop miners from continuing to approve tx's after an exchange has failed, or been found to be fraudulent. A hash of this table is included in the headers of each trade block.
The miner/exchange match the orders and keep hashing till he finds a POW solution, then publish the blocks to the other miners. The other miners make note that Gox now owes Bininstant $1000 ($9000 credit left) and Bitinstant now owes 10 btc to gox.
When gox sends fiat by international wire for $1000, gox will broadcast a signed message to the miner network indicating such, upon acknowledgement of the money arriving, Bitinstant will sign the tx and notify miners of the exchange. Miners will include this in the next trade block as an "off-exchange block-trade" ( or "third market") trade between the two, and will receive a small fee for its inclusion. Upon inclusion miners will then up Gox's credit limit with Bitinstant back to $10,000
If for any reason a broker decides he can't trust another counterparty (fraud financial failure, etc) he can sign a message to miners revoking said Exchange Web of Trust Table key endorsement (includes fee, goes into exchange block chain).
Miners, will be paid a tx fee, owed to them by each exchange who submits a tx that gets executed denominated in btc. Our exchange software can charge a flat fee to include tx's. And we can write this into the protocol. A fee like 0.25% is nice and low enough to encourage people to use our exchange, but high enough to ensure enough fee revenue to keep the PoW hash strong. So in this case the miner who scores the block with our 10btc/$1000 trade will publish his exchange account number as the coinbase address (say miner happens to be with Bitinstant), and Bitinstant will credit 0.05 to the miners exchange account (2 x 0.25% x 10 btc). Gox will owe $1000 for the buy, and Bitinstand will owe gox 9.9725 BTC (10 BTC - 0.025 BTC). (Basically Bitinstant being the miner's preferred broker, lays out 0.25% fee charged to both sides of the trade). Your account at Bitinstant is now credited for $997.50, and my account at Gox is credited for 9.975 BTC.
Payment network addresses: like the one the miner included in the solved block to redeem the block fees (coinbase) will be based on the broker code (First 5 digits of hash of broker pubkey) followed by the internal account number assigned to the miner by Bitinstant. That address according to Bitinstant's records now has 0.05 BTC.
Did i miss anything?
Oh yeah, do you see what i did there with the miner being able to request an account number from Bitinstant and then include it in the solved block as the coinbase?
I now have like 9.975 BTC in my account at Gox. I got to Dave Famous Wiener's. Before Dave will let me put his Wiener in my mouth I have to pay and he doesn't want to wait for an hour for 6 BTC confirms. He shows me a qr code on his smart phone that includes his account number at Bitinstant. Encoded in the QR if the address's first 5 digits (Bitinstants broker code), the rest is Dave's assigned account number, the 0.1 BTC i owe him for his Wiener, along with a customer code of XXX.
I scan the bar code and approve the tx by sending it to gox. Gox sees the broker code and knows to contact Bitinstant's server, and send a signed message "i owe your exchange 0.1 BTC, and you should put it in some account number's account and the customer code is XXX".
Dave's invoice of 0.1 BTC for customer XXX on his phone comes back instantly as paid (gasp, an instant off block chain payment has occurred!).
Bitinstant submits a "Gox now owes me 0.1 BTC, reduce Gox's credit balance by 0.1 BTC due to an off-chain tx" signed message to the miners/exchanges with a small fee for inclusion into the next trade-block. Or then just keep a side-book and wait to settle debts via the BTC block chain when the BTC owed gets large enough.
So not only can we buy and sell btc for currency, but we can use these account relationships with custody/brokers to do off blockchain, low fee, instant confirmation transactions as well! I SEE WHAT YOU DID THERE!
Now with a colored coin, how are earth do we do and instant payment or a fractional amount of the colored coin? Besides colored coins spam the blockchain with messages the block chain does not need to see. Only you and your custodian need to know when fiat is sent back and forth, and micropayments can be instantly done off block chain.
So we have the infrastructure for trading btc & currency and instant off-chain micro payment, which only involves the buyer's and seller's brokers, not announcing your bitdust tx to the whole world and making them each your bitdust unspent outputs.