Skip to content

Commit

Permalink
Merge pull request #76 from eth-educators/smoothing-pools-2
Browse files Browse the repository at this point in the history
finish smoothing pool page
  • Loading branch information
hanniabu authored Feb 20, 2024
2 parents 753a986 + a3425a2 commit 823cc2a
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update_data_daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
pip install -r _scripts/requirements.txt
- name: Fetch latest changes
run: |
Expand Down
2 changes: 1 addition & 1 deletion _data/smoothing-pools-processed.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"smooth":{"id":"smooth","name":"Smooth","link":"https://smooth.dappnode.io/","address":"`0xAdFb8D27671F14f297eE94135e266aAFf8752e35`","fee":"7%","oracles":"3 oracle operators: DAppNode, Giveth & Migalabs","validators":546,"incentives":"Accepts donations - [docs](https://docs.dappnode.io/docs/smooth/deep-dive-into-smooth/rewards)","team":"[DappNode](https://dappnode.com/pages/about)","bond":"0.01 ETH bond","claim_period":"?","audit":"?","launch_date":"Dec 2023","discord":"https://discord.gg/dappnode"},"smoothly":{"id":"smoothly","name":"Smoothly","link":"https://app.smoothly.money/","address":"`0x43670D6f39Bca19EE26462f62339e90A39B01e34`","fee":"1.5%","oracles":"[6 oracle operators](https://docs.smoothly.money/oracle-operators): EthStaker, Anthony Sassano, Aestus Relay, Cryptomanufaktur, Kody, Noah","validators":6,"incentives":"[SLIDE](https://docs.smoothly.money/social-layer-incentives-for-decentralization-slide): Gitcoin Grants & other public goods funding","team":"[Kody Sale](https://warpcast.com/kodys.eth) & [Noah Figueras](https://github.com/noahfigueras)","bond":"[0.5 ETH bond](https://docs.smoothly.money/bond-and-mev-theft)","claim_period":"Every 21 days","audit":"[Pashov, Aug 2023](https://github.com/Smoothly-Protocol/contracts/blob/master/audits/Smoothly-security-review-Pashov-14-8-2023.md)","launch_date":"Jan 2024","discord":"https://discord.gg/7hrV76bKEa"}}
{"smooth":{"id":"smooth","name":"Smooth","link":"https://smooth.dappnode.io/","address":"`0xAdFb8D27671F14f297eE94135e266aAFf8752e35`","fee":"7%","oracles":"3 oracle operators: DAppNode, Giveth & Migalabs","validators_active":549,"validators_pending":6,"validators_total":555,"incentives":"Accepts donations - [docs](https://docs.dappnode.io/docs/smooth/deep-dive-into-smooth/rewards)","team":"[DappNode](https://dappnode.com/pages/about)","bond":"0.01 ETH bond","claim_period":"Variable - rewards accumulate a pending balance between proposals and become active after the next proposal.","audit":"?","launch_date":"Dec 2023","discord":"https://discord.gg/dappnode"},"smoothly":{"id":"smoothly","name":"Smoothly","link":"https://app.smoothly.money/","address":"`0x43670D6f39Bca19EE26462f62339e90A39B01e34`","fee":"1.5%","oracles":"[6 oracle operators](https://docs.smoothly.money/oracle-operators): EthStaker, Anthony Sassano, Aestus Relay, Cryptomanufaktur, Kody, Noah","validators_active":8,"validators_pending":43,"validators_total":51,"incentives":"[SLIDE](https://docs.smoothly.money/social-layer-incentives-for-decentralization-slide): Gitcoin Grants & other public goods funding","team":"[Kody Sale](https://warpcast.com/kodys.eth) & [Noah Figueras](https://github.com/noahfigueras)","bond":"[0.5 ETH bond](https://docs.smoothly.money/bond-and-mev-theft)","claim_period":"Every 21 days","audit":"[Pashov, Aug 2023](https://github.com/Smoothly-Protocol/contracts/blob/master/audits/Smoothly-security-review-Pashov-14-8-2023.md)","launch_date":"Jan 2024","discord":"https://discord.gg/7hrV76bKEa"}}
11 changes: 8 additions & 3 deletions _data/smoothing-pools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ smooth:
address: "`0xAdFb8D27671F14f297eE94135e266aAFf8752e35`"
fee: "7%"
oracles: "3 oracle operators: DAppNode, Giveth & Migalabs"
validators: 550
validators_active: 549
validators_pending: 6
validators_total: 555
incentives: "Accepts donations - [docs](https://docs.dappnode.io/docs/smooth/deep-dive-into-smooth/rewards)"
team: "[DappNode](https://dappnode.com/pages/about)"
bond: "0.01 ETH bond"
claim_period: "?"
claim_period: "Variable. Rewards accumulate a pending balance between proposals and become active after the next proposal."
audit: "?"
launch_date: "Dec 2023"
discord: "https://discord.gg/dappnode"
Expand All @@ -55,11 +57,14 @@ smoothly:
address: "`0x43670D6f39Bca19EE26462f62339e90A39B01e34`"
fee: "1.5%"
oracles: "[6 oracle operators](https://docs.smoothly.money/oracle-operators): EthStaker, Anthony Sassano, Aestus Relay, Cryptomanufaktur, Kody, Noah"
validators: 50
validators_active: 8
validators_pending: 43
validators_total: 51
incentives: "[SLIDE](https://docs.smoothly.money/social-layer-incentives-for-decentralization-slide): Gitcoin Grants & other public goods funding"
team: "[Kody Sale](https://warpcast.com/kodys.eth) & [Noah Figueras](https://github.com/noahfigueras)"
bond: "[0.5 ETH bond](https://docs.smoothly.money/bond-and-mev-theft)"
claim_period: "Every 21 days"
audit: "[Pashov, Aug 2023](https://github.com/Smoothly-Protocol/contracts/blob/master/audits/Smoothly-security-review-Pashov-14-8-2023.md)"
launch_date: "Jan 2024"
discord: "https://discord.gg/7hrV76bKEa"

