Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Architecture

Two layers: protocol (on-chain) and stack (off-chain). Apps talk to the stack; the stack talks to Gnosis.

CLC clients talk to the staging host, which talks to Gnosis

On-chain

Discovery starts at ContractRegistry. It maps identifiers to index proxies.

IdentifierContractWhat it lists
AccountIndexAccountsIndexRegistered users (clc-core writes here)
TokenIndexTokenUniqueSymbolIndexVouchers
PoolIndexTokenUniqueSymbolIndexPools

eth-tracker walks TokenIndex and PoolIndex, then each pool's tokenRegistry(), and watches those addresses. clc-core only needs AccountIndex from the registry.

A pool is not one contract. SwapPool is the vault; it is injected with a registry, quoter, fee policy, limiter, and optional protocol fee controller. Seal bits lock those slots.

SwapPool calls registry, quoter, fee policy, limiter, and protocol fee controller

Implementations are shared. Each voucher/pool/index is an ERC-1967 proxy from ERC1967Factory. DecimalQuoter, SwapRouter, RescueVault, ERC1967Factory, and Calibur are plain contracts.

Off-chain

ProcessRole
eth-trackerFollows the chain, filters CLC events, publishes to NATS
eth-indexerConsumes NATS, writes chain_data
clc-coreHTTP API, SIWE auth, catalog, deploy jobs, EIP-7702 relayer
storage-serverSigned uploads to R2; browsers post here, not through clc-core
clc-appWeb PWA + admin console

Tracker publishes to NATS; indexer consumes. Indexer does not tail logs.