Skip to content

Commit

Permalink
I document how to add a new network.
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafabarmshory committed Oct 13, 2022
1 parent 9358890 commit 470eb0f
Show file tree
Hide file tree
Showing 10 changed files with 340 additions and 157 deletions.
39 changes: 11 additions & 28 deletions _businesses/staking.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,34 +91,17 @@ <h2>Calculator</h2>


<script type="application/json" id="networks-data">
[{% for network in site.networks %}
{
"id": "{{ network.id }}",
"title": "{{ network.title }}",
"icon": "{{ network.icon | relative_url }}",
"token": "{{ network.token }}",
"tokenPrice": "{{ network.token_price }}",
"url": "{{ network.url | relative_url }}",
"count": 0,

"stakingMin": {{ network.stake_min }},
"apr": {{ network.stake_apr }},
"inflation": {{network.network_inflation }},
"epoch": {{ network.network_epoch }},

"rewardConstant": {{ network.node_reward_constant}},
"rewardPercentage": {{ network.node_reward_percentage}},

"networkSymbol": "{{ network.network_symbol }}",
"networkTitle" : "{{ network.network_title }}",
"networkFee" : {{ network.network_fee }},

"nodeStartValue": {{ network.node_start_value }},
"nodeHardware" : "{{ network.node_hardware }}",

"p2pStaked": {{ network.p2p_staked_value }}
},
{% endfor %}{}]
[{% for network in site.networks %}{
"title": {{ network.title | jsonify }},
"description": {{ network.description | jsonify }},
"icon": {{ network.icon | relative_url | jsonify }},
"url": {{ network.url | relative_url | jsonify }},
"network": {{ network.network | jsonify }},
"sites": {{ network.sites | jsonify }},
"staking": {{ network.staking | jsonify }},
"validator": {{ network.validator | jsonify }},
"competitors": {{ network.competitors | jsonify }}
} {% unless forloop.last %},{% endunless %}{% endfor %}]
</script>


Expand Down
6 changes: 6 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ defaults:
values:
layout: "resource"
category: "resource"
-
scope:
type: "posts"
values:
layout: "post"
category: "post"


#liquid:
Expand Down
42 changes: 40 additions & 2 deletions _layouts/network.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,52 @@ <h2>Market</h2>
<td>Main Coin Symbol</td>
<td>{{ page.network_symbol | upcase }}</td>
</tr>

<tr>
<td>Network Symbol</td>
<td>{{ page.network_symbol }}</td>
</tr>
<tr>
<td>Network Title</td>
<td>{{ page.network_title }}</td>
</tr>
<tr>
<td>Network Fee</td>
<td>{{ page.network_fee }}</td>
</tr>
<tr>
<td>Market Cap</td>
<td>{{ page.market_cap | formatprice }}</td>
<td>Network Inflation</td>
<td>{{ page.network_inflation }}</td>
</tr>



<tr>
<td>P2P Wallets</td>
<td>
<ul>
{% for wallet in page.p2p_wallets %}
<li>{{ wallet }} </li>
{% endfor %}
</ul>
</td>
</tr>
<tr>
<td>Slashing Policies</td>
<td>
<ul>
{% for policy in page.slashing %}
<li>{{ policy }} </li>
{% endfor %}
</ul>
</td>
</tr>
</tbody>
</table>
</div>
</section>



<section class="row">
<div class="col">
Expand Down
72 changes: 39 additions & 33 deletions _networks/solana.html
Original file line number Diff line number Diff line change
Expand Up @@ -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'
---
Original file line number Diff line number Diff line change
@@ -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
---

Expand All @@ -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
Expand All @@ -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
Expand Down
7 changes: 0 additions & 7 deletions _posts/2022-01-01-Test-Page.html

This file was deleted.

116 changes: 116 additions & 0 deletions _posts/2022-10-13-how_to_add_network.md
Original file line number Diff line number Diff line change
@@ -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'
```
Loading

0 comments on commit 470eb0f

Please sign in to comment.