00๐ Aurellion Protocol Documentation
homeindexnavigation
๐ Aurellion Protocol Documentation
Aurellion is a decentralised Real-World Asset (RWA) marketplace that enables physical commodities โ livestock, grain, gemstones, raw materials โ to be tokenised on-chain, traded on a Central Limit Order Book (CLOB), transported through a network of verified nodes and drivers, and settled automatically via smart contract.
๐บ Documentation Map
Architecture
- Architecture/System Overview โ 10,000-foot view of the full stack
- Architecture/Diamond Proxy Pattern โ EIP-2535 modular contract architecture
- Architecture/Data Flow โ How data moves from user action to on-chain settlement
- Architecture/Repository Pattern โ Domain/repository/service separation
- Architecture/Services Layer โ Infrastructure services: routing, price history, redemption
- Architecture/Indexer Architecture โ Ponder event pipeline deep-dive
Smart Contracts
- Smart Contracts/Overview โ All contracts and their relationships
- Facets
- Smart Contracts/Facets/AssetsFacet โ ERC-1155 RWA tokenisation
- Smart Contracts/Facets/CLOBCoreFacet โ Order placement & order book
- Smart Contracts/Facets/CLOBMatchingFacet โ Matching engine & trade execution
- Smart Contracts/Facets/CLOBViewFacet โ Gas-free read-only order book queries
- Smart Contracts/Facets/CLOBMEVFacet โ Commit-reveal MEV protection
- Smart Contracts/Facets/CLOBAdminFacet โ Admin controls, fee config, circuit breakers
- Smart Contracts/Facets/CLOBLogisticsFacet โ ECDSA-verified driver logistics system โญ new
- Smart Contracts/Facets/OrderRouterFacet โ Single entry point for all orders โญ recommended
- Smart Contracts/Facets/NodesFacet โ Node registry & capacity management
- Smart Contracts/Facets/AuSysFacet โ Logistics orchestration
- Smart Contracts/Facets/BridgeFacet โ CLOB โ Logistics bridge
- Smart Contracts/Facets/RWYStakingFacet โ Real World Yield staking
- Smart Contracts/Facets/OperatorFacet โ Operator permissions & reputation
- Libraries
- Smart Contracts/Libraries/DiamondStorage โ Unified storage layout
- Smart Contracts/Libraries/CLOBLib โ CLOB utility functions
Core Concepts
- Core Concepts/Real World Asset Tokenisation โ How physical assets become tokens
- Core Concepts/Order Lifecycle โ CLOB order from placement to settlement
- Core Concepts/Journey and Logistics โ Physical delivery system
- Core Concepts/Node Network โ Storage and logistics infrastructure
- Core Concepts/CLOB Trading โ Central Limit Order Book mechanics
- Core Concepts/AMM Liquidity Pools โ Passive liquidity and LP token mechanics
- Core Concepts/RWY Staking โ Real World Yield opportunities
- Core Concepts/P2P Trading โ Direct peer-to-peer trades
User Roles
- Roles/Customer โ Buy, trade, and stake as a customer
- Roles/Node Operator โ Run a storage/logistics node
- Roles/Driver โ Transport physical assets and earn bounties
Frontend
- Frontend/Application Structure โ Next.js app architecture
- Frontend/Providers โ React context providers and their responsibilities
- Frontend/Pages Reference โ Full route map of the application
Indexer
- Indexer/Ponder Setup โ Event indexer configuration
- Indexer/Schema and Queries โ GraphQL schema and query patterns
Public API
- Public API/Aurellion Core API Contract โ Public HTTP contract for
aurellion-core
Technical Reference
- Technical Reference/Developer Quickstart โ Working code examples for every operation โญ start here
- Technical Reference/FAQ โ Common questions answered
- Technical Reference/Events Reference โ All contract events
- Technical Reference/Error Reference โ All custom errors with fix guidance
- Technical Reference/Order Status Reference โ All status enums across all systems
- Technical Reference/Fee Structure โ Every fee: rate, recipient, formula
- Technical Reference/Deployment โ Live contract addresses and deployment history
- Technical Reference/Security Model โ Threat model, access control, reentrancy, MEV
- Technical Reference/Gas Optimisation โ PackedOrder, RB trees, batch calls, cost reference
- Technical Reference/Testing Guide โ Hardhat, Foundry, Vitest, Playwright
- Technical Reference/Upgrading Facets โ Safe upgrade playbook
- Technical Reference/Contract ABIs โ ABI sources, TypeChain, encoding
- Technical Reference/Troubleshooting โ Common errors and how to fix them
Reference
- Glossary โ A-Z of every term in the codebase
โก Quick Reference
| Concept | Description |
|---|---|
| Diamond | 0x8ed92Ff64dC6e833182a4743124FE3e48E2966A7 โ single proxy for all interactions |
| OrderRouterFacet | Recommended entry point for all order placement |
| AssetsFacet | Mints and manages ERC-1155 RWA tokens |
| CLOB | Central Limit Order Book โ price-time priority matching |
| Node | Verified physical storage location that mints and holds assets |
| Driver | Registered courier that transports assets between nodes |
| Journey | A single leg of physical delivery from sender to receiver |
| Unified Order | Links a matched CLOB trade to physical logistics |
| RWY | Real World Yield โ stake commodities for processing profits |
| CLOBLogisticsFacet | ECDSA-verified GPS-proof delivery system |
| Ponder | Event indexer powering the GraphQL query layer |
| Quote Token | AURA on testnet, USDC on mainnet |
๐ข Numbers at a Glance
| Metric | Value |
|---|---|
| Network | Base Sepolia (Chain ID 84532) |
| Diamond deployed | Block 36,030,424 (2026-01-08) |
| Total facets | 21 |
| Taker fee | 0.1% |
| Maker fee | 0.05% |
| Driver bounty | 2% of order value |
| Protocol delivery fee | 0.25% |
| RWY protocol cut | 1% of profit |
| Max journeys per order | 10 |
| Max nodes per order | 20 |
| Commit-reveal threshold | 10,000 quote tokens |
| PackedOrder slots | 3 (vs 10 in V1) |
๐ External Links
- EIP-2535 Diamond Standard
- Base Sepolia Explorer
- Diamond: 0x8ed92Ff64dC6e833182a4743124FE3e48E2966A7
- Indexer GraphQL
- Aurellion Core Public API
- OpenZeppelin ERC-1155
- Ponder Docs
- Base Documentation
Documentation generated from the live codebase โ 57 files, ~12,000 lines.