# AML

To keep Nest secure and globally compliant, Nest has implemented a sub-second and seamless AML (Anti-Money Laundering) check that happens before users deposit into any Nest vault.

### What You Need to Know

* AML checks are required to deposit into Nest vaults and are powered by TRM Labs.
* AML checks run on both the app and smart contracts (to ensure they can't be bypassed).
* Policies are disclosed to asset issuers and protocols whose assets are available through Nest vaults.&#x20;

<figure><img src="https://2939257221-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBkbdCnPSZgUYVIXZJJrm%2Fuploads%2FfB7fxnF4Hofgrm81ztQc%2FWalletRestricted.png?alt=media&#x26;token=3cd7e6d0-5a66-4dca-ac23-e689daf493f0" alt=""><figcaption><p>Wallet restricted notification</p></figcaption></figure>

### Freeze and Seize Capabilities

Nest implements freeze and seize functionality directly in its smart contracts to enable compliance with global AML/ATF regulations.

* **Freeze illicit funds**: Temporarily restrict transfers from wallets identified as illicit, preventing further movement while investigations proceed.
* **Seize illicit assets**: Permanently redirect illicit funds to a designated recovery or authority wallet, similar to mechanisms in USDC and USDT smart contracts. Asset seizure capability can only be activated under a lawful order (e.g., federal law in the US).

### How It Works&#x20;

Nest uses [**TRM Labs**](https://www.trmlabs.com/), a leading blockchain intelligence provider, to run AML checks. Nest's compliance team defines the rules, and [**Predicate**](https://predicate.io/) applies them.

## GET /user/{address}/compliance

> Checks compliance for a user and retrieves predicate message if compliant

```json
{"openapi":"3.0.0","info":{"title":"Nest API","version":"1.0.0"},"servers":[{"url":"https://api.nest.credit/v1","description":"Nest API Server"}],"paths":{"/user/{address}/compliance":{"get":{"tags":["User"],"description":"Checks compliance for a user and retrieves predicate message if compliant","parameters":[{"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]+$","description":"User address"},"required":true,"description":"User address","name":"address","in":"path"},{"schema":{"type":"number","default":1,"description":"Optional. Chain ID"},"required":false,"description":"Optional. Chain ID","name":"chainId","in":"query"},{"schema":{"type":"string","default":false,"description":"Optional. Indicates if the compliance check is for deposit and bridge interaction. Defaults to false."},"required":false,"description":"Optional. Indicates if the compliance check is for deposit and bridge interaction. Defaults to false.","name":"isDepositAndBridge","in":"query"},{"schema":{"type":"string","default":false,"description":"Optional. Indicates if bridge uses zapper (usdt -> usdc swap). Defaults to false."},"required":false,"description":"Optional. Indicates if bridge uses zapper (usdt -> usdc swap). Defaults to false.","name":"isZapper","in":"query"},{"schema":{"type":"string","default":false,"description":"Optional. Indicates solana deposits.  Defaults to false."},"required":false,"description":"Optional. Indicates solana deposits.  Defaults to false.","name":"isSolana","in":"query"},{"schema":{"type":"string","default":false,"description":"Optional. Indicates if the new proxy is used. Defaults to false."},"required":false,"description":"Optional. Indicates if the new proxy is used. Defaults to false.","name":"isNewProxy","in":"query"},{"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Optional. The Nest composer address extracted from CCTP hook data. Required for Solana deposits."},"required":false,"description":"Optional. The Nest composer address extracted from CCTP hook data. Required for Solana deposits.","name":"nestComposerAddress","in":"query"},{"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Optional. Override predicate \"from\" with executor address (bundled EVM flow)."},"required":false,"description":"Optional. Override predicate \"from\" with executor address (bundled EVM flow).","name":"predicateFromAddress","in":"query"}],"responses":{"200":{"description":"Compliance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"isCompliant":{"type":"boolean"},"predicateMessage":{"$ref":"#/components/schemas/PredicateMessage"}},"required":["isCompliant","predicateMessage"]}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}}},"components":{"schemas":{"PredicateMessage":{"type":"object","properties":{"taskId":{"type":"string","nullable":true},"expireByBlockNumber":{"type":"number","nullable":true},"signerAddresses":{"type":"array","items":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"}},"signatures":{"type":"array","items":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"}}},"required":["taskId","expireByBlockNumber","signerAddresses","signatures"]}}}}
```
