← Protocols
Instadapp
01Description

DeFi smart layer with three layers: DeFi Smart Accounts (DSA) — proxy wallets that batch protocol calls via vetted Connectors; Avocado — multichain smart-contract wallet with USDC gas; Instadapp Lite — auto-rebalancing yield vaults (e.g. ETH-leverage on Lido/Aave).

02Best for
  • 01batched DeFi transactions (DSA)
  • 021-click migrations between Aave/Compound/Morpho
  • 03Avocado multichain account abstraction
  • 04Instadapp Lite leveraged yield vaults
  • 05DSL aggregator middleware
03Install
  • pnpm add dsa-connect @instadapp/avocado viem
04Environment variables
VariableScopeDescription
NEXT_PUBLIC_DSA_INDEXClientInstadapp Index/registry contract (deploys DSAs); resolve per chain from dsa-connect.
NEXT_PUBLIC_AVOCADO_FORWARDERClientAvocado Forwarder address used to relay multichain transactions with USDC gas.
05Prompt snippet
Integrate Instadapp. For DSA (DeFi Smart Accounts): use `dsa-connect` — `const dsa = new DSA(web3); await dsa.build({ owner, version: 2 })` deploys a per-user proxy. Compose actions with `dsa.add({ connector, method, args })` (e.g. connector `AAVE-V3-A` method `deposit`, or `COMPOUND-V3-A` method `borrow`, or `MORPHO-BLUE-A`) then `dsa.cast()` executes them atomically as a single tx. Migrations across Aave↔Compound↔Morpho are encoded as one multi-connector cast. For Avocado: wrap a signer in `@instadapp/avocado` `createSafe(signer)` to get a multichain smart account that pays gas in USDC and supports cross-chain calls via the Avocado Forwarder. For Instadapp Lite: deposit into the ERC-4626 `iETHv2` (or asset variants) which auto-rebalances leverage on Lido + Aave to track an ETH-staking yield amplification target.
06Gotchas
  • DSA is a smart contract owned by the EOA — funds live on the DSA address, not the EOA. Approvals, NFTs, and token receivers must be set to the DSA, otherwise `cast` will revert on `transferFrom`.
  • Connector versions are nuanced — `AAVE-V2-A` vs `AAVE-V3-A` vs `AAVE-V3-IMPORT-A` are different; using the wrong one will silently target the wrong protocol or fail the migration.
  • Connectors are governance-upgradeable via the Instadapp `ConnectorRegistry` — a deprecated connector can be removed and break legacy clients; pin to specific versions and monitor the registry.
  • Avocado's USDC gas model means a transaction can fail if the user has no USDC on the destination chain even if the call itself is gas-free; surface USDC top-up flows in the UI.
  • Instadapp Lite vaults are leverage strategies — a sharp ETH price drop or stETH depeg triggers rebalancer cascades; if the rebalancer keeper is paused or the underlying lending market freezes, NAV can diverge from the theoretical target.
  • Lite vault redemptions are subject to the underlying lending-market liquidity (Aave / Lido withdrawal queue) — large withdrawals may need to wait for queue processing; do not assume instant exit.
  • DSA `cast` is atomic — one failing connector rolls the whole batch back; debugging requires Tenderly simulation or `castEstimate` before sending.
07Alternatives