# Compliance enforcement

> The on-chain controls a vault owner can use to enforce compliance, what each acts on, and what none of them can do.

Source: https://docs.trusslabs.io/vaults/compliance

A vault that serves regulated customers needs a way to decide who may use it, and a way to act when something goes
wrong. A Truss vault gives its owner two kinds of on-chain control. Policies decide who may enter, hold and exit.
Forced transfers, when a vault is deployed with them, move a position without the holder's consent. This section
describes what the contracts do; which controls a vault needs is for its owner to decide with its advisers.

> **Key points**
>
> - The deposit, holder and withdrawal policies decide who may enter, who may hold, and who may exit or be paid.
> - Forced transfers are chosen at deployment and can never be switched on or off afterwards.
> - A policy needed at launch should be named at deployment. Binding one on a live vault waits the CRITICAL tier.
> - No control freezes shares in place, burns them, or reverses a payout.

## The controls

| Need | Control | Acts when | How it is set up |
|---|---|---|---|
| Who may enter | Deposit policy | A deposit request opens | Bound at the CRITICAL tier |
| Who may hold shares or a pending request | Holder policy | Shares or a request arrive anywhere | At deployment, or later at the CRITICAL tier |
| Who may exit, and who may be paid | Withdrawal policy | A redemption is opened, transferred, claimed or paid instantly | At deployment, or later at the CRITICAL tier |
| Moving a position without consent | Forced transfers | The VaultAdmin or a vault manager calls `forceTransfer`, at once | Chosen at deployment, fixed for the vault's life |
| Stopping new activity | Vault pause | The Sentry or the VaultAdmin pauses, at once | Unpausing is the VaultAdmin's, after HIGH |
| A record of actions | Events | Every binding, forced transfer and pause | Nothing to set up |

No holder or withdrawal policy has been built yet, so the policy rows describe what the vault supports. A pause
refuses new deposit and redemption requests, pushes into sub-accounts and instant withdrawals. Claims, cancellations,
settlement, and transfers of shares and pending requests carry on.

## What stays off chain

The verification process, the screening provider and case management stay off chain. A policy only reads their
results on chain, for example from an allowlist that the owner keeps up to date. The vault does not say who updates
such a list, or how fast. That depends on how the policy is built: who can edit it, and at what delay. A screening
list that waits a long delay to change is of little use.

## Decide before launch

- Forced transfers cannot be switched on or off after deployment. Read [Forced transfers](https://docs.trusslabs.io/vaults/compliance/forced-transfers.md)
  before choosing.
- Binding a policy on a live vault waits the CRITICAL tier, chosen per vault; the committed preprod configs use 14
  days. A holder or withdrawal policy needed from the first deposit should be named at deployment.
- On a vault with forced transfers, every vault manager key can move any holder's position at once. Plan those keys
  as carefully as the VaultAdmin's.

## What no control can do

- Freeze shares in place. The sender of shares is never checked, and a pause does not stop transfers, so a holder
  can send shares away until a forced transfer lands.
- Burn or seize shares. A forced transfer moves a position to another address. Nothing is minted or burned.
- Reverse a payout. USDC already claimed has left the vault.
- Judge by amount or time. The holder and withdrawal policies see only an address.

## Where to read more

| Page | What it covers |
|---|---|
| [Using policies for compliance](https://docs.trusslabs.io/vaults/compliance/using-policies.md) | Each compliance need mapped to the hook that enforces it |
| [Forced transfers](https://docs.trusslabs.io/vaults/compliance/forced-transfers.md) | What a forced transfer moves, its checks, and how it is enabled |
| [Compliance scenarios](https://docs.trusslabs.io/vaults/compliance/scenarios.md) | Steps for a screening match, a lost key, a court order and offboarding |
| [Vault policies](https://docs.trusslabs.io/vaults/policies/vault-policies.md) | Every function that asks the deposit, holder and withdrawal policies |
| [Emergency controls](https://docs.trusslabs.io/vaults/guides/emergency-controls.md) | Pausing and the other levers that act at once |
