Aave V4 icon

Aave V4

Query Aave V4 DeFi protocol. Use this to: check supported chains, list hubs/spokes/reserves, get user positions/balances/supplies/borrows by wallet address, view transaction history, get exchange rates and APY history. Supports custom GraphQL queries for advanced use cases.

Position Management → Liquidate Position

AI-generated

Summary

Liquidate a user's Aave V4 position by repaying debt and claiming collateral

Inputs

  • chainId — Identifier of the blockchain network; can be specified as an expression
  • pmCollateralReserveId (required) — Identifier of the collateral reserve to liquidate; choose from the list or use an expression
  • pmDebtReserveId (required) — Identifier of the debt reserve to repay; choose from the list or use an expression
  • pmLiquidatorAddress (required) — Address of the liquidator performing the transaction
  • pmUserToLiquidate (required) — Address of the user whose position is being liquidated
  • pmLiquidateMax — If true, liquidate the maximum possible amount of debt
  • pmLiquidateAmount (required) — Amount of debt to liquidate; required when pmLiquidateMax is false
  • pmReceiveShares — If true, receive the liquidation proceeds as aTokens instead of the underlying asset

Output shape

a transaction receipt indicating success or failure of the liquidation

May include a transaction hash; errors are returned as an error object

Examples

Example 1: Liquidate using maximum debt amount

Set pmLiquidateMax to true; provide chainId, collateral reserve, debt reserve, liquidator address, and user address

Example 2: Liquidate a specific debt amount

Provide pmLiquidateAmount, chainId, collateral reserve, debt reserve, liquidator address, and user address; set pmLiquidateMax false

Links

Discussion