TESTNET
Markets
Trade
Lending Vaults
More
User Docs Developer Docs Sdk API Docs Help
Welcome to Polyester
Concepts
Overview
Creating an Account
Authentication Methods
Turnkey
Smart Wallets
Dashboard
Account Security
MFA
Asset Lifecycle
Supported Assets
Deposit Funds
Withdraw Funds
Transfer Funds
Inventory and Supply
Overview
Trading Fees
Base vs Quote
Lending Fees
Withdrawal Fees
Liquidation Fees
Rebates
Overview
On-chain Visibility
Overview
Supplying
Borrowing
Collateral
Interest
Liquidations
Overview
Trades
Candles
Order Book
Data Delivery
Notifications
Appearance
Localization
Sound Effects
Overview
Architecture
Benchmarks
Matching Engine
Settlement
Safeguards
Overview
Validators
Gas Abstraction
Layer-1 Benchmarks
Audits
Read Pre-compiles
Create Invite Code
Managing Links/Codes
Claiming Rewards
Auto-Convert Rewards
Overview
Create/Delete subaccounts
Permissions
Roles
Audit Logs
Unified Trading Account
Spot Trading
Order Types
Tools
Privacy
Custom Layouts
Overview
Asset Wrapping
Vaults
Zipper Security
What Is TEE?
  1. Polyengine
  2. /
  3. Overview

Overview

PolyEngine is the off-chain execution engine that handles all trading activity on the Polyester Exchange.

It processes and sequences trading events at high throughput, maintains the authoritative trading ledger, and produces verifiable records of execution that are anchored on-chain. This architecture supports high-throughput execution while preserving transparency, fairness, and replayability.


Why Trading State Lives Outside the Chain

Trading is inherently high-frequency and state-heavy.

An active market produces large volumes of state transitions: order placement, cancellation, partial fills, price updates, trigger evaluation, and continuous rebalancing of reserved funds. Encoding this activity directly into block-by-block execution would severely limit performance and market responsiveness.

PolyEngine exists to handle this rapidly changing state efficiently. It executes trading off-chain using deterministic rules, records every action in an immutable execution database, and periodically submits cryptographic proofs to the chain that attest to the correctness and ordering of what occurred.

This design allows Polyester to support deep order books, tight spreads, and responsive execution without sacrificing fairness or verifiability.


Trading as an Event Execution System

PolyEngine operates as a strictly ordered event processor.

Every action related to trading is modeled as an event: order intent, validation, reservation, cancellation, trigger activation, match, fill (partial or full), internal transfer, or ledger update. These events are processed sequentially under deterministic rules and recorded in an append-only execution database.

Order matching is one class of event among many. What matters is not just which trades occur, but that all trading rules were applied correctly and in the proper order.

This event-first model is what enables provability, replayability, and consistent market behavior under load.


Deterministic Matching and Fair Sequencing

PolyEngine executes trading logic deterministically.

Given the same ordered inputs, it will always produce the same outcomes: the same matches, the same fills, the same ledger transitions. Order sequencing, self-trade prevention, post-only behavior, trigger evaluation, and rejection paths all follow fixed rules.

Determinism ensures that matching is fair, outcomes are explainable, and execution can be independently verified after the fact.


Provability and Replayability

At the core of PolyEngine is an append-only, immutable execution database.

Every trading-related event is recorded in sequence. From this record, PolyEngine periodically generates cryptographic commitments that are submitted to Polyester Chain. These proofs attest that events occurred in the claimed order, rule evaluation was correct at the time of execution, state transitions (including reservations and ledger updates) were valid.

Because these commitments are anchored on-chain, the full trading state of the exchange can be reconstructed and replayed from genesis if desired. Proofs establish not only what happened, but how it happened.

This enables independent verification of the full trading history without the throughput constraints of fully on-chain execution.


PolyEngine and Polyester Scan

PolyEngine is the source of all trading activity visible on Polyester Scan.

As execution occurs, PolyEngine emits grouped bundles of trading events that are surfaced on Polyester Scan in near real time. These event streams allow observers to follow market activity as it unfolds and inspect how trading state evolves.

At defined checkpoints, PolyEngine submits cryptographic proofs derived from this event history to Polyester Chain. These submissions establish finality and make the execution history concrete and verifiable.


Unified Liquidity and Market Depth

PolyEngine operates as a single execution layer across all spot markets.

Because assets are unified before they ever reach trading, PolyEngine does not reason about chain-specific variants or fragmented representations. Markets list only base tickers such as BTC, USDT, or USDC, allowing liquidity to concentrate into fewer, deeper books.

This improves market depth, reduces spreads, and enhances execution quality, especially during periods of volatility. PolyEngine is what makes Polyester function as one coherent market rather than many fragmented ones.


Built for Continuous Expansion

PolyEngine's architecture supports advanced order types, richer market data, and more expressive trading tools without changing how custody, backing, or verification works. As new features are introduced, the guarantees remain the same.

Performance improves. Depth increases. Rules stay consistent.


Scope of This Section

The following pages explore specific components in more detail:

  • Architecture: system components, data flow, and trust boundaries
  • Matching Engine: order matching and sequencing rules
  • Settlement: order finalization
  • Safeguards: risk controls and failure handling
  • Benchmarks: performance characteristics
Previous

Sound Effects

Next

Architecture

  • Why Trading State Lives Outside the Chain
  • Trading as an Event Execution System
  • Deterministic Matching and Fair Sequencing
  • Provability and Replayability
  • PolyEngine and Polyester Scan
  • Unified Liquidity and Market Depth
  • Built for Continuous Expansion
  • Scope of This Section