Simulate Leverage
simulate_leveragePreview opening a leveraged position — deterministic, read-only, no wallet needed. Returns the resulting leverage, effective LTV, leveraged collateral, expected leveraged APY, price impact, the auto-selected execution path, flash-loan size, and (if the flash loan exceeds direct market liquidity) the public-allocator reallocation fee. Numbers move with market prices.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount of payToken in human units (e.g. '10000' for 10,000 USDC). | |
| chainId | No | Chain to target. Supported: 1, 4663. Default: 1. | |
| leverage | No | Target leverage, e.g. 3. Provide this OR desiredLtv. | |
| payToken | Yes | Address of the token you pay in. May be the collateral (opened directly) or any other token (zapped: swapped to collateral first). Native ETH = the zero address 0x0000…0000. | |
| slippage | No | Swap slippage as a ratio (0.005 = 0.5%). Default 0.005, capped at 0.01. | |
| desiredLtv | No | Target LTV percent, e.g. '66.67'. Provide this OR leverage. | |
| strategyId | Yes | Morpho market id of the strategy (from list_strategies / get_strategy). |