*[Contents of this post are based on an ongoing discussion with Alex Russell and Aggelos Kiayias. It contains potentially unpublished material.]*

In a proof-of-stake blockchain protocol such as Ouroboros, at most half of the users are dishonest. While an honest user always extends the longest available blockchain, the dishonest users try to fool him into extending a manipulated blockchain. Here, the user who is allowed to issue a block at any time-slot is called the “slot leader.” As it happens, a number of future slot leaders are computed in advance using the random values present in the blocks. Although counterintuitive, such a scheme ensures that if the adversary does not control more than half the users now, it is very unlikely that he cannot control more than half the slot leaders. The time-slots are divided into “epochs” of length .

We consider a variant of Ouroboros where the random bits necessary for selecting the slot leaders for the next epoch come from a per-epoch random value, plus the random values from a certain prefix of the blocks issued in the current epoch. Because the random values do not depend on the contents of the block, the adversary cannot maliciously choose a block-content that affects the leader selection. He, however, has one of three options:

- Issuing a block and attaching it to the longest available chain
- Not issuing a block
- Issuing a block but linking it to a shorter, possibly malicious chain. If an honest block is bypassed by this maneuver, we say the adversary has
an honest player*skipped*

We are interested in giving an upper bound to the expected number of competing chains that the adversary can possibly present to the leader selection process. This number would limit the choices for even a computationally-unbounded adversary. Not surprisingly, we call this number the ** grinding power **of the adversary.

**Competitive Chains.** If the adversary has to “sell” a manipulated chain to an honest player at the end of an epoch, the chain has to satisfy the following:

- It has to be competitive. That is, it has to be at least as large as the number of honest users preceding because these honest players will always add a new block to the longest available chain. Otherwise, there is no chance that will select this chain.
- Moreover, every prefix of this chain, ending in an honest block, must be competitive for the same reason.

**Towards a Formal Definition.** A *characteristic string* is a Boolean string where a zero denotes an honest player and a one denotes an adversarial player. Suppose contains zeros located at increasing positions . Set because we assume that an honest player is going to be presented with the outcomes dictated by . A substring of can only be obtained by deleting bits from . For any string , let be the first bits of . Let be the suffix of starting at position . Let denote the th bit in a string .

Let and denote the number of zeros and ones in a string , respectively. Define as the * discrepancy *of . Fix and . Let denote a closed interval. We write to refer to the substring . Let and denote the number of ones and zeros, respectively, in the interval . Let denote the reverse string of any string .

Definition (Admissible strings and grinding power).Let be an -bit Boolean string containing zeros. Let be the th zero-bit in . Let be the substring of supported on a characteristic vector . is “‘” if the following hold:admissible

- , and
- If contains but not , then must contain at least one-bits from the interval .
The number is called the “

” of .grinding power

The second constraint says that must include at least one one-bit from for every such that but i.e., *an honest player is skipped*. The first constraint takes care of the case that the last zero-bit is skipped.

Let us make one more definition before we proceed.

Definition (ZPDC strings).Given Boolean string , consider a string , with , which obeys the following rule: if then

- , hence we say is pinned on the zeros of ; and
- The discrepancy of the suffix of beginning at is nonnegative.
We call a zero-pinned discrepancy-constrained string, or a

in short. Let denote the number of possible ZPDC strings for .ZPDC string for

**Towards an Expression for . **

For an index set , let be the number of admissible substrings that contain the zero-bits from the positions indexed by . That is, if , considers the substrings which contain zero-bits from -positions where .

*Boundary values.* For completeness, set and z_0 := 0, z_{m+1} := n+1$.

Claim.The grinding power is, where

and

**Explanation.** Every subset of the zero-bits of gives rise to a family of substrings, each containing the zero-bits indexed by . A fixed subset partitions into intervals. The admissible substrings pertaining to exclude the zero-bits that are interior to these intervals.

All zero-bits of are turned off inside the interval . However, if we look at any suffix of , at least one one-bit must be “on” in the admissible string to render a zero-bit “off.” Consider the characteristic vector of the one-bits of an admissible string restricted to the interval , and let us call it . It will certainly have zeros where has zeros. Since these zeros are “off” in the admissible string, every suffix of rooted at these zeros must have a nonnegative discrepancy. That is, suppose , rooted at a zero-bit, has zeros in it. Then will contain at least ones. This condition can be stated as the discrepancy of every suffix of , rooted at zeros of , is nonnegative. is the number of such ZPDC strings (see the definition above).

The boundary values above ensure that the expression works for all intervals, especially the first and the last. This leads to the following.

The number of admissible strings for a characteristic string , which we call , is the same as the number of ways we can partition into intervals using subsets of the zero-bits of , times the number of ZPDC strings for each interval in each partition.

**What is** N**ext?**

Naturally, we would like to give an upper bound to this number. Moreover, we want to bound the expectation of this number when is drawn from the Binomial distribution with a biased probability .

While I don’t know how to do that at this moment, I’ll tackle that in a future post.

**References**

[1] Ouroboros: A Provably Secure Proof-of-Stake Blockchain Protocol