Summary
The price simulation tool computes price impact as (simulated_price - spot_price) / spot_price * 100. Unit tests should assert the computation and display are correct for positive, zero, and negative price impact values.
Scope
- Test that simulated_price of 110 with spot_price of 100 shows price impact of +10.00%
- Test that simulated_price equal to spot_price shows price impact of 0.00%
- Test that the custom quantity input fires a debounced fetch after 300ms
- Test that a fetch error shows 'Unable to simulate price' and hides the impact value
- Test that the loading skeleton is shown while the fetch is in progress
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
The price simulation tool computes price impact as (simulated_price - spot_price) / spot_price * 100. Unit tests should assert the computation and display are correct for positive, zero, and negative price impact values.
Scope
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram