The colored coins or colored coins are one of the attempts of the community and cryptocurrency developers to expand the functionality of Bitcoin allowing the creation of tokens to represent other currencies or assets of interest on a blockchain. 

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:

  1. 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).
  2. 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.

Coloring algorithms

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:

  1. The color balance of all inputs
  2. The position of the outputs relative to the inputs
  3. The relative size of the outputs
  4. The details of the script associated with the outputs
  5. 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.

Pros

  1. Possibility of being used to represent in a tokenized way what is desired.
  2. As they are running on the Bitcoin blockchain, they enjoy the strongest, safest, decentralized blockchain network in the world, and with global reach.
  3. 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.

Cons

  1. 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.
  2. 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.
  3. 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.
  4. 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:

  1. 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.
  2. 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.
  3. 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).
  4. 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.
  5. 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.
  6. A local community for example might want create a community currency, using the Bitcoin infrastructure to store funds safely.

How much do you know, cryptonuta?

Can colored coins be used to represent any real asset?

TRUE!

The main characteristic of colored coins is their ability to tokenize any type of real asset within the Bitcoin blockchain. All this is possible thanks to the fact that they can be programmed explicitly for this purpose.

Protocols for creating Colored Coin

Now, all the evolution of the development on colored coins led to the creation of different protocols for their creation. And it is that carrying out this work on established protocols not only facilitated its creation, but also its maintenance and improvement. This is how the following protocols were created:

CCP or Open Assets Protocol

Known in 2013 as Colored Coins Protocols (CCP) and later renamed to Open Assets Protocol, this is a protocol for creating colored coins. The project was one of the most used due to the enormous amount of tools available for this task. In fact, the protocol has interfaces in such popular languages ​​as Python, Objective-C, Ruby or Microsoft .NET, which facilitates the development of tools using this protocol.

Additionally, Open Assets Protocol supported enhancements such as BIP-70 (a payment protocol) and BIP-21 (a URI scheme to facilitate payments). Currently the protocol is abandoned, and its repository on GitHub has not been updated since 2016.

ChromaWay EPOBC Protocol

Another popular protocol for creating colored coins is EPOBC from ChromaWay. The protocol began its development in 2014, when the company began to commercialize colored coins. The project was started by Alex Mizrahi, and since then he started to revolutionize the way colored coins could be created.

Colu's Colored Coin Protocol

Colu's Colored Coins protocol is another well-known way to make your own colored coins. The implementation is written in JavaScript which greatly facilitates the process of creating projects to handle colored coins.

Colored Coins in practice

Creating a colored coin is free, anyone can do it, and there are tools to do it. Below we show you the tools.

However, you must understand that, despite the fact that the action of creating it is free, to perform them a Bitcoin transaction must be created. That is, you must pay the fees to send a Bitcoin transaction.

To carry out a transaction, it will be enough to have a wallet that supports the same colored coin protocol used.

The colored coins work on the Bitcoin network, that means that the addresses are the same as Bitcoin. You do not have to create special addresses and any Bitcoin address can receive a colored coin.

Viewing the colored coins that an address has will depend on whether or not you have a purse that supports it.

Subsequently, every time someone wants to transfer units of that colored coin to another Bitcoin address, you must carry out a Bitcoin transaction, since the colored coin is the interpretation of the OP_RETURN value of a UTXO, which is transferred to the new address. This means that you must pay the transaction fee that the Bitcoin network requests.

But not only that! Since in Bitcoin, unlike Ethereum, you cannot make a transaction where no amount of Bitcoin is sent, you must send the minimum amount (dust amount), currently at 546 satoshis. In other words, sending a colored coin has a mining cost and a “cost” of some satoshis that you must send to the destination.

As you can see, its poor usability triggered the search for alternatives, making Ethereum smart contracts more efficiently solve the use case of tokens through the ERC-20 standard: they do not require adding a minimum, they are more easily programmable and they allow programming more elaborate scenarios.

Examples of Colored Coins

Currently there are several colored coins in development and active use, these cases are Counterparty, OmniLayer, Bisq. All these projects depend on the operation of Bitcoin to be able to carry out their operations, operations that are made possible by a data load (coloring) in bitcoin transactions.

So for example, in Counterparty Currently there are different projects that take advantage of Counterparty's coloration capacity to issue tokens on Bitcoin. This is the case of projects like Rare Pepe, a set of memes that are well known in the Bitcoin community. Thanks to this, it is possible to create, buy and sell these collectibles on Bitcoin. In the same way we can talk about Spell of Genesis, another project that makes use of Counterparty, and even the same Counterparty currency, the XCP token.

OmniLayerFor its part, it is better known because it is the birthplace of Tether, the stablecoin anchored to the dollar that is currently the mainstay of operations with this type of currency. In fact, in OmniLayer the Tether is known as the Asset 31, and all the currencies that make use of this type of Tether, actually carry out their operations on Bitcoin using colored coins. In fact, if you check this address 32TLn1WLcu8LtfvweLzYUYU6ubc2YV9eZs, you will see that it is a Bitcoin address. You will notice that however, it is an address that receives bitcoins in very small amounts, something curious. But if you use the OmniLayer Explorer, the story changes dramatically, being able to see that they are operations in Tether, with a fairly high value, some up to 220 million.

BISQ For its part, it is a well-known decentralized exchange that works in Bitcoin, and it is also a project that works thanks to colored coins, in a very similar way to OmniLayer.

However, these protocols have changed a lot and not only use the coloring ability for their operations, they also use other advancements such as HTLC, DLC, CLTV o CSV for your operations. In the end, this has transformed them into something much bigger and more ambitious, which we know as second layer protocols.