Protocol architecture
How contracts, per-market accounting and off-chain services fit together.
On this page
The market is the accounting boundary
A market is identified by its original (hook, poolId). The hook owns its trading and liquidity rules; its vault owns reserve accounting. Approving a new hook version does not rewrite an existing pool’s address or economics. A pool ID alone is insufficient to select a Sinjoh market across versions.
| Component | Responsibility |
|---|---|
| Launch factory | Create and initialize a fixed-supply token, vault, canonical pool and optional route/first buy atomically. |
| Launch hook / market hook | Settle trades and taxes, manage liquidity, maintain market inventory, enforce creator controls and floor mechanics. |
| Market vault | Track protected floor cash, spendable treasury and current/draining yield positions. |
| Settings / Governance | Record compatible versions, feeds, paths and service authority; execute current-Safe administration. |
| Lens / Quoter | Read consistent accounting and simulate actual fills; neither is a treasury or signing authority. |
Revenue and rewards are separate layers
- 01Hook fee buckets
- 02Creator route / platform router
- 03Converter or direct action
- 04Recipient / floor / treasury / reward pot
Creator routes allocate creator revenue. The platform router handles protocol revenue with a separate per-asset ledger. The converter executes approved conversions for recognized callers. Airdrop and raffle contracts reserve their own obligations; the rewards desk settles market-owned reward shares into the correct market.
Services observe and execute bounded work
| Service | What it does |
|---|---|
| Keepers | Collect fees, maintain liquidity, run routes, sweep eligible inventory and settle rewards when authorized and economically due. |
| Reward attester | Reconstruct holder history, apply eligibility rules, publish reproducible inputs/results and post closed-round commitments. |
| Randomness prover | Produce proofs for posted raffle commitments; the on-chain verifier checks the result. |
| Indexer / API | Discover market/version relationships and expose indexed history with observation blocks, confirmation state and lag. |
| Application / SDK | Present state, obtain quotes and build user-signed transactions against a specific manifest. |
Where assets live
Uniswap PoolManager custody can represent balances as ERC-6909 claims. Hook inventory, fee buckets, vault floor cash, vault treasury, yield shares and reward reservations are different ledger categories. A raw contract balance is not a substitute for these accounts. Accounting must avoid counting an underlying asset, its receipt and its claim value more than once.
Skip to documentation