# Execution & Integrations

When a fund executes a trade, capital moves from the treasury to an external protocol through a dedicated subwallet. This page explains how that routing works.

### Subwallets

Most protocols expect interactions from a single account. They are not built to receive instructions directly from a multisig. Subwallets bridge this gap.

A subwallet is a smart account generated through Privy that acts as the fund's interface with a specific venue. It is controlled by the fund's execution layer, not by any individual. The operator's personal wallet never touches fund capital.

Each integrated protocol gets its own subwallet. Capital flows from the treasury into the subwallet, the subwallet interacts with the protocol, and positions are tracked back to the fund.

### How a trade executes

1. An Admin proposes a trade - open a perps position, enter a prediction market, swap tokens
2. The proposal routes through the fund's governance process
3. The execution layer instructs the treasury to deploy capital through the appropriate subwallet
4. The subwallet opens the position on the external protocol
5. The position is recorded onchain and visible to all fund members

Every integration follows this same pattern.

### Integrations

**Hyperliquid** - Perpetuals positions open and manage through a Hyperliquid subwallet. The fund connects at the protocol layer, not through Hyperliquid's frontend.

**Polymarket** - Prediction market positions route through a Polymarket subwallet. Operators can build strategies around political, economic, sports, and crypto events. Available in v1.5.

**ERC-20 Swaps** - Token swaps execute through onchain DEX routing directly from the treasury. No subwallet needed - the treasury swaps natively.

**Aave** - Lending positions deploy fund capital into Aave markets through a dedicated subwallet. Available in v2.

### What members see

Every trade executed through the fund is visible in real time - the venue, the asset, the size, and the timestamp. Members do not need to trust that the operator is following the stated strategy. The onchain record shows exactly what the fund is doing.

### What's next

Rayze is continuously integrating new venues and protocols. Each new integration follows the same architecture - governance approves, the execution layer routes, the treasury settles through a protocol-specific subwallet.


---

# 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.rayze.io/architecture/execution-and-integrations.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.
