VAULTS
Button Vaults allow collateral token holders to permissionlessly deposit and earn yield denominated in the deposit token. Vaults are deployed on HyperEVM and serve as the primary entry point for Bitcoin and other collateral within the Button protocol. Each Vault tracks collateral deposits, issues vault tokens representing proportional ownership, and allocates liquidity to strategy modules known as Tailors.
Vaults can operate in either public or private permissioned modes depending on end user requirements. A private permissioned vault allows for full segregation of collateral deposits, allowing for the end user to customize their strategies.

- TVL Caps: Configurable upper limits to manage vault size and risk exposure.
- Oracle: Determines vault value based on the performance and NAV of underlying strategies.
- Async Withdrawals: Supports delayed withdrawals to ensure orderly unwinds of strategy positions
TAILORS
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.
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.
LENDING POOLS
Button Lending Pools on HyperEVM provide collateralized lending infrastructure specifically designed for providing margin to Button strategies. Button Lending Pools integrate with a margin Accountant to evaluate borrower solvency across the protocol, ensuring platform wide risk management.
This design enables Tailors to borrow against both collateral and the value of its strategies. For example, a Pocket holding a basis trade on HyperCore can borrow against both its deposited BTC collateral and the value of its active trade position (with a haircut), unlocking significantly higher capital efficiency while maintaining robust risk management.

TECHNICAL COMPONENTS
Pools
Button Lend pools are isolated strategy specific lending pools, allowing for borrowing of an ERC20 debt asset, using an ERC20 collateral asset for a specific Button strategy.
Each pool is independently configured with its own:
- Interest rate model: Typically a fixed interest rate
- LTV: Loan to value, maximum borrowing power per dollar of collateral
- Liquidation parameters: Thresholds and incentives
- Oracle configuration: Price feed sources and staleness limits
Accountant
The Margin Accountant is a specialized contract that calculates total position health across multiple collateral sources. When a lending pool checks if a borrower is solvent, it delegates to the Accountant, which aggregates:
- Collateral in lending pools: BTC or other assets deposited as collateral
- Assets held in Pockets: Undeployed capital available for margin
- HyperCore position values: Real time valuation of basis trades and other strategies, via an Oracle
The Accountant is configured to apply different discounts depending on the collateral source and Tailor strategy, and returns a unified health factor:
- Health Factor = (Total Collateral Value / Total Debt Value) × 100%
This health factor is used to determine solvency and trigger liquidations.
Liquidations
Liquidations are triggered when the health factor of a Tailor falls below the defined configuration in its Accountant. Liquidations are asynchronous, and processed in phases:
Phase 1: Liquidation Triggered
When health falls below the liquidation threshold, the Tailor's pocket is placed into liquidation mode
Pocket is marked as "liquidating"
All operations (such as withdrawals) that allow for removal of NAV are blocked
Phase 2: Position Unwinding
Agents will begin unwinding the position to bring the Pocket below the liquidation threshold. If debt is fully repaid during this period, the liquidation is cancelled and the Pocket returns to normal operation.
Phase 3: Collateral Liquidations
If agents determine that the debt cannot be repayed with only unwinding the position, then collateral is liquidated to repay debt.
Oracles
Button lending infrastructure relies on multiple oracle systems to ensure accurate valuation and robust risk management.
- Collateral Price Oracles: All collateral assets (BTC) are priced using Pyth Network oracles. Pyth is a pull-based oracle system that provides high-frequency price feeds with sub-second latency, ideal for volatile crypto markets.
- HyperCore Position Oracle: HyperCore position oracles track the real time value of basis trades and other strategies executed on HyperCore. Unlike collateral price oracles, this oracle reports position specific data. Off chain agents query the Hyperliquid API and submit signed position updates onchain. Only authorized agents can update position data.
