-
Notifications
You must be signed in to change notification settings - Fork 25
/
stationary1559.html
9380 lines (8945 loc) · 298 KB
/
stationary1559.html
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stationary behaviour of EIP 1559 agent-based model</title>
<meta property="og:title" content="Stationary behaviour of EIP 1559 agent-based model" />
<meta property="og:url" content="https://ethereum.github.io/abm1559/notebooks/stationary1559.html" />
<meta property="og:image" content="https://ethereum.github.io/rig/static/rig.png" />
<meta property="og:description" content="Basefee converges to price out all but a target size of users" />
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Stationary behaviour of EIP 1559 agent-based model">
<meta name="twitter:description" content="Basefee converges to price out all but a target size of users">
<meta name="twitter:image" content="https://ethereum.github.io/rig/static/rig.png">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/underscore-umd-min.js" type="text/javascript"></script>
<script src="https://ethereum.github.io/rig/static/react.development.js"></script>
<script src="https://ethereum.github.io/rig/static/react-dom.development.js"></script>
<script src="https://ethereum.github.io/rig/static/component-library.js"></script>
<script src="https://ethereum.github.io/rig/static/header.js"></script>
<script src="https://ethereum.github.io/rig/static/footer.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<style type="text/css">
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: var(--jp-cell-editor-active-background) }
.highlight { background: var(--jp-cell-editor-background); color: var(--jp-mirror-editor-variable-color) }
.highlight .c { color: var(--jp-mirror-editor-comment-color); font-style: italic } /* Comment */
.highlight .err { color: var(--jp-mirror-editor-error-color) } /* Error */
.highlight .k { color: var(--jp-mirror-editor-keyword-color); font-weight: bold } /* Keyword */
.highlight .o { color: var(--jp-mirror-editor-operator-color); font-weight: bold } /* Operator */
.highlight .p { color: var(--jp-mirror-editor-punctuation-color) } /* Punctuation */
.highlight .ch { color: var(--jp-mirror-editor-comment-color); font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: var(--jp-mirror-editor-comment-color); font-style: italic } /* Comment.Multiline */
.highlight .cp { color: var(--jp-mirror-editor-comment-color); font-style: italic } /* Comment.Preproc */
.highlight .cpf { color: var(--jp-mirror-editor-comment-color); font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: var(--jp-mirror-editor-comment-color); font-style: italic } /* Comment.Single */
.highlight .cs { color: var(--jp-mirror-editor-comment-color); font-style: italic } /* Comment.Special */
.highlight .kc { color: var(--jp-mirror-editor-keyword-color); font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: var(--jp-mirror-editor-keyword-color); font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: var(--jp-mirror-editor-keyword-color); font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: var(--jp-mirror-editor-keyword-color); font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { color: var(--jp-mirror-editor-keyword-color); font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: var(--jp-mirror-editor-keyword-color); font-weight: bold } /* Keyword.Type */
.highlight .m { color: var(--jp-mirror-editor-number-color) } /* Literal.Number */
.highlight .s { color: var(--jp-mirror-editor-string-color) } /* Literal.String */
.highlight .ow { color: var(--jp-mirror-editor-operator-color); font-weight: bold } /* Operator.Word */
.highlight .w { color: var(--jp-mirror-editor-variable-color) } /* Text.Whitespace */
.highlight .mb { color: var(--jp-mirror-editor-number-color) } /* Literal.Number.Bin */
.highlight .mf { color: var(--jp-mirror-editor-number-color) } /* Literal.Number.Float */
.highlight .mh { color: var(--jp-mirror-editor-number-color) } /* Literal.Number.Hex */
.highlight .mi { color: var(--jp-mirror-editor-number-color) } /* Literal.Number.Integer */
.highlight .mo { color: var(--jp-mirror-editor-number-color) } /* Literal.Number.Oct */
.highlight .sa { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Affix */
.highlight .sb { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Backtick */
.highlight .sc { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Char */
.highlight .dl { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Delimiter */
.highlight .sd { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Doc */
.highlight .s2 { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Double */
.highlight .se { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Escape */
.highlight .sh { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Heredoc */
.highlight .si { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Interpol */
.highlight .sx { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Other */
.highlight .sr { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Regex */
.highlight .s1 { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Single */
.highlight .ss { color: var(--jp-mirror-editor-string-color) } /* Literal.String.Symbol */
.highlight .il { color: var(--jp-mirror-editor-number-color) } /* Literal.Number.Integer.Long */
</style>
<link rel="stylesheet" type="text/css" href="https://ethereum.github.io/rig/static/jupyter.css"/>
<link rel="stylesheet" type="text/css" href="https://ethereum.github.io/rig/static/theme-light.css"/>
<style type="text/css">
a.anchor-link {
display: none;
}
.highlight {
margin: 0.4em;
}
/* Input area styling */
.jp-InputArea {
overflow: hidden;
}
.jp-InputArea-editor {
overflow: hidden;
}
@media print {
body {
margin: 0;
}
}
</style>
<!-- Load mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-MML-AM_CHTML-full,Safe"> </script>
<!-- MathJax configuration -->
<script type="text/x-mathjax-config">
init_mathjax = function() {
if (window.MathJax) {
// MathJax loaded
MathJax.Hub.Config({
TeX: {
equationNumbers: {
autoNumber: "AMS",
useLabelIds: true
}
},
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true,
processEnvironments: true
},
displayAlign: 'center',
CommonHTML: {
linebreaks: {
automatic: true
}
},
"HTML-CSS": {
linebreaks: {
automatic: true
}
}
});
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
}
}
init_mathjax();
</script>
<!-- End of mathjax configuration -->
<link rel="stylesheet" type="text/css" href="https://ethereum.github.io/rig/static/index.css"/>
</head>
<body class="jp-Notebook" data-jp-theme-light="true" data-jp-theme-name="JupyterLab Light">
<div id="header"></div>
<script>
ReactDOM.render(
e(Header, null),
document.querySelector("#header")
);
const hamburger = document.querySelector(".hamburger");
const navMenu = document.querySelector(".nav-menu");
function mobileMenu() {
hamburger.classList.toggle("active");
navMenu.classList.toggle("active");
}
function closeMenu() {
hamburger.classList.remove("active");
navMenu.classList.remove("active");
}
hamburger.addEventListener("click", mobileMenu);
const navLink = document.querySelectorAll(".nav-link");
navLink.forEach(n => n.addEventListener("click", closeMenu));
</script>
<div class="article-container">
<div class="document-container">
<div class="title-container">
<div class="title">
Stationary behaviour of EIP 1559 agent-based model
</div>
<div class="sub-title">
</div>
</div>
<div id="toc-author-block">
<div id="authors"></div>
<div id="toc"></div>
</div>
<div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<h2 id="TL;DR">TL;DR<a class="anchor-link" href="#TL;DR">¶</a></h2><ul>
<li>EIP 1559 is a proposed improvement for the transaction fee market. It sets a variable "base" gasprice to be paid by the user and burned by the protocol, in addition to a "tip" paid by the user to the block producer.</li>
<li>The base price ("basefee") adjusts upwards when demand is high, and downwards otherwise.</li>
<li>We observe in this notebook that in a stationary environmnent, basefee converges to a value that prices out enough users to achieve the target block size.</li>
</ul>
<hr>
<p>We introduce here the building blocks of agent-based simulations of EIP1559. This follows an <a href="https://nbviewer.jupyter.org/github/ethereum/rig/blob/master/eip1559/eip1559.ipynb">earlier notebook</a> that merely looked at the dynamics of the EIP 1559 mechanism. In the present notebook, agents decide on transactions based on the current basefee and form their transactions based on internal evaluations of their values and costs.</p>
<p><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3025604">Huberman et al., 2019</a> introduced such a model and framework for the Bitcoin payment system. We adapt it here to study the dynamics of the basefee.</p>
<p>All the code is available in <a href="https://github.com/barnabemonnot/abm1559">this repo</a>, with some preliminary documentation <a href="https://barnabemonnot.com/abm1559/build/html/">here</a>. You can also download the <a href="https://pypi.org/project/abm1559/"><code>abm1559</code> package from PyPi</a> and reproduce all the analysis here yourself!</p>
<h2 id="The-broad-lines">The broad lines<a class="anchor-link" href="#The-broad-lines">¶</a></h2><p>We have several entities. <em>Users</em> come in randomly (following a Poisson process) and create and send transactions. The transactions are received by a <em>transaction pool</em>, from which the $x$ best <em>valid</em> transactions are included in a <em>block</em> created at fixed intervals. $x$ depends on how many valid transactions exist in the pool (e.g., how many post a gasprice exceeding the prevailing basefee in 1559 paradigm) and the block gas limit. Once transactions are included in the block, and the block is included in the <em>chain</em>, transactions are removed from the transaction pool.</p>
<p>How do users set their parameters? Users have their own internal ways of evaluating their <em>costs</em>. Users obtain a certain <em>value</em> from having their transaction included, which we call $v$. $v$ is different for every user. This value is fixed but their overall <em>payoff</em> decreases the longer they wait to be included. Some users have higher time preferences than others, and their payoff decreases faster than others the longer they wait. Put together, we have the following:</p>
$$ \texttt{payoff} = \texttt{value} - \texttt{cost from waiting} - \texttt{transaction fee} $$<p>Users expect to wait for a certain amount of time. In this essay, we set this to a fixed value -- somewhat arbitrarily we choose 5. This can be readily understood in the following way. Users estimate what their payoff will be from getting included 5 blocks from now, assuming basefee remains constant. If this payoff is negative, they decide not to send the transaction to the pool (in queuing terminology, they <em>balk</em>). We'll play with this assumption later.</p>
<p>The scenario is set up this way to study <em>stationarity</em>: assuming some demand comes in from a fixed distribution at regular intervals, we must expect basefee to reach some stationary value and stay there. It is then reasonable for users, at this stationary point, to consider that 5 blocks from now basefee will still be at the same level. In the nonstationary case, when for instance a systemic change in the demand happens (e.g., the rate of Poisson arrivals increases), a user may want to hedge their bets by estimating their future payoffs in a different way, taking into account that basefee might increase instead. This strategy would probably be a good idea during the <em>transition</em> phase, when basefee shifts from one stationary point to a new one.</p>
<p>We make the assumption here that users choose their 1559 parameters based on their value alone. We set the transaction <code>max_fee</code> parameter to the value of the user and set the <code>gas_premium</code> parameter to a residual value -- 1 Gwei per unit of gas.</p>
<p>There is no loss of generality in assuming all users send the same transaction in (e.g., a simple transfer) and so all transactions have the same <code>gas_used</code> value (21,000). In 1559 paradigm, with a 20M gas limit per block, this allows at most 952 transactions to be included, although the mechanism will target half of that, around 475 here. The protocol adjusts the basefee to apply economic pressure, towards a target gas usage of 10M per block.</p>
<h2 id="Simulation">Simulation<a class="anchor-link" href="#Simulation">¶</a></h2><p>We import a few classes from our <code>abm1559</code> package.</p>
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs ">
<details>
<summary>Open code input</summary>
<div class="jp-Cell-inputWrapper">
<div class="jp-InputArea jp-Cell-inputArea">
<div></div>
<div class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline">
<div class="CodeMirror cm-s-jupyter">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">%</span><span class="k">config</span> InlineBackend.figure_format = 'svg'
<span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">sys</span>
<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">insert</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">pardir</span><span class="p">))</span>
<span class="c1"># You may remove the two lines above if you have installed abm1559 from pypi</span>
<span class="kn">from</span> <span class="nn">abm1559.utils</span> <span class="kn">import</span> <span class="n">constants</span>
<span class="kn">from</span> <span class="nn">abm1559.txpool</span> <span class="kn">import</span> <span class="n">TxPool</span>
<span class="kn">from</span> <span class="nn">abm1559.users</span> <span class="kn">import</span> <span class="n">User1559</span>
<span class="kn">from</span> <span class="nn">abm1559.userpool</span> <span class="kn">import</span> <span class="n">UserPool</span>
<span class="kn">from</span> <span class="nn">abm1559.chain</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">Chain</span><span class="p">,</span>
<span class="n">Block1559</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">from</span> <span class="nn">abm1559.simulator</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">spawn_poisson_demand</span><span class="p">,</span>
<span class="n">update_basefee</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
</pre></div>
</div>
</div>
</div>
</div>
</details>
</div>
<div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<p>And define the main function used to simulate the fee market.</p>
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell jp-mod-noOutputs ">
<details>
<summary>Open code input</summary>
<div class="jp-Cell-inputWrapper">
<div class="jp-InputArea jp-Cell-inputArea">
<div></div>
<div class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline">
<div class="CodeMirror cm-s-jupyter">
<div class=" highlight hl-ipython3"><pre><span></span><span class="k">def</span> <span class="nf">simulate</span><span class="p">(</span><span class="n">demand_scenario</span><span class="p">,</span> <span class="n">UserClass</span><span class="p">):</span>
<span class="c1"># Instantiate a couple of things</span>
<span class="n">txpool</span> <span class="o">=</span> <span class="n">TxPool</span><span class="p">()</span>
<span class="n">basefee</span> <span class="o">=</span> <span class="n">constants</span><span class="p">[</span><span class="s2">"INITIAL_BASEFEE"</span><span class="p">]</span>
<span class="n">chain</span> <span class="o">=</span> <span class="n">Chain</span><span class="p">()</span>
<span class="n">metrics</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">user_pool</span> <span class="o">=</span> <span class="n">UserPool</span><span class="p">()</span>
<span class="k">for</span> <span class="n">t</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">demand_scenario</span><span class="p">)):</span>
<span class="k">if</span> <span class="n">t</span> <span class="o">%</span> <span class="mi">100</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span> <span class="nb">print</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
<span class="c1"># `env` is the "environment" of the simulation</span>
<span class="n">env</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">"basefee"</span><span class="p">:</span> <span class="n">basefee</span><span class="p">,</span>
<span class="s2">"current_block"</span><span class="p">:</span> <span class="n">t</span><span class="p">,</span>
<span class="p">}</span>
<span class="c1"># We return a demand drawn from a Poisson distribution.</span>
<span class="c1"># The parameter is given by `demand_scenario[t]`, and can vary</span>
<span class="c1"># over time.</span>
<span class="n">users</span> <span class="o">=</span> <span class="n">spawn_poisson_demand</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">demand_scenario</span><span class="p">[</span><span class="n">t</span><span class="p">],</span> <span class="n">UserClass</span><span class="p">)</span>
<span class="c1"># We query each new user with the current basefee value</span>
<span class="c1"># Users either return a transaction or None if they prefer to balk</span>
<span class="n">decided_txs</span> <span class="o">=</span> <span class="n">user_pool</span><span class="o">.</span><span class="n">decide_transactions</span><span class="p">(</span><span class="n">users</span><span class="p">,</span> <span class="n">env</span><span class="p">)</span>
<span class="c1"># New transactions are added to the transaction pool</span>
<span class="n">txpool</span><span class="o">.</span><span class="n">add_txs</span><span class="p">(</span><span class="n">decided_txs</span><span class="p">)</span>
<span class="c1"># The best valid transactions are taken out of the pool for inclusion</span>
<span class="n">selected_txs</span> <span class="o">=</span> <span class="n">txpool</span><span class="o">.</span><span class="n">select_transactions</span><span class="p">(</span><span class="n">env</span><span class="p">)</span>
<span class="n">txpool</span><span class="o">.</span><span class="n">remove_txs</span><span class="p">([</span><span class="n">tx</span><span class="o">.</span><span class="n">tx_hash</span> <span class="k">for</span> <span class="n">tx</span> <span class="ow">in</span> <span class="n">selected_txs</span><span class="p">])</span>
<span class="c1"># We create a block with these transactions</span>
<span class="n">block</span> <span class="o">=</span> <span class="n">Block1559</span><span class="p">(</span><span class="n">txs</span> <span class="o">=</span> <span class="n">selected_txs</span><span class="p">,</span> <span class="n">parent_hash</span> <span class="o">=</span> <span class="n">chain</span><span class="o">.</span><span class="n">current_head</span><span class="p">,</span> <span class="n">height</span> <span class="o">=</span> <span class="n">t</span><span class="p">,</span> <span class="n">basefee</span> <span class="o">=</span> <span class="n">basefee</span><span class="p">)</span>
<span class="c1"># The block is added to the chain</span>
<span class="n">chain</span><span class="o">.</span><span class="n">add_block</span><span class="p">(</span><span class="n">block</span><span class="p">)</span>
<span class="c1"># A couple of metrics we will use to monitor the simulation</span>
<span class="n">row_metrics</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">"block"</span><span class="p">:</span> <span class="n">t</span><span class="p">,</span>
<span class="s2">"basefee"</span><span class="p">:</span> <span class="n">basefee</span> <span class="o">/</span> <span class="p">(</span><span class="mi">10</span> <span class="o">**</span> <span class="mi">9</span><span class="p">),</span>
<span class="s2">"users"</span><span class="p">:</span> <span class="nb">len</span><span class="p">(</span><span class="n">users</span><span class="p">),</span>
<span class="s2">"decided_txs"</span><span class="p">:</span> <span class="nb">len</span><span class="p">(</span><span class="n">decided_txs</span><span class="p">),</span>
<span class="s2">"included_txs"</span><span class="p">:</span> <span class="nb">len</span><span class="p">(</span><span class="n">selected_txs</span><span class="p">),</span>
<span class="s2">"blk_avg_gas_price"</span><span class="p">:</span> <span class="n">block</span><span class="o">.</span><span class="n">average_gas_price</span><span class="p">(),</span>
<span class="s2">"blk_avg_tip"</span><span class="p">:</span> <span class="n">block</span><span class="o">.</span><span class="n">average_tip</span><span class="p">(),</span>
<span class="s2">"pool_length"</span><span class="p">:</span> <span class="n">txpool</span><span class="o">.</span><span class="n">pool_length</span><span class="p">(),</span>
<span class="p">}</span>
<span class="n">metrics</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">row_metrics</span><span class="p">)</span>
<span class="c1"># Finally, basefee is updated and a new round starts</span>
<span class="n">basefee</span> <span class="o">=</span> <span class="n">update_basefee</span><span class="p">(</span><span class="n">block</span><span class="p">,</span> <span class="n">basefee</span><span class="p">)</span>
<span class="k">return</span> <span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">metrics</span><span class="p">),</span> <span class="n">user_pool</span><span class="p">,</span> <span class="n">chain</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>
</details>
</div>
<div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<p>As you can see, <code>simulate</code> takes in a <code>demand_scenario</code> array. Earlier we mentioned that each round, we draw the number of users wishing to send transactions from a Poisson distribution. <a href="https://en.wikipedia.org/wiki/Poisson_distribution">This distribution is parameterised by the expected number of arrivals, called <em>lambda</em> $\lambda$</a>. The <code>demand_scenario</code> array contains a sequence of such lambda's. We also provide in <code>UserClass</code> the type of user we would like to model (see the <a href="http://barnabemonnot.com/abm1559/build/html/#users">docs</a> for more details).</p>
<p>Our users draw their <em>value</em> for the transaction (per unit of gas) from a uniform distribution, picking a random number between 0 and 20 (Gwei). Their cost for waiting one extra unit of time is drawn from a uniform distribution too, this time between 0 and 1 (Gwei). The closer their cost is to 1, the more impatient users are.</p>
<p>Say for instance that I value each unit of gas at 15 Gwei, and my cost per round is 0.5 Gwei. If I wait for 6 blocks to be included at a gas price of 10 Gwei, my payoff is $15 - 6 \times 0.5 - 10 = 2$.</p>
<p>The numbers above sound arbitrary, and in a sense they are! They were chosen to respect the scales we are used to (<a href="https://ethereum.github.io/rig/ethdata/notebooks/gas_weather_reports/exploreJuly21.html">although gas prices are closer to 100 Gweis these days...</a>). It also turns out that any distribution (uniform, Pareto, whatever floats your boat) leads to stationarity. The important part is that <em>some</em> users have positive value for transacting in the first place, enough to fill a block to its target size at least. The choice of sample the cost from a uniform distribution, as opposed to having all users experience the same cost per round, allows for <strong>simulating a scenario where some users are more in a hurry than others</strong>.</p>
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell ">
<details>
<summary>Open code input</summary>
<div class="jp-Cell-inputWrapper">
<div class="jp-InputArea jp-Cell-inputArea">
<div></div>
<div class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline">
<div class="CodeMirror cm-s-jupyter">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">demand_scenario</span> <span class="o">=</span> <span class="p">[</span><span class="mi">2000</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">200</span><span class="p">)]</span>
<span class="p">(</span><span class="n">df</span><span class="p">,</span> <span class="n">user_pool</span><span class="p">,</span> <span class="n">chain</span><span class="p">)</span> <span class="o">=</span> <span class="n">simulate</span><span class="p">(</span><span class="n">demand_scenario</span><span class="p">,</span> <span class="n">User1559</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>
</details>
<div class="jp-Cell-outputWrapper">
<div class="jp-OutputArea jp-Cell-outputArea">
<div class="jp-OutputArea-child">
<div></div>
<div class="jp-RenderedText jp-OutputArea-output" data-mime-type="text/plain">
<pre>0
100
</pre>
</div>
</div>
</div>
</div>
</div>
<div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<p>To study the stationary case, we create an array repeating $\lambda$ for as many blocks as we wish to simulate the market for. We set $\lambda$ to spawn on average 2000 users between two blocks.</p>
</div>
<div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<h3 id="Results">Results<a class="anchor-link" href="#Results">¶</a></h3><p>Let's print the head and tail of the data frame holding our metrics. Each row corresponds to one round of our simulation, so one block.</p>
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell ">
<details>
<summary>Open code input</summary>
<div class="jp-Cell-inputWrapper">
<div class="jp-InputArea jp-Cell-inputArea">
<div></div>
<div class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline">
<div class="CodeMirror cm-s-jupyter">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">df</span>
</pre></div>
</div>
</div>
</div>
</div>
</details>
<div class="jp-Cell-outputWrapper">
<div class="jp-OutputArea jp-Cell-outputArea">
<div class="jp-OutputArea-child">
<div></div>
<div class="jp-RenderedHTMLCommon jp-RenderedHTML jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/html">
<div>
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th>block</th>
<th>basefee</th>
<th>users</th>
<th>decided_txs</th>
<th>included_txs</th>
<th>blk_avg_gas_price</th>
<th>blk_avg_tip</th>
<th>pool_length</th>
</tr>
</thead>
<tbody>
<tr>
<th>0</th>
<td>0</td>
<td>1.000000</td>
<td>2031</td>
<td>1562</td>
<td>952</td>
<td>2.000000</td>
<td>1.0</td>
<td>610</td>
</tr>
<tr>
<th>1</th>
<td>1</td>
<td>1.124900</td>
<td>1983</td>
<td>1525</td>
<td>952</td>
<td>2.124900</td>
<td>1.0</td>
<td>1183</td>
</tr>
<tr>
<th>2</th>
<td>2</td>
<td>1.265400</td>
<td>1912</td>
<td>1453</td>
<td>952</td>
<td>2.265400</td>
<td>1.0</td>
<td>1684</td>
</tr>
<tr>
<th>3</th>
<td>3</td>
<td>1.423448</td>
<td>1997</td>
<td>1493</td>
<td>952</td>
<td>2.423448</td>
<td>1.0</td>
<td>2225</td>
</tr>
<tr>
<th>4</th>
<td>4</td>
<td>1.601237</td>
<td>2001</td>
<td>1459</td>
<td>952</td>
<td>2.601237</td>
<td>1.0</td>
<td>2732</td>
</tr>
<tr>
<th>...</th>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
<tr>
<th>195</th>
<td>195</td>
<td>11.795094</td>
<td>2001</td>
<td>508</td>
<td>508</td>
<td>12.795094</td>
<td>1.0</td>
<td>1924</td>
</tr>
<tr>
<th>196</th>
<td>196</td>
<td>11.893583</td>
<td>2040</td>
<td>459</td>
<td>459</td>
<td>12.893583</td>
<td>1.0</td>
<td>1924</td>
</tr>
<tr>
<th>197</th>
<td>197</td>
<td>11.839914</td>
<td>1979</td>
<td>462</td>
<td>462</td>
<td>12.839914</td>
<td>1.0</td>
<td>1924</td>
</tr>
<tr>
<th>198</th>
<td>198</td>
<td>11.795810</td>
<td>1983</td>
<td>487</td>
<td>487</td>
<td>12.795810</td>
<td>1.0</td>
<td>1924</td>
</tr>
<tr>
<th>199</th>
<td>199</td>
<td>11.829281</td>
<td>1960</td>
<td>444</td>
<td>444</td>
<td>12.829281</td>
<td>1.0</td>
<td>1924</td>
</tr>
</tbody>
</table>
<p>200 rows × 8 columns</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
<p>At the start of the simulation we clearly see in column <code>users</code> a demand close to 2000 users per round. Among these 2000 or so, around 1500 decide to send their transaction in (<code>decided_txs</code>). The 500 who don't might have a low value or high per-round costs, meaning it is unprofitable for them to even send their transaction in. Eventually 952 of them are included (<code>included_txs</code>), maxing out the block gas limit. The basefee starts at 1 Gwei but steadily increases from there, reaching around 11.8 Gwei by the end.</p>
<p>By the end of the simulation, we note that <code>decided_txs</code> is always equal to <code>included_txs</code>. By this point, the basefee has risen enough to make it unprofitable for most users to send their transactions. This is exactly what we want! Users balk at the current prices.</p>
<p>In the next chart we show the evolution of basefee and tips. We define <em>tip</em> as the gas price minus the basefee, which is what <em>miners</em> receive from the transaction.</p>
<p>Note that <a href="https://twitter.com/barnabemonnot/status/1284271520311848960">tip is in general <strong>not</strong> equal to the gas premium</a> that users set. This is particularly true when basefee plus gas premium exceeds the max fee of the user. In the graph below, the tip hovers around 1 Gwei (the premium), but is sometimes less than 1 too, especially when users see the prevailing basefee approach their posted max fees.</p>
</div><div class="jp-Cell jp-CodeCell jp-Notebook-cell ">
<details>
<summary>Open code input</summary>
<div class="jp-Cell-inputWrapper">
<div class="jp-InputArea jp-Cell-inputArea">
<div></div>
<div class="jp-CodeMirrorEditor jp-Editor jp-InputArea-editor" data-type="inline">
<div class="CodeMirror cm-s-jupyter">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">df</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="s2">"block"</span><span class="p">,</span> <span class="p">[</span><span class="s2">"basefee"</span><span class="p">,</span> <span class="s2">"blk_avg_tip"</span><span class="p">])</span>
</pre></div>
</div>
</div>
</div>
</div>
</details>
<div class="jp-Cell-outputWrapper">
<div class="jp-OutputArea jp-Cell-outputArea">
<div class="jp-OutputArea-child">
<div></div>
<div class="jp-RenderedText jp-OutputArea-output jp-OutputArea-executeResult" data-mime-type="text/plain">
<pre><AxesSubplot:xlabel='block'></pre>
</div>
</div>
<div class="jp-OutputArea-child">
<div></div>
<div class="jp-RenderedSVG jp-OutputArea-output " data-mime-type="image/svg+xml">
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with matplotlib (https://matplotlib.org/) -->
<svg height="262.19625pt" version="1.1" viewBox="0 0 368.925 262.19625" width="368.925pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<metadata>
<rdf:RDF xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<cc:Work>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:date>2021-01-29T10:19:45.966470</dc:date>
<dc:format>image/svg+xml</dc:format>
<dc:creator>
<cc:Agent>
<dc:title>Matplotlib v3.3.3, https://matplotlib.org/</dc:title>
</cc:Agent>
</dc:creator>
</cc:Work>
</rdf:RDF>
</metadata>
<defs>
<style type="text/css">*{stroke-linecap:butt;stroke-linejoin:round;}</style>
</defs>
<g id="figure_1">
<g id="patch_1">
<path d="M -0 262.19625
L 368.925 262.19625
L 368.925 0
L -0 0
z
" style="fill:none;"/>
</g>
<g id="axes_1">
<g id="patch_2">
<path d="M 26.925 224.64
L 361.725 224.64
L 361.725 7.2
L 26.925 7.2
z
" style="fill:#ffffff;"/>
</g>
<g id="matplotlib.axis_1">
<g id="xtick_1">
<g id="line2d_1">
<defs>
<path d="M 0 0
L 0 3.5
" id="m0f3aed0770" style="stroke:#000000;stroke-width:0.8;"/>
</defs>
<g>
<use style="stroke:#000000;stroke-width:0.8;" x="42.143182" xlink:href="#m0f3aed0770" y="224.64"/>
</g>
</g>
<g id="text_1">
<!-- 0 -->
<g transform="translate(38.961932 239.238437)scale(0.1 -0.1)">
<defs>
<path d="M 31.78125 66.40625
Q 24.171875 66.40625 20.328125 58.90625
Q 16.5 51.421875 16.5 36.375
Q 16.5 21.390625 20.328125 13.890625
Q 24.171875 6.390625 31.78125 6.390625
Q 39.453125 6.390625 43.28125 13.890625
Q 47.125 21.390625 47.125 36.375
Q 47.125 51.421875 43.28125 58.90625
Q 39.453125 66.40625 31.78125 66.40625
z
M 31.78125 74.21875
Q 44.046875 74.21875 50.515625 64.515625
Q 56.984375 54.828125 56.984375 36.375
Q 56.984375 17.96875 50.515625 8.265625
Q 44.046875 -1.421875 31.78125 -1.421875
Q 19.53125 -1.421875 13.0625 8.265625
Q 6.59375 17.96875 6.59375 36.375
Q 6.59375 54.828125 13.0625 64.515625
Q 19.53125 74.21875 31.78125 74.21875
z
" id="DejaVuSans-48"/>
</defs>
<use xlink:href="#DejaVuSans-48"/>
</g>
</g>
</g>
<g id="xtick_2">
<g id="line2d_2">
<g>
<use style="stroke:#000000;stroke-width:0.8;" x="80.37982" xlink:href="#m0f3aed0770" y="224.64"/>
</g>
</g>
<g id="text_2">
<!-- 25 -->
<g transform="translate(74.01732 239.238437)scale(0.1 -0.1)">
<defs>
<path d="M 19.1875 8.296875
L 53.609375 8.296875
L 53.609375 0
L 7.328125 0
L 7.328125 8.296875
Q 12.9375 14.109375 22.625 23.890625
Q 32.328125 33.6875 34.8125 36.53125
Q 39.546875 41.84375 41.421875 45.53125
Q 43.3125 49.21875 43.3125 52.78125
Q 43.3125 58.59375 39.234375 62.25
Q 35.15625 65.921875 28.609375 65.921875
Q 23.96875 65.921875 18.8125 64.3125
Q 13.671875 62.703125 7.8125 59.421875
L 7.8125 69.390625
Q 13.765625 71.78125 18.9375 73
Q 24.125 74.21875 28.421875 74.21875
Q 39.75 74.21875 46.484375 68.546875
Q 53.21875 62.890625 53.21875 53.421875
Q 53.21875 48.921875 51.53125 44.890625
Q 49.859375 40.875 45.40625 35.40625
Q 44.1875 33.984375 37.640625 27.21875
Q 31.109375 20.453125 19.1875 8.296875
z
" id="DejaVuSans-50"/>
<path d="M 10.796875 72.90625
L 49.515625 72.90625
L 49.515625 64.59375
L 19.828125 64.59375
L 19.828125 46.734375
Q 21.96875 47.46875 24.109375 47.828125
Q 26.265625 48.1875 28.421875 48.1875
Q 40.625 48.1875 47.75 41.5
Q 54.890625 34.8125 54.890625 23.390625
Q 54.890625 11.625 47.5625 5.09375
Q 40.234375 -1.421875 26.90625 -1.421875
Q 22.3125 -1.421875 17.546875 -0.640625
Q 12.796875 0.140625 7.71875 1.703125
L 7.71875 11.625
Q 12.109375 9.234375 16.796875 8.0625
Q 21.484375 6.890625 26.703125 6.890625
Q 35.15625 6.890625 40.078125 11.328125
Q 45.015625 15.765625 45.015625 23.390625
Q 45.015625 31 40.078125 35.4375
Q 35.15625 39.890625 26.703125 39.890625
Q 22.75 39.890625 18.8125 39.015625
Q 14.890625 38.140625 10.796875 36.28125
z
" id="DejaVuSans-53"/>
</defs>
<use xlink:href="#DejaVuSans-50"/>
<use x="63.623047" xlink:href="#DejaVuSans-53"/>
</g>
</g>
</g>
<g id="xtick_3">
<g id="line2d_3">
<g>
<use style="stroke:#000000;stroke-width:0.8;" x="118.616457" xlink:href="#m0f3aed0770" y="224.64"/>
</g>
</g>
<g id="text_3">
<!-- 50 -->
<g transform="translate(112.253957 239.238437)scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-53"/>
<use x="63.623047" xlink:href="#DejaVuSans-48"/>
</g>
</g>
</g>
<g id="xtick_4">
<g id="line2d_4">
<g>
<use style="stroke:#000000;stroke-width:0.8;" x="156.853095" xlink:href="#m0f3aed0770" y="224.64"/>
</g>
</g>
<g id="text_4">
<!-- 75 -->
<g transform="translate(150.490595 239.238437)scale(0.1 -0.1)">
<defs>
<path d="M 8.203125 72.90625
L 55.078125 72.90625
L 55.078125 68.703125
L 28.609375 0
L 18.3125 0
L 43.21875 64.59375
L 8.203125 64.59375
z
" id="DejaVuSans-55"/>
</defs>
<use xlink:href="#DejaVuSans-55"/>
<use x="63.623047" xlink:href="#DejaVuSans-53"/>
</g>
</g>
</g>
<g id="xtick_5">
<g id="line2d_5">
<g>
<use style="stroke:#000000;stroke-width:0.8;" x="195.089733" xlink:href="#m0f3aed0770" y="224.64"/>
</g>
</g>
<g id="text_5">
<!-- 100 -->
<g transform="translate(185.545983 239.238437)scale(0.1 -0.1)">
<defs>
<path d="M 12.40625 8.296875
L 28.515625 8.296875
L 28.515625 63.921875
L 10.984375 60.40625
L 10.984375 69.390625
L 28.421875 72.90625
L 38.28125 72.90625
L 38.28125 8.296875
L 54.390625 8.296875
L 54.390625 0
L 12.40625 0
z
" id="DejaVuSans-49"/>
</defs>
<use xlink:href="#DejaVuSans-49"/>
<use x="63.623047" xlink:href="#DejaVuSans-48"/>
<use x="127.246094" xlink:href="#DejaVuSans-48"/>
</g>
</g>
</g>
<g id="xtick_6">
<g id="line2d_6">
<g>
<use style="stroke:#000000;stroke-width:0.8;" x="233.32637" xlink:href="#m0f3aed0770" y="224.64"/>
</g>
</g>
<g id="text_6">
<!-- 125 -->
<g transform="translate(223.78262 239.238437)scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-49"/>
<use x="63.623047" xlink:href="#DejaVuSans-50"/>
<use x="127.246094" xlink:href="#DejaVuSans-53"/>
</g>
</g>
</g>
<g id="xtick_7">
<g id="line2d_7">
<g>
<use style="stroke:#000000;stroke-width:0.8;" x="271.563008" xlink:href="#m0f3aed0770" y="224.64"/>
</g>
</g>
<g id="text_7">
<!-- 150 -->
<g transform="translate(262.019258 239.238437)scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-49"/>
<use x="63.623047" xlink:href="#DejaVuSans-53"/>
<use x="127.246094" xlink:href="#DejaVuSans-48"/>
</g>
</g>
</g>
<g id="xtick_8">
<g id="line2d_8">
<g>
<use style="stroke:#000000;stroke-width:0.8;" x="309.799646" xlink:href="#m0f3aed0770" y="224.64"/>
</g>
</g>
<g id="text_8">
<!-- 175 -->
<g transform="translate(300.255896 239.238437)scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-49"/>
<use x="63.623047" xlink:href="#DejaVuSans-55"/>
<use x="127.246094" xlink:href="#DejaVuSans-53"/>
</g>
</g>
</g>
<g id="xtick_9">
<g id="line2d_9">
<g>
<use style="stroke:#000000;stroke-width:0.8;" x="348.036284" xlink:href="#m0f3aed0770" y="224.64"/>
</g>
</g>
<g id="text_9">
<!-- 200 -->
<g transform="translate(338.492534 239.238437)scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-50"/>
<use x="63.623047" xlink:href="#DejaVuSans-48"/>
<use x="127.246094" xlink:href="#DejaVuSans-48"/>
</g>
</g>
</g>
<g id="text_10">
<!-- block -->
<g transform="translate(181.057813 252.916562)scale(0.1 -0.1)">
<defs>
<path d="M 48.6875 27.296875
Q 48.6875 37.203125 44.609375 42.84375
Q 40.53125 48.484375 33.40625 48.484375
Q 26.265625 48.484375 22.1875 42.84375
Q 18.109375 37.203125 18.109375 27.296875
Q 18.109375 17.390625 22.1875 11.75
Q 26.265625 6.109375 33.40625 6.109375
Q 40.53125 6.109375 44.609375 11.75
Q 48.6875 17.390625 48.6875 27.296875
z
M 18.109375 46.390625
Q 20.953125 51.265625 25.265625 53.625
Q 29.59375 56 35.59375 56
Q 45.5625 56 51.78125 48.09375
Q 58.015625 40.1875 58.015625 27.296875
Q 58.015625 14.40625 51.78125 6.484375
Q 45.5625 -1.421875 35.59375 -1.421875
Q 29.59375 -1.421875 25.265625 0.953125
Q 20.953125 3.328125 18.109375 8.203125
L 18.109375 0
L 9.078125 0
L 9.078125 75.984375
L 18.109375 75.984375
z
" id="DejaVuSans-98"/>
<path d="M 9.421875 75.984375
L 18.40625 75.984375
L 18.40625 0
L 9.421875 0
z
" id="DejaVuSans-108"/>
<path d="M 30.609375 48.390625
Q 23.390625 48.390625 19.1875 42.75
Q 14.984375 37.109375 14.984375 27.296875
Q 14.984375 17.484375 19.15625 11.84375
Q 23.34375 6.203125 30.609375 6.203125
Q 37.796875 6.203125 41.984375 11.859375
Q 46.1875 17.53125 46.1875 27.296875
Q 46.1875 37.015625 41.984375 42.703125
Q 37.796875 48.390625 30.609375 48.390625
z
M 30.609375 56
Q 42.328125 56 49.015625 48.375
Q 55.71875 40.765625 55.71875 27.296875
Q 55.71875 13.875 49.015625 6.21875
Q 42.328125 -1.421875 30.609375 -1.421875
Q 18.84375 -1.421875 12.171875 6.21875
Q 5.515625 13.875 5.515625 27.296875
Q 5.515625 40.765625 12.171875 48.375
Q 18.84375 56 30.609375 56
z
" id="DejaVuSans-111"/>
<path d="M 48.78125 52.59375
L 48.78125 44.1875
Q 44.96875 46.296875 41.140625 47.34375
Q 37.3125 48.390625 33.40625 48.390625
Q 24.65625 48.390625 19.8125 42.84375
Q 14.984375 37.3125 14.984375 27.296875
Q 14.984375 17.28125 19.8125 11.734375
Q 24.65625 6.203125 33.40625 6.203125
Q 37.3125 6.203125 41.140625 7.25
Q 44.96875 8.296875 48.78125 10.40625
L 48.78125 2.09375
Q 45.015625 0.34375 40.984375 -0.53125
Q 36.96875 -1.421875 32.421875 -1.421875
Q 20.0625 -1.421875 12.78125 6.34375
Q 5.515625 14.109375 5.515625 27.296875
Q 5.515625 40.671875 12.859375 48.328125
Q 20.21875 56 33.015625 56
Q 37.15625 56 41.109375 55.140625
Q 45.0625 54.296875 48.78125 52.59375
z
" id="DejaVuSans-99"/>
<path d="M 9.078125 75.984375
L 18.109375 75.984375
L 18.109375 31.109375
L 44.921875 54.6875
L 56.390625 54.6875
L 27.390625 29.109375
L 57.625 0
L 45.90625 0
L 18.109375 26.703125
L 18.109375 0
L 9.078125 0
z
" id="DejaVuSans-107"/>
</defs>
<use xlink:href="#DejaVuSans-98"/>