Skip to main content

Architecture

Raphael follows a modular AMM architecture derived from the battle-proven ve(3,3) protocol family. Each responsibility lives in its own contract, and the contracts compose into the swap, liquidity and incentive systems described across these docs.

Core components

ComponentResponsibility
Factory registryTracks approved pool factories and pool implementations
Basic pool factoryCreates stable and volatile pools
Concentrated pool factoryCreates tick-based concentrated-liquidity pools
RouterAdds/removes basic liquidity and executes routed swaps
Nonfungible position managerCreates and manages concentrated-liquidity NFTs
QuoterSimulates candidate routes without executing a state-changing swap
Gauge factoryCreates staking gauges for eligible pools
GaugeAccounts for staked positions and distributes $RAPH emissions
VoterRecords pool votes and coordinates gauges and reward contracts
Voting rewardsAccounts for fees and incentives owed to veRAPH voters
MinterCreates and schedules $RAPH emissions
Vote escrowLocks $RAPH and issues veRAPH NFT positions
Governor / emergency rolesExecutes only the permissions present in the deployed contracts

Swap path

A client discovers candidate pools, requests quotes, chooses a route, applies a slippage limit and submits execution through the appropriate router.

A route can combine basic and concentrated pools. Multi-hop routing should optimise the final output after accounting for pool fees, price impact and gas, not merely select the pool with the largest TVL. Routing and Quotes covers this in detail.

Liquidity and incentives

  1. A pool is created by a registered factory.
  2. Liquidity providers deposit into it.
  3. If approved, a gauge is created and made eligible for votes.
  4. veRAPH holders vote for the pool.
  5. The voter allocates $RAPH emissions to its gauge.
  6. Gauge accounting distributes $RAPH to eligible staked positions.
  7. Voting-reward contracts account for fees and incentives.

Immutability and permissions

Do not describe the system as fully immutable without reviewing the Raphael deployment. Factories, gauges, fees, emergency controls or implementations may have narrowly scoped administrative permissions. These should be documented contract by contract; see the verification checklist in Contract Deployments.