-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
AST-10: Float Type Hint for Financial Amount Parameter
Severity: LOW
Affected File(s): aster/rest_api/account.py:302
Description
The modify_isolated_position_margin function accepts amount: float. Using Python float for financial amounts introduces IEEE 754 floating-point precision errors.
Vulnerable Code
def modify_isolated_position_margin(self, symbol: str, amount: float, type: int, **kwargs):
Impact
Potential rounding errors in margin calculations when users perform arithmetic before passing the value.
Recommended Fix
Accept str or Decimal: def modify_isolated_position_margin(self, symbol: str, amount: str, type: int, **kwargs):
Methodology: Triple-verification static analysis -- each finding verified across three independent code review passes.
Researcher: Independent Security Researcher -- Mefai Security Team
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels