aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2019-04-18 15:23:32 +0800
committerMission Liao <mission.liao@dexon.org>2019-04-18 15:23:32 +0800
commitd822d447fc24c20e905b4879ca035a1e73395fba (patch)
treefd492eb688efe348ce9d375624b39818f8a2b4e6
parentc813cb8a6bd106e4a902fb16b3aace842088da7c (diff)
downloaddexon-wiki-d822d447fc24c20e905b4879ca035a1e73395fba.tar.gz
dexon-wiki-d822d447fc24c20e905b4879ca035a1e73395fba.tar.zst
dexon-wiki-d822d447fc24c20e905b4879ca035a1e73395fba.zip
Initial commit for governance contract access
-rw-r--r--Governance-Contract-Access-Guide.md61
1 files changed, 61 insertions, 0 deletions
diff --git a/Governance-Contract-Access-Guide.md b/Governance-Contract-Access-Guide.md
new file mode 100644
index 0000000..64e2786
--- /dev/null
+++ b/Governance-Contract-Access-Guide.md
@@ -0,0 +1,61 @@
+
+## Contract Write function
+In this section, we briefly introduce some functions that DEXON governance provides to write in.
+
+### Register
+1. In DekuSan wallet, switch to the `owner's account`.
+2. Navigate to the `Write` tab of the governance contract and select `register` from the dropdown menu.
+3. Fill in the information like below; currently, you need 1M DXN to run a BP node.
+ - Node Public Key (you must hold the corresponding secret key)
+ - Name of the node
+ - Contact email
+ - Node Location
+ - Website URL
+4. Click `Send` and `confirm` in DekuSan wallet.
+
+### Stake/Unstake
+After registering, each node owner can continue depositing more stake into DEXON governance contract. This is super easy to achieve in DEXON governance contract.
+ 1. Switch to the `owner account` in DekuSan wallet.
+ 2. Navigate to the `Write` tab and select `stake` from the dropdown menu.
+ 3. Fill the amount of stake in the contract.
+ 4. Click `Send` and `confirm` in DekuSan wallet.
+
+On the other hand, each node owner can also unstake from DEXON governance contract. This is almost identical to operating stake function.
+ 1. Switch to the `owner account` in DekuSan wallet.
+ 2. Navigate to the `Write` tab and select `unstake` from the dropdown menu.
+ 3. Fill the amount of unstake in the contract.
+ 4. Click `Send` and `confirm` in DekuSan wallet.
+
+To ensure the stability of DEXON blockchain, the duration to withdraw the unstake coin is set 24 epochs, which corresponds around 1 day in real-world time. In the duration, the node can still propose block and earn the reward, but the node sill can be fined if violating any rule.
+Note that, each node can only unstake once until the unstake is withdrawn.
+
+### Withdraw
+After unstaking and wait for 24 epochs, the node can withdraw the stake.
+ 1. Switch to the `owner account` in DekuSan wallet.
+ 2. Navigate to the `Write` tab and select `withdraw` from the dropdown menu.
+ 3. Click `Send` and `confirm` in DekuSan wallet.
+
+
+### Transfer Node Owner
+A node owner can also transfer the owner right to others.
+ 1. Switch to the `owner account` in DekuSan wallet.
+ 2. Navigate to the `Write` tab and select `register` from the dropdown menu.
+ 3. Fill the `address` of the new owner.
+ 4. Click `Send` and `confirm` in DekuSan wallet.
+
+> WARNING: This is an IRREDUCIBLE operation. No one can recover if you transfer to a wrong address. Please double-check the address is correct.
+
+## Contract Read function
+<!-- Most of the information can be found in DEXONSCAN website. To prevent in case, we introduce a method to read the status of DEXON blockchain. -->
+
+The latest system parameters can be found in the governance contract. We introduce some fruquently used functions.
+
+### nodes
+`nodes` returns the status of a node, where the input is the order of the node. The order of a node can be query by the function `nodesOffsetByAddress`.
+
+
+### nodeLength
+`nodeLength` returns the current size of the node set.
+
+### nodesOffsetByAddress
+`nodesOffsetByAddress` returns the order of a node, where the input is the address of the node.