Halving now raises the price anchor (pass-through 0.6, ramp the week before) with a pre-halving news item
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
967077a2db
commit
0560c34231
6 files changed
+42
-1
No files matched your search
@@ -16,6 +16,8 @@ namespace Decentralized.Domain
|
||||
public sealed class Market
|
||||
{
|
||||
public double Sentiment = 1.0;
|
||||
/// <summary>供给因子:出块奖励减半抬高挖矿成本,价格锚随之上移;减半前一周有预期行情。每晚向目标靠拢。</summary>
|
||||
public double Supply = 1.0;
|
||||
public List<Pool> Pools = new List<Pool>();
|
||||
/// <summary>开门时的参考价,夜间用它和收盘价算当日均价(合约的标记价)。</summary>
|
||||
public double OpenPrice = Tuning.PscStartPrice;
|
||||
@@ -42,9 +44,20 @@ namespace Decentralized.Domain
|
||||
/// <summary>PSC 的参考价(信用点)。</summary>
|
||||
public double Price => Main.Price;
|
||||
|
||||
/// <summary>供给因子的目标:奖励比起始奖励每少一半,锚上移 2^传导指数;减半前 7 天内再逐日加预期。</summary>
|
||||
public static double SupplyTarget(int day, double reward)
|
||||
{
|
||||
double t = Math.Pow(Tuning.BlockReward / Math.Max(1e-9, reward), Tuning.HalvingPassThrough);
|
||||
int toHalving = Tuning.HalvingDays - day % Tuning.HalvingDays; // 减半当晚 day % HalvingDays == 0,那天之后又是一个完整周期
|
||||
if (toHalving <= Tuning.HalvingRampDays) t *= 1 + Tuning.HalvingRamp * (Tuning.HalvingRampDays - toHalving + 1) / Tuning.HalvingRampDays;
|
||||
return t;
|
||||
}
|
||||
|
||||
public void UpdateSupply(int day, double reward) => Supply += (SupplyTarget(day, reward) - Supply) * Tuning.SupplyAdjust;
|
||||
|
||||
public double Anchor(ICollection<MarketEvent> active)
|
||||
{
|
||||
double a = Tuning.PscStartPrice * Sentiment;
|
||||
double a = Tuning.PscStartPrice * Sentiment * Supply;
|
||||
if (active.Contains(MarketEvent.Blackout)) a *= 1.10;
|
||||
if (active.Contains(MarketEvent.Crackdown)) a *= 0.92;
|
||||
return a;
|
||||
|
||||
Reference in new issue
Block a user