> For the complete documentation index, see [llms.txt](https://button-labs.gitbook.io/button/gKgg6YSLPuW40VjoL4W1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://button-labs.gitbook.io/button/gKgg6YSLPuW40VjoL4W1/core/tailors.md).

# Tailors

### Overview

Button Tailors on HyperEVM represent programmable strategy modules that define how collateral from a Vault is deployed.

Each Tailor corresponds to a specific strategy, such as a basis trade, and enforces its own parameters, including margin limits, target markets, and risk thresholds. This modular design allows multiple strategies to coexist within the Button ecosystem, each operating independently while adhering to shared collateral and risk management rules.

### Technical Components

A Tailor is a smart contract deployed on HyperEVM that acts as the central orchestration contract in the Button protocol. It manages user trading positions through isolated Pocket wallets. It coordinates deposits, withdrawals, HyperCore integrations, and protocol adapter execution.

<figure><img src="/files/vgcnV1KclZ1z2gUjLgvq" alt=""><figcaption></figcaption></figure>

### Pockets

Each "user" of a Tailor gets an isolated smart contract wallet called a Pocket:

* Custodies assets, both on HyperEVM and HyperCore
* Controlled exclusively by Tailor
* Cannot be directly accessed, all interactions must go through the Tailor that owns it

Pockets allow for multiple users to share the same orchestration rules across a Tailor without needing to pool assets together.

### Adapters

Tailors use Adapters to integrate with external contracts, such as a lending pool. Adapters are explicitly whitelisted for a Tailor, and contain logic that govern how the Tailor can interact with the external contract. For example, we can create an adapter that enables the Tailor to swap on a HyperEVM AMM, placing rules around what assets can be traded in the adapter.

### Smart Contracts

The source code for Tailors can be found [here](https://github.com/buttonxyz/button-protocol), with audits found [here](https://github.com/buttonxyz/button-protocol/reports/audits).