2 changes: 1 addition & 1 deletion _includes/js/aos.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const aosSelectors = [
"body > header",
"body > section",
"body > footer",
"table",
// "table",
// ".markdown-aos > h1",
// ".markdown-aos > h2",
// ".markdown-aos > h3",
Expand Down
3 changes: 2 additions & 1 deletion _includes/partials/components/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ <h5>Resources</h5>
<ul class="nav flex-column">
<li class="nav-item mb-2"><a href="/resources" class="nav-link p-0 text-muted">All Resources</a></li>
<li class="nav-item mb-2"><a href="/mev-relay-list" class="nav-link p-0 text-muted">MEV Relay List</a></li>
<li class="nav-item mb-2"><a href="/staking-software" class="nav-link p-0 text-muted">Staking Software</a></li>
<li class="nav-item mb-2"><a href="/smoothing-pools" class="nav-link p-0 text-muted">Smoothing Pools</a></li>
<li class="nav-item mb-2"><a href="/solo-staking-guides" class="nav-link p-0 text-muted">Solo Staking Guides</a></li>
<li class="nav-item mb-2"><a href="/staking-software" class="nav-link p-0 text-muted">Staking Software</a></li>
<li class="nav-item mb-2"><a href="/tax" class="nav-link p-0 text-muted">Staking Taxes</a></li>
</ul>
</div>
Expand Down
3 changes: 2 additions & 1 deletion _includes/partials/components/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="/resources">All Resources</a></li>
<li><a class="dropdown-item" href="/mev-relay-list">MEV Relay List</a></li>
<li><a class="dropdown-item" href="/staking-software">Staking Software</a></li>
<li><a class="dropdown-item" href="/smoothing-pools">Smoothing Pools</a></li>
<li><a class="dropdown-item" href="/solo-staking-guides">Solo Staking Guides</a></li>
<li><a class="dropdown-item" href="/staking-software">Staking Software</a></li>
<li><a class="dropdown-item" href="/tax">Staking Taxes</a></li>
</ul>
</li>
Expand Down
4 changes: 4 additions & 0 deletions _scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
python-dotenv==1.0.1
PyYAML==6.0.1
Requests==2.31.0
xmltodict==0.13.0
23 changes: 15 additions & 8 deletions _scripts/smoothing_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ def get_smooth_data():
def process_smooth_data(raw_data):
active = raw_data["total_active_validators"]
total = raw_data["total_subscribed_validators"]
print({"source":"smooth", "active":active, "total":total})
return active
pending = total - active;
results = {"source":"smooth", "active":active, "pending":pending, "total":total}
print(results)
return results



Expand All @@ -36,16 +38,21 @@ def get_smoothly_data():

def process_smoothly_data(raw_data):
active = raw_data["data"]["activated"]
waiting = raw_data["data"]["awaiting_activation"]
total = active + waiting
print({"source":"smoothly", "active":active, "waiting":waiting, "total":total})
return active
pending = raw_data["data"]["awaiting_activation"]
total = active + pending
results = {"source":"smoothly", "active":active, "pending":pending, "total":total}
print(results)
return results


def save_smoothing_pool_data(smooth_subs, smoothly_subs):
smoothing_pool_data = utilities.read_file(f"_data/smoothing-pools.yml", file_type="yaml")
smoothing_pool_data["smooth"]["validators"] = smooth_subs
smoothing_pool_data["smoothly"]["validators"] = smoothly_subs
smoothing_pool_data["smooth"]["validators_active"] = smooth_subs["active"]
smoothing_pool_data["smooth"]["validators_pending"] = smooth_subs["pending"]
smoothing_pool_data["smooth"]["validators_total"] = smooth_subs["total"]
smoothing_pool_data["smoothly"]["validators_active"] = smoothly_subs["active"]
smoothing_pool_data["smoothly"]["validators_pending"] = smoothly_subs["pending"]
smoothing_pool_data["smoothly"]["validators_total"] = smoothly_subs["total"]
utilities.save_to_file(f"/_data/smoothing-pools-processed.json", smoothing_pool_data, context=f"{script_id}__save_smoothing_pool_data")


Expand Down
6 changes: 3 additions & 3 deletions _scripts/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import time
import json
import yaml
# import xmltodict
import xmltodict
import pprint
from datetime import datetime, timezone
from dotenv import load_dotenv
Expand Down Expand Up @@ -123,8 +123,8 @@ def read_file(rel_path, file_type="json", context=""):
print(error)


# def xml2json(xml):
# return xmltodict.parse(xml)
def xml2json(xml):
return xmltodict.parse(xml)


def report_error(error, context=""):
Expand Down
13 changes: 13 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,19 @@ section li:not(:last-child) {
}


.table-responsive {
border-radius: var(--bs-border-radius);
}
.table-responsive .table {
margin-bottom: 0;
}
table tr td {
max-width: 60vw !important;
text-wrap: unset;
word-wrap: break-word;
}



.link-disabled {
cursor: not-allowed;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/markdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@

/*adds sticky header*/
.markdown .table-responsive {
max-height: 650px;
max-height: 700px;
overflow: scroll;
position: relative!important;
/*widens table*/
Expand Down
14 changes: 10 additions & 4 deletions smoothing-pools.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ subheader: Smooth vs Smoothly

A significant vector of centralization in staking is that large pools have the ability to share execution layer rewards among all its stakers. Until very recently, solo stakers didn’t have the option to benefit from smoothing execution layer rewards in a pool.

Analysis has shown that, **over a 5 year time span, validators in a smoothing pool earn 41.6% more than those not in a pool**. If a lone validator joins a smoothing pool with 99 validators in it, the likelihood of it outperforming in the pool compared to by itself is 78%. Find a full analysis by Ken Smith using the Monte Carlo method with lots of math and helpful figures and charts [here](https://raw.githubusercontent.com/htimsk/SPanalysis/main/report/Analysis%20of%20the%20Smoothing%20Pool.pdf). Or you can watch him [explain it on stage](https://www.youtube.com/watch?v=2NU6pij2OzU) at Devcon Bogotá.
Analysis has shown that, **over a 5 year time span, validators in a smoothing pool earn 41.6% more than those not in a pool**. If a lone validator joins a smoothing pool with 99 validators in it, the likelihood of it outperforming in the pool compared to by itself is 78%. Ken Smith wrote [a full analysis](https://raw.githubusercontent.com/htimsk/SPanalysis/main/report/Analysis%20of%20the%20Smoothing%20Pool.pdf) using the Monte Carlo method with lots of math and helpful figures and charts. Or you can watch him [explain it on stage](https://www.youtube.com/watch?v=2NU6pij2OzU) at Devcon Bogotá.

#### When does it make sense for me to join a smoothing pool?

When there are more validators in the pool than you’ll be adding. For example if you have 2 validators, it only makes sense to join a smoothing pool if it already has 3 validators in it before you join.
When there are more active validators in the pool than you’ll be adding. For example if you have 2 validators, it only makes sense to join a smoothing pool if it already has 3 active validators in it before you join. Validators move from pending to active after a block proposal.

#### How many solo staker smoothing pool options are there?

Expand All @@ -29,7 +29,13 @@ As of Feb 2024, there are two options: Smooth & Smoothly. EthStaker supports bot

{% assign smoothing_pool_data = site.data.smoothing-pools-processed %}
{%- assign smooth = smoothing_pool_data.smooth -%}
{%- capture smooth_validators -%}
{{smooth.validators_active}} active, {{smooth.validators_pending}} pending, {{smooth.validators_total}} total
{%- endcapture -%}
{%- assign smoothly = smoothing_pool_data.smoothly -%}
{%- capture smoothly_validators -%}
{{smoothly.validators_active}} active, {{smoothly.validators_pending}} pending, {{smoothly.validators_total}} total
{%- endcapture -%}

{:class="table"}
| | Smooth | Smoothly
Expand All @@ -38,7 +44,7 @@ As of Feb 2024, there are two options: Smooth & Smoothly. EthStaker supports bot
| Address | {{smooth.address}} | {{smoothly.address}}
| Fee | {{smooth.fee}} | {{smoothly.fee}}
| Oracles | {{smooth.oracles}} | {{smoothly.oracles}}
| Validators in pool | {{smooth.validators}} | {{smoothly.validators}}
| Validators in pool | {{smooth_validators}} | {{smoothly_validators}}
| Extra incentives | {{smooth.incentives}} | {{smoothly.incentives}}
| Team | {{smooth.team}} | {{smoothly.team}}
| MEV theft protection | {{smooth.bond}} | {{smoothly.bond}}
Expand All @@ -54,6 +60,6 @@ As of Feb 2024, there are two options: Smooth & Smoothly. EthStaker supports bot
EthStaker hosted a community call with Smooth & Smoothly in Dec 2023:

<div class="videowrapper">
<iframe width="560" height="315" src="https://www.youtube.com/embed/dB5csfO8I0E?si=8sYpI5A2DHhN2QRb" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/dB5csfO8I0E?si=8sYpI5A2DHhN2QRb" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>

0 comments on commit 823cc2a

Please sign in to comment.