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

# Technical Overview

HYPERPNL is built as a modular system where each component has a clearly defined responsibility.

The architecture is designed to remove discretionary control and ensure that trading rules, outcomes, and fund flows are enforced consistently by the system itself.

To achieve this, HYPERPNL combines off-chain execution with on-chain verification.

Trading is handled off-chain for performance and scalability.\
Critical actions such as fund routing, outcome validation, and payouts are enforced on-chain for transparency and trust.

All critical actions are periodically verified and signed by the user.\
These signed confirmations are used to create tamper-proof records, which are anchored on-chain.\
As a result, outcomes can be independently verified and cannot be altered after the fact.

#### <mark style="color:$warning;">**High-Level Structure**</mark>

At a high level, the system consists of three main parts:

* **Frontend**\
  The user-facing interfaces used to interact with the platform
* **Backend**\
  Core backend services responsible for trading execution, monitoring, rule enforcement, and data management
* **Smart Contracts**\
  On-chain components that manage fund flows and verify outcomes.

Each part is isolated and communicates through well-defined interfaces.

{% @mermaid/diagram content="flowchart LR
subgraph Market\["Market"]
HL\[Hyperliquid]
end

subgraph App\["HyperPNL App"]
direction TB
FE\[Frontend]
BE\[Core Backend]
BE\_DESC\[User trading happens here]
end

subgraph Chain\["Smart Contracts"]
PR\[Payment Router]
PT\[Payout Treasury]
DR\[Data Recorder]
end

%% Market data
HL -->|market data| App

%% Purchase flow
FE -->|challenge purchase| PR
PR -->|payout allocation| PT
PR --> REV\[Protocol Revenue]
PR --> REF\[Referral Fee]
PR -->|purchase confirmed| App

%% Trading & outcome
BE -->|outcome summary| FE
BE --> BE\_DESC
FE -->|user verified outcome| DR
DR -->|payout authorization| PT" %}
