Last year, while he was still actively working on Steem development, Dan Larimer (aka @dantheman, aka @dan aka @bytemaster) wrote this post about Steem subchains. In it, he pointed out that Steem is a potential developer's playground when it comes to potential blockchain-based applications.
What is a subchain?
Ever heard of Counterparty or Omni (formerly Mastercoin)? Those are what @dantheman calls "subchains": they are an application layer built on top of the main Bitcoin blockchain. What this means is that to (for example) send XCP tokens on Counterparty, you include a specially-formatted instruction in a Bitcoin transaction, pay the Bitcoin transaction fee, and then the Counterparty "network" parses this instruction and records that you sent the requested number of XCP tokens. Of course there are many many other operations available on Counterparty and Omni, but they all work in exactly this way.
Subchains let developers build blockchains without worrying about the blockchain itself. The developers of Counterparty and Omni trust that the Bitcoin miners are doing their job and that the history of Counterparty and Omni instructions stored in the blockchain will not change. Beyond that, all Counterparty and Omni need to do are ensure that their own protocols can parse the history embedded in the Bitcoin blockchain properly to generate their own database states deterministically.
Introducing MIST, the Micro Intra-Steem Token
Here, I am not proposing a protocol; think of MIST as a meta-protocol. It's extremely simple: a MIST protocol is a deterministic rule that maps lists of Steem operations to database states.
First, here's a quick primer on how the Steem blockchain is organized:
- Blocks: A block is a list of Steem transactions. Steem blocks are published once every 3 seconds.
- Transactions: A transaction is a list of one or more Steem operations.
- Operations: An operation is the fundamental unit of "interaction" with Steem. When you publish or edit a post or reply on Steem, you're putting a "comment" operation into a transaction which is then included in a Steem block. Same with voting, same with following, same with resteeming, and so on.
Operations are included in a transactions in a fixed order; transactions are included in blocks in a fixed order. Because of this structure, for our purposes we can ignore blocks and transactions and think of the Steem blockchain very simply as a list of operations. Once an operation is a couple minutes old, the order of that list cannot change, and the information included in each operation cannot change.
The MIST Fundamental Diagram
At its core, a MIST is a flow chart that looks like this:
So to create your own subchain according to the MIST meta-protocol, all you need to do is fill in the 2nd and 3rd items by answering these fundamental questions:
- What is the initial state of the MIST database?
- What constitutes a valid MIST instruction?
- For each valid MIST instruction, what is the corresponding database update?
A Trivial Example: Operation Counter
This is the silliest, simplest example I could think of. This particular MIST database has one attribute:
counter, which I will initialize to
0. I'll answer the two fundamental questions here:
- Every Steem operation maps to a single MIST instruction called
- For each
counter = counter + 1.
What's it do? It keeps a running tally of the number of operations that have ever been included in the Steem blockchain. What's the point? It was the simplest MIST I could think of.
It's so simple that it's silly to think of it as a subchain, but since we can fit it into the MIST Fundamental Diagram, it's actually a valid example.
What else can we do with MIST?
Well, quite literally anything that can be implemented on a blockchain can be implemented as a MIST. For example, we could port Counterparty to Steem. Call it Steemparty or something like that. Then we'd have a whole litany of Steem tokens that nobody would know what to do with.
What about a multivariate reputation system? The current system, where Steemit.com shows a little number by your account name that is supposed to mean your "reputation," is useful for spotting serial spammers, but not helpful if you're trying to figure out whether to trust someone to do some work you paid for. So why not set up a MIST that lets people report several different aspects of reputation? Like maybe you do business with someone and they're a total jerk - but they act in an honorable and trustworthy manner. Then they deserve to have a different "niceness" score than "trust" score.
Prediction markets are always fun. This is how Gnosis raised millions of dollars without a working prototype, by promising prediction markets.
Want to get in on the Bitcoin fork action? I bet you could come up with a clever way to let people use their Bitcoin private keys to claim balances of a new STEEM.BTC asset that you design to operate on Steem. You might even allow people to mine it!
Stay tuned! Maybe I have more up my sleeve, and maybe it's worth your time to follow me.
If you would like to play with an experimental MIST, go resteem this post.