Skip to main content
Ramses is a multi-contract system with four main layers:
  • Core concentrated-liquidity contracts
  • Core discrete-liquidity contracts and periphery
  • Periphery routing and position-management contracts
  • Governance, emissions, and fee-routing contracts
The current contracts use an address-based governance model built on xRAM, VoteModule, Voter, FeeDistributor, and AccessHub. Older descriptions that refer to veNFT-style voting are not accurate for the code in this repository.

Core

Factory Reference
The CL core consists of:
  • RamsesV3Factory
  • RamsesV3PoolDeployer
  • RamsesV3Pool
  • Core pool interfaces and math/oracle libraries
Pools expose swap, liquidity, oracle, and protocol-fee functionality, while the factory wires pools into the wider Ramses governance and fee-routing system.

DLMM

DLMM Contract Architecture
Robinhood DLMM Deployments
The DLMM stack consists of:
  • DLMMFactory
  • DLMMPool and its embedded DLMMToken share accounting
  • DLMMRouter and DLMMQuoter
  • DLMMFeeCollector
  • Optional DLMMRewarder hooks and DLMMRewarderFactory
DLMM prices are divided into fixed-price bins. LP ownership is represented by a fungible share balance for each bin ID, and swap fees retained for LPs stay in bin reserves. At the Robinhood snapshot at block 22,674,244, the deployment was fee-only and its factory was not connected to Voter. Rewarder references describe optional architecture.

Periphery

Swap Router Reference
Position Manager Reference
The periphery adds safer and more ergonomic integration points for swaps, NFT positions, quoting, tick inspection, and helper libraries.

Gauges and Fee Routing

GaugeV3 Reference
FeeCollector Reference
FeeDistributor Reference
Sarcophagus Reference & Searcher Guide
This layer handles:
  • Weekly emissions for active gauges
  • Protocol-fee collection from CL pools
  • Protocol-fee collection from DLMM pools
  • Periodized distribution of fee and incentive tokens to voter addresses
  • Permissionless exchange of r33 for selected ERC-20 protocol-fee balances on supported deployments

Governance

Voter Reference
Minter Reference
VoteModule Reference
AccessHub Reference
Governance responsibilities are split across several contracts:
  • VoteModule holds staked xRAM and exposes voting power, delegation, and admin permissions.
  • Voter records votes by owner address, creates gauges, routes emissions, and coordinates reward claims.
  • Minter advances the weekly period and mints capped emissions.
  • AccessHub is the operational control layer for fees, gauges, xRAM/R33 administration, and treasury/timelock actions.

Tokens

xRAM Reference
R33 / hyperRAM Reference
  • xRAM is a transfer-restricted ERC20 governance token created from RAM via convertEmissionsToken().
  • R33 is the source contract for the liquid governance wrapper; the ERC4626 token it mints is named hyperRAM.