Expose integer base fees alongside execution fee curves

This commit is contained in:
2026-12-03 12:48:10 +08:00
parent 2a62f1812a
commit f7946d2277
15 changed files with 207 additions and 26 deletions
+26
View File
@@ -1336,3 +1336,29 @@ sequenceDiagram
E-->>C: 每个可服务市场的持仓总值,空盘为零
end
```
### 读取基础费率
```mermaid
flowchart LR
C["command.rs · 上架"] --> M["market.rs"] --> F["fees.rs · 基础费、实际扣费"]
F --> S["schema.sql · market_fee_terms"]
G["gamma_directory.rs"] --> Q["gamma_market.sql"] --> S
H["clob_market.rs"] --> L["clob_market.sql"] --> S
```
```mermaid
sequenceDiagram
participant O as 运营方
participant E as Exchange
participant D as SQLite
participant C as 客户端
O->>E: 上架时登记基础费及成交曲线系数
E->>D: 同一事务保存两项配置
C->>E: base_fee_bps(结果资产 ID)
E->>D: 按市场读取整数基点
E-->>C: YES 和 NO 共用相同的基础费
C->>E: 预估或提交一笔吃单
E->>D: 读取成交曲线系数
E-->>C: 按成交数量与各档价格计算费用
```