Zero-Knowledge Proofs: Adventures in the Dark Forest

An RTS game on Ethereum… WHAT?!

That’s exactly what the Dark Forest, an innovative blockchain game named after Liu Cixin’s eponymous second novel of the Remembrance of Earth’s Past trilogy, is: the first real-time strategy game running on Ethereum in existence.


Lucky for me, I recently had the chance to play the beta of this strange game and learn more about how it accomplished such a feat.

And I found it fascinating.


This image has an empty alt attribute; its file name is screenshot.png
What Dark Forest looks like in-game


Though understandably bare-bones in gameplay features due to its beta status, Dark Forest must be the first time I can honestly call an Ethereum game fun, and this fun is made possible thanks to its interesting use of zero-knowledge proofs.

Let’s see what makes Dark Forest so special. It will teach us something about Zero Knowledge proofs in the process.

What You Don’t Know Can’t Kill You

This image has an empty alt attribute; its file name is chess-board-and-pieces.jpg
In chess, players have complete knowledge of the game state at anytime.

Games can be categorized in two main camps.

First, we have games in which the players know everything about the game state. For example, in chess, both players know where all the pieces are. Each player has the same amount of game state knowledge as his opponent. Winning or losing depends on the computational ability of the player to calculate all the possibilities. There is no bluffing, no making decisions based on incomplete information, no wondering what the opponent is doing.

The second type of game is one in which players have incomplete knowledge of the game state. Think of the very popular (at least it used to be) real-time strategy game Starcraft. Players control units and build bases in a game map obscured by a fog of war. The fog of war is a large part of what makes that game fun since it hides each player from the other unless and keeps them guessing.

The players don’t know what lies ahead. Their minds are always on high alert as they wonder: “Where is my opponent? What is he doing? What is he building? What does he thinks I’m doing?”

This creates complexity. Tension.


FUN.

But what about blockchain games? Most of them fall into the first category. Users know everything about the game state.

And that’s understandable.


After all, Ethereum is a public blockchain and all its data is available to anybody. It is therefore very difficult to hide information. For that reason, games on Ethereum have a tendency to be pretty boring and limited to the trading of non-fungible collectibles such as playing cards.

Until Dark Forest, that is.

How Dark Forest uses Zero-Knowledge Proofs

This image has an empty alt attribute; its file name is 4bnuqe.jpg
Zero-knowledge allows a fog of war preventing users from having complete knowledge of the game state

The big innovation that Dark Forest brings to the discussion is providing a fog of war on Ethereum.

You do not know what your opponents are doing at all time. You do not even know where they are or how strong they are.

The fog of war hides them.

How Dark Forest manages to do that is through use of zero-knowledge proofs. Now, this subject can be quite deep and heavy on the math, but the concept itself is very simple.

In short, zero-knowledge proofs allows a verifier to perform a verification that a certain computation has been performed honestly without performing the computation himself.

That’s it.

In the case of Dark Forest, users submit proofs of actions they did to the blockchain. They do not have to disclose their location or amount of resources. They simply need to perform an action that respects the rules of the game and submit their proof.

This allows each player to have knowledge of his own game state, but not the game state of other players if they are hidden by the fog of war.

In other words, players make public proofs and their private game states, thus allowing each player to stay hidden behind a fog of war.

And THAT is what makes the game fun.

Not Just For Fun However…

This image has an empty alt attribute; its file name is 4bnv0d.jpg
Embrace the dark side. There lies the future of crypto!

That being said, don’t make the mistake of thinking that zero-knowledge proofs are only for creating blockchain games. In fact, they are capable of much, much more: they could be the key to scale Ethereum to millions of users.

In effect, zero-knowledge proofs make it possible to verify that arbitrarily complex computation has been performed without performing this computation ourselves. As such, ZK proof allow for the fast verification that many, many transactions have been been correctly processed in a relatively space efficient manner.

Projects such as Loopring, for example, leverage the power of zk rollups, an innovative scaling solution based on ZK proofs, to process even more transactions on Ethereum, by a factor of 1000x of what is possible on-chain.

Zcash, on the other hand, masks transactions thanks to zero-knowledge proofs. While Zcash is its own blockchain separate of Ethereum, the same principles apply to create private transactions on Ethereum.

As such, zero-knowledge proofs are instrumental in private transactions and the scaling of Ethereum.

Conclusion

Zk proofs are a fascinating concept that can be as deep as you want it to be. Anyone interested in blockchain should learn about it and know about their possible applications.

Zero-knowledge creeps on you with amazing ideas and streams of possibilities.

Just don’t get lost in its dark forest as you wander its intricacies.

1 thought on “Zero-Knowledge Proofs: Adventures in the Dark Forest

  1. Situs Judi Bola

    It’s a shame you don’t have a donate button! I’d most certainly donate to this excellent blog!
    I suppose for now i’ll settle for book-marking and adding your RSS feed to my Google account.

    I look forward to brand new updates and will share this site
    with my Facebook group. Talk soon!

Comments are closed.