> 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/engine.md).

# Engine

### Overview

The Button Engine is an offchain, high performance trading system written in Rust that executes strategies defined by Tailors on HyperEVM. It connects to HyperCore through delegated API wallets, enabling non-custodial order placement, position management, and strategy execution without ever taking control of user assets.

The Engine acts as the operational bridge between Button’s smart contracts and Hyperliquid’s order book, ensuring that trades are executed deterministically and risk parameters remain synchronized with onchain state.

### Technical Components

The Engine is designed for reliability, transparency, and safety:

* **Delegated Execution:** Operates through HyperCore API wallets, which can transfer assets between spot and perp subaccounts and place orders, but cannot withdraw funds
* **Low Latency Performance:** Continuously reads market data and position state from HyperCore to update Tailor health, margin, and exposure
* **Risk Enforcement:** Ensures all strategies remain within their configured limits
* **Transparency and Auditability:** Execution and position data are fully verifiable via HyperEVM events and HyperCore state queries

This architecture allows the Engine to provide high performance trading behavior with decentralized transparency and custody guarantees.
