diff --git a/README.md b/README.md index 7f3ccd5..e1c0a5e 100644 --- a/README.md +++ b/README.md @@ -22,4 +22,4 @@ Follow the [LINK](dual-token-model.ipynb). Follow the [LINK](https://github.com/vang1ong7ang/DualTokenModel/releases). -*Interactive figures are lost if you open the article in github preview.* +*Interactive figures are lost if you open the article in github release.* diff --git a/dual-token-model.ipynb b/dual-token-model.ipynb index f75b71a..527041a 100644 --- a/dual-token-model.ipynb +++ b/dual-token-model.ipynb @@ -80,7 +80,54 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "TODO: Difference between GP and NEO holder, Only GP get GAS" + "As an example, current token model of [neo](http://neo.org/) will be shown below:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "> There are 2 kinds of native token defined in neo system: NEO and GAS.\n", + "> \n", + "> NEO is Governing Token. Neo holders can take part in NEO network management, including voting for consensus nodes, network parameter modification, etc. NEO's total amount is 100 million. Its minimum unit is 1 and can not be divided. It's registered in Genesis block, and stored in standby validators' muti-signature addresses.\n", + ">\n", + "> GAS is utility token, or network fuel token. Operation costs and incentive for consensus node in NEO network are paid in GAS. GAS's total amount is also 100 million and can be divided to 0.00000001 unit. Gas is registered in Genesis block and issued afterwards as block incentive for NEO holders.\n", + "> A new block is generated about every 15 seconds according to system design. Thus approximately 2 million new blocks are created every year. 100 million GAS is issued gradually in 22 years according to a attenuation algorithm. No GAS is issued afterwards." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "PoS and BFT like blockchains need governance mechanism to make on-chain decision and incentive mechanism to reward responsible governance participants. However, the implements detail of governance mechanism and incentive mechanism will not be introduced here. Some of the NEO holders are governance participants because NEO is the governance token. GAS can only be paid as transaction fees." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In the version 2 of [neo](http://neo.org/), the inflation GAS is distributed to NEO holders, which makes NEO holders too lazy to participate in on-chain governance because NEO holders get the same GAS whether they participate or not. Thus, in the version 3 of [neo](http://neo.org/), the inflation GAS is only distributed to governance participants as a reward." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In this article, governance participants is used instead of NEO holders. You should keep in mind that governace partcipants are not equivalent to NEO holders." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "However, the problem is that, the low demand of GAS makes GAS valueless, and easily been controlled in the market and exchanges by attackers. Currently there are not enough on-chain transactions which need a lot of GAS. Almost the only thing that a governance participant can to when it obtains a GAS is to sell it. Then, more want to sell it but less want to buy it. GAS becomes valueless. As a result, governance participants can not get enough reward if the price of GAS is too low." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In this article, solution will be proposed to solve the GAS dilemma." ] }, { @@ -142,6 +189,13 @@ "## No Inflation on NEO" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "As a respect to the original design, NEO can be kept with no inflation." + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -149,6 +203,13 @@ "## Permanent Inflation on GAS" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inflation GAS is used to incentive governance participants, permanent inflation on GAS is proposed to make the solution works in the long run." + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -244,7 +305,7 @@ " c = solution(S, T, K)\n", " x = numpy.arange(-8,8,0.001)\n", " y = solution.r(c).proportion(10**x)\n", - " matplotlib.pyplot.xlabel('g/n')\n", + " matplotlib.pyplot.xlabel('log(g/n)')\n", " matplotlib.pyplot.ylabel('r')\n", " matplotlib.pyplot.plot(x, y)\n", " matplotlib.pyplot.show()" @@ -296,7 +357,7 @@ "source": [ "@solution.decorator()\n", "def draw(S, T, K):\n", - " c = solution(S, T, K)\n", + " c = so.lution(S, T, K)\n", " x = numpy.arange(1,10,1)\n", " y = numpy.arange(0.1,100,0.1)\n", " x, y = numpy.meshgrid(x, y)\n", @@ -772,6 +833,50 @@ "The solution makes a soft exchange rate for NEO and GAS." ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "N \\approx x G\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The following expression shows the condition of no need to buy GAS, which is, the maximum price of GAS:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\frac{\\partial e}{\\partial n} \\Big | _{n=\\frac{A}{N}} = 0\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The following expression show the condition of the balance demand and supply where $P$ is the total supply of NEO and $Q$ is the total supply of GAS:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\n", + "\\begin{cases}\n", + "\\frac{\\partial e}{\\partial g} = 0 \\\\\n", + "\\frac{g}{n} = \\frac{Q}{P}\\\\\n", + "\\end{cases}\n", + "$$" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -811,12 +916,15 @@ "- $I$: amount of inflation GAS\n", "- $N$: price of NEO in dollar\n", "- $n$: amount of NEO held by the specific participant of neo governance\n", + "- $P$: total supply of NEO\n", "- $p$: rate of profit in dollar\n", + "- $Q$: total supply of GAS\n", "- $r$: reward weight rate\n", "- $S$: additional reward weight rate\n", "- $T$: minimal reward weight rate\n", "- $V$: the set of all governance participant\n", - "- $w$: reward weight" + "- $w$: reward weight\n", + "- $x$: exchange rate of NEO and GAS" ] }, {