102: EMC Perps: show liquidation risk and account health

This commit is contained in:
2026-10-25 16:35:17 +01:00
parent 2f30712004
commit b4c7fe87d9
30 changed files with 1070 additions and 48 deletions
@@ -0,0 +1,31 @@
# Proposal
## Why
The owner cannot currently distinguish liquidation risk from profitability in EMC. Issue #102 requires venue-reported risk at isolated-position and shared Cross-account level, including honest handling of old or incomplete observations.
## What Changes
- Add venue reference/liquidation prices to Jupiter's overview-only observations.
- Read Phoenix TraderView risk using officially derived trader addresses independently of TWAP, preserving account thresholds and sentinel handling.
- **BREAKING**: Phoenix adapter constructors now require the existing SolanaBlockChain dependency for local address derivation; Hub wiring is updated.
- Add a Risk column, scope-aware summaries and freshness expiration during existing UI polling.
- Use the owner's selected policy: neutral isolated distance, red only for reached/crossed boundary; Phoenix's own tiers retain their colors.
- Expire risk observations at five minutes without implying a five-minute safety guarantee. Preserve prior critical states with age/failure annotations.
## Capabilities
### New Capabilities
None.
### Modified Capabilities
- `jupiter-perps-overview`: reported risk prices and observation timestamps.
- `phoenix-perps-service`: official address resolution and reported account/position risk.
- `evelyn-perps-service`: immutable risk scopes with exact distance/utilization and retained status.
- `evelyn-perps-overview`: Risk cells, deduplicated group summaries and expiration of unchanged snapshots.
## Impact
Integration DTOs/readers, Phoenix's existing Solana dependency wiring, Evelyn snapshots, JavaFX cells and existing project/shared documentation. No new dependencies, trading, live polling, commits or pushes.