# Overview & Architecture

**Blockchain Infrastructure Team**\
\&#xNAN;*March 2026*

## Overview

Uniocean is a high-performance, application-specific Layer-1 blockchain expressly engineered to support a fully decentralized exchange (DEX) ecosystem. Built utilizing the modular framework of the Cosmos SDK and secured by Tendermint BFT consensus, Uniocean achieves instant transaction finality and unparalleled throughput.

By embedding the core exchange logic — such as the order matching engine, oracle price feeds, and liquidation mechanics — directly into the base layer via custom modules, the network eliminates the latency, gas unpredictability, and MEV vulnerabilities typically associated with smart contract-based exchanges on general-purpose blockchains. This infrastructure empowers Uniocean to deliver an institutional-grade trading experience while preserving absolute decentralization and trustless execution.

## System Architecture

The Uniocean ecosystem operates on a decoupled, three-tier architecture designed to segregate the consensus layer from data availability and user interfaces. This ensures that the core blockchain remains highly performant while providing real-time data access to end users.

### Frontend DEX UI

The Frontend DEX UI serves as the primary client-facing gateway. It is a highly optimized, single-page application that provides a localized trading experience akin to centralized exchanges.

* **Wallet Integration & Abstraction:** Supports seamless connection with native Cosmos wallets (e.g., Keplr) as well as EVM-compatible wallets (e.g., MetaMask) utilizing EIP-712 signature standards for cross-chain identity abstraction.
* **Real-Time State Rendering:** Maintains persistent WebSocket connections to the backend API, allowing the UI to render dynamic orderbooks, user balances, and charting data with sub-second latency.
* **Transaction Formulation:** Formulates, signs, and broadcasts raw transaction bytes (such as order creation or cancellation) directly to the RPC nodes of the validator network.

### Backend API & Indexers

Directly querying a blockchain node's KVStore for complex, aggregated trading data is highly inefficient. To solve this, Uniocean utilizes a robust off-chain indexing layer.

* **Event Ingestion:** The indexer continuously listens to the Tendermint RPC via WebSockets. As the Uniocean chain processes blocks, its custom modules emit strongly-typed ABCI events (e.g., `OrderMatched`, `PositionLiquidated`).
* **Data Transformation & Storage:** The indexer decodes these protobuf events, structures the data, and persists it into high-performance relational databases (such as PostgreSQL) and in-memory caches (like Redis).
* **API Gateway:** Exposes standardized REST, gRPC, and GraphQL endpoints. This layer serves historical trade data, aggregated market metrics, and real-time state updates to the Frontend DEX UI and algorithmic trading bots without congesting the core blockchain network.

### Validator Network

The Validator Network is the foundational Layer-1 infrastructure of Uniocean. It is a decentralized, permissionless network of nodes responsible for securing the chain and executing the protocol logic.

* **Tendermint Core Consensus:** Utilizes Byzantine Fault Tolerant (BFT) consensus to ensure secure, rapid block production and instant finality, completely eliminating the possibility of chain re-organizations.
* **On-Chain Matching Engine:** Unlike traditional AMMs, Uniocean validates transactions and routes limit and market orders into an on-chain memory pool. Orders are matched deterministically within the block's `EndBlocker` execution phase, ensuring fair pricing and MEV resistance.
* **Sentry Node Topology:** To protect block-producing validators from DDoS attacks, the network employs a sentry node architecture where public P2P traffic is routed through robust full nodes before reaching the isolated validators.


---

# 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://uniocean.gitbook.io/uniocean-docs/overview-and-architecture.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.
