# Aave V3 \[Distribute Aave V3 lending yield, instant in and out]

:::info
Railnet connects Aave V3 through the **`AaveV3Vehicle`** adapter.
:::

Aave V3 is an over-collateralized lending market. Suppliers earn the interest borrowers pay and can withdraw at any time; the rate moves with utilization and there is no lock-up.

## At a glance

| | |
|---|---|
| **Protocol** | [Aave V3](https://aave.com), over-collateralized lending |
| **Yield** | Borrower interest, accrued into the aToken balance |
| **Vehicle** | `AaveV3Vehicle` (native adapter) |
| **Deposits** | Instant |
| **Withdrawals** | Instant, bounded by pool liquidity |
| **Networks** | Ethereum mainnet, Base |
| **Deposit assets** | Any active reserve asset, one Vehicle each |
| **Status** | Live on Ethereum mainnet |

## How Railnet integrates it

On deposit the Vehicle supplies the asset to Aave's `Pool` and holds the aToken; on redeem it withdraws and pays the receiver. Both directions are synchronous, so a Query opens and settles in one transaction. `maxDeposit` is `0` on an inactive, frozen or paused reserve and otherwise caps at the room left under the supply cap; `maxRedeem` is `0` when the reserve is inactive or paused and otherwise follows available pool liquidity. `totalAssets()` is the accounted scaled aToken balance times the liquidity index, so donated aTokens cannot move the share price.

## Considerations

* Aave governance can freeze or pause a reserve. Read `maxDeposit` and `maxRedeem` rather than assume capacity.
* A reserve at its supply cap returns a reduced or zero `maxDeposit`.
* The rate is variable and resets with utilization every block, so quote it live. Protocol risk is Aave's: see [Risk management](/strategies/risk-management).
* AAVE emissions and Merit sit outside the supply rate; your Conduit decides where they go ([Rewards](/conduits/rewards)).

## Spawn parameters

`asset` is the underlying you distribute; `poolAddressesProvider` is that market's Aave provider. Put a Conduit on it: see [Quick start](/conduits/quick-start), then [Integrate a Conduit](/developers/integrate-conduit).

```solidity [Solidity]
AaveV3VehicleFactory.SpawnParams memory params = AaveV3VehicleFactory.SpawnParams({
    asset: USDC,
    poolAddressesProvider: AAVE_V3_PROVIDER,
    accessControl: accessControl,
    feeManager: FeeManager(address(0)),            // address(0) for none
    modulesManager: ModulesManager(address(0)),
    querySalt: bytes32(0),
    deploymentSalt: keccak256("aave-v3-usdc"),
    forbiddenAddresses: new address[](0),
    initialExpectedSupply: 0.8e18,                 // 18 decimals, 1 USDC seed
    queryRegistry: queryRegistry
});

AaveV3Vehicle vehicle = factory.spawn(params);
```

## Live deployments

| Vehicle | Asset | Address | Network |
|---|---|---|---|
| `$AAVEV3-1-USDC` | USDC | [0x6a62031b745fc0362041f792318ade8fd5c05d5c](https://etherscan.io/address/0x6a62031b745fc0362041f792318ade8fd5c05d5c) | Ethereum mainnet |

Factory: [0x35672A7D07E9F3e4eCEA31f61A88CAe4d1A913d4](https://etherscan.io/address/0x35672A7D07E9F3e4eCEA31f61A88CAe4d1A913d4). Other networks: [Deployed contracts](/developers/contracts/deployments).

## Next steps

<Cards>
  <Card title="Quick start" description="Specify the Conduit on your Vehicle." icon="rocket" to="/conduits/quick-start" />

  <Card title="Compose with other sources" description="Combine several Vehicles behind one token." icon="layers" to="/strategies/allocation" />
</Cards>
