Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

attakdefand/DECENTRALIZED-APP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

48 Commits

DEX-OS: Decentralized Exchange Operating System

DEX-OS is a comprehensive operating system for decentralized exchanges, providing a complete infrastructure for building, deploying, and managing DEX platforms.

Architecture Overview

os-dex-full/
├── Cargo.toml ← Workspace root
├── README.md ← Full docs + deployment
├── docker-compose.yml ← Local chain + services
├── rust-toolchain.toml ← Rust nightly (edition2024)
├── crates/ ← Shared libs (5K LoC)
│ ├── security/ ← Your protection layer
│ ├── crypto/ ← ZK + sigs
│ └── p2p/ ← libp2p utils
├── kernel/ ← 18.5K LoC (from previous tarball)
│ └── ... (vm/, consensus/, etc.)
├── chains/ ← Multi-chain adapters (8K LoC)
│ ├── evm/ ← Solidity hooks + ethers-rs
│ ├── svm/ ← Serum DEX fork (Rust programs)
│ │ └── programs/ ← Anchor-based AMM (from solana-labs/dexterity)
│ ├── cosmwasm/ ← DEX contracts (from multiversx/mx-exchange-sc)
│ │ └── contracts/ ← Pair, Router, Factory (Rust + CosmWasm)
│ └── ibc/ ← Hyperlane + IBC relay
├── plugins/ ← Extensible modules (6K LoC)
│ ├── hooks/ ← WASM hooks (V4-style)
│ ├── ai/ ← Fee oracle + keeper agents
│ └── mev/ ← Shield + private mempool
├── services/ ← Off-chain Rust microservices (12K LoC)
│ ├── p2p/ ← libp2p node (from rust-libp2p examples)
│ ├── indexer-zk/ ← ZK-rollup event processing
│ ├── api/ ← GraphQL + REST (Axum)
│ ├── bundler-zk/ ← AA bundler (ERC-4337)
│ └── security-monitor/ ← Anomaly detection
├── ui/ ← Frontend (8K LoC)
│ ├── pwa/ ← Yew + Tailwind (from jetli/rust-yew-realworld-example-app)
│ │ └── src/ ← Components: Swap, Pool, Wallet
│ ├── tauri/ ← Desktop app (Tauri + Yew)
│ └── ai-chat/ ← Grok-like trade assistant
├── tests/ ← 12-layer matrix (5K LoC)
│ ├── security/ ← Reentrancy, DoS, ZK exploits
│ ├── fuzz/ ← Proptest for inputs
│ ├── chaos/ ← Node crashes (chaos-mesh)
│ └── e2e/ ← Cypress for UI flows
├── infra/ ← Deployment (3K LoC)
│ ├── docker/ ← Services + local node
│ ├── k8s/ ← Manifests
│ └── offline/ ← Air-gapped sync
└── governance/ ← DAO (2K LoC)
 ├── dao/ ← On-chain voting (Substrate pallet)
 └── treasury/ ← Fee distribution

Getting Started

Prerequisites

Before setting up the project, ensure you have the following installed:

  • Rust nightly toolchain (required for edition2024 support)
  • Node.js (for development tools)
  • Docker (for containerized services)
  • GPG (for Git commit signing)

Automated Setup

Run the automated setup script for your platform:

Windows (PowerShell):

.\setup-environment.ps1

Linux/macOS (Bash):

chmod +x setup-environment.sh
./setup-environment.sh

Manual Setup

  1. Install Rust nightly (required for edition2024 support):

    rustup install nightly
    rustup default nightly
  2. Build the workspace:

    cargo build
  3. Run tests:

    cargo test

Components

Kernel

The kernel provides the core virtual machine and consensus mechanisms.

Chains

Multi-chain adapters for various blockchain networks:

  • EVM: Ethereum Virtual Machine support
  • SVM: Solana Virtual Machine support
  • CosmWasm: Cosmos-based smart contracts
  • IBC: Inter-Blockchain Communication protocol

Plugins

Extensible modules that can be added to enhance functionality:

  • Hooks: WASM-based extension points
  • AI: Artificial intelligence modules for fee optimization and keeper agents
  • MEV: Miner Extractable Value protection mechanisms

Services

Off-chain microservices that support the DEX operations:

  • P2P: Peer-to-peer networking
  • Indexer-ZK: Zero-knowledge rollup event processing
  • API: GraphQL and REST APIs
  • Bundler-ZK: Account abstraction transaction bundler
  • Security Monitor: Anomaly detection and threat monitoring

UI

Frontend applications:

  • PWA: Progressive Web App using Yew and Tailwind CSS
  • Tauri: Desktop application
  • AI Chat: AI-powered trading assistant

Deployment

The system can be deployed using Docker Compose for local development or Kubernetes for production environments.

License

This project is licensed under either of:

  • Apache License, Version 2.0
  • MIT License

at your option.

About

DECENTRALIZED-APP is a comprehensive decentralized exchange application built with Rust, featuring smart contracts, blockchain indexing services, API endpoints, and a WebAssembly-based user interface. MEV monitoring, and IPFS storage.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /