estimate_lending_energy
Estimate energy, bandwidth, and TRX costs for JustLend operations before executing them. Supports supply, borrow, repay, withdraw, approve, and market actions.
Instructions
Estimate energy, bandwidth, and TRX cost for any JustLend operation BEFORE executing it. Covers ALL operations: supply, withdraw, withdraw_all, borrow, repay, approve, enter_market, exit_market, claim_rewards. Tries on-chain simulation first; falls back to historical typical values if simulation fails. Returns per-step breakdown (e.g. approve + mint for supply), total energy, total bandwidth, and estimated TRX cost. For supply/repay: automatically checks current allowance — if sufficient, the approve step is skipped. For approve: supports custom spender address (not just jToken). Use this tool whenever the user asks about gas/energy/cost for any lending operation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Amount in underlying token units (e.g. '100'). Default: '1'. Not needed for enter_market, exit_market, approve, withdraw_all, claim_rewards. | |
| market | Yes | jToken symbol (e.g. 'jUSDT', 'jTRX', 'jUSDD'). Required for all operations except claim_rewards. | |
| address | No | TRON address for simulation. Default: configured wallet | |
| network | No | Network. Default: mainnet | |
| spender | No | Custom spender address for approve operation. Default: jToken contract address. Only used when operation is 'approve'. | |
| operation | Yes | The operation to estimate resources for |