How yaminyann/dex-on-arc works
Lumarc is a non-custodial Arc trading terminal. A wallet user enters the app, chooses a trading capability, and signs transactions through their wallet; orders escrow funds in the contract and execute only when a keeper submits them. The graph also preserves the documented portfolio, dashboard, agent, administration, and testnet-harness capabilities. The source excerpts show app routing and backend startup, but not every component’s calls, so undocumented links are omitted.
Main entry points: ordersAbi.ts Orders contract · App.tsx App shell · engine.ts Command execution · index.ts Backend API
Components 25
Trading interface
- App shell
src/App.tsx - Trading terminal
src/components/Terminal.tsx - Portfolio dashboard
src/components/Dashboard.tsx - Owner administration
src/components/Admin.tsx - App settings
src/components/SettingsPage.tsx - Market and order forms
src/components/TradePanel.tsx - Order tables and tabs
src/components/OrderTables.tsx
Trading services
- Chain data hooks
src/trading/hooks.ts - Swap aggregator client
src/trading/aggregator.ts - Network configuration
src/trading/networks.ts - Chain facts
src/onchain-facts.ts
Agent Station
- Agent Station
src/components/AgentStation.tsx - Command parser
src/trading/agent/parser.ts - Command execution
src/trading/agent/engine.ts - Agent permissions
src/trading/agent-permission.ts
Backend services
- Backend API
server/index.ts - Quote gateway
server/gateway/instance.ts - Order keeper
server/keeper.ts - Order event indexer
server/indexer/runtime.ts - Indexer database
server/indexer/db.ts
On-chain execution
- Orders contract
src/trading/ordersAbi.ts
Other components
- Wallet user
- Connected wallet
- Arc network
- Quote providers
Connections 31
- Wallet user → App shell: opens
README.md - App shell → Trading terminal: routes to
src/App.tsx - App shell → Portfolio dashboard: routes to
src/App.tsx - App shell → Agent Station: routes to
src/App.tsx - App shell → Owner administration: routes to
src/App.tsx - App shell → App settings: routes to
src/App.tsx - Trading terminal → Market and order forms: offers trading
README.md - Trading terminal → Order tables and tabs: shows orders
README.md - Wallet user → Connected wallet: connects
README.md - Market and order forms → Connected wallet: requests signatures
- Market and order forms → Orders contract: creates orders
README.md - Portfolio dashboard → Orders contract: reads portfolio
README.md - Owner administration → Orders contract: manages settings
README.md - Agent Station → Command parser: parses commands
src/components/AgentStation.tsx - Agent Station → Command execution: executes plans
src/components/AgentStation.tsx - Command execution → Agent permissions: checks limits
src/trading/agent/engine.ts - Command execution → Chain data hooks: reads oracle
src/trading/agent/engine.ts - Command execution → Orders contract: submits orders
src/trading/agent/engine.ts - Chain data hooks → Orders contract: reads contract
src/trading/hooks.ts - Chain data hooks → Swap aggregator client: fetches health
src/trading/hooks.ts - Network configuration → Chain facts: loads chain facts
src/trading/networks.ts - Backend API → Quote gateway: configures gateway
server/index.ts - Backend API → Order keeper: starts keeper
server/index.ts - Backend API → Order event indexer: starts indexer
server/index.ts - Order keeper → Quote gateway: ranks quotes
server/keeper.ts - Order keeper → Orders contract: executes orders
server/keeper.ts - Order event indexer → Indexer database: stores indexed data
server/indexer/runtime.ts - Order event indexer → Orders contract: reads event logs
server/indexer/runtime.ts - Quote gateway → Quote providers: requests quotes
- Connected wallet → Arc network: signs transactions
README.md - Orders contract → Arc network: escrows funds
README.md