How Mimblewimble Works?

Mimblewimble — Beam — Confidential and Scalable Coin

To understand how Mimblewimble works without diving into math and cryptography we will present the following metaphor.

A safe box as a metaphor for Beam | Mimblewimble

Imagine a large room filled with small safe boxes with code locks as shown in the picture below. Each box holds some value (in BEAM coins) and belongs to someone who knows the code that opens the box. Each box has a serial number, using which the box can be easily located in the room when all boxes are organized in the correct order.

Imagine as well, that it is only possible to set the code once, the code cannot be reset. It is also not possible to take a closed box with value out of this room, or for that matter to add a box with value to the room, except for one specific case described below. The only thing allowed is to enter the room with an empty open box in your hands with no value in it. Besides, only one person is allowed to enter the room at each time.

Hey, who the f*** is Alice?

Let’s first discuss a simple case of Alice, who wants to transfer the value of precisely one box she owns to Bob. To do that, Alice tells Bob in private the serial number of the box and the combination to open it. Bob goes into the room with a new empty open box in his hands, finds the box with the required serial number, opens it using the key provided by Alice and takes out the value. Now, since it is not possible to reset the combination on the box, Bob puts the taken value into the new box he brought in, sets his combination, locks it and puts it in the corner of the room. The empty box, which previously belonged to Alice is discarded and placed in another corner. After this, Bob leaves the room. The transaction is complete.

This schema of course easily scales to the case in which Alice wants to transfer the contents of multiple boxes to Bob as well. In professional terms, these boxes are called ‘commitments,’ and they correspond to a cryptographic commitment scheme which is used as a base of Mimblewimble transactions. Each commitment thus represents a single unspent transaction output (UTXO).

The serial number of the box represents a public representation of the commitment and the code for the box acts as a private key, also called blinding factor, which both protects the value in the box and serves as proof of ownership for it.

One would ask how new value is created. Let’s say there are special people working in the room (one at a time) whose responsibility is to organize the new boxes that are added, as a result of transactions, according to their serial numbers, remove and throw away old empty boxes, and make sure people do not bring in or out anything they are not supposed to. We will call these people Miners, and they are periodically rewarded for their efforts by an entirely new box with newly minted BEAMs called Mining Reward.

If old boxes were not removed, they would quickly fill up the room. By removing them, we make sure that space needed to store those boxes is proportional to the number of UTXOs at any specific time. This corresponds to the ‘cut-through’ feature of Mimblewimble, which reduces the blockchain size.

Starwars — Lucas Film LTD — Yoda

If all the rules are upheld as described, one can prove that total amount of value in the room is precisely equal to the total sum of Mining Rewards over any term, since this is the only way to create new value and value cannot be destroyed.

To be continued.

Learn more about our project on our website

Join our developer community: Gitter