diff --git a/_networks/solana.html b/_networks/solana.html
index 3b1af0e..1ef1250 100644
--- a/_networks/solana.html
+++ b/_networks/solana.html
@@ -2,38 +2,44 @@
title: "Solana"
icon: "/assets/images/networks-logo/solana.svg"
-market_cap: 11476031214
-network_symbol: "SOL"
-network_title: "Solana"
-network_fee: 1.0
-network_epoch: 5.0
-network_inflation: 8.0
-
-site_main: "https://solana.com/"
-site_docs: "https://docs.solana.com/"
-site_git: "https://github.com/solana-labs"
-site_explorer: "https://explorer.solana.com/"
-
-token: "SOL"
-token_price: 32.12
-
-stake_min: 1
-stake_apr: 7.1
-stake_reward_frequency: '2-3 day'
-stake_effectiveness_rating: 0
-stake_unbonding_period: 21.0
-
-slashing_uptime: true
-slashing_duble_signe: true
-
-node_start_value: 0
-node_hardware: 32CPU_256GRAM_2TS_CUDA
-node_reward_constant: 0
-node_reward_percentage: 7.0
-
-staked_value: 0.0
-
-p2p_staked_value: 4537698.0
-p2p_wallet: 'FKsC411dik9ktS6xPADxs4Fk2SCENvAiuccQHLAPndvk'
+network:
+ symbol: "SOL"
+ fee: 1.0
+ epoch: 5.0
+ inflation: 8.0
+ token:
+ name: "SOL"
+ price: 32.12
+
+sites:
+ - name: "Main"
+ url: "https://solana.com/"
+ - name: "Documentation"
+ url: "https://docs.solana.com/"
+ - name: "Source"
+ url: "https://github.com/solana-labs"
+ - name: "explorer"
+ url: "https://explorer.solana.com/"
+
+staking:
+ min: 1
+ apr: 7.1
+
+validator:
+ cost: 1
+ staked: 0
+ hardware: 32CPU_256GRAM_2TS_CUDA
+ reward:
+ constant: 0
+ percentage: 7.0
+ slashing:
+ - 'Uptime'
+ - 'Duble signe'
+
+competitors:
+ p2p:
+ staked: 4537698.0
+ wallets:
+ - 'FKsC411dik9ktS6xPADxs4Fk2SCENvAiuccQHLAPndvk'
---
diff --git a/_posts/2021-08-30-welcome-to-jekyll.html b/_posts/2021-08-30-welcome.md
similarity index 75%
rename from _posts/2021-08-30-welcome-to-jekyll.html
rename to _posts/2021-08-30-welcome.md
index 10f26bd..de566ba 100644
--- a/_posts/2021-08-30-welcome-to-jekyll.html
+++ b/_posts/2021-08-30-welcome.md
@@ -1,6 +1,6 @@
---
-layout: post
-title: "Welcome to Jekyll!"
+title: "How to add a new post"
+description: " This project is based on Jekyll (static site builder) and hosted on GitHub. In this post I`ll show you how to impove the project"
categories: jekyll update
---
@@ -10,8 +10,9 @@
a web server and auto-regenerates your site when a file is updated.
Jekyll requires blog post files to be named according to the following format:
-
+```
`YEAR-MONTH-DAY-title.MARKUP`
+```
Where `YEAR` is a four-digit number, `MONTH` and `DAY` are both two-digit
numbers, and `MARKUP` is the file extension representing the format used in the
@@ -28,7 +29,9 @@
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}
-Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].
+Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of
+Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you
+have questions, you can ask them on [Jekyll Talk][jekyll-talk].
[jekyll-docs]: https://jekyllrb.com/docs/home
[jekyll-gh]: https://github.com/jekyll/jekyll
diff --git a/_posts/2022-01-01-Test-Page.html b/_posts/2022-01-01-Test-Page.html
deleted file mode 100644
index 5aa5414..0000000
--- a/_posts/2022-01-01-Test-Page.html
+++ /dev/null
@@ -1,7 +0,0 @@
----
-layout: post
-title: "Test page"
-categories: Test
----
-
-
Test Page
diff --git a/_posts/2022-10-13-how_to_add_network.md b/_posts/2022-10-13-how_to_add_network.md
new file mode 100644
index 0000000..ca45c42
--- /dev/null
+++ b/_posts/2022-10-13-how_to_add_network.md
@@ -0,0 +1,116 @@
+---
+title: 'How to add a network'
+description: 'To add a new network, you can create an a new descriptive file, then the them makes all required pages.'
+---
+
+This project contains PoS networks.
+
+To add a new network, just create a new file (the same name with network) in the
+networks collection folder (_network).
+
+You have to descripe it fully.
+
+## General information
+
+First of all define general informations such as title, icon and descriptions:
+
+- title: the title of the network
+- description: a short descritpion of the network
+- icon: full path of a graphic file from assets folder
+
+You may add more based on Jekyll theme.
+
+## References and sites
+
+There must be list of sites where the network is supported.
+
+here is an example:
+
+```yaml
+sites:
+ - name: "Main"
+ url: "https://solana.com/"
+ - name: "Documentation"
+ url: "https://docs.solana.com/"
+ - name: "Source"
+ url: "https://github.com/solana-labs"
+ - name: "explorer"
+ url: "https://explorer.solana.com/"
+```
+
+The site section is array of sites (a paire of name and url).
+
+## Network information
+
+The network part contains general information about the network it self, such as
+fee and epoch;
+
+Here is an example
+
+```yaml
+network:
+ symbol: "SOL"
+ fee: 1.0
+ epoch: 5.0
+ inflation: 8.0
+ token:
+ name: "SOL"
+ price: 32.12
+```
+
+- sympol: the short name of the network
+- fee: Common fee of transactions based on the main token
+- epoch: The length of the network epoch in the unit of days
+- inflation: the inflation rate (percentage) of the coin in a year
+- token: description of the main token
+- token.name: The name of the main token
+- token.price: the price of the main token in USDT
+
+## Staking
+
+Suppos you are about to stake on the network, this part show how the
+network is in staking. for example APR and minimum staking value.
+
+here is an example:
+
+
+```yaml
+staking:
+ min: 1
+ apr: 7.1
+```
+
+## To be a validator
+
+To become a validator, you must pay and do lots of things, this part
+show you the critical points of views:
+
+Here is an example:
+
+```yaml
+validator:
+ cost: 1
+ staked: 0
+ hardware: 32CPU_256GRAM_2TS_CUDA
+ reward:
+ constant: 0
+ percentage: 7.0
+ slashing:
+ - 'Uptime'
+ - 'Duble signe'
+```
+
+## Competitors
+
+There are many staking company you may want to know about.
+
+Here is list of competitors:
+
+```yaml
+competitors:
+ p2p:
+ staked: 4537698.0
+ wallets:
+ - 'FKsC411dik9ktS6xPADxs4Fk2SCENvAiuccQHLAPndvk'
+```
+
diff --git a/assets/js/calculator-staking.js b/assets/js/calculator-staking.js
index 10f2fa1..2a081bd 100644
--- a/assets/js/calculator-staking.js
+++ b/assets/js/calculator-staking.js
@@ -5,10 +5,69 @@
const { useState } = owl.hooks;
+ const rolesDb = JSON.parse(document.getElementById('roles-data').textContent);
+ const networkDb = JSON.parse(document.getElementById('networks-data').textContent);
+ const resourcesDb = JSON.parse(document.getElementById('resources-data').textContent);
+
+ function computeNetworkRevenueInMounth(network) {
+ let coinValue = 0;
+ coinValue += (30 * network.validator.reward.constant / network.network.epoch) * network.network.token.price;
+ coinValue += (network.competitors.p2p.staked * network.staking.apr * network.validator.reward.percentage) / (12.0 * 100 * 100);
+ coinValue += network.validator.staked * (network.staking.apr - network.network.inflation) / 12.0;
+ return coinValue;
+ }
+
+ function computeSetupCostInUSDT(network) {
+ return 150 + (network.validator.staked + network.network.fee) * network.network.token.price;
+ }
+
+ function computeMaintainCostInUSDT(networks) {
+ let costMaintain = 0;
+ let n = networks.length;
+ // Add network resource price
+ networks.forEach(network =>
+ costMaintain += getResource(network).cost
+ );
+
+ // SPO cost
+ let spo = getRole("SPO");
+ costMaintain += Math.ceil(n / spo.throughput) * spo.cost;
+
+ // IT cost
+ let it = getRole("IT");
+ costMaintain += Math.ceil(n / it.throughput) * it.cost;
+
+ // CTO cost
+ let cto = getRole("CTO");
+ costMaintain += cto.cost;
+
+ // CEO cost
+ let ceo = getRole("CEO");
+ costMaintain += ceo.cost;
+
+ return costMaintain;
+ }
+
+
+ function getResource(network) {
+ let list = resourcesDb.filter(resource => resource.name === network.validator.hardware);
+ if (list.length) {
+ return list[0]
+ }
+ console.warn("Resource with name " + network.validator.hardware + " not found");
+ }
+
+ function getRole(abbreviation) {
+ let list = rolesDb.filter(role => role.abbreviation === abbreviation);
+ if (list.length) {
+ return list[0]
+ }
+ console.warn("Role with name " + abbreviation + " not found");
+ }
// -------------------------------------------------------------------------
// NetworkTable
// -------------------------------------------------------------------------
- const ResourceTable_TEMPLATE = xml /* xml */`
+ const ResourceTable_TEMPLATE = xml /* xml */`