Skip to Content
PluginsAave V4

Aave V4

Aave V4 introduces a Hub-and-Spoke architecture: liquidity lives in Hubs, while users supply, borrow, and manage collateral through Spokes tied to specific ecosystems. Each Spoke has its own set of reserves identified by an opaque reserveId, resolved from an asset via the Hub address and the Hub’s asset ID. Aave V4 uses a single rate model per reserve, so there is no separate stable/variable borrow mode as in Aave V3.

This plugin currently exposes the Lido Spoke, one of Aave V4’s launch Spokes. Additional Spokes can be added as the protocol matures.

Supported chains: Ethereum. Read-only actions work without credentials. Write actions require a connected wallet.

Actions

ActionTypeCredentialsDescription
Supply AssetWriteWalletSupply an asset to the Aave V4 Lido Spoke to earn interest
Withdraw AssetWriteWalletWithdraw a supplied asset from the Aave V4 Lido Spoke
Borrow AssetWriteWalletBorrow an asset against supplied collateral
Repay DebtWriteWalletRepay a borrowed asset
Set Asset as CollateralWriteWalletEnable or disable a supplied reserve as collateral
Get Reserve IDReadNoResolve an asset to its reserveId within the Spoke
Get User Supplied AssetsReadNoGet the amount of underlying asset supplied by a user for a reserve
Get User DebtReadNoGet a user’s drawn and premium debt for a reserve
Get User Account DataReadNoGet overall account health, collateral, debt, and risk premium

Supply Asset

Supply an asset to the Aave V4 Lido Spoke to earn interest. Amount is in the underlying asset’s smallest unit (wei for 18-decimal tokens).

Inputs:

InputTypeDescription
reserveIduint256Reserve ID (resolve first with Get Reserve ID)
amountuint256Amount (wei)
onBehalfOfaddressOn Behalf Of Address

Outputs: success, transactionHash, transactionLink, error

When to use: Earn yield on idle tokens, automate deposits into the Lido Spoke, build supply strategies keyed off reserve identifiers.


Withdraw Asset

Withdraw a supplied asset from the Aave V4 Lido Spoke.

Inputs:

InputTypeDescription
reserveIduint256Reserve ID
amountuint256Amount (wei)
onBehalfOfaddressRecipient Address

Outputs: success, transactionHash, transactionLink, error

When to use: Withdraw funds when needed, automate withdrawals based on rate changes, rebalance collateral positions.


Borrow Asset

Borrow an asset from the Aave V4 Lido Spoke against supplied collateral. V4 uses a single rate model, so there is no interest rate mode input.

Inputs:

InputTypeDescription
reserveIduint256Reserve ID
amountuint256Amount (wei)
onBehalfOfaddressOn Behalf Of Address

Outputs: success, transactionHash, transactionLink, error

When to use: Borrow against collateral, leverage positions, automate borrowing based on market conditions.


Repay Debt

Repay a borrowed asset to the Aave V4 Lido Spoke.

Inputs:

InputTypeDescription
reserveIduint256Reserve ID
amountuint256Amount (wei)
onBehalfOfaddressOn Behalf Of Address

Outputs: success, transactionHash, transactionLink, error

When to use: Automate debt repayment when health factor drops, repay before liquidation, scheduled debt reduction.


Set Asset as Collateral

Enable or disable a supplied reserve as collateral in the Aave V4 Lido Spoke. There is no partial collateral in V4: this toggles the entire supplied balance of the reserve.

Inputs:

InputTypeDescription
reserveIduint256Reserve ID
usingAsCollateralboolUse as Collateral
onBehalfOfaddressOn Behalf Of Address

Outputs: success, transactionHash, transactionLink, error

When to use: Manage collateral exposure, disable a reserve as collateral during market uncertainty, optimize borrow capacity.


Get Reserve ID

Resolve an asset to its reserveId within the Lido Spoke, given the Hub address and the Hub’s asset ID for that asset. Call this before Supply, Withdraw, Borrow, Repay, or Set Asset as Collateral.

Inputs:

InputTypeDescription
hubaddressHub Address
assetIduint256Hub Asset ID (resolve via the Hub’s getAssetId(underlying))

Outputs:

OutputTypeDescription
reserveIduint256Reserve ID

When to use: Look up the reserveId for a token before running any Spoke action against it.


Get User Supplied Assets

Get the amount of underlying asset supplied by a user for a given reserve.

Inputs:

InputTypeDescription
reserveIduint256Reserve ID
useraddressUser Address

Outputs:

OutputTypeDescription
suppliedAmountuint256Supplied Amount (underlying)

When to use: Monitor individual reserve positions, track supplied balances across reserves.


Get User Debt

Get the debt of a user for a given reserve, split into drawn debt and premium debt. Total debt is drawn plus premium.

Inputs:

InputTypeDescription
reserveIduint256Reserve ID
useraddressUser Address

Outputs:

OutputTypeDescription
drawnDebtuint256Drawn Debt (underlying)
premiumDebtuint256Premium Debt (underlying)

When to use: Monitor outstanding debt per reserve, compare drawn vs. premium debt, plan repayments.


Get User Account Data

Get overall account health, including collateral value, debt, health factor, and risk premium. Returns a struct; access individual fields via a dotted path (for example result.healthFactor).

Inputs:

InputTypeDescription
useraddressUser Address

Outputs:

OutputTypeDescription
accountDatastructriskPremium, avgCollateralFactor, healthFactor, totalCollateralValue, totalDebtValueRay, activeCollateralCount, borrowCount

When to use: Monitor account health factor for liquidation protection, check borrow capacity before opening new positions, track portfolio-level collateral and debt.


Example Workflows

Health Factor Monitor with Alert

Schedule (every 5 min) -> Aave V4: Get User Account Data -> Code (accountData.healthFactor / 1e18) -> Condition (< 1.5) -> Discord: Send Message

Monitor your Aave V4 Lido Spoke health factor and send a Discord alert when it drops below 1.5, giving you time to act before liquidation.

Supply After Resolving Reserve ID

Manual -> Aave V4: Get Reserve ID -> Aave V4: Supply Asset

Resolve the reserveId for an asset from its Hub address and asset ID, then supply that asset to the Lido Spoke in the same workflow.


Supported Chains

ChainContracts Available
Ethereum (1)Aave V4 Lido Spoke

Aave V4 launched on Ethereum mainnet with a Hub-and-Spoke architecture. This plugin exposes the Lido Spoke; the full, current action list for this protocol is available in the app’s action grid and via the search_protocol_actions MCP tool.