# blazephoenixxyz-crypto/blaze-phoenix-dex architecture

> Architecture diagram of the GitHub repository blazephoenixxyz-crypto/blaze-phoenix-dex, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/blazephoenixxyz-crypto/blaze-phoenix-dex
- Repository: https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex

## Overview

BlazePhoenix-Dex is an on-chain DeFi router and aggregator intended to price routes from measured pool behavior, then execute swaps. The likely user journey is request a quote, select a route, and execute it against a venue; the README also describes Solver-plan properties and quote/execution parity. The tree identifies Core, Hub, Quoter, Router, and Solver contracts, but no source excerpts were available, so their call relationships and the Hub’s specific runtime role remain unverified.

Main entry points: [`src/BlazePhoenixQuoter.sol`](https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex/blob/main/src/BlazePhoenixQuoter.sol) (Route quoter), [`src/BlazePhoenixSolver.sol`](https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex/blob/main/src/BlazePhoenixSolver.sol) (Route solver), [`src/BlazePhoenixRouter.sol`](https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex/blob/main/src/BlazePhoenixRouter.sol) (Swap router), [`src/BlazePhoenixCore.sol`](https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex/blob/main/src/BlazePhoenixCore.sol) (Pricing core)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_quoting["Quote and planning"]
  node_quoter["Route quoter"]
  node_solver["Route solver"]
end

subgraph group_execution["Swap execution"]
  node_router["Swap router"]
end

subgraph group_protocol["Protocol core"]
  node_core["Pricing core"]
  node_hub["Protocol hub"]
end

node_trader(("Trader"))
node_venues[("Liquidity venues")]

node_trader -.->|"requests quote"| node_quoter
node_quoter -.->|"plans route"| node_solver
node_trader -.->|"submits swap"| node_router
node_router -.->|"executes swap"| node_venues
node_quoter -.->|"prices route"| node_core
node_solver -.->|"uses quote math"| node_core

click node_quoter "https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex/blob/main/src/BlazePhoenixQuoter.sol"
click node_solver "https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex/blob/main/src/BlazePhoenixSolver.sol"
click node_router "https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex/blob/main/src/BlazePhoenixRouter.sol"
click node_core "https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex/blob/main/src/BlazePhoenixCore.sol"
click node_hub "https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex/blob/main/src/BlazePhoenixHub.sol"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_quoter,node_solver toneBlue
class node_router,node_venues toneAmber
class node_core,node_hub toneMint
class node_trader toneIndigo
```

## Components

### Quote and planning

- [Route quoter](https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex/blob/main/src/BlazePhoenixQuoter.sol): `src/BlazePhoenixQuoter.sol`
- [Route solver](https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex/blob/main/src/BlazePhoenixSolver.sol): `src/BlazePhoenixSolver.sol`

### Swap execution

- [Swap router](https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex/blob/main/src/BlazePhoenixRouter.sol): `src/BlazePhoenixRouter.sol`

### Protocol core

- [Pricing core](https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex/blob/main/src/BlazePhoenixCore.sol): `src/BlazePhoenixCore.sol`
- [Protocol hub](https://github.com/blazephoenixxyz-crypto/blaze-phoenix-dex/blob/main/src/BlazePhoenixHub.sol): `src/BlazePhoenixHub.sol`

### Other components

- **Trader**
- **Liquidity venues**

## Connections

- Trader → Route quoter: requests quote
- Route quoter → Route solver: plans route
- Trader → Swap router: submits swap
- Swap router → Liquidity venues: executes swap
- Route quoter → Pricing core: prices route
- Route solver → Pricing core: uses quote math
