Skip to main content

Documentation Index

Fetch the complete documentation index at: https://tech.ramses.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Distributes weekly RAM emissions to Ramses V3 concentrated liquidity positions. Rewards are allocated based on periodSecondsInsideX96, which tracks each position’s time-weighted in-range contribution during each weekly period.

Functions

notifyRewardAmount

  function notifyRewardAmount(
    address token,
    uint256 amount
  ) external
Notifies the gauge of newly deposited reward tokens for distribution in the current period. Collects protocol fees from the pool before processing. The token must be a whitelisted reward token.

Parameters:

NameTypeDescription
tokenaddressThe reward token address
amountuint256The amount of reward tokens to distribute

notifyRewardAmountNextPeriod

  function notifyRewardAmountNextPeriod(
    address token,
    uint256 amount
  ) external
Queues reward tokens for distribution in the next period rather than the current one.

Parameters:

NameTypeDescription
tokenaddressThe reward token address
amountuint256The amount of reward tokens to distribute

notifyRewardAmountForPeriod

  function notifyRewardAmountForPeriod(
    address token,
    uint256 amount,
    uint256 period
  ) external
Queues reward tokens for distribution in a specific future period. The period must be strictly in the future.

Parameters:

NameTypeDescription
tokenaddressThe reward token address
amountuint256The amount of reward tokens to distribute
perioduint256The future period to distribute rewards in

getReward

  function getReward(
    uint256 tokenId,
    address[] tokens
  ) external
Claims accrued rewards for a position. Calculates rewards based on the position’s periodSecondsInsideX96 relative to total in-range liquidity during each period. The caller must be the position owner, operator, or approved for all. Only callable by authorized claimers.

Parameters:

NameTypeDescription
tokenIduint256The ID of the position NFT to claim for
tokensaddress[]The reward token addresses to claim

getReward (batch)

  function getReward(
    uint256[] tokenIds,
    address[] tokens
  ) external
Claims accrued rewards for multiple positions in a single call.

Parameters:

NameTypeDescription
tokenIdsuint256[]The IDs of the position NFTs to claim for
tokensaddress[]The reward token addresses to claim

getRewardForOwner

  function getRewardForOwner(
    uint256 tokenId,
    address[] tokens
  ) external
Claims rewards on behalf of the position owner, sending them to the owner’s address. Callable by the voter contract or authorized claimers.

Parameters:

NameTypeDescription
tokenIduint256The ID of the position NFT to claim for
tokensaddress[]The reward token addresses to claim

earned

  function earned(
    address token,
    uint256 tokenId
  ) external view returns (uint256)
Returns the amount of a reward token earned by a position but not yet claimed.

Parameters:

NameTypeDescription
tokenaddressThe reward token address
tokenIduint256The ID of the position NFT

Return Values:

TypeDescription
uint256Amount of earned rewards

periodEarned

  function periodEarned(
    uint256 period,
    address token,
    uint256 tokenId
  ) external view returns (uint256)
Returns the amount earned by a position for a specific period.

Parameters:

NameTypeDescription
perioduint256The period to query
tokenaddressThe reward token address
tokenIduint256The ID of the position NFT

left

  function left(
    address token
  ) external view returns (uint256)
Returns the approximate amount of a reward token remaining for distribution in the current period, based on the time remaining.

Parameters:

NameTypeDescription
tokenaddressThe reward token address

Return Values:

TypeDescription
uint256Approximate remaining reward amount

rewardRate

  function rewardRate(
    address token
  ) external view returns (uint256)
Returns the per-second reward rate for a token in the current period.

Parameters:

NameTypeDescription
tokenaddressThe reward token address

Return Values:

TypeDescription
uint256Reward amount per second

getRewardTokens

  function getRewardTokens() external view returns (address[])
Returns the list of all reward token addresses registered on this gauge.

positionHash

  function positionHash(
    address owner,
    uint256 index,
    int24 tickLower,
    int24 tickUpper
  ) external pure returns (bytes32)
Computes the unique identifier for a position based on its owner, index, and tick range.

Parameters:

NameTypeDescription
owneraddressThe position owner address
indexuint256The position index (token ID)
tickLowerint24The lower tick of the position range
tickUpperint24The upper tick of the position range

addRewards

  function addRewards(
    address reward
  ) external
Adds a new reward token to the gauge. Only callable by AccessHub.

Parameters:

NameTypeDescription
rewardaddressThe reward token address to add

removeRewards

  function removeRewards(
    address reward
  ) external
Removes a reward token from the gauge. Only callable by AccessHub.

Parameters:

NameTypeDescription
rewardaddressThe reward token address to remove

syncCache

  function syncCache() external
Syncs cached values from the Voter and AccessHub contracts, including the reward validator, R33 address, fee collector, and authorized claimers list.

Key Concepts

  • Rewards are distributed per weekly period (epoch), aligned with the Ramses voting cycle
  • A position earns rewards proportional to its secondsInsideX96 during each period relative to the total
  • Only authorized claimers (registered through the Voter contract) can call reward-claiming functions
  • The gauge supports a reward validator for anti-sybil checks; flagged claims are redirected to the R33 address
  • notifyRewardAmount collects protocol fees from the pool before processing new rewards