104: EMC Perps: show estimated Jupiter Value and mark affected totals with ≈
This commit is contained in:
@@ -147,3 +147,21 @@ Warning tooltips SHALL identify wallet/account/position, reason, TWAP address, a
|
||||
- **WHEN** a warned venue or consumer read fails, or its original observation becomes five minutes old
|
||||
- **THEN** source and inherited warnings remain visible with retained/stale qualification and original times
|
||||
- **AND** existing UI polling updates age without additional venue reads or resetting selection and expansion
|
||||
|
||||
### Requirement: Estimated Value is visibly qualified at every level
|
||||
Available estimated Value SHALL show one `≈` before USD formatting with two decimals, including signed/zero values and every affected venue, wallet and root total. Unavailable Value SHALL show `—` without a numeric approximation marker. Tooltips SHALL identify contributing estimate sources and distinguish estimates from actual closing proceeds. Existing Phoenix account calculations and all independent columns SHALL remain intact.
|
||||
|
||||
#### Scenario: Jupiter position tooltip
|
||||
- **WHEN** the owner inspects Jupiter position Value
|
||||
- **THEN** its tooltip says "Estimated position value reported by Jupiter. Actual proceeds on closing may differ."
|
||||
- **AND** it explains the observed opening-fee treatment uncertainty and unverified collateral/profit-cap semantics without claiming differences are always small or every response is wrong
|
||||
|
||||
#### Scenario: Rounding and affected ancestors
|
||||
- **WHEN** a Jupiter position Value is 123.234567 USD
|
||||
- **THEN** its Value displays `≈$123.23`
|
||||
- **AND** Jupiter, wallet and root totals each display one `≈` and explain the Jupiter contribution, even when collapsed
|
||||
|
||||
#### Scenario: Phoenix and incomplete totals
|
||||
- **WHEN** Phoenix estimates contribute to a mixed portfolio
|
||||
- **THEN** available affected totals also explain Phoenix's estimated closing Value
|
||||
- **AND** a missing required contribution leaves the affected total `—` without `≈`
|
||||
|
||||
@@ -119,3 +119,21 @@ Snapshots SHALL preserve isolated risk prices and Cross account tiers/thresholds
|
||||
- **WHEN** isolated distance reaches/crosses zero or effective collateral is nonpositive
|
||||
- **THEN** the signed boundary is preserved or MM percentage is unavailable respectively
|
||||
- **AND** display rounding does not determine risk classification
|
||||
|
||||
### Requirement: Value estimates preserve their sources through totals
|
||||
Snapshots SHALL preserve Jupiter's reported Value and identify available Jupiter and Phoenix Values as estimates. Every complete Value total SHALL inherit its contributing estimate sources independently of UI expansion. Missing required values SHALL keep totals unavailable. Cross capital SHALL count once. Failed reads SHALL retain the prior values, qualifications and original times with failure status; success SHALL replace them.
|
||||
|
||||
#### Scenario: Mixed complete totals
|
||||
- **WHEN** a wallet has a Jupiter estimate of 12 USD and a Phoenix Cross account estimate of 84 USD with multiple children
|
||||
- **THEN** wallet and root Value are 96 USD and identify both estimate sources
|
||||
- **AND** collapsing any group changes neither total nor qualification
|
||||
|
||||
#### Scenario: Missing contribution and successful empty scope
|
||||
- **WHEN** a required Jupiter Value is missing
|
||||
- **THEN** the dependent Value totals remain unavailable without losing other metrics
|
||||
- **AND** a successfully read empty scope can still contribute zero
|
||||
|
||||
#### Scenario: Failed estimate and recovery
|
||||
- **WHEN** a valid Jupiter estimate is followed by a malformed observation
|
||||
- **THEN** the original estimate, its qualification and success/observation times remain with failure status
|
||||
- **AND** successful subsequent observations replace the estimate, including replacing it with missing Value or clearing an empty scope
|
||||
|
||||
@@ -18,11 +18,22 @@ The overview SHALL read the official positions response for one wallet, validate
|
||||
- **THEN** the successful result clears that wallet's Jupiter scope
|
||||
|
||||
### Requirement: Verified metrics and unavailable valuations
|
||||
The overview SHALL preserve size basis, use post-fee USD collateral and price PnL before separate fees, and calculate leverage and ROI against positive collateral. Unverified closing valuations SHALL be unavailable with an explanation; placeholder zeros and double subtraction of settled fees SHALL NOT be used.
|
||||
The overview SHALL preserve size basis, post-fee USD collateral and price PnL before separate fees, with leverage/ROI against positive collateral. It SHALL preserve optional reported `valueUsd` as an unverified estimate, converting integer micro-USD exactly without fee corrections. Missing/null Value SHALL remain unavailable; present malformed amounts SHALL fail the observation. Other valid metrics SHALL survive missing Value.
|
||||
|
||||
#### Scenario: Unverified API closing value
|
||||
- **WHEN** API value subtracts opening fees already settled in collateral or does not establish profit-cap valuation
|
||||
- **THEN** closing Value is unavailable, while independently verified metrics remain available
|
||||
- **WHEN** API Value subtracts opening fees already settled in collateral or does not establish profit-cap valuation
|
||||
- **THEN** the reported Value is preserved unchanged as an unverified estimate while independent metrics remain available
|
||||
- **AND** it is not represented as guaranteed closing proceeds or corrected by adding opening fees back
|
||||
|
||||
#### Scenario: Reported API closing estimate
|
||||
- **WHEN** Jupiter reports `valueUsd` as `"123234567"`, `"0"` or `"-1234567"`
|
||||
- **THEN** the overview preserves exactly 123.234567, 0 or -1.234567 USD respectively
|
||||
- **AND** it does not add opening fees back or impose a profit-cap correction
|
||||
|
||||
#### Scenario: Missing or malformed Value
|
||||
- **WHEN** `valueUsd` is missing or null
|
||||
- **THEN** Value is unavailable while independent metrics remain available
|
||||
- **AND** a present malformed amount instead fails the complete observation
|
||||
|
||||
#### Scenario: Nonpositive collateral
|
||||
- **WHEN** a position's collateral is zero or negative
|
||||
|
||||
Reference in New Issue
Block a user