A note to my former self: You're not supposed to take care of everything

submited by
Style Pass
2023-03-26 16:00:09

I created the first implementation in a week, modifying the official C++ Bitcoin node software (now known as Bitcoin Core). My proof-of-concept patch was only a few hundred lines of code.

Here's what it did, briefly: Bitcoin transactions form a directed acyclic graph, as transaction's inputs point to previous transactions' outputs. It is possible to associate a property (e.g. "color") with transactions outputs and trace this property through the graph in such a way that the amount of "colored" coins is conserved. My code associated "color" property with each unspent transaction output a Bitcoin node keeps track of, and made it possible to select only coins (unspent transaction outputs) of a particular color in node's wallet, thus making it possible to send coins of a particular color.

The colored coin mailing list was impressed with my prototype, even though I felt it had its shortcomings: color definition was hard-coded, and it was not possible to add more colors dynamically. Still, it could function as a Minimum Viable Product (MVP) even in this primitive form: if somebody wanted to wish to make e.g. "USD coin" on top of the existing Bitcoin network they could release their own version of Bitcoin Core wallet with support of their "color".

Leave a Comment