Oct 177 min read

Hans in Luck Living in Stacksland

Edit 16.12.2020: Updated for Stacks 2.0 Feature Completness (removed "User Support for Miners")

Hans in Luck is a famous German story that was recorded by the Brothers Grimm back in the 18th century (video, text). The story is about an apprentice who receives a piece of gold after working hard for his master for seven years. On the way home he exchanges the gold for a horse (because the gold is heavy), then the horse for a cow (because the horse bolts), the cow for a pig (because the cow does not give milk), and so on until in the end he has nothing but himself. However, he feels very lucky to not have the burden of all the previously owned goods. The story shows how people can have very different views on the value of goods. Now, let's imagine Hans in Luck would live in a kingdom that knew about blockchains, proof of transfer and stacking. Let's call it Stacksland. How would Hans' live in Stacksland look like?


At the time of the story, there were no computers to build a blockchain. Therefore, we need a few scribes that do the work like computers today. When Hans in Luck exchanged the gold for the horse a scribe would write it down in his big book. Messengers would constantly run across the country and tell the others about the exchange so that all scribes have always the same content in their books. This would happen again and again for each exchange that Hans did. Hans would pay a small amount of gold to the scribe so that the scribe could buy new pencils.

Block Rewards

The king of Stacksland would be a rich king who, initially, would own all the gold in the kingdom. The king would also be a good king and once in a while, the king would pay one of the scribes a piece of gold as a reward for their work. The king would choose the one who worked the hardest. Think "Employee of the Year", just more often. This looks already like a Bitcoin blockchain with proof of work.

Smart Contracts

While it is good to write down all the exchanges so that everybody sees what is happening, for Hans, it would have been beneficial if he could write some conditions around the deals into the big books, like "I exchange the gold for a horse that does not bolt. If the horse bolts the exchange should be reverted". For that to happen, we would need some magic ink. When a messenger sees the horse bolting and the messenger tells a scribe about it then the magic ink would update automagically all the books at once with the reverted exchange. The magic ink would replace the gold. Hans would not pay the scribe in gold but he would give the scribe as much magical ink as is needed to write down the exchange and its conditions. The king would not reward the scribes with gold but with magic ink. This looks like a blockchain with smart contracts.

Proof of Transfer

Unfortunately, the scribes get gnarled fingers from all the writing over all the years. Therefore, we should introduce a new set of books. It should be books where the scribes just have to tell the magic ink what to write. Words and numbers would appear magically on the pages and the scribes' fingers would be well and healthy. This looks like a blockchain with some kind proof of thinking, for sure not proof of work.

As some people still wanted to use the original books and the gold, and have scribes with pencils, just like it was in the old days, and as others, like Hans, wanted to use the new books and magic ink, the king of Stacksland decided to have both. There was one group of scribes wearing ruby coats, writing with pencils and being paid in gold. The other group wearing emerald coats used magic ink and were paid in magic ink. The ruby scribes would continue to work like they did before writing down only pure exchanges. The emerald scribes would record both pure exchanges and contracts in their books using magic ink.

Note, that the emerald scribes don't have to work as hard as the ruby scribes with their fingers. The emerald scribes just have to be proficient in managing, transferring, and exchanging gold and magical ink.


In order to increase the trust in the new books and in the work of the emerald scribes were doing, we introduce a new group of professionals: the accountants. The accountants would be people who believe in both the gold and the magic ink. They would check the books of emerald scribes and the people would have trust that the emerald scribes would do their work correctly. The accountants would accept payments in gold for their work from the emerals scribes as a sign of their belief and trust in gold. They would also need to put a inkpot full of magical ink into the window of their houses as a sign of their belief and trust in the magic ink. The accountants in Stacksland represent the "stackers" in the ecosystem of the Stacks blockchain.

While the accountants are paid in gold by the emerald scribes, the emerald scribes are paid in magical ink by the king. As with the gold, initially, the king of Stacksland owned all the magical ink. As he is a wise king and likes his people to use the emerald books, he would sell parts of the ink to his people (or distribute it fairly between Hans and all the others who exchange horses, cows and pigs day in day out). Once in a while, the king would select the scribe who paid the most gold to the accountants and give this scribe the extra magical ink as a reward. It would be always the same amount of ink regardless of the amount of gold paid to the accountants. That is how proof of transfer works.

Verifiable Random Function

We could refine the process a bit and say that the king wasn't the smartest in mathematics. Sometimes, he would miscount the gold and select the "wrong" scribe. This way all emerald scribes would eventually get some extra ink. For the proof-of-transfer blockchain, this translates to some randomness to be selected for the block reward. The probability to get selected is related to the number of Bitcoins transferred.


Hans could also help an accountant to get their full inkpot of magical ink. Hans could lend the accountant some of his magical ink. In exchange, the accountant would give Hans some of the gold that he or she received from the emerald scribes. This way even Hans can participate in the business of accounting and show his trust in both gold and magical ink. For the proof-of-transfer blockchain, this translate to "pooling" Stacks together with other users such that the required minimum amount of stacks back be stacked.


I don't want to judge whether Hans in Luck living in Stacksland would be happier than in the original story but at least everybody would know that the rider of the horse and the shepherd of the cow weren't very honest to Hans in Luck.


The picture above shows how block rewards are paid by the king to different scribes and how exchanges with gold are written into the ruby books (yellow arrows) while exchanges involving magical ink are written into the emerald books (blue arrows).

Finally, here is a list with terms and its translation into the blockchain world:

scribes = miners
big books = blockchain
gnarled fingers = Proof of Work / burning electricity
ruby coats = BTC blockchain
emerald coats = STX blockchain

messengers = network/consensus (keeping chains in sync)

gold = BTC
magic ink = STX

accountants = stackers

inkpot full of magical ink = stacking threshold / requirement

selecting the "wrong" scribe = VRF
help an accountant to get their full inkpot of magical ink = pooling / delegating STX


Illustrations by

Jeano LePlic

Thank you for reviewing and commenting to Jason and Dan and my family.

Share this story