Skip to content

Commit d721cff

Browse files
committed
add f12 consensus section on probability of selection
1 parent ab8f409 commit d721cff

File tree

1 file changed

+90
-1
lines changed

1 file changed

+90
-1
lines changed

docs/project-catalyst/f12-economic-model.md

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,96 @@ milestone 3.
298298

299299
:::
300300

301-
### 4.1 Contextualizing consensus components
301+
### 4.1 Probability of selection
302+
303+
In the previous section we speculated as to the total cost for an attacker to
304+
secure all of the nodes necessary to publish erroneous data. In this section we
305+
will investigate the probability of those corrupted nodes being selected to
306+
reach consensus over a given statement.
307+
308+
The first example was of a proposer which has their statement verified by a
309+
subset of 10 nodes. The probability of having a specific combination of nodes
310+
(i.e. the 10 corrupted nodes) selected can be determined using the following
311+
formula:
312+
313+
$
314+
P = \frac{1}{{\binom{n}{r}}}
315+
$
316+
317+
Where $\binom{n}{r}$, pronounced "n choose r," is the number of ways to choose
318+
$r$ from $n$. In the specific use case of Orcfax, $r$ represents the number of
319+
ways to choose 10 individuals from the 100 total nodes ($n$) without regard to
320+
order.
321+
322+
- $n = 100$
323+
- $r = 10$
324+
325+
This can be represented as:
326+
327+
$
328+
\binom{100}{10} = \frac{100!}{10!(100 - 10)!} = \frac{100!}{10! \cdot 90!}
329+
$
330+
331+
:::info[Explanation]
332+
333+
1. $100!$: The factorial of 100, representing all possible arrangements of 100
334+
nodes.
335+
2. $10!$: The factorial of 10, representing the arrangements of the selected 10
336+
nodes.
337+
3. $90!$: The factorial of 90, representing the remainder of arrangements after
338+
the removal of permutations.
339+
340+
:::
341+
342+
Thus, the probability $P$ is:
343+
344+
$
345+
P = \frac{1}{\frac{100!}{10! \cdot 90!}}
346+
$
347+
348+
This gives the probability of a specific set of 10 nodes being selected from a
349+
total of 100 nodes, which is
350+
351+
$
352+
5.78 \times 10^{-14} = 0.0000000000000578
353+
$
354+
355+
In the second example where a subset of nodes is selected, each proposes a
356+
statement, and the median is selected, the bad actor needs 11 of their corrupted
357+
nodes to participate in consensus in order to ensure that 10 of their nodes will
358+
make the 11th the median.
359+
360+
The probability of their 11 nodes being selected within a subset of 21 nodes can
361+
be expressed in the following equation:
362+
363+
$
364+
P = \frac{\binom{11}{11} \cdot \binom{89}{10}}{\binom{100}{21}}
365+
$
366+
367+
:::info[Explanation]
368+
369+
1. $\binom{11}{11}$: The number of ways to choose all 11 of the corrupted nodes
370+
(this is 1, as there's only one way to choose all 11 of them).
371+
2. $\binom{89}{10}$: The number of ways to choose the remaining 10 nodes from
372+
the remaining 89.
373+
3. $\binom{100}{21}$: The total number of ways to choose 21 nodes out of the
374+
total 100.
375+
376+
:::
377+
378+
Thus, the probability of all 11 corrupted nodes being selected within a subset
379+
of 21 nodes is approximately:
380+
381+
$
382+
2.4904 \times 10^{-9} = 0.00000000249
383+
$
384+
385+
This section is for purposes of illustration only. Specific design choices to be
386+
made in milestone 3 can have significant impacts on how randomness is
387+
implemented and thereby the probable chance of a bad actor being able to
388+
influence consensus.
389+
390+
### 4.2 Contextualizing consensus components
302391

303392
The following demonstrates the various components of a fully decentralized node
304393
within the EchoNet network; "Validator Node-1" shows each of its components

0 commit comments

Comments
 (0)