# 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`.
