I've been thinking about whether it would be possible to have alternate cryptocurrencies that are 'backed' by BTC, stored in a special address on the Bitcoin blockchain that can only be moved by transactions containing proof of work, instead of a digital signature.
Converting bitcoins into the BTC-backed altcoins would be easy. A party would just send a certain amount of bitcoin to the alternate cryptocurrency's special Bitcoin address, along with information indicating which address in the altchain they want their new altcoins deposited to. Since the alternate cryptocurrency nodes would also store the Bitcoin blockchain, they would see the deposit to the special Bitcoin address and know to credit the bitcoin depositer with the right amount of altcoins.
When someone wants to convert their BTC-backed alt-coins to bitcoins, they would create a special transaction from their alt-address to a Bitcoin address, which the altchain's miners would then use as a reference to create a 'payout' of bitcoins from the special address on the Bitcoin blockchain to the Bitcoin address the alt-coin holder indicated as the destination of the bitcoin withdrawal.
It would be miners that create these special transactions because the proof of work they use to authorize new blocks in the alternate blockchain would also be what's used to authorize the transfer of bitcoins from the special Bitcoin addresses.
The special addresses could use a P prefix, and encode all of the blockchain rules of the sidechain, and information needed to validate txs that spend its UTXO, including:
- Rules:
- Version no.
- Difficulty period
- Block time
- Security features, e.g.:
- Maximum reanimation ratio
- Maturation period, n, for reanimations
- Version Number
- Current difficulty
- Previous block hash
- Sum_time (time from start of difficulty period)
- Sum_block (number of blocks from start of difficulty period)
- Timestamp registry for previous 11 blocks
- Validation of previous n blocks
In order for a transaction with TxIn from one of these addresses to be valid, the following conditions would need to be met:
- the hash of the block header fields found in the transaction (timestamp of last block in timestamp registry, nonce, difficulty value, merkle root (which is a hash of the altchain merkle root and transaction hash)) and the POW address of the UTXO it's spending (version number, previous block hash) would need to meet the difficulty target
- the timestamp registry of the previous 11 blocks, contained in the transaction, is checked against that of the UTXO it's spending, to validate that the first ten timestamps of the new registry correspond with the last ten timestamps of the previous registry, and that the latest timestamp isn't more than 2 hours ahead of the previous timestamp
- the difficulty value is validated by checking if it matches the difficulty target calculated from the timestamp registry of the previous 11 blocks, the Sum_time value (time from start of difficulty period), the Sum_block value (number of blocks from start of difficulty period), and the difficulty target value found in the UXTO being spent.
- the Sum_time value is validated by checking if it is the sum of the previous Sum_time value and the time difference between the last and current timestamp
- the Sum_block value is validated by checking if it increments the previous Sum_block value by one
The transactions can include additional security features like a 'Validation of previous n blocks' value, that validates whether each of the previous n blocks is valid. If a block is found invalid by one of its successors transactions, then all reanimation transactions in that block are cancelled. This would prevent bitcoin at a POW address from being trivially stolen.
Having these special addresses would allow numerous smaller, decentralized blockchains to be setup with bitcoin backing their value. These could be regional currencies, or used in closed online communities. The Bitcoin blockchain could therefore be much smaller, while still providing the basis for a fungible decentralized currency used by the whole world.
Here are some diagrams visualizing the POW transaction concept:
Basic concept (click for very large version):
A close up of the blockchain - POW transaction relationship (click for large image of a POW transaction):