-
Notifications
You must be signed in to change notification settings - Fork 0
/
simple-attack-diagram.tex
56 lines (40 loc) · 1.72 KB
/
simple-attack-diagram.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
\usetikzlibrary{calc, arrows.meta, intersections, patterns, positioning, shapes.misc, fadings, through,decorations.pathreplacing}
\begin{figure*}[htb]
\centering
\begin{tikzpicture}[very thick, black]
\coordinate (distance) at (2,0);
\coordinate (O) at (-1,0); % Origin
\coordinate (P1) at (0,0);
\coordinate (P2) at ($(P1) + (distance)$);
\coordinate (P3) at ($(P2) + (distance)$);
\coordinate (P4) at ($(P3) + (distance)$);
\coordinate (P5) at ($(P4) + (distance)$);
\coordinate (F) at (9,0); %End
\node[anchor=east,yshift=16pt] at (O) {{\tiny \asset} reserves:};
\node[anchor=east,yshift=8pt] at (O) {{\tiny \stasset} supply:};
\coordinate[above=12pt] (M0) at (O);
\coordinate[above=12pt] (M1) at (P2);
\coordinate[above=12pt] (M2) at (P4);
\coordinate[above=12pt] (M3) at (F);
\draw[line width=0.8pt] (M0) -- (M1) node[color=black,midway,fill=white](L0) {$\frac{b_0}{s_0}$};
\draw[line width=0.8pt] (M2) -- (M3) node[color=black,midway,fill=white](L2) {$\frac{\textcolor{myred}{\blacktriangledown} b_0 + (1 - p) b}{s_0 + s}$};
\draw[line width=0.8pt] ($(M1) + (0,2pt)$) -- ($(M1) + (0,-2pt)$);
\draw[line width=0.8pt] ($(M2) + (0,2pt)$) -- ($(M2) + (0,-2pt)$);
\draw[line width=0.8pt] (M1) -- (M2) node[color=black,midway, fill=white](L1) {$\frac{\textcolor{mygreen}{\blacktriangle} b_0 + b}{\textcolor{mygreen}{\blacktriangle} s_0 + s}$};
%% Timeline
\draw[->] (O) -- (F);
%% Ticks
\foreach \x in {P2,P4}
\draw ($(\x) - (0,3pt)$) -- ($(\x) + (0,3pt)$);
%% t_2
\draw (P2) node[below=3pt](T2) {$t_2$} ;
\node[below=8pt] at (T2) {%
Liquid stakes};
%% t_4
\draw (P4) node[below=3pt](T4) {$t_4$} ;
\node[below=8pt] at (T4) {%
Equivocates};
\end{tikzpicture}
\caption{Timeline of the simplistic attack.}
\label{fig:simple-timeline}
\end{figure*}