2.6 KiB
MODIFIED Requirements
Requirement: Perps overview displays a collapsible position hierarchy
The Perps tab SHALL display Position, Direction, Margin, Collateral, Leverage, Exposure, Value, uPnL and TWAP in that order beneath the visible Perpetual Contracts root. Isolated hierarchy SHALL be wallet → venue → position; each Phoenix Cross account SHALL add a Cross group above its positions. Groups SHALL show applicable totals, leave direction/aggregate ratios and TWAP blank, and be expanded by default.
Scenario: Open either environment's Perps tab
- WHEN the owner opens Perps in Production or Test
- THEN all nine columns, root totals and the account-aware hierarchy are available, with horizontal scrolling where required
Scenario: Collapse and expand groups
- WHEN the owner collapses and expands a wallet, venue or Cross account
- THEN descendants hide and return without changing totals
ADDED Requirements
Requirement: TWAP cells show execution progress and snapshot duration
Matching filled Phoenix TWAPs SHALL show a progressbar using executed/total child counts and an overlaid estimated duration to the next child in unbounded hours, minutes and seconds. Other cells SHALL be empty. Updates SHALL follow existing snapshots without a live timer. Failed retained observations SHALL be labeled retained; due or unknown schedules SHALL not show negative or wrapped times or imply execution.
Scenario: Long interval
- WHEN the snapshot's estimated wait is 28 hours 32 minutes 10 seconds, or 128 hours 32 minutes 10 seconds
- THEN the text is approximately 28:32:10 or 128:32:10 respectively
Scenario: Failed or due observation
- WHEN the venue read fails or the latest observed next slot is already due
- THEN the cell communicates retained or awaiting-update status without advancing progress
Requirement: TWAP tooltip distinguishes estimates from fills
TWAP tooltips SHALL show executed/total progress, Estimated completion, total size, next child size, filled quantity and observation time. Sizes SHALL include their symbol and approximate USD values from Phoenix mark prices where available. Distinct regular/dust sizes and periodic nominal-slot timing assumptions SHALL be explained. Unknown values SHALL remain unknown; expiry SHALL never be presented as completion.
Scenario: Missing price or smaller next child
- WHEN the mark price is unavailable or the next child is a smaller rest order
- THEN token amounts remain visible with unknown USD values, or the next size reflects that rest order respectively