# Using Transfer Hooks

### What are Transfer Hooks?

Aera transfer hooks exist to enable custom functionality during vault unit transfers such as whitelist/blacklist checks. Transfer hooks can embed arbitrary logic ranging from simple acceptance checks to more stateful logic such as rewards management.

### Why They Matter?

Many vault owners need to enforce restrictions on who can receive vault units. This enables permissioned vaults or can be used to support a holistic compliance strategy.

### How to Choose a Transfer Hook?

A vault transfer hook needs to implement a `beforeTransfer` function which accepts the `from` address, `to` address and the `transferAgent`. Two hooks are available to vault owners out-of-the-box: the `TransferWhitelistHook` and the `TransferBlacklistHook`.

The `TransferWhitelistHook` maintains a list of whitelisted addresses and only allows vault units to be sent to whitelisted addresses. The whitelist hook can be used in permissioned vaults with a fixed set of participants.

The `TransferBlacklistHook` can be configured with a blacklist oracle. It's compatible with the Chainalysis sanctions oracle interface but can be used with any custom blacklist.

### Caveats

Hooks can be updated using `setBeforeTransferHook`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aera.finance/multi-depositor-vaults/using-transfer-hooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
