rwadurian/backend
hailin 8980a169ed fix(trading): 修复做市商吃单扣款金额错误(使用交易总额而非原始数量×价格)
问题:
  做市商吃单时,buyerPayAmount = tradeQuantity × price(原始数量×价格),
  未计入销毁倍数。例如:卖出 697.81 积分股,销毁倍数 5000.88,
  交易总额 = 17,615.96 积分值,但做市商只被扣了 697.81 × 0.005 = 3.49。
  10% 手续费(1,761.60)反而大于做市商支出,导致做市商不减反增。

修复:
  - 做市商吃单时:actualBuyerCost = sellerGrossAmount(含销毁倍数的交易总额)
  - 普通用户买入时:actualBuyerCost = buyerPayAmount(原始数量×价格,不变)
  - frozenCash 仍释放下单时冻结的原始金额(buyerPayAmount)
  - 做市商交易流水记录 assetType=CASH + 实际支付金额

做市商吃单扣款计算(修复后):
  MM 支出 = sellerGrossAmount(交易总额)
  MM 手续费收入 = tradeFee(10%)
  MM 净支出 = sellerReceiveAmount = 交易总额 × 90%

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 05:56:12 -08:00
..
.claude refactor: simplify mpc-service to gateway mode 2025-12-06 17:16:14 -08:00
api-gateway feat(nginx): 添加 madmin.szaiai.com nginx 配置 2026-02-02 00:01:37 -08:00
infrastructure chore(docker): 为 mpc-system、api-gateway、infrastructure 添加时区配置 2025-12-23 18:35:09 -08:00
mpc-system fix(service-party-android): 修复导入钱包签名时 'party not registered' 错误 2026-02-02 03:24:14 -08:00
scripts fix(scripts): 修正容器名为 rwa-blockchain-service 2025-12-15 10:34:25 -08:00
services fix(trading): 修复做市商吃单扣款金额错误(使用交易总额而非原始数量×价格) 2026-02-03 05:56:12 -08:00
.env.windows fix(referral): 修复 getMyReferralInfo 使用 userId 而不是 accountSequence 的问题 2025-12-14 05:05:03 -08:00
docker-compose.windows.yml fix(mining-service): Redis DB 11 冲突修复,迁移至 DB 16 2026-01-30 02:22:20 -08:00