> For the complete documentation index, see [llms.txt](https://docs.bullpen.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bullpen.fi/about-bullpen/platform-architecture.md).

# Platform Architecture

Bullpen routes trades to different execution venues based on the asset type and market. This page explains how orders flow through the system.

## Trade Routing Overview

```
┌──────────────────────────────────────────────────────────────────────────────┐
│                                 BULLPEN                                       │
├──────────────────────────────────────────────────────────────────────────────┤
│                                                                               │
│  ┌─────────┐   ┌─────────┐   ┌───────────────┐   ┌─────────────┐            │
│  │  Perps  │   │  Spot   │   │     Spot      │   │ Predictions │            │
│  │         │   │ (Major) │   │  (Long-tail)  │   │             │            │
│  └────┬────┘   └────┬────┘   └───────┬───────┘   └──────┬──────┘            │
│       │             │                │                  │                    │
└───────┼─────────────┼────────────────┼──────────────────┼────────────────────┘
        │             │                │                  │
        ▼             ▼                ▼                  ▼
  ┌───────────┐  ┌──────────┐   ┌──────────┐      ┌────────────┐
  │Hyperliquid│  │   UNIT   │   │ Jupiter  │      │ Polymarket │
  │   Perps   │  │          │   │  Ultra   │      │            │
  └───────────┘  └──────────┘   └──────────┘      └────────────┘
```

## Prediction Markets

All prediction market orders execute through **Polymarket's Central Limit Order Book (CLOB)**. Bullpen connects directly to Polymarket for market discovery, pricing, order placement, and settlement.

Collateral is USDC.e on Polygon. Orders match via price-time priority. Winning positions pay $1.00 per share at resolution and can be redeemed gaslessly.

Bullpen adds additional tooling on top of Polymarket execution: smart money discovery, copy trading, convergence signals, trade feeds, and alerts.

## Perpetuals

All perpetual futures orders execute on **Hyperliquid**.

Hyperliquid operates a fully onchain central limit order book (CLOB) via HyperCore. Every order, cancel, trade, and liquidation happens transparently onchain with block-level finality. Bullpen supports all Hyperliquid perp markets and order types.

Bullpen also supports **HIP-3** (Hyperliquid Improvement Proposal 3), which enables permissionless liquidity provision through a hyperliquidity vault system. This allows for deeper liquidity on long-tail perp markets.

For detailed order type specifications, see [Hyperliquid Docs: Order Types](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/order-types).

## Spot: Major Assets

For spot assets listed on Hyperliquid (BTC, ETH, SOL, HYPE, MON, XPL, and others), trades route through the **UNIT** integration which accesses Hyperliquid's spot orderbook.

Currently supported UNIT assets include:

| Asset    | Pair          |
| -------- | ------------- |
| HYPE     | HYPE/USDC     |
| BTC      | BTC/USDC      |
| MON      | MON/USDC      |
| SOL      | SOL/USDC      |
| ETH      | ETH/USDC      |
| XPL      | XPL/USDC      |
| USDT     | USDT/USDC     |
| FARTCOIN | FARTCOIN/USDC |
| PUMP     | PUMP/USDC     |

This list expands as Hyperliquid adds new spot markets.

## Spot: Long-Tail Assets

For any Solana SPL token not listed on Hyperliquid, trades execute through **Jupiter Ultra**.

Jupiter Ultra is a meta-aggregation layer that:

* Aggregates quotes from multiple liquidity sources (Iris, JupiterZ, DFlow, Hashflow, OKX)
* Simulates execution quality before routing
* Provides MEV protection via ShadowLane (Jupiter's proprietary transaction landing engine)
* Supports gasless swaps for trades above \~$10 USD

Ultra delivers sub-second transaction landing (50-400ms vs 400ms-1.2s for traditional methods) and consistently achieves positive slippage on average.

For technical details, see [Jupiter Ultra V3 Documentation](https://dev.jup.ag/blog/ultra-v3).

## Account Structure

Bullpen maintains separate balances for different market types:

| Account       | Collateral       | Used For                      |
| ------------- | ---------------- | ----------------------------- |
| Polymarket    | USDC.e (Polygon) | Prediction markets            |
| Perps         | USDC             | Hyperliquid perpetual futures |
| Spot (HL)     | USDC             | Hyperliquid spot markets      |
| Spot (Solana) | SOL / SPL tokens | Solana token trading          |

You can transfer between accounts using the built-in transfer functionality. See [Transfers](/features/transfers.md) for details.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bullpen.fi/about-bullpen/platform-architecture.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
