rosacastillo
commited on
Commit
·
fe04619
1
Parent(s):
9d943dd
updating staking graphs to show non-agent traders
Browse files- data/all_trades_profitability.parquet +2 -2
- data/outliers.parquet +2 -2
- data/service_map.pkl +2 -2
- notebooks/staking.ipynb +0 -0
- scripts/staking.py +2 -2
- tabs/staking.py +8 -5
data/all_trades_profitability.parquet
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f0d88dddc2ccfcad5531d596e3b51c20ca74563d3b431da117878c1d73ea6d01
|
3 |
+
size 411266
|
data/outliers.parquet
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:51fd4bea9e2c7e8a3c87ca9ba9adefafe537ab43904a33c3d04b79c102ef446b
|
3 |
+
size 17918
|
data/service_map.pkl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f0a0b8258b8a46f5e53a1decfda25f670f3fdec4e2d21d1e1ed856d6d4400ef9
|
3 |
+
size 72607
|
notebooks/staking.ipynb
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
scripts/staking.py
CHANGED
@@ -138,7 +138,7 @@ def update_service_map(start: int = 1, end: int = 1000):
|
|
138 |
|
139 |
|
140 |
def check_owner_staking_contract(owner_address: str) -> str:
|
141 |
-
staking = ""
|
142 |
owner_address = owner_address.lower()
|
143 |
# check quickstart staking contracts
|
144 |
qs_list = [x.lower() for x in STAKING_PROGRAMS_QS.values()]
|
@@ -169,7 +169,7 @@ def get_trader_address_staking(trader_address: str, service_map: dict) -> str:
|
|
169 |
break
|
170 |
|
171 |
if found_key == -1:
|
172 |
-
return ""
|
173 |
owner = service_map[found_key]["owner_address"]
|
174 |
return check_owner_staking_contract(owner_address=owner)
|
175 |
|
|
|
138 |
|
139 |
|
140 |
def check_owner_staking_contract(owner_address: str) -> str:
|
141 |
+
staking = "non_staking"
|
142 |
owner_address = owner_address.lower()
|
143 |
# check quickstart staking contracts
|
144 |
qs_list = [x.lower() for x in STAKING_PROGRAMS_QS.values()]
|
|
|
169 |
break
|
170 |
|
171 |
if found_key == -1:
|
172 |
+
return "non_agent"
|
173 |
owner = service_map[found_key]["owner_address"]
|
174 |
return check_owner_staking_contract(owner_address=owner)
|
175 |
|
tabs/staking.py
CHANGED
@@ -41,24 +41,27 @@ def plot_staking_trades_per_market_by_week(
|
|
41 |
]
|
42 |
if market_creator != "all":
|
43 |
all_filtered_trades["staking"] = all_filtered_trades["staking"].replace(
|
44 |
-
{
|
45 |
)
|
46 |
-
colour_sequence = ["gray", market_colour]
|
47 |
-
categories_sorted = {
|
|
|
|
|
48 |
else:
|
49 |
all_filtered_trades["staking"] = all_filtered_trades["staking"].replace(
|
50 |
{
|
51 |
-
"": "non_staking_traders",
|
52 |
"pearl": "staking_pearl_traders",
|
53 |
"quickstart": "staking_quickstart_traders",
|
|
|
54 |
}
|
55 |
)
|
56 |
-
colour_sequence = ["gray", "purple", "goldenrod"]
|
57 |
categories_sorted = {
|
58 |
"staking": [
|
59 |
"non_staking_traders",
|
60 |
"staking_pearl_traders",
|
61 |
"staking_quickstart_traders",
|
|
|
62 |
]
|
63 |
}
|
64 |
trades = get_overall_by_staking_traders(all_filtered_trades)
|
|
|
41 |
]
|
42 |
if market_creator != "all":
|
43 |
all_filtered_trades["staking"] = all_filtered_trades["staking"].replace(
|
44 |
+
{market_creator: "staking_traders", "non_agent": "non_agent_traders"}
|
45 |
)
|
46 |
+
colour_sequence = ["gray", market_colour, "black"]
|
47 |
+
categories_sorted = {
|
48 |
+
"staking": ["non_staking_traders", "staking_traders", "non_agent_traders"]
|
49 |
+
}
|
50 |
else:
|
51 |
all_filtered_trades["staking"] = all_filtered_trades["staking"].replace(
|
52 |
{
|
|
|
53 |
"pearl": "staking_pearl_traders",
|
54 |
"quickstart": "staking_quickstart_traders",
|
55 |
+
"non_agent": "non_agent_traders",
|
56 |
}
|
57 |
)
|
58 |
+
colour_sequence = ["gray", "purple", "goldenrod", "black"]
|
59 |
categories_sorted = {
|
60 |
"staking": [
|
61 |
"non_staking_traders",
|
62 |
"staking_pearl_traders",
|
63 |
"staking_quickstart_traders",
|
64 |
+
"non_agent_traders",
|
65 |
]
|
66 |
}
|
67 |
trades = get_overall_by_staking_traders(all_filtered_trades)
|