Actions61
- Activity Actions
- Asset Actions
- Custom Query Actions
- Hub Actions
- Lending Actions
- Market Data Actions
- Position Management Actions
- Position Swap Actions
- Protocol Actions
- Reserve Actions
- Spoke Actions
- Swap Actions
- User Position Actions
Lending → Preview Action
AI-generatedSummary
Preview a lending action (borrow, repay, supply, or withdraw) on Aave V4.
Inputs
- chainId — Chain identifier or name; optional, can be supplied via expression.
- lendingReserveId (required) — Identifier of the Aave reserve to interact with.
- previewActionType (required) — Type of preview action: borrow, repay, supply, or withdraw.
- lendingAmount (required) — Amount of the asset in its main unit (e.g., 1.5 for 1.5 ETH).
- lendingSenderAddress (required) — Address of the signer sending the transaction.
- previewEnableCollateral — Enable the supplied asset as collateral (only relevant for supply previews).
- previewUseMax — Use the maximum available amount for repay or withdraw previews.
- previewUsePermit — Use EIP‑2612 permit for gas‑less token approval (for repay or supply).
Output shape
a single JSON object describing the previewed transaction, typically containing the action type, amount, reserve, sender, and optionally collateral and permit flags
The exact fields may vary by action type; the response is meant for simulation and does not execute the transaction.
Examples
Example 1: Simulate supplying 2 units of DAI as collateral
chainId: 'ethereum', lendingReserveId: '0x...DAI', previewActionType: 'supply', lendingAmount: '2', lendingSenderAddress: '0xSender', previewEnableCollateral: true
Example 2: Preview repaying the maximum borrowed amount
chainId: 'ethereum', lendingReserveId: '0x...USDC', previewActionType: 'repay', lendingAmount: '', previewUseMax: true, previewUsePermit: false, lendingSenderAddress: '0xSender'
Example 3: Preview withdrawing the full supply
chainId: 'ethereum', lendingReserveId: '0x...USDC', previewActionType: 'withdraw', lendingAmount: '', previewUseMax: true, lendingSenderAddress: '0xSender'