-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Issue: ROE% Calculation Mismatch with aster.dex
Description
There's a significant discrepancy in how Return on Equity (ROE%) is calculated between lik hunter and aster.dex for the same position. The ROE% in lik hunter is much lower than what's shown in aster.dex.
Position Details
- Symbol: BNBUSDT
- Position Size: 0.12 BNB
- Entry Price: 1,113.75 USDT
- Mark Price: 1,158.474 USDT
- Leverage: 25x
- Position Value: ~139.02 USDT (0.12 * 1,158.474)
Observed Values
| Platform | PNL (USDT) | ROE% | Calculation Base |
|---|---|---|---|
| aster.dex | +5.37 | 96.57% | Based on margin (5.56 USDT) |
| lik hunter | ~5.37 | ~3.86% | Based on position value |
Analysis
-
Dollar Amounts:
- Both platforms show approximately the same PNL in USDT (~5.37 USDT)
-
Percentage Calculation:
-
aster.dex (96.57%):
- Margin = Position Value / Leverage = 139.02 / 25 = 5.56 USDT
- ROE = (5.37 / 5.56) * 100 ≈ 96.57%
- This is the industry standard for leveraged trading (PNL/margin)
-
lik hunter (~3.86%):
- Appears to be calculating as (5.37 / 139.02) * 100 ≈ 3.86%
- This is incorrect as it uses position value instead of margin
-
Expected Behavior
The ROE% in lik hunter should match aster.dex's calculation:
ROE% = (Unrealized PNL / Margin) * 100 = (5.37 / 5.56) * 100 ≈ 96.57%
Impact
- Misleading ROE% could lead to incorrect risk assessment
- Inconsistent with standard trading platform behavior
- May cause confusion in performance evaluation
Request
- Update the ROE% calculation to use margin as the base (like aster.dex)
- Consider renaming to "ROE%" to be explicit about the calculation
- Add a tooltip explaining the calculation method
- Add tests to ensure consistency with exchange calculations
Additional Context
- The dollar PNL amounts match between platforms
- The issue is specifically with the percentage calculation
- The correct calculation should use margin (position value / leverage) as the base
Metadata
Metadata
Assignees
Labels
No labels