第十阶段 stage 2(二):CRA 部分抵押(储备、抵押率、挪用与崩盘线、劫掠补储备)、官方铸造与销毁排队、官方跑路、质押多币种入口
This commit is contained in:
1 parent
3758049dcb
commit
d0dfa93226
17 files changed
+493
-117
No files matched your search
@@ -120,8 +120,8 @@ namespace Decentralized
|
||||
double thr = t;
|
||||
list.Add(new PredictCandidate { Kind = PredictKind.Gas, Key = "gas", Title = "Gas", Param = thr, Tomorrow = true, Prob = (a, b) => GasPublic(d, day + 1, thr) });
|
||||
}
|
||||
if (d.Stable.CraWarnDay < 0 && d.Stable.CraSpiralDay < 0)
|
||||
list.Add(new PredictCandidate { Kind = PredictKind.Cra, Key = "cra", Title = "CRA", Prob = (from, to) => PredictMath.CraWarnProb(d.Stable.CraSubsidy, CraDrain(d), day, from, to, CraHazard) });
|
||||
if (d.Stable.CraWarnDay < 0 && d.Stable.CraCrashDay < 0)
|
||||
list.Add(new PredictCandidate { Kind = PredictKind.Cra, Key = "cra", Title = "CRA", Prob = (from, to) => PredictMath.CraWarnProb(d.Stable.Cushion, CraDrain(d), day, from, to, CraHazard) });
|
||||
if (!d.Network.EraDone && d.Network.EraDay > 0 && day + 4 >= (d.Network.EraWarned ? d.Network.EraWarnDay : Tuning.EraMin))
|
||||
list.Add(new PredictCandidate { Kind = PredictKind.Era, Key = "era", Title = L.T("predict.era"), Prob = (from, to) => PredictMath.EraProb(day, from, to, d.Network.EraWarned ? d.Network.EraWarnDay : -1) });
|
||||
return list;
|
||||
@@ -132,7 +132,7 @@ namespace Decentralized
|
||||
d.GasPhase < 0 ? PredictMath.GasFlat(day, thr) : (1 - Tuning.PredictGasBlind) * PredictMath.GasAtLeast(day, d.GasPhase, thr) + Tuning.PredictGasBlind * PredictMath.GasFlat(day, thr);
|
||||
|
||||
private static double CraHazard => 1 - Math.Pow(1 - Tuning.CraSpiralWeekly, 1.0 / 7);
|
||||
private static double CraDrain(SaveData d) => (Tuning.CraNpcStake + d.Staking.Earning) * d.Stable.CraRate;
|
||||
private static double CraDrain(SaveData d) => Stablecoins.CushionDrain(Tuning.CraNpcStake + d.Staking.Earning, d.Stable.CraRate);
|
||||
|
||||
/// <summary>开门后补盘。价格盘一次只留一个(阈值不同的盘口会互相对冲)。</summary>
|
||||
public static void Morning(SaveData d, int day)
|
||||
@@ -199,8 +199,8 @@ namespace Decentralized
|
||||
case PredictKind.Gas:
|
||||
return d.GasPhase < 0 ? (double?)null : GasPublic(d, m.ToDay, m.Param);
|
||||
case PredictKind.Cra:
|
||||
if (d.Stable.CraWarnDay >= 0 || d.Stable.CraSpiralDay >= 0) return 0.02;
|
||||
return PredictMath.CraWarnProb(d.Stable.CraSubsidy, CraDrain(d), day + 1, m.FromDay, m.ToDay, CraHazard);
|
||||
if (d.Stable.CraWarnDay >= 0 || d.Stable.CraCrashDay >= 0) return 0.02;
|
||||
return PredictMath.CraWarnProb(d.Stable.Cushion, CraDrain(d), day + 1, m.FromDay, m.ToDay, CraHazard);
|
||||
case PredictKind.Era:
|
||||
return PredictMath.EraProb(day, m.FromDay, m.ToDay, d.Network.EraWarned ? d.Network.EraWarnDay : -1);
|
||||
}
|
||||
@@ -309,7 +309,7 @@ namespace Decentralized
|
||||
if (d.GasHist.Count > 0) list.Add(L.T("predict.clue.gas", string.Join(" ", d.GasHist.Skip(Math.Max(0, d.GasHist.Count - 7)).Select(x => x.ToString("0.0", System.Globalization.CultureInfo.InvariantCulture)))));
|
||||
break;
|
||||
case PredictKind.Cra:
|
||||
list.Add(L.T("predict.clue.subsidy", (d.Stable.CraSubsidy / Tuning.CraSubsidy0 * 100).ToString("0")));
|
||||
list.Add(L.T("predict.clue.subsidy", (d.Stable.Cushion / Stablecoins.Cushion0 * 100).ToString("0")));
|
||||
list.Add(L.T("predict.clue.drain", Fmt.Num(CraDrain(d))));
|
||||
break;
|
||||
case PredictKind.Era:
|
||||
|
||||
Reference in new issue
Block a user