102: EMC Perps: show liquidation risk and account health

This commit is contained in:
2026-10-26 06:05:26 +01:00
parent 2f30712004
commit e71a8daa8d
30 changed files with 1070 additions and 48 deletions
@@ -79,3 +79,16 @@ The reader SHALL estimate future execution times from snapshot slot, due slot an
#### Scenario: Expiry before planned completion
- **WHEN** the scheduled final child lies beyond the order's expiry
- **THEN** the reader does not provide that schedule as an estimated completion time
### Requirement: Read venue account health independently of TWAP
The reader SHALL resolve the official trader account for authority/PDA/subaccount and read its venue risk classification, effective collateral, maintenance margin and position liquidation prices. It SHALL validate identities and amounts, use venue reference prices with original observation times and normalize sentinel liquidation prices to unavailable. Existing pacing, cooldown, timeout and failure retention contracts SHALL apply without signing or TWAP dependence.
#### Scenario: Same-symbol isolated and Cross accounts
- **WHEN** the wallet holds the same market in multiple accounts without active TWAPs
- **THEN** each visible account receives only its own reported risk and liquidation data
- **AND** a mismatched trader identity or position size fails the observation
#### Scenario: Missing or unsupported risk field
- **WHEN** a response has missing optional risk values or an unknown tier
- **THEN** those values remain unavailable without assuming a safe state
- **AND** a nonpositive liquidation-price sentinel does not invalidate independent account health