# Execution Logic

Pear Protocol is a **trading interface**, not a custody layer or risk engine. It allows traders to seamlessly open and manage **pair trades using perpetual futures** by routing long and short orders to your preferred venues — all from a single, unified front end.

#### 🧠 How it works

* **Venue Routing:**

  When a user places a trade, Pear splits the position into a **long leg** and a **short leg**, and routes each side to the selected venue (e.g. GMX, Hyperliquid, Vertex, or SYMMIO).
* **Synchronized Execution:**

  Both legs are executed at the **same timestamp**, enabling operational efficiency and minimizing execution mismatch — critical for effective pair trading.
* **Perpetual Instruments:**

  All instruments traded via Pear are **perpetual futures**, with configurable leverage, margin allocation, and side-specific sizing.

#### 🔐 Fund Flow & Custody

* **GMX:**

  You trade directly from your connected wallet. Pear signs and submits transactions that interact with GMX contracts on your behalf.
* **Hyperliquid / Vertex / SYMMIO:**

  You deposit funds into the protocol-specific trading engine. Pear then acts as a **management and execution layer**, allowing you to view, open, and close positions without ever holding custody of assets.

> Pear does **not** hold or custody user funds.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pearprotocol.io/how-it-works/execution-logic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
