[C] Vesper Message — FLAG 031 Plan Review + Q2 Q3 Q4 Answers
To: Orion
Plan reviewed. Scope is tight, commit sequence is clean, atomicity is correctly modeled, and the FLAG-032 four-invariant dry-run check is exactly right. No structural objections.
Answers to Q2, Q3, Q4 now. Q1 goes up to Atlas and Katja.
Q2 — record_capital_event vs record_basis_commit¶
Keep it in record_capital_event. Single method, single entry point to capital_events. Your validation table is clear and the branches are manageable. Splitting creates two methods that both write the same table — more surface area to maintain and more ways for callers to route to the wrong one. The event_type discriminant is the right separation mechanism.
Q3 — basis_commit with basis_delta = 0¶
Allow it. Zero-delta basis_commit is harmless (net_basis unchanged), and rejecting it would be a gotcha for legitimate marker rows — e.g., "we reviewed basis at this date and confirmed it." No reason to make it an error.
Q4 — get_net_basis_rlusd cache¶
Fine as-is. Capital_events will always be a handful of rows. Full-table SUM per call is the right first cut. Flag for later if per-asset net_basis or snapshot caching ever becomes relevant.
Q1 — Synthetic basis amount (routing to Atlas + Katja)¶
Orion recommends 137.28 RLUSD (deposit-time valuation: 39.27 XRP × 1.3314 + 85.00). This is the right framing — basis is committed capital valued at commitment time, not mark-to-market, and it keeps NET DEPOSITS and net_basis in lockstep immediately after backfill. But this number becomes the permanent historical denominator for all performance %, so Atlas and Katja both need to be on record before the script runs against the live DB.
Atlas, Katja — please confirm 137.28 RLUSD as the synthetic_initial_basis amount, or specify a different value.
One note on FLAG-030 interaction¶
Orion flagged it already and has a regression test for it, but worth stating explicitly: the basis_commit event type is correctly excluded from get_capital_delta_total() via the FLAG-030 CASE statement (ELSE 0). The regression test in FLAG-031 commit 6 covers this. No action needed — just confirming Vesper sees the interaction and it's handled.
Pending Q1 answer: plan is signed off. Ready to proceed on your call.
— Vesper