[DS STEPN] STEPN gems upgrade expectation

STEPN gems upgrade expectation (🚨🚧🚧🚧 Work in progress 🚧🚧🚧🚨)

This (outdated 🚨) application computes the profit mathematical expectation of the fusion of 3 gems to upgrade to 1 gem of a better quality.
Chain:
Upgrade cost @@C@@ = =
@@P@@ = =
@@Q@@ = =
Ratio @@Q / P@@
Sell fees @@F@@
+ Gain if you win @@Q \left(1 - \frac{F}{100}\right)@@ = =
− Total upgrade cost @@3P + C@@ = =
= Profit if you win @@Q \left(1 - \frac{F}{100}\right) - (3P + C)@@ = =
Probability to win @@W@@ %
+ Gain expectation @@Q \left(1 - \frac{F}{100}\right) \frac{W}{100}@@ = =
− Total upgrade cost @@3P + C@@ = =
= Profit expectation @@Q \left(1 - \frac{F}{100}\right) \frac{W}{100} - (3P + C)@@ = =
ℹ️ Coin prices come from CoinGecko.

Try successive upgrades until have profit

(🚨🚧 Work in progress 🚧🚨)
@@N@@# winsGainCost=ProfitProbabilityCumulative prob.Expectation
100%==

Fixed number @@N@@ of upgrades

(🚨🚧 Work in progress 🚧🚨)
Gain expectation Total upgrades cost Profit expectation Probability of Profit and probability
@@N@@ @@Q \left(1 - \frac{F}{100}\right) \sum_{i=1}^N i \binom{N}{i} \left(\frac{W}{100}\right)^i \left(1 - \frac{W}{100}\right)^{N-i}@@ @@(3P + C) N@@ = positive profit for each number of success
=
=
=
=
=
=
=
=
=
=

Gem price history

⚠️ Don’t trust these data. Check by yourself. And pay attention to the fact that maybe no one is buying.
Date Chain Gem Quality 1 Quality 2 Quality 3 Quality 4
2022-08-13 12:10 Solana E0.02     SOL0.333    SOL2.18     SOL11.4      SOL
2022-08-13 12:10 Solana L0.0298   SOL0.423    SOL2.89     SOL14.55     SOL
2022-08-13 12:10 Solana C0.058    SOL0.584    SOL3.7      SOL16.95     SOL
2022-08-13 12:10 Solana R0.01     SOL0.14     SOL1        SOL4.7      SOL
2022-08-13 12:10 BSC E0.01     BNB0.058    BNB0.4      BNB2.2      BNB
2022-08-13 12:10 BSC L0.01     BNB0.088    BNB0.595    BNB3.29     BNB
2022-08-13 12:10 BSC C0.0129   BNB0.1018   BNB0.65     BNB3.47     BNB
2022-08-13 12:10 BSC R0.01     BNB0.023    BNB0.152    BNB0.88     BNB
2022-08-13 12:10 Ethereum E0.00116  ETH0.13     ETH1.18     ETH
2022-08-13 12:10 Ethereum L0.001    ETH0.12     ETH1.24     ETH
2022-08-13 12:10 Ethereum C0.0178   ETH0.139    ETH
2022-08-13 12:10 Ethereum R0.001    ETH0.11     ETH
2022-07-31 11:20 Solana E0.0369   SOL0.458    SOL2.9      SOL14.46     SOL
2022-07-31 11:20 Solana L0.054    SOL0.615    SOL3.7      SOL15.5      SOL
2022-07-31 11:20 Solana C0.0446   SOL0.42     SOL2.718    SOL13.7      SOL
2022-07-31 11:20 Solana R0.01     SOL0.143    SOL1.03     SOL5        SOL
2022-07-31 11:20 BSC E0.01     BNB0.105    BNB0.62     BNB3.69     BNB
2022-07-31 11:20 BSC L0.012    BNB0.1138   BNB0.725    BNB3.5      BNB
2022-07-31 11:20 BSC C0.0109   BNB0.08     BNB0.5148   BNB2.68     BNB
2022-07-31 11:20 BSC R0.01     BNB0.0295   BNB0.222    BNB1.06     BNB
2022-07-31 11:20 Ethereum E0.03285  ETH1        ETH5.1      ETH
2022-07-31 11:20 Ethereum L0.0083   ETH0.86     ETH4.99     ETH13.45     ETH
2022-07-31 11:20 Ethereum C0.0485   ETH0.668    ETH
2022-07-31 11:20 Ethereum R0.00191  ETH0.852    ETH
2022-07-20 11:15 Solana E0.0375   SOL0.51     SOL3.2      SOL15.9      SOL
2022-07-20 11:15 Solana L0.04     SOL0.529    SOL3.45     SOL16.5      SOL
2022-07-20 11:15 Solana C0.0527   SOL0.53     SOL3.15     SOL14        SOL
2022-07-20 11:15 Solana R0.01     SOL0.15     SOL1.07     SOL5.35     SOL
2022-07-20 11:15 BSC E0.01     BNB0.102    BNB0.65     BNB3.36     BNB
2022-07-20 11:15 BSC L0.01     BNB0.1199   BNB0.7      BNB3.35     BNB
2022-07-20 11:15 BSC C0.0105   BNB0.1      BNB0.7      BNB3.99     BNB
2022-07-20 11:15 BSC R0.01     BNB0.0379   BNB0.319    BNB1.81     BNB
2022-07-20 11:15 Ethereum E0.21     ETH
2022-07-20 11:15 Ethereum L0.95     ETH
2022-07-20 11:15 Ethereum C0.749    ETH
2022-07-20 11:15 Ethereum R0.24     ETH
2022-07-10 18:10 Solana E0.09     SOL1.15     SOL6.9      SOL40        SOL
2022-07-10 18:10 Solana L0.066    SOL0.93     SOL5.85     SOL29        SOL
2022-07-10 18:10 Solana C0.0287   SOL0.54     SOL3.49     SOL18.19     SOL
2022-07-10 18:10 Solana R0.0104   SOL0.34     SOL2.8      SOL13        SOL
2022-07-10 18:10 BSC E0.027    BNB0.445    BNB5.5      BNB8.98     BNB
2022-07-10 18:10 BSC L0.01     BNB0.1396   BNB0.822    BNB4.5      BNB
2022-07-10 18:10 BSC C0.01     BNB0.12     BNB0.8      BNB3.89     BNB
2022-07-10 18:10 BSC R0.01     BNB0.0854   BNB0.5945   BNB2.77     BNB

Todo

Links