## 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@@ = … = … Gem price @@P@@ = … = … Next quality gem price @@Q@@ = … = … Ratio @@Q / P@@ Sell fees @@F@@ 0% 6% + 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

## Todo

• Probability of profit
• URL parameters to save data
• Think better and rebuild all