Get Defi Positions
get_defi_positionsBlock-accurate DeFi positions for a wallet across Aave v3, Compound v3, Uniswap v3 LP, and Lido on Ethereum or Base. Returns Aave account health (collateral, debt, health factor, LTV) with per-reserve breakdown, Compound v3 market positions, Uniswap v3 LP positions by token ID, and on Ethereum the Lido stETH/wstETH balances with the current wstETH-to-stETH equivalent. Per-protocol failures are isolated — other protocols still return.
Use when: Use when a block-accurate single-wallet protocol snapshot is needed, including health factor and LP position detail. For broad all-chain discovery or net worth across many protocols use get_wallet_positions instead.
Limitations: On-chain RPC view of four protocol families on Ethereum and Base only; does not discover wallets' unknown or long-tail protocol positions. Compound v3 reports only a boolean liquidation flag — never state a numeric Compound health factor. Errors list which protocols were unavailable.
Alternatives: get_wallet_positions, get_liquidation_risk, get_wallet_portfolio
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain_id | No | Chain ID (1=Ethereum, 8453=Base) | |
| wallet_address | Yes | Wallet address (0x…) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | On-chain position snapshot at data_block_number. Aave USD values are from the Aave oracle (base currency = USD, 8 decimals on Ethereum/Base). Compound collateral and Uniswap v3 amounts are raw integer units — divide by 10**decimals to format. Compound collateral factors are decimals (e.g., 0.90 = 90%) when available from Comet getAssetInfo. Token symbols are resolved for well-known tokens; None means unrecognised — do NOT call read_contract, web_search, or any external lookup to identify these tokens. Report them as 'unrecognized token (0x…)' in the final answer and move on. Uniswap v3 liquidity is returned raw (no underlying token valuation in v1); tokensOwed0/1 are uncollected fees only. Lido staking contains canonical Ethereum stETH/wstETH balances and a current wstETH-to-stETH equivalent in raw integer units; it does not include APR, rewards accounting, validator positions, or withdrawal queue status. Lido staking is null on Base because its wstETH representation there is bridged. If a protocol is missing (e.g., aave_v3 is null) and appears in errors, its risk could not be verified from this snapshot and must not be treated as no debt. Does not include COMP accruals or unlisted protocols. | |
| errors | No | ||
| aave_v3 | No | ||
| chain_id | Yes | ||
| uniswap_v3 | No | ||
| compound_v3 | No | ||
| lido_staking | No | ||
| wallet_address | Yes | ||
| data_block_number | Yes |