Skip to content

Commit

Permalink
0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vang1ong7ang committed Mar 15, 2020
1 parent 847ecbf commit 3c88b80
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
116 changes: 112 additions & 4 deletions dual-token-model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -142,13 +189,27 @@
"## 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": {},
"source": [
"## 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": {},
Expand Down Expand Up @@ -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()"
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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": {},
Expand Down Expand Up @@ -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"
]
},
{
Expand Down

0 comments on commit 3c88b80

Please sign in to comment.