Ponzi via signed wallet calls; counter informants guarantee prediction markets
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9484de2f1f
commit
4279d48374
8 files changed
+102
-29
No files matched your search
@@ -355,7 +355,7 @@ namespace Decentralized
|
||||
|
||||
private static int LowerRep() => StoreReputation.GetStoreReputation(StoreReputation.FACTION_LOWER_LEVEL)?.GetReputation() ?? 0;
|
||||
|
||||
/// <summary>理财页:开一个高息理财产品,下层的人往里存钱;池子随时可以卷走,但每晚都有被举报的风险。用 Poinbase 账户的 CRC,不用签名。</summary>
|
||||
/// <summary>理财页:开一个高息理财产品,下层的人往里存钱;池子随时可以卷走,但每晚都有被举报的风险。开张和卷走是链上合约调用,用当前钱包,要签名;之后每晚垫付的利息从发行人钱包出。</summary>
|
||||
private static void PonziPage(CustomUIBuilder b)
|
||||
{
|
||||
var d = Session.Data;
|
||||
@@ -364,7 +364,8 @@ namespace Decentralized
|
||||
Columns(b, l =>
|
||||
{
|
||||
l.AddHeader(L.T("ponzi.h"));
|
||||
l.AddLabel(L.T("ponzi.acct", Fmt.Num(d.Poinbase.Avail(Assets.CRC))));
|
||||
var issuer = pz.Open ? d.Own(pz.Wallet) ?? d.Hot : d.Hot;
|
||||
l.AddLabel(L.T("ponzi.acct", WalletWindow.NameOf(issuer), Fmt.Num(issuer.Avail(Assets.CRC))));
|
||||
l.AddSeparator();
|
||||
if (pz.Open)
|
||||
{
|
||||
@@ -386,14 +387,26 @@ namespace Decentralized
|
||||
{
|
||||
if (!_ponziConfirm) { _ponziConfirm = true; Open(); return; }
|
||||
_ponziConfirm = false;
|
||||
double take = pz.Rug(d.Poinbase);
|
||||
PlayerStore.Instance.secData.CommitCrime("FRAUD", (int)Tuning.PonziCrime);
|
||||
StoreReputation.GetStoreReputation(StoreReputation.FACTION_LOWER_LEVEL)?.SetReputation(0);
|
||||
News.Show("pd_news_ponzi_rug_" + day, L.T("news.ponzi.rug.title"), L.T("news.ponzi.rug.desc"), 4);
|
||||
Log.Info($"卷走理财池 {take:0},自己垫的利息 {pz.OwnPaid:0}");
|
||||
_message = L.T("ponzi.rugged", Fmt.Num(take));
|
||||
Session.Save();
|
||||
var iw = d.Own(pz.Wallet) ?? d.Hot;
|
||||
_message = L.T("hw.wait");
|
||||
Open();
|
||||
WalletWindow.OpenForBill(new WalletWindow.Bill
|
||||
{
|
||||
Contract = true, Asset = Assets.CRC, Amount = 0, Spend = 0, FeeAsset = BestFeeAsset(iw),
|
||||
Summary = L.T("ponzi.rug.sum", Fmt.Num(pz.Pool)),
|
||||
Execute = pw =>
|
||||
{
|
||||
if (!pz.Open || !ChainAddress.Same(pw.Address, pz.Wallet)) { _message = L.T("ponzi.err.wallet"); Open(); return; }
|
||||
double take = pz.Rug(pw);
|
||||
PlayerStore.Instance.secData.CommitCrime("FRAUD", (int)Tuning.PonziCrime);
|
||||
StoreReputation.GetStoreReputation(StoreReputation.FACTION_LOWER_LEVEL)?.SetReputation(0);
|
||||
News.Show("pd_news_ponzi_rug_" + day, L.T("news.ponzi.rug.title"), L.T("news.ponzi.rug.desc"), 4);
|
||||
Log.Info($"卷走理财池 {take:0},自己垫的利息 {pz.OwnPaid:0},钱包 {pw.Address}");
|
||||
_message = L.T("ponzi.rugged", Fmt.Num(take));
|
||||
Session.Save();
|
||||
Open();
|
||||
},
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -410,9 +423,21 @@ namespace Decentralized
|
||||
r.AddLabel(L.T("ponzi.ad", Fmt.Num(Tuning.PonziAdCost)));
|
||||
r.AddButton(L.T("ponzi.start"), () =>
|
||||
{
|
||||
_message = pz.Start(d.Poinbase, _ponziRate, day) ? L.T("ponzi.started") : L.T("ponzi.err");
|
||||
Session.Save();
|
||||
if (d.Hot.Avail(Assets.CRC) + 1e-9 < Tuning.PonziAdCost) { _message = L.T("ponzi.err"); Open(); return; }
|
||||
double rate = _ponziRate;
|
||||
_message = L.T("hw.wait");
|
||||
Open();
|
||||
WalletWindow.OpenForBill(new WalletWindow.Bill
|
||||
{
|
||||
Contract = true, Asset = Assets.CRC, Amount = Tuning.PonziAdCost,
|
||||
Summary = L.T("ponzi.start.sum", (rate * 100).ToString("0", CultureInfo.InvariantCulture), Fmt.Num(Tuning.PonziAdCost)),
|
||||
Execute = pw =>
|
||||
{
|
||||
_message = pz.Start(pw, rate, StoreStation.GetDayCounter()) ? L.T("ponzi.started") : L.T("ponzi.err");
|
||||
Session.Save();
|
||||
Open();
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user