calculate_health_factor
Calculate resulting health factor for lending positions after supply, borrow, withdraw, or repay actions. Assess risk of liquidation by comparing collateral, debt, and liquidation threshold.
Instructions
Calculate health factor after a potential action
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action type | |
| amount | Yes | Action amount in USD | |
| currentDebt | Yes | Current debt in USD | |
| currentCollateral | Yes | Current collateral in USD | |
| liquidationThreshold | Yes | Liquidation threshold (e.g., '0.85') |