diff --git a/_scripts/requirements.txt b/_scripts/requirements.txt
new file mode 100644
index 0000000..320dc8f
--- /dev/null
+++ b/_scripts/requirements.txt
@@ -0,0 +1,4 @@
+python-dotenv==1.0.1
+PyYAML==6.0.1
+Requests==2.31.0
+xmltodict==0.13.0
diff --git a/_scripts/smoothing_pools.py b/_scripts/smoothing_pools.py
index b013dfd..e1905c3 100644
--- a/_scripts/smoothing_pools.py
+++ b/_scripts/smoothing_pools.py
@@ -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
@@ -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")
diff --git a/_scripts/utilities.py b/_scripts/utilities.py
index 91b4d9d..9776d80 100644
--- a/_scripts/utilities.py
+++ b/_scripts/utilities.py
@@ -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
@@ -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=""):
diff --git a/assets/css/main.css b/assets/css/main.css
index 5f3b4a6..466f7f1 100644
--- a/assets/css/main.css
+++ b/assets/css/main.css
@@ -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;
diff --git a/assets/css/markdown.css b/assets/css/markdown.css
index 2acd98e..9431651 100644
--- a/assets/css/markdown.css
+++ b/assets/css/markdown.css
@@ -144,7 +144,7 @@
/*adds sticky header*/
.markdown .table-responsive {
- max-height: 650px;
+ max-height: 700px;
overflow: scroll;
position: relative!important;
/*widens table*/
diff --git a/smoothing-pools.md b/smoothing-pools.md
index f5d2a92..cd56b7e 100644
--- a/smoothing-pools.md
+++ b/smoothing-pools.md
@@ -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?
@@ -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
@@ -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}}
@@ -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: