-
Notifications
You must be signed in to change notification settings - Fork 0
/
whaling.tex
103 lines (84 loc) · 2.81 KB
/
whaling.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
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
\documentclass[a4paper, 12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{dsfont}
\usepackage[left=2cm, right=2cm, bottom=3cm, top=2cm]{geometry}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{microtype}
\usepackage{natbib}
\newcommand{\given}{\,|\,}
\title{Whaling}
\author{Brendon J. Brewer}
\date{}
\begin{document}
\maketitle
%\abstract{\noindent Abstract}
% Need this after the abstract
\setlength{\parindent}{0pt}
\setlength{\parskip}{8pt}
\section{AR setup}
Let $x$ be an old total amount and $x'$ be the new one. The updated trending
score $y'$ is then
\begin{align}
y' &= ky + f(x, x', y)
\end{align}
where $y$ is the old trending score, $k$ is the decay coefficient, and
$f(x, x', y)$ is the spike height function.
Suppose a whale has $L$ LBC and shifts it onto a claim with initial amount
close to zero and initial trending score close to zero.
The trending score will jump to
\begin{align}
y' &= k \times 0 + f(L, 0, 0)
\end{align}
Under the current {\tt ar.py}, this is (ignoring the minnow boost)
\begin{align}
y' \approx L^{1/4}.
\end{align}
If this happens at time $t=0$ (in units of blocks), it will decay according to
\begin{align}
y(t) &= L^{1/4} k^t. \label{eqn:decay}
\end{align}
The half life of the decay is $\ell = -1/\log_2(k)$.
If we assume that a whale
does this every $m$ blocks, the stationary distribution over trending score
will have this inverse CDF:
\begin{align}
y &= F^{-1}(u) \\
&= L^{1/4} k^{m(1-u)}.
\end{align}
Inverting this gives the CDF
\begin{align}
\ln y + 4 \ln L &= m(1-u)\ln k \\
F(y) &= 1 - \frac{\ln y + 4 \ln L}{m \ln k}.
\end{align}
Differentiation shows that the PDF is proportional to
$1/y$, and the bounds are $[L^{1/4}k^m, L^{1/4}]$.
If there are lots of whales with $L$ LBC, this will also be, in expectation,
the frequency distribution of their trending scores, at fixed $L$.
Let's find the joint distribution of $L$ and $y$.
Let $L$ have a Pareto distribution. Then,
\begin{align}
f(L, y) &= f(L)f(y \given L) \\
&\propto \frac{1}{yL^{\alpha + 1}}
\end{align}
where $L > L_{\rm min}$ and $y \in L^{1/4}[k^m, 1]$.
The conditional $f(L \given y)$ should tell us the
frequency distribution of LBC balances
of whales at trending level $y$. It will be proportional to
the joint:
\begin{align}
f(L \given y) &\propto \frac{1}{yL^{\alpha + 1}}
\end{align}
and its normalisation is
\begin{align}
Z(y) &= \int \frac{1}{yL^{\alpha + 1}} \, dL \\
&= \frac{1}{y}\int_{k^{4m}}^{1} \frac{1}{L^{\alpha + 1}} \, dL \\
&= \frac{1}{y}\left[\frac{-1}{\alpha L^\alpha}\right]_{k^{4m}}^{1} \\
&= \frac{1}{y}\left[\frac{1}{\alpha k^{4m\alpha}} -
\frac{1}{\alpha} \right] \\
&= \frac{1}{\alpha y}\left[\frac{1 - k^{4m\alpha}}{k^{4m\alpha}}\right] \\
\end{align}
\bibliographystyle{plainnat}
\bibliography{references}
\end{document}