Distribute negative-risk conversion fees across cash and outcome shares

This commit is contained in:
2026-12-03 13:05:09 +08:00
parent 351de6187e
commit 0f608db47f
10 changed files with 196 additions and 17 deletions
+2 -1
View File
@@ -99,7 +99,7 @@ impl Exchange {
db.execute_batch(include_str!("kickoff_schema.sql"))?;
}
let activity_ready: bool = db.query_row(
"SELECT EXISTS(SELECT 1 FROM sqlite_schema WHERE type='table' AND name='wallet_migration')",
"SELECT EXISTS(SELECT 1 FROM sqlite_schema WHERE type='trigger' AND name='record_wallet_receipt')",
[], |r| r.get(0),
)?;
if !activity_ready {
@@ -245,6 +245,7 @@ impl Exchange {
"fills",
"paired_fills",
"neg_risk_groups",
"neg_risk_conversion_fees",
"neg_risk_reserve_remainders",
"augmented_results",
] {