> For the complete documentation index, see [llms.txt](https://docs.satay.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.satay.finance/technical-overview/satay-module.md).

# Satay Module

## Overview

The `satay::satay` module serves as the primary interface for interacting with vaults within the Satay protocol. It provides public entry functions that allow users to create and manage vaults, handle deposits and withdrawals, and integrate strategies.

## Structs

The `satay::satay` module does not define any new structs. Instead, it leverages existing structs from the `satay::vault` and `satay::strategy` modules to manage vaults and strategies.

## Functions

The module primarily exposes public entry functions that facilitate various operations related to vault management.

* `create_vault(account: &signer, deposit_limit: Option<u64>, total_debt_limit: Option<u64>, base_metadata: Object<Metadata>)`: Creates a new vault with the specified deposit limit, total debt limit, and base asset metadata.
* `create_vault_with_coin<CoinType>(account: &signer, deposit_limit: Option<u64>, total_debt_limit: Option<u64>)`: Creates a new vault for a specific coin type, wrapping the coin if necessary, and initializing it with a deposit limit and total debt limit.
* `pause_vault(account: &signer, vault: Object<Vault>)`: Pauses the specified vault, preventing new deposits but allowing withdrawals.
* `unpause_vault(account: &signer, vault: Object<Vault>)`: Unpauses the specified vault, allowing it to accept deposits again.
* `add_strategy(account: &signer, vault: Object<Vault>, strategy: Object<BaseStrategy>, debt_limit: u64)`: Adds a new strategy to the specified vault with a maximum debt limit for yield generation or management.
* `remove_strategy(account: &signer, vault: Object<Vault>, strategy: Object<BaseStrategy>, force: bool)`: Removes an existing strategy from the specified vault, with an option to force removal even if the strategy has outstanding debt.
