Neo was founded 2014 and has grown into a first-class smart contract platform. It is backed by a global developer community who continue to drive the blockchain forward. more
The N3 version of the Neo MainNet launched at 9:00:00 on August 2nd, 2021 (UTC). more
Neo is unique in that it was the first public blockchain platform to adopt a dual token mechanism (NEO and GAS). It separates the rights of governance from the rights of using the network. It also provides a means of acquiring the tokens needing to pay transaction fees. more
NEO token holders decide who is in charge of maintaining the Neo network through the election of a Neo Council. GAS token rewards are distributed to voters and council members alike. more
NeoBurger project seeks to compensate for the usability issues of indivisible NEO in applications such as DeFi, while also providing an avenue for maximized GAS rewards for holders. more
NeoBurger earns the majority of its GAS by voting in the Neo N3 governance mechanism. NEO pooled in the NeoBurger contract is automatically managed using different voting strategies. NEO is distributed between a limited number of “agents,” each of which can cast a vote. By using multiple agents as separate wallets, NeoBurger can get around the limitation of only being able to vote for one candidate at a time.
Constant management of votes between the agents allows the NeoBurger platform to maximize the GAS received from the vote reward distribution. The majority of these rewards are passed on to bNEO holders, although some fees do also apply to certain actions. As more NEO is pooled in NeoBurger, the platform can employ further strategies, for example to use its increased vote weight to help elect new nodes to the council.
In this article, the NeoBurger strategy of a simplified governance mechanism of Neo network is introduced.
Everyone can burn 1000
GAS and become a candidate.
Every NEO holder can vote for a candidate and the voting weight is its NEO balance. Votes can be changed or canceled by the NEO holder.
The Top 7 voted candidates are elected as consensus nodes and the Top 21 voted candidates are elected as council members.
There are 5 GAS generated in each block: 40%
of the GAS are split equally among the 7 voter groups of consensus nodes and 40%
of the GAS are split equally among the 14 voter groups of non-consensus-nodes council members. Inside each group, the GAS is distributed to the voters by their NEO balances.
In this article, the reward coefficient is defined as the GAS distributed to each voter group.
NeoBurger can distribute its NEO to the controlled agents who vote for different specific candidates.
We want to solve the optimal NEO distribution.
In this article:
- amount of NEO is a positive real number instead of a positive integer while NEO is an indivisible token;
- reward coefficients are constants while actually they can be changed by moving candidate's rank up or down; (actually moving candidates into or out from consensus nodes or council members is a dangerous operation for the entire network if the candidates are not prepared well)
Given:
-
$\mathcal{C}$ : a set of candidates -
$v_c \in \mathbb{R}_{\gt 0}$ : the votes of each candidate$c \in \mathcal{C}$ -
$k_c \in \mathbb{R}_{\gt 0}$ : the reward coefficient of each candidate$c \in \mathcal{C}$ -
$n \in \mathbb{R}_{\gt 0}$ : the total amount of NEO we hold
Solve the amount of NEO
-
satisfing
$\sum_{c \in \mathcal{C}}{n_c} = n$ -
maximizing the following GAS reward expression:
$$ f = \sum_{c \in \mathcal{C}}{\frac{n_c k_c}{v_c + n_c}} \in \mathbb{R}_{\gt 0} $$
- time complexity
- space complexity
Define the solution as a mapping
-
calculate
$n_*$ :$$ n_* = \sum_{c \in \mathcal{C}}{v_c} $$
-
calculate
$u$ :$$ u = \frac{n + n_*}{\sum_{c \in \mathcal{C}}{\sqrt{k_c v_c}}} $$
-
for
$\forall c \in \mathcal{C}$ :$$ n_c = u \sqrt{k_c v_c} - v_c $$
-
define
$\mathcal{C}_+$ :$$ \mathcal{C}_+ = { c \vert c \in \mathcal{C}, n_c \ge 0 } $$
-
return a mapping
$\Psi_{\mathcal{C}}$ :$$ \Psi_{\mathcal{C}}(c) = \begin{cases} 0 & c \notin \mathcal{C}+ \ n_c & \mathcal{C}+ = \mathcal{C} \ \Psi_{\mathcal{C}_+}(c) & \text{else} \end{cases} $$
Proof of Correctness and complexity will be explained in this section.
Follow the method of Lagrange multipliers:
In order to find the maximum of function
The necessary condition for the optimality can be inferred by solving the following equation
Thus for
Thus for
Thus for
For
Thus:
Thus:
Sufficient conditions for a constrained local maximum can be stated in terms of a sequence of principal minors (determinants of upper-left-justified sub-matrices) of the bordered Hessian matrix of second derivatives of the Lagrangian expression.
Then:
For
$$ \mathbf{h}i = \begin{bmatrix} 0 & -1 & -1 & -1 & \dots & -1 \ -1 & -\frac{2 k{c_1} v_{c_1}}{ {(v_{c_1} + n_{c_1})}^3 } & & & & \ -1 & & -\frac{2 k_{c_2} v_{c_2}}{ {(v_{c_2} + n_{c_2})}^3 } & & & \ -1 & & & -\frac{2 k_{c_3} v_{c_3}}{ {(v_{c_3} + n_{c_3})}^3 } & & \ \vdots & & & & \ddots & \ -1 & & & & & -\frac{2 k_{c_i} v_{c_i}}{ {(v_{c_i} + n_{c_i})}^3 } \ \end{bmatrix} $$
Follow the Leibniz formula for determinants:
$$ \det \mathbf{h}i = \sum{1 \le t \le i}{(-1) {(-1)}^2 \prod_{1 \le s \le i, s \neq t}{-\frac{2 k_{c_s} v_{c_s}}{ {(v_{c_s} + n_{c_s})}^3 }}} $$
Thus:
$$ \operatorname{sign}(\det \mathbf{h}i) = \operatorname{sign}(\sum{1 \le t \le i}{ {(-1)}^i }) = {(-1)}^i $$
Thus it is a local maximum of function
Since the Hessian matrix shows
The only issue left is that sometimes
define
to satisfy
Otherwise
$$ \max{f} \vert_{\exists c \in \mathcal{C}- : n_c \gt 0} \lt \max{f} \vert{\forall c \in \mathcal{C}_- : n_c = 0} $$
Then re-calculate the rest.
damn greedy :)
<script>MathJax = {tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]}};</script> <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>