Monetas brings colored coins to btcd

This article is syndicated from the Monetas blog with the approval of the author, Justus Ranvier.

As a company with current and planned blockchain-synergistic products, Monetas is strongly invested in Bitcoin wallet development. After choosing btcwallet from Conformal Systems as our technical foundation for blockchain integration, Monetas is currently devoting four full-time software engineers to adding features and improvements to btcwallet.

One of those features is colored coin support. This article will explain colored coins, and how we are implementing them in btcwallet, and what capabilities these changes entail for both Monetas and Conformal.

colored-1

What are colored coins?

The term “colored coins” can mean two different things. First, it is a technique for carefully constructing Bitcoin transactions in a way that preserves information apart from the base monetary value of the underlying units. Second, the term “colored coins” is sometimes also used to refer to the extra information itself. For the sake of clarity we will differentiate the technique from the information by using the term “virtual tokens” to refer to the extra information that is preserved using the colored coins technique.

Virtual tokens possess all the capabilities of currency, plus one additional capability (smart property) which is helpful for non-currency usage.

Users of virtual tokens can:

  • Transfer them between individuals
  • Combine multiple tokens into a single token with a greater value
  • Divide the value of a single token into multiple tokens
  • Use them in blockchain-scripted contracts
  • Store them on the blockchain with multisig scripts
  • Unambiguously prove that any particular virtual token is a valid
    member of a set created by the issuer, without requiring the issuer to
    create and manage a token registry.

Along with these capabilities, virtual tokens also possess certain limitations. There are certain tasks which virtual tokens inherently cannot perform unaided:

Enforcement
Virtual tokens represent ownership information, but they can’t enforce real-world obligations. For example, a particular issuance of virtual tokens might represent tickets for entry to a concert. The virtual token can prove the bearer should be allowed to enter the concert, but it can’t force the bouncer to step aside and let him pass. Colored coin techniques can’t prevent the user from manipulating the underlying bitcoins in a way that destroys the extra information, because operations on virtual tokens are governed by Bitcoin transaction rules, and colored coin requirements are more strict but not enforced by the network. Using virtual tokens in a transaction that does not obey the colored coin rules destroys their extra meaning, leaving behind only their base monetary value. This is equivalent to taking one’s paper concert ticket and setting it on fire.
Metadata
The quantity and ownership of virtual tokens can be stored in the blockchain, but the semantic information that indicates what a token means is not (and cannot be) similarly stored. For example, the blockchain will track how many concert tickets have been issued and which address owns them, but not the fact that they represent authorised entry into a particular concert at a specific time and place. The storage of and operations on metadata require a specific kind of external system, such as Open-Transactions.
Blockchain Limitations
The speed of colored coin transactions, and the capabilities of scripted contracts that use virtual tokens are the same as those of the underlying blockchain. However, in combination with a system such as Monetas, virtual tokens gain Monetas’ speed, cost, and capability advantages, thus offering the best of both worlds.

How is Monetas implementing colored coins?

There are two techniques that may be used to create virtual tokens: transaction-based coloring and address-based coloring.

Transaction-based coloring was pioneered by ChromaWallet and works by identifying a specific Bitcoin transaction at a particular time as the “genesis transaction” and tracking all units which descend from the genesis transaction. Transaction-based coloring can produce the full range of virtual token types, and has the security property that even a loss of the original private keys to the genesis address cannot result in the issuing of counterfeit virtual tokens. This security property means the number of virtual tokens matching a color definition is fixed at the time of creation and cannot be altered in the future—which can be an advantage or a disadvantage, depending on the application.

Address-based coloring was created by Coinprism and tracks bitcoins which are descended from any transaction that passes through a defined address. This means the issuer can easily create new units in the future, but so could a thief who manages to steal the private key for that address. Address-based coloring is also incapable of creating a type of virtual token known as smart property, which is a type that Monetas plans to use extensively.

Monetas’ efforts at developing colored coin capabilities for btcwallet are currently focused on transaction-based coloring, because it provides the features and security properties we need. In addition, the manner in which we will integrate colored coins with Open-Transactions bypasses the issuance limitations of transaction-based coloring.

Virtual Tokens

As exciting as the low-level plumbing of colored coins is, the ways in which colored coin virtual tokens may be used are even more exciting. Our development efforts are currently focused on three use cases for colored coins we call tickets, certificates, and smart property.

Tickets
Tickets are transferable bearer tokens which are designed to be eventually redeemed for some kind of real world value.

Examples of tickets include:

  • Event entry passes
  • Store coupons and special offers
  • Frequent flyer miles and other redeemable rewards

Certificates
Certificates are transferable and redeemable in the same manner as tickets, and they additionally entitle the bearer to some kind of revenue paid through the blockchain.

Certificates can be used for bearer securities, such as securitized loans, mortgages, bonds, and dividend-paying stocks.

Smart Property
Smart properties are transferable like tickets and certificates, and in addition, every particular smart property is unique—there is only one of its kind.

Smart properties can be used to indicate ownership of an unique real-world asset, and can also be used for objective naming of content-addressed mutable data. This naming function is related to, and an extension of, hash-based naming.

A common operation in software engineering is to use cryptographic hash functions to create short identifiers for large pieces of data. This is useful because hash values are easy to communicate since they are short, and also are easy to check since they are deterministic. This means if you know the name of some piece of data, you can independently verify that you have the correct copy of it. But the limitation of hash-based naming is that the named data can never change.

Smart property overcomes this limitation. Because of a Bitcoin feature (OP_RETURN) that allows arbitrary data to be attached to transactions, every time smart property is moved it can be associated with a new hash. This means if you use the smart property as the name of your data instead of using the hash, you can change that data and everybody who knows the identifier of the smart property can identify the most current version of the data.

This is an exciting new capability with deep implications, and we do not believe we have fully mapped out all the possibilities it opens up.

The benefits

Once this colored coin work is complete, Monetas will be able to use this functionality to realize the full potential of the Open-Transactions technology.

At the present time, every Monetas notary effectively creates its own namespace within which instruments are valid but outside of which they are meaningless. It is not possible for any notary to verify the claims of any other notary in an objective fashion, because any proof an honest notary can produce is indistinguishable from a proof created by a dishonest notary. Unless, of course, the notaries have a common blockchain they can all use as a reference.

colored-3

Colored coins enable the creation of federated instruments.

Federated instruments are based on contracts which are bidirectionally linked to smart property. This means that contracts can be named by their smart property identifier and any notary who is presented with a federated contract can use the blockchain to verify its authenticity.

The issuer of a federated instrument also uses colored coin tickets, certificates, or smart properties to objectively record the number of units issued. Recipients of these units can deposit them with, and move them between, voting pools and enjoy the full benefits and functionality of the Monetas platform. Monetas notaries can accept deposits of these units without knowing anything about the issuer or the reliability of other notaries because they can rely on the blockchain as an objective and unimpeachable source of truth for clearing and settlement.

Other users of btcwallet besides Monetas will benefit from the features we are adding. As part of our technical collaboration with Conformal, we are implementing colored coins in an interoperable manner. Any user of btcwallet will gain the ability to create, receive, and transfer the three basic virtual token types even if they do not choose to utilize the Monetas platform to obtain full functionality.

We at Monetas enjoy working with the Conformal team and are excited by the abilities that the work we’re doing will bring to both companies and the digital finance ecosystem.

Leave a Reply

Your email address will not be published. Required fields are marked *