Las colored coins or colored coins, are one of the first creations of the community in order to create tokens on Bitcoin, in order to enjoy its enormous power, security and global reach.
To achieve this, the colored coins make use of the programming capabilities of Bitcoin, through its Bitcoin Script. Basically, what they do is create a program that uniquely identifies Bitcoin, assigning properties that represent that new token or colored coin.
In this way, each transaction of a colored coin in the background is a Bitcoin transaction, only that within its script there are instructions that only nodes and wallets adapted to colored coins will be able to understand. Like the ERC-20 tokens de Ethereum, which came later, this type of operation opens the doors for a whole new amount of functionalities.
Although nowadays it is a protocol that is hardly used, the truth is that it inspired the ability to create other types of assets on a main network, something that Ethereum would later exploit, reaching many more use cases.
That said, we can define a colored coin as follows:
A colored coin is a special token that works on the Bitcoin blockchain. A token in which a series of instructions are defined within its Bitcoin Script that can only be fully understood by nodes and wallets adapted to it. In this way, it is capable of creating a completely new token, with its own accounting within Bitcoin.
Origin of the Colored Coin
The origin of the colored coins stems from the need to create new tokens and transfer assets on the Bitcoin blockchain. With these tokens it is possible to represent anything in the world, from stocks, commodities, real estate, fiat currencies and even other cryptocurrencies. And since necessity is the mother of all creations, this necessity led to the fact that in March 2012, Yoni Hesse (the CEO of eToro), driven by the idea of MasterCoin, he presented the idea of "colored coin" on his personal blog.
The idea was curdling, and in forums like Bitcointalk the idea of colored coins began to take more shape and interest. All this led to that on December 4, 2012, Meni Rosenfeld will create a whitepaper explaining the colored coins. It was the first formal work of a colored coin, and although incomplete, it captured the attention of the community.
Already in 2013, Colored Coin Protocol by Flavien Charlon, a protocol that allowed the creation of colored coins using specific configurations in the inputs and outputs of transactions. This was the first functional colored coin protocol on Bitcoin. However, it was not until July 3, 2014 that the EPOBC protocol Company ChromaWay. This protocol greatly facilitated the process of creating colored coins for developers interested in such technology, and was one of the first to use the new OP_RETURN function of Bitcoin Script.
This development was followed by others such as Colored Coins that came to light in 2015, among others that were gaining more and more relevance in the world of Bitcoin. And above all, those interested in the potential tokenization of the world, and all this before Ethereum had its first public release.
Why were the Colored Coins created?
Now, with all of the above, you are surely wondering Why were the colored coins created? Well, the main reason why colored coins were created is to open the doors to the development of new functionalities in Bitcoin. The ability to create tokens that are associated with things in the real world, and that these are backed by a blockchain network is a unique opportunity. The ability to create a currency, a tokenized bond, or even integrate applications with Bitcoin to send microtransactions or operations that are registered and protected by the blockchain is something unique.
But not only that, the colored coins and their possibilities were only the starting point of other more advanced technologies, such as the case of the second layer protocols that we see now, such as the case of RSK o BISQ. Simply put, the inventiveness of the community took the possibilities of Bitcoin a step further and allowed other possibilities to be explored.
For example, it was possible to create a colored coin on Bitcoin where each of its units was equivalent to one dollar or one euro. Indeed, this is what we know as stablecoin, and at that time (2014) it was something new with many possibilities and Bitcoin allowed us to explore all that. Of course it was not the only possible thing, with the colored coins you could represent anything, at that point, the imagination was the limit.
How do Colored Coins work?
Colored coins have different operating mechanisms depending on the protocol or the way they are implemented. Remember that a protocol simply means a way of doing things.
The reason for this is that in principle there is no standard method in Bitcoin to create tokens directly on its blockchain. For that reason, the developers of colored coin used some more creative processes to achieve their mission, some of them quite complex, and even with potential risks.
There are different protocols of creating Colored Coins, and most of them currently harness the power of the Bitcoin Script property called OP_RETURN. But OP_RETURN hasn't always existed on Bitcoin.
Before the creation of OP_RETURN in 2014, colored coins used to use a scheme in which the inputs and outputs of their transactions were processed in a certain way. The way these inputs and outputs were configured created the equivalent of a "color", a way of identifying and differentiating a regular Bitcoin transaction from its corresponding colored coin.
For example, in the first version of the Colored Coin Protocol (CCP), a transaction's index entry 0 was marked with a “color index script” that identified the operation. This color index was then used to check the outputs greater than 2 (the first output was considered non-spendable, and the second output was the direction of change) of that transaction and through the script of input 0, the corresponding colored coins operations.
As you can see, it is quite a complex and even limited system. First, CCP was unable to correctly handle unrecognized color sequences on the network. Thus, for example, if a person used a new version of the CCP protocol, and performed an operation on a colored coin not recognized in a previous version, the old nodes invalidate the transaction completely, even if several of those entries were recognized correctly. . This led to the protocol being especially susceptible to network forks that affect the operation of the colored coin.
This situation did not directly affect Bitcoin because for this network and its nodes, the operations that were carried out were valid. But for the network of colored coins that ran on modified versions of Bitcoin Core, the operations between different versions of its protocol were a real chaos.
The arrival of OP_RETURN
With the arrival of OP_RETURN things start to change with colored coins. With this function it was possible to store information on the Bitcoin blockchain in a standard way. Initially it was only possible to add 80 bytes of information in OP_RETURN, then it was reduced to 40 bytes, but today it is possible to store a total of 83 bytes (from Bitcoin Core 0.12) of arbitrary information in the transaction.
It may seem like little space, but 80 bytes is more than enough to create new protocols of colored coins, leaving behind many of the limitations that they had until that moment. Instead of creating colored structures in the inputs and outputs of transactions, it was easier to include information on operations in the OP_RETURN function and have it processed by the nodes of the colored coin.
Basically what was done was to inject instructions in the OP_RETURN so that the nodes of the colored coin will take the outputs of said transaction and send them to their recipients according to the instructions given.
In this way, the programming capacity of the colored coins was improved and at the same time, it was possible to create more stable and elaborate systems for their handling.
The genesis transaction
Of course, the above is simply the methods to make a colored coin work, but in all this there is a basic point that is shared: the genesis transaction of the colored coin.
The genesis transaction is used to issue all of the coins that will be assigned to said colored coin. This genesis transaction has a series of specific rules that its inputs and outputs must follow.
First of all, your entries should consider two cases:
- Colored coin non refundable: in the case of non-refundable colored coins, the tickets are irrelevant; the issuer will have no power once the transaction is issued, so the only thing that matters is the transaction itself (specifically, its outputs).
- Remissible colored coins: in this case, the issuer must choose a secure address as the “issue address” and set the transaction entry 0 to come from that address. Subsequently, the issuer will be able to issue more colored coin units by creating another genesis transaction with the same address in entry 0.
On the other hand, on the side of the outputs of a genesis transaction, these consist of a set of outputs that send the colored coins to their original owners, followed by an OP_RETURN data output, together with one or more "change" outputs for send excess bitcoins without color to the issuer.
At this point, each protocol implements its own scheme of control and emission of colored coins units, but in practice, these two points are universal for each protocol.
The coloring algorithms or kernel color are the mechanisms that allow the operation of the colored coins according to a series of predefined rules. In this way, the coloring algorithms are the heart of the protocols that make the colored coins work, since it is these that make the operation of the colored coins between different purses possible.
The first kernel color that allowed to transfer coins with different colors in the same transaction was OBC (Order-Based Coloring). Then other algorithms appeared such as TBC (Tagging-based Coloring), the POBC (Padded Order-based Coloring), the EPOBC (Enhanced, Padded, Order-Based Coloring). In addition to other more complex ones such as SPOBC (Smart Property Order-Based Coloring) and DHKEC (Diffie-Hellman Key Exchange Coloring).
Of course each of these kernel color has its advantages, its drawbacks and its own possible applications. However, they all respect some basic operational considerations, which are:
- The color balance of all inputs
- The position of the outputs relative to the inputs
- The relative size of the outputs
- The details of the script associated with the outputs
- Information encoded in the headers of the transaction. For example using the OP_CODE, OP_NSEQUENCE, or the OP_RETURN.
Pros and Cons of Colored Coins
Now, like everything in the world of technology, colored coins have their benefits and risks.
- Possibility of being used to represent in a tokenized way what is desired.
- As they are running on the Bitcoin blockchain, they enjoy the strongest, safest, decentralized blockchain network in the world, and with global reach.
- They allow the creation of exchangeable token systems. This property allows for example: to create decentralized exchanges or to carry out atomic exchanges between different colored coins.
- Highly complex to implement and develop. The appearance of the protocols and other tools for their development improved this situation, but even so, colored coins are more complex to create than other options such as Ethereum's ERC-20 tokens.
- They put more pressure on the blockchain. The creation of colored coins increases the size of the transactions and this impairs the ability of the network to process transactions. All of this leads to a decrease in the number of transactions that can be processed, drives up the cost of mining commissions, and dramatically increases the size of the blockchain.
- Disincentives miners due to low commissions for colored coins. This is a situation that can lead to a loss of computing power to the network due to low profits for miners, who will then prefer to mine for more profitable cryptocurrencies.
- The fact that some colored coins represent securities or other types of assets related to third parties represents a risk. The fact that a third party represents the interests for a colored coin leads to it being able to simply scam those who participate in said system.
Use cases for Colored Coins
Now let's know some cases that we can give to the colored coins:
- Atomic payment and exchange systems. Since colored coins are really nothing more than bitcoins that are treated in a specific way according to the indicated color scheme or OP_RETURN script, it is possible to perform atomic operations or payment systems using colored coins.
- Decentralized Exchanges (DEX). The ability to perform atomic exchanges with colored coins opens up the possibility of representing other tokens or coins with them and making exchanges with them in a fast, secure and completely decentralized way using the Bitcoin blockchain.
- Creation of collectibles. Colored coins are to some extent very similar to non-fungible tokens, in fact, when a payment is made with a colored coin, what is really done is to pass the ownership of that token to the other person, as happens with a NFT token (such as Ethereum's ERC-721).
- Access and subscription. Use of colored coins to trade and manage access and subscription services. For example, a museum, a subway, or an online service like Netflix may issue passes as colored coins. Thus, when launching a smartphone application, it can be used to make a cryptographic signature prove ownership of a pass in person, allowing these passes to be simultaneously transferable, fully digital and without a secure copy.
- A company might want issue shares using colored coins, leveraging Bitcoin's infrastructure to allow people to maintain ownership of stocks and trade stocks, and even allow you to vote and pay dividends on the Bitcoin blockchain.
- A local community for example might want create a community currency, using the Bitcoin infrastructure to store funds safely.