Colored Coins Metadata (Bitcoin 2.0)

Aaron Goldsmith
Jul 10, 2017 · 2 min read

Colored Coins is a concept that allows attaching metadata to Bitcoin transactions and leveraging the Bitcoin infrastructure for issuing and trading immutable digital assets that can represent real world value. The value of such digital assets is tied to a real-world promise by the asset issuers that they are willing to redeem those digital tokens for something of value in the real world.

Metadata is in plain JSON format and it’s inclusion is optional. When metadata is included, it is not stored directly on the blockchain, but rather, using the BitTorrent Protocol which gives a decentralized way to share and store data. Furthermore, the protocol uses the new DHT (“distributed sloppy hash table”) trackerless torrents that remove the need for a centralized host for torrent file trackers.

There are two basic components of the metadadta: Static Data and Rules. Generally, the data section consists of various static data fields, while the rules section encodes an extra layer of logic that gives smart contract functionality to colored coins.

The current implementation of the colored coins protocol supports 4 kinds of rules:

  • Fees: Pay a fee to specific address on each transfer.
  • Expiration: The will expire after a set period.
  • Minters: Recipients of the asset can issue more of it.
  • Holders: Only certain Bitcoin addresses can receive this asset.

Example Metadata:

{
metadata: {
assetId: String,
assetName: String,
assetGenesis: String,
issuer: String,
description: String,
urls: [
{name: String, url: String, mimeType: String, dataHash: String },
{name: String, url: String, mimeType: String, dataHash: String },
...
],
userData : {
meta: [
{key: String, value: String, type: String},
{key: String, value: String, type: String},
...
],
user_key: user_value,
user_key: user_value,
...
},
encryptions: [
{key: "user_key", pubKey: 'RSA Public Key',format:'pem|der',type:'pkcs1|pkcs8' },
...
],
verifications: {
social:{
network_1:{
....
},
network_2:{
....
},
....
},
domain:{
url:"https://www.example.com/path/to/file/filename.txt"
},
signed:{
message: "We at ... verifying issuance of colored coins asset with asset ID [...].",
signed_message: "-----BEGIN CMS-----...-----END CMS-----",
cert: "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----"
}
}
},
rules: {
fees: [{}],
expiration: {},
minters: [{}],
holders: [{}]
}
}

Digital assets on top of the Bitcoin Blockchain can be used to issue financial assets (securities like shares, commodities like Gold or new currencies), prove ownership (a digital key to a house or a car, a concert ticket), store information (documents, certificates), or create smart contracts.

The advantage given by using the blockchain as the backbone for such asset manipulation is that one can rely on the blockchain’s transparency, immutability, ease of transfer, and non-counterfeitability to transfer and trade such digital tokens with unprecedented security and ease.

The Colu SDK is a fully decentralized Javascript solution that provides the functionality of issuing and transacting with colored coins, as well as the handling of colored coin addresses. It uses the Colu Engine for funding all transactions, automatically signs and writes all transactions to the bitcoin blockchain, and reads all digital asset metadata.

Colored Coins on Github: https://github.com/Colored-Coins

Colu SDK/API: http://documentation.colu.co

Written by

Full-Stack Software Engineer — I love ES6/7/8+ and data structures, especially with Node.js!

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade