> For the complete documentation index, see [llms.txt](https://city-protocol.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://city-protocol.gitbook.io/docs/software-development-kit/lending-borrowing/aave-v3.md).

# Aave V3

Aave V3 methods return a single transaction object rather than the two-phase pattern used by Morpho. The SDK does not auto-handle ERC-20 approvals for Aave, so your app needs to manage those separately before calling supply or repay methods.

#### Supply

Supplies assets into an Aave V3 pool as a lender. Make sure you have already approved the pool to spend the underlying token before executing this transaction.

```
const tx = await lendingClient.buildAaveSupplyTx({
  pool: "0xYourAavePoolAddress",
  asset: "0xYourReserveAsset",
  amount: 1_000_000n, // Amount in underlying token decimals
});
```

**Note:** Approvals are handled separately by your app. You will need to send a standard ERC-20 `approve` call to the asset contract with the pool address as spender before this transaction will succeed.

#### Borrow

Borrows assets from an Aave V3 pool. You need collateral supplied to the pool beforehand, and the borrow amount must keep your health factor above 1.

```
const tx = await lendingClient.buildAaveBorrowTx({
  pool: "0xYourAavePoolAddress",
  asset: "0xYourReserveAsset",
  amount: 500_000n,
});
```

#### Repay

Repays a borrow position on Aave V3. As with supply, make sure you approve the pool to spend the repayment token first.

```
const tx = await lendingClient.buildAaveRepayTx({
  pool: "0xYourAavePoolAddress",
  asset: "0xYourReserveAsset",
  amount: 500_000n,
});
```
