Reprice listed goods; honeypot stays at 1%
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a76f04c75e
commit
a44e4008c1
7 files changed
+64
-6
No files matched your search
@@ -14,6 +14,8 @@ namespace Decentralized.Domain
|
||||
public double Health;
|
||||
/// <summary>标价倍率与标价(信用点)。</summary>
|
||||
public double Mult;
|
||||
/// <summary>参考价:改价时按它重算标价。</summary>
|
||||
public long Ref;
|
||||
public int ListPrice;
|
||||
public int ListedDay, PayDay;
|
||||
public SaleState State = SaleState.Listed;
|
||||
@@ -71,11 +73,31 @@ namespace Decentralized.Domain
|
||||
double share = total > 0 ? Math.Min(1, ListFee(listPrice) / total) : 0;
|
||||
w.Taint -= w.Taint * share; w.Basis -= w.Basis * share;
|
||||
w.Add(feeAsset, -qty);
|
||||
var s = new BmSale { Item = item, Model = model, FakeOf = fakeOf, Health = health, Mult = m, ListPrice = listPrice, ListedDay = day };
|
||||
var s = new BmSale { Item = item, Model = model, FakeOf = fakeOf, Health = health, Ref = refValue, Mult = m, ListPrice = listPrice, ListedDay = day };
|
||||
Sales.Add(s);
|
||||
return s;
|
||||
}
|
||||
|
||||
public static int RepriceFee(int newPrice) => (int)Math.Ceiling(newPrice * Tuning.BmRepriceFee);
|
||||
|
||||
/// <summary>改价:上架中的货换一个倍率,按参考价重算标价,收改价费;不改变上架日。</summary>
|
||||
public bool Reprice(BmSale s, double m, Wallet w, string feeAsset, int day, Func<string, double> price)
|
||||
{
|
||||
if (s == null || s.State != SaleState.Listed || s.Ref <= 0 || Math.Abs(m - s.Mult) < 1e-9 || m < Tuning.BmSellMin - 1e-9 || m > Tuning.BmSellMax + 1e-9 || Closed(day) || feeAsset == Assets.CRC) return false;
|
||||
int listPrice = ListPriceOf(s.Ref, m);
|
||||
double p = price(feeAsset);
|
||||
if (p <= 0) return false;
|
||||
int fee = RepriceFee(listPrice);
|
||||
double qty = fee / p;
|
||||
if (w.Avail(feeAsset) + 1e-9 < qty) return false;
|
||||
double total = w.Value(price);
|
||||
double share = total > 0 ? Math.Min(1, fee / total) : 0;
|
||||
w.Taint -= w.Taint * share; w.Basis -= w.Basis * share;
|
||||
w.Add(feeAsset, -qty);
|
||||
s.Mult = m; s.ListPrice = listPrice;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Delist(BmSale s) { s.State = SaleState.Delisted; s.Why = "delist"; }
|
||||
|
||||
/// <summary>未到账的货款(信用点):跑路时一并归零,也推高跑路概率。</summary>
|
||||
|
||||
@@ -102,9 +102,9 @@ namespace Decentralized.Domain
|
||||
public const double BmTrapShare = 0.4, BmTrapWindowCap = 400;
|
||||
/// <summary>货架上除违禁品外的两类货:高科技物品(需中档声望)和显卡的出现概率、加价(在现货溢价 / 订单价之外再加),显卡里夹假卡的比例、是全新卡(成色 100、封条完好、不会是假卡)的概率。</summary>
|
||||
public const double BmTechChance = 0.30, BmGpuChance = 0.30, BmTechMarkup = 0.5, BmGpuMarkup = 0.2, BmGpuFake = 0.20, BmGpuNew = 0.15;
|
||||
/// <summary>玩家上架出售:标价倍率范围(相对参考价)、上架费、成交抽成、成交后货款托管天数、假卡被买家看穿的概率;
|
||||
/// <summary>玩家上架出售:标价倍率范围(相对参考价)、上架费、改价费、成交抽成、成交后货款托管天数、假卡被买家看穿的概率;
|
||||
/// 倍率 ≤0.9 / 1.0 / 1.8 时的期望成交天数(之间插值);货款带污点的概率与比例随倍率从下限涨到上限;卖家好评的初始值、看穿一次扣的点数、同时上架的件数上限。</summary>
|
||||
public const double BmListFee = 0.05, BmCommission = 0.08, BmSellMin = 0.6, BmSellMax = 1.8, BmFakeDetect = 0.5;
|
||||
public const double BmListFee = 0.05, BmRepriceFee = 0.02, BmCommission = 0.08, BmSellMin = 0.6, BmSellMax = 1.8, BmFakeDetect = 0.5;
|
||||
public const double BmSellDaysFast = 1, BmSellDays1 = 2, BmSellDaysMax = 14;
|
||||
public const double BmSaleTaintChanceMin = 0.2, BmSaleTaintChanceMax = 0.9, BmSaleTaintRatioMin = 0.2, BmSaleTaintRatioMax = 0.8;
|
||||
public const int BmSaleHold = 3, BmRatingStart = 90, BmRatingFakeLoss = 10, BmMaxListings = 10;
|
||||
|
||||
@@ -270,7 +270,7 @@ black.kind.Contraband.3,Contraband (high)
|
||||
black.kind.Tech,High-tech (markup)
|
||||
nightlog.bm.ready,"Black market: {0} arrived; a courier will come by once you open."
|
||||
item.web3guide.name,Web3 Handbook
|
||||
item.web3guide.desc,"Bank: depositing turns credits into CRC; withdrawing turns CRC back into credits and goes through compliance screening. Trading: buys are paid in the quote coin, sells in the traded coin. Mixer: pick a coin, amount and rounds; each round takes a fee and lowers taint, rounds equal days of waiting, and the coins come back to the same address; the more you deposit, the worse the cleaning. Payments and transfers (black market, mixer, Ponero desk, listing fees) require typing the payee address (the 0x string in the merchant name, or the platform's own) and a wrong address pays nothing. Black market: coin only, no CRC, 30% above normal channels, with extra markup on high-tech goods and GPUs; the coin you pay leaves its share of taint with the seller and the goods carry no stolen tag; GPUs may be fake, inspect them yourself. Orders are cheaper than spot but take days and may be intercepted; merchants sell by type at their own price factor, 5+ items get 5% off and 10+ get 10% off, and a bulk merchant appears at random with the lowest prices but six days of waiting; escrow costs 5%, is released on delivery and refunded if the seller runs; advance release takes another 10% off, but a scammer keeps the money and only sellers with 30+ trades accept; the platform itself can rug, be taken over by enforcement, or a seller can be arrested, after which your orders get traced and crime logged; forum rumors can be warnings. An intercepted parcel sometimes turns into enforcement at your door: signing logs the crime on the spot and seizes the goods, refusing only costs the payment. Selling: on the black market's Sell page, list contraband, high-tech goods and GPUs from storage at 0.6x to 1.8x the reference price. The higher the multiplier, the slower the sale (below 0.9x about a day, 1.0x about two, 1.8x about fourteen), and the likelier and larger the taint on the payout, which also grows with how much you sold in the last 7 days; at most 10 listings at a time, 5% listing fee, 8% commission, payout held 3 days before reaching your wallet; a fake card may be spotted and returned, hurting your rating; if the platform rugs, listed goods and unreleased payouts are gone. Ponero desk: Ponero is a privacy coin and swapping in wipes the taint on that value; 6% fee each way with a daily limit; coin swapped out of Ponero has no origin and cash-out screening gets stricter."
|
||||
item.web3guide.desc,"Bank: depositing turns credits into CRC; withdrawing turns CRC back into credits and goes through compliance screening. Trading: buys are paid in the quote coin, sells in the traded coin. Mixer: pick a coin, amount and rounds; each round takes a fee and lowers taint, rounds equal days of waiting, and the coins come back to the same address; the more you deposit, the worse the cleaning. Payments and transfers (black market, mixer, Ponero desk, listing fees) require typing the payee address (the 0x string in the merchant name, or the platform's own) and a wrong address pays nothing. Black market: coin only, no CRC, 30% above normal channels, with extra markup on high-tech goods and GPUs; the coin you pay leaves its share of taint with the seller and the goods carry no stolen tag; GPUs may be fake, inspect them yourself. Orders are cheaper than spot but take days and may be intercepted; merchants sell by type at their own price factor, 5+ items get 5% off and 10+ get 10% off, and a bulk merchant appears at random with the lowest prices but six days of waiting; escrow costs 5%, is released on delivery and refunded if the seller runs; advance release takes another 10% off, but a scammer keeps the money and only sellers with 30+ trades accept; the platform itself can rug, be taken over by enforcement, or a seller can be arrested, after which your orders get traced and crime logged; forum rumors can be warnings. An intercepted parcel sometimes turns into enforcement at your door: signing logs the crime on the spot and seizes the goods, refusing only costs the payment. Selling: on the black market's Sell page, list contraband, high-tech goods and GPUs from storage at 0.6x to 1.8x the reference price. The higher the multiplier, the slower the sale (below 0.9x about a day, 1.0x about two, 1.8x about fourteen), and the likelier and larger the taint on the payout, which also grows with how much you sold in the last 7 days; at most 10 listings at a time, 5% listing fee, repricing a listing costs 2% and the sale speed follows the new multiplier, 8% commission, payout held 3 days before reaching your wallet; a fake card may be spotted and returned, hurting your rating; if the platform rugs, listed goods and unreleased payouts are gone. Ponero desk: Ponero is a privacy coin and swapping in wipes the taint on that value; 6% fee each way with a daily limit; coin swapped out of Ponero has no origin and cash-out screening gets stricter."
|
||||
courier.odd1,...Package is here.
|
||||
courier.odd2,"(His hand stays in his pocket.) Sign here."
|
||||
courier.sign,Sign
|
||||
@@ -344,3 +344,5 @@ black.pay.bad,Address does not match; nothing paid.
|
||||
pay.mix,"Mixer {0} {1}"
|
||||
pay.swap,"Ponero desk {0} {1}"
|
||||
pay.listfee, (listing fee)
|
||||
pay.repricefee," (repricing fee x{0})"
|
||||
black.sell.repriced,"Repriced: {0}, now {1}."
|
||||
|
@@ -269,7 +269,7 @@ black.kind.Contraband.3,违禁品(高)
|
||||
black.kind.Tech,高科技物品(加价)
|
||||
nightlog.bm.ready,"黑市:{0} 到货,开店后会有快递员上门。"
|
||||
item.web3guide.name,Web3 手册
|
||||
item.web3guide.desc,"银行:存入把信用点换成 CRC;提取把 CRC 换回信用点,提取要过合规审查。交易:买入按计价币的数量支付,卖出按所交易币的数量卖出。混币器:选币种、填数量和轮数,每轮扣手续费并降低污点,轮数即等待天数,到期提回同一个地址;存入越多,清洗越差。付款与转账(黑市、混币器、Ponero 兑换处、上架费)前要手输收款地址(商家名里的 0x 开头那串,或平台自己的地址),输错不会付款。黑市:只收币,不收 CRC,价格比正常渠道贵 30%,高科技物品和显卡另有加价;付出去的币带着按比例的污点留在卖家那边,货不带赃物标签;显卡不保证真假,自己鉴定。订单比现货便宜,要等几天,路上可能被截获;商家按类型卖货,价格系数各不相同,一次订 5 件以上 95 折、10 件以上 9 折,大宗商家随机出现,价格最低但要等六天;托管多付 5% 托管费,收货后放款,卖家跑路时退款;提前放款再打九折,卖家若是骗子钱就没了,只有成交 30 单以上的卖家接受;平台自己也可能跑路,也可能被执法接管,或者卖家落网,之后你的订单会被追查、记罪证;论坛上的传闻可以当预兆。被截获的包裹有时会变成执法人员上门:签收当场记罪证并查封,拒签只损失货款。出售:在黑市的出售页把储藏区里的违禁品、高科技物品和显卡上架,标价是参考价的 0.6 到 1.8 倍。倍率越高成交越慢(0.9 以下约一天,1.0 约两天,1.8 约十四天),货款带污点的可能性和比例也越高,近 7 天出售的量越大,污点越重;同时最多上架 10 件,上架收 5% 上架费,成交扣 8% 抽成,货款托管 3 天后进钱包;卖假卡可能被买家看穿而退货,拉低好评;平台跑路时上架的货和未放款的货款都没了。Ponero 兑换处:Ponero 是隐私币,兑入时这部分价值的污点被清除;兑入、兑出各收 6% 手续费,每天有额度;从 Ponero 兑出的币来路不明,出金审查会加重。"
|
||||
item.web3guide.desc,"银行:存入把信用点换成 CRC;提取把 CRC 换回信用点,提取要过合规审查。交易:买入按计价币的数量支付,卖出按所交易币的数量卖出。混币器:选币种、填数量和轮数,每轮扣手续费并降低污点,轮数即等待天数,到期提回同一个地址;存入越多,清洗越差。付款与转账(黑市、混币器、Ponero 兑换处、上架费)前要手输收款地址(商家名里的 0x 开头那串,或平台自己的地址),输错不会付款。黑市:只收币,不收 CRC,价格比正常渠道贵 30%,高科技物品和显卡另有加价;付出去的币带着按比例的污点留在卖家那边,货不带赃物标签;显卡不保证真假,自己鉴定。订单比现货便宜,要等几天,路上可能被截获;商家按类型卖货,价格系数各不相同,一次订 5 件以上 95 折、10 件以上 9 折,大宗商家随机出现,价格最低但要等六天;托管多付 5% 托管费,收货后放款,卖家跑路时退款;提前放款再打九折,卖家若是骗子钱就没了,只有成交 30 单以上的卖家接受;平台自己也可能跑路,也可能被执法接管,或者卖家落网,之后你的订单会被追查、记罪证;论坛上的传闻可以当预兆。被截获的包裹有时会变成执法人员上门:签收当场记罪证并查封,拒签只损失货款。出售:在黑市的出售页把储藏区里的违禁品、高科技物品和显卡上架,标价是参考价的 0.6 到 1.8 倍。倍率越高成交越慢(0.9 以下约一天,1.0 约两天,1.8 约十四天),货款带污点的可能性和比例也越高,近 7 天出售的量越大,污点越重;同时最多上架 10 件,上架收 5% 上架费,上架后可以改价(收 2% 改价费,标价按参考价重算,成交的快慢跟着新倍率走),成交扣 8% 抽成,货款托管 3 天后进钱包;卖假卡可能被买家看穿而退货,拉低好评;平台跑路时上架的货和未放款的货款都没了。Ponero 兑换处:Ponero 是隐私币,兑入时这部分价值的污点被清除;兑入、兑出各收 6% 手续费,每天有额度;从 Ponero 兑出的币来路不明,出金审查会加重。"
|
||||
courier.odd1,……东西到了。
|
||||
courier.odd2,"(他的手一直放在口袋里)在这儿签个字。"
|
||||
courier.sign,签收
|
||||
@@ -343,3 +343,5 @@ black.pay.bad,地址不符,没有付款。
|
||||
pay.mix,"混币器 {0} {1}"
|
||||
pay.swap,"Ponero 兑换处 {0} {1}"
|
||||
pay.listfee,(上架费)
|
||||
pay.repricefee,"(改价费 ×{0})"
|
||||
black.sell.repriced,"已改价:{0},标价 {1}。"
|
||||
|
@@ -551,6 +551,15 @@ namespace Decentralized
|
||||
Open();
|
||||
}
|
||||
|
||||
private static void RepriceSale(BmSale s, double mult)
|
||||
{
|
||||
var d = Session.Data;
|
||||
if (!d.Black.Reprice(s, mult, d.Hot, _payAsset, StoreStation.GetDayCounter(), Session.Price)) { _message = L.T("msg.balance"); Open(); return; }
|
||||
_message = L.T("black.sell.repriced", ItemName(s.Item), s.ListPrice);
|
||||
Session.Save();
|
||||
Open();
|
||||
}
|
||||
|
||||
private static void Delist(BmSale s)
|
||||
{
|
||||
var d = Session.Data;
|
||||
@@ -573,7 +582,22 @@ namespace Decentralized
|
||||
var sale = sl;
|
||||
string st = sale.State == SaleState.Sold ? L.T("black.sale.Sold", sale.PayDay) : L.T("black.sale." + sale.State + (sale.State == SaleState.Delisted && sale.Why != null ? "." + sale.Why : ""));
|
||||
l.AddLabel(L.T("black.mine.sale", ItemName(sale.Item), sale.Mult.ToString("0.0", CultureInfo.InvariantCulture), st));
|
||||
if (sale.State == SaleState.Listed) l.AddButton(L.T("black.sell.delist"), () => Delist(sale));
|
||||
if (sale.State == SaleState.Listed)
|
||||
{
|
||||
l.BeginRow();
|
||||
foreach (var m in SellMults)
|
||||
{
|
||||
double mult = m;
|
||||
string n = m.ToString("0.0", CultureInfo.InvariantCulture);
|
||||
l.AddButton(Math.Abs(mult - sale.Mult) < 1e-9 ? $"[{n}]" : n, () =>
|
||||
{
|
||||
if (Math.Abs(mult - sale.Mult) < 1e-9) return;
|
||||
BeginPay(d.Address("platform"), ItemName(sale.Item) + L.T("pay.repricefee", n), BlackMarket.RepriceFee(BlackMarket.ListPriceOf(sale.Ref, mult)), () => RepriceSale(sale, mult));
|
||||
});
|
||||
}
|
||||
l.AddButton(L.T("black.sell.delist"), () => Delist(sale));
|
||||
l.End();
|
||||
}
|
||||
}
|
||||
foreach (var o in d.Black.Orders.OrderByDescending(x => x.PlacedDay))
|
||||
l.AddLabel(L.T("black.mine.line", ItemName(o.Item) + (o.Count > 1 ? " ×" + o.Count : ""), BlackDelivery.DisplayName(o.Seller), L.T("black.mode." + o.Mode), L.T("black.state." + o.State + (o.Why != null && o.State != OrderState.Done ? "." + o.Why : "")), o.DueDay));
|
||||
|
||||
Reference in new issue
Block a user