Soyara DEX GitBook
DocsSoyara DEX1. Overview & Architecture

1. Overview & Architecture

Soyara DEX is the native next-generation Decentralized Exchange (DEX) and AI trading infrastructure built specifically for the GenLayer Testnet (Bradbury). By unifying high-throughput automated market making with decentralized Intelligent Contracts (ICs) executing in the GenVM sandbox, Soyara DEX transitions decentralized trading from static math formulas into adaptive, context-aware, and consensus-validated decentralized finance.

The Paradigm Shift: From Blind AMMs to Intelligent Market Makers
Traditional DEXes operate blindly. They execute whatever calldata is submitted, without verifying intent, economic validity, or malicious frontrunning risk. Soyara DEX introduces Decentralized Intelligent Contracts that evaluate trade proposals across validator nodes using Optimistic Democracy consensus before committing state on-chain.

From AMMs to Intelligent Market Makers (IMMs)

In 2018, Uniswap revolutionized crypto by introducing the Constant Product Automated Market Maker (x * y = k). While brilliant in its simplicity, the traditional AMM model assumes that all market participants act with equal information and that smart contracts should remain passive mathematical calculators.

In reality, passive AMMs are aggressively exploited by predatory MEV bots, sandwich attacks, and toxic orderflow. Intelligent Market Makers (IMMs) solve this by adding a decentralized cognitive validation layer:

  • Contextual Understanding: Understanding user intent via natural language rather than requiring manual parameter engineering.
  • Real-Time Route Optimization: Dynamically evaluating whether V2 classic or V3 concentrated pools deliver the best net return after gas and fees.
  • Consensus-Enforced Guardrails: Every execution proposal is verified by independent GenLayer validators running Python Intelligent Contracts.

The 3-Tiered Hybrid Architecture

Tier 1: Interaction

Conversational AI Engine

Off-chain LLM models parse complex trading prompts, query real-time pool depths, compute multi-hop quotes, and construct standardized execution proposals.

Tier 2: Consensus

GenVM Intelligent Contracts

AgentValidator.py & LiquidityValidator.py execute on GenLayer validator nodes, validating proposal safety via Optimistic Democracy and the Equivalence Principle.

Tier 3: Settlement

AGGFlow Bytecode Router

Optimized EVM contracts execute compiled swap programs across V2 AMM, V3 Concentrated Liquidity, and WGEN 1:1 deposit/withdraw with atomic settlement.