1.7 KiB
ADDED Requirements
Requirement: Separate account capital and precise position metrics
The reader SHALL return immutable account balances separately from positions, including funded empty Cross accounts. Quote lots SHALL convert at 1e-6 USD. Price PnL SHALL use precise virtual quote and signed base amounts at mark. Initial position margin SHALL follow size-dependent tiers including venue interpolation and rounding. Unsupported non-USDC collateral SHALL make affected valuations unavailable instead of being ignored.
Scenario: Size between margin tiers
- WHEN a position lies between two leverage tiers
- THEN its initial margin follows interpolated integer leverage and upward quote-lot rounding, rather than the market's maximum leverage
Scenario: Unsupported spot collateral
- WHEN an account has nonzero spot collateral that cannot be valued reliably
- THEN collateral, equity and closing Value are unavailable while independent exposure and price PnL remain available
Requirement: Estimated account and isolated closing proceeds
Equity SHALL include collateral, undiscounted price PnL and signed unsettled funding once. Estimated Value SHALL subtract estimated closing taker fees with account fee overrides. Settled fees/funding SHALL NOT be subtracted again. Isolated position leverage/ROI SHALL use actual collateral; Cross position leverage/ROI SHALL remain unavailable unless their venue convention is verified.
Scenario: Funding signs and fee override
- WHEN collateral is 100 USD, PnL 5 USD, unsettled funding -2 USD, and estimated exit fee 1 USD
- THEN equity is 103 USD and estimated Value 102 USD
- AND effective Cross leverage uses 103 USD as its denominator