Deploy Vault

By default, any Vault deployed via Aave Labs (e.g., using the Aave API or SDK) will share 50% of its fee revenue with Aave Labs.

Vaults deployed through other methods will not be surfaced via the Aave Labs API.

To deploy a new Aave vault through Aave Labs, follow these steps:

1

Identify the Reserve

First, determine which reserve you want your vault to be based on.

Let's say we choose the WETH supply reserve of an Ethereum market.

Reserve
const reserve: Reserve = {  __typename: "Reserve",  market: {    __typename: "MarketInfo",    address: "0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2",    chainId: 1,    // …  },  underlyingToken: {    __typename: "Currency",    symbol: "WETH",    name: "Wrapped Ether",    address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",    // …  },  isFrozen: false,  isPaused: false,  // …};

Ensure the reserve is not frozen or paused.

2

Define Configuration

Next, define the configuration for deploying the vault.

The minimal configuration to deploy a vault is:

Minimal Configuration
import { bigDecimal, evmAddress, VaultDeployRequest } from "@aave/react";
// …
const request: VaultDeployRequest = {  market: reserve.market.address,  chainId: reserve.market.chain.chainId,  underlyingToken: reserve.underlyingToken.address,  deployer: evmAddress(walletClient!.account.address),  // owner: evmAddress("0x1234…"), if different from deployer  initialFee: bigDecimal(11), // 11% performance fee  shareName: "Aave WETH Vault Shares",  shareSymbol: "avWETH",  initialLockDeposit: bigDecimal(1000), // 1000 WETH initial deposit};

When a recipient is not specified, the fee revenue is distributed equally between the vault owner and Aave Labs.

Let's explore a more advanced recipient configuration with an example. Suppose you want to deploy a vault where you keep 70% of the fee revenue and share the remaining 30% with your partner.

Configuration with Fee Recipients
import { bigDecimal, evmAddress, VaultDeployRequest } from "@aave/react";
const request: VaultDeployRequest = {  // …  feeRecipients: [    {      address: evmAddress("0x1234…"),      percent: bigDecimal(30),    },    {      address: evmAddress("0x4567…"),      percent: bigDecimal(70),    },  ],};

If the vault generates 100 WETH in fee revenue, the distribution will be as follows:

  • partner: 15 WETH

  • owner: 35 WETH

  • Aave Labs: 50 WETH

Since Aave Labs retains 50% of the total fee revenue by default, the remaining 50% is divided between the owner and partner according to the specified percentages.

3

Deploy the Vault

Finally, deploy the vault.

Use the useVaultDeploy and useSendTransaction hooks with the wallet library of your choice to send the transactions.

Viem
import { useWalletClient } from "wagmi";import { errAsync, useVaultDeploy } from "@aave/react";import { useSendTransaction } from "@aave/react/viem";
// …
const { data: walletClient } = useWalletClient();
const [deployVault, deploying] = useVaultDeploy();const [sendTransaction, sending] = useSendTransaction(walletClient);
// …
// Optional: combine loading statesconst loading = deploying.loading || sending.loading;const error = deploying.error || sending.error;
// …
const result = await deployVault(request).andThen((plan) => {  switch (plan.__typename) {    case "TransactionRequest":      // Single transaction execution      return sendTransaction(plan);
    case "ApprovalRequired":      // Approval + transaction sequence      return sendTransaction(plan.approval).andThen(() =>        sendTransaction(plan.originalTransaction)      );
    case "InsufficientBalanceError":      return errAsync(        new Error(`Insufficient balance: ${plan.required.value} required.`)      );  }});
if (result.isErr()) {  console.error("Vault deployment failed:", result.error);} else {  console.log("Vault deployment successful with hash:", result.value);}