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.

Custom Errors (Errors.sol)

The protocol uses a centralized Errors library for custom error definitions across all contracts.

Voter Errors

ErrorParametersDescription
ACTIVE_GAUGEaddress gaugeAttempting to interact with an already active gauge
GAUGE_INACTIVEaddress gaugeAttempting to interact with an inactive gauge
ALREADY_WHITELISTEDaddress tokenAttempting to whitelist an already whitelisted token
NOT_AUTHORIZEDaddress callerCaller is not authorized to perform the action
NOT_WHITELISTEDaddress tokenToken is not whitelisted
BOTH_NOT_WHITELISTEDBoth tokens in a pair are not whitelisted
NOT_POOLaddress poolAddress is not a valid pool
NOT_INITContract is not initialized
LENGTH_MISMATCHArray lengths don’t match
NO_GAUGEaddress poolPool doesn’t have an associated gauge
ALREADY_DISTRIBUTEDaddress gauge, uint256 periodRewards are already distributed for the period
ZERO_VOTEaddress poolAttempting to vote with zero amount
RATIO_TOO_HIGHuint256 _xRatioRatio exceeds maximum allowed
VOTE_UNSUCCESSFULVote operation failed

Gauge V3 Errors

ErrorParametersDescription
GAUGE_EXISTSaddress poolPool already has a gauge
NOT_VOTERaddress callerCaller is not the voter contract
NOT_GT_ZEROuint256 amtAmount is not greater than zero
CANT_CLAIM_FUTUREAttempting to claim future rewards
CANT_REWARD_PASTAttempting to reward past periods
NEED_TEAM_TO_UPDATEGauge can’t determine if using secondsInRange from the pool is safe
NOT_AUTHORIZED_CLAIMERaddress ownerOwner is not an authorized NFP manager

Gauge Errors

ErrorParametersDescription
ZERO_AMOUNTAmount is zero
CANT_NOTIFY_STAKEStake notification failed
REWARD_TOO_HIGHReward amount is too high
NOT_GREATER_THAN_REMAININGuint256 amount, uint256 remainingAmount exceeds remaining balance
TOKEN_ERRORaddress tokenToken operation failed
NOT_NFP_MANAGERaddress nfpManagerAddress is not an NfpManager

Fee Distributor Errors

ErrorParametersDescription
NOT_FINALIZEDuint256 periodPeriod is not finalized
NOT_FEE_DISTRIBUTORaddress destinationRedirect destination is not a FeeDistributor
DIFFERENT_DESTINATION_TOKENSRedirect destination’s pool/pair has completely different tokens

Pair Errors

ErrorParametersDescription
UNSTABLE_RATIORatio is unstable
SAFE_TRANSFER_FAILEDSafe transfer failed
OVERFLOWArithmetic overflow
SKIM_DISABLEDSkim operation is disabled
INSUFFICIENT_LIQUIDITY_MINTEDInsufficient liquidity minted
INSUFFICIENT_LIQUIDITY_BURNEDInsufficient liquidity burned
INSUFFICIENT_OUTPUT_AMOUNTOutput amount is insufficient
INSUFFICIENT_INPUT_AMOUNTInput amount is insufficient
INSUFFICIENT_LIQUIDITYInsufficient liquidity
INVALID_TRANSFERInvalid transfer
KK invariant violation in AMM

Pair Factory Errors

ErrorParametersDescription
FEE_TOO_HIGHFee is too high
ZERO_FEEFee is zero
INVALID_ASSORTMENTToken assortment is invalid
ZERO_ADDRESSAddress is zero
PAIR_EXISTSPair already exists
INVALID_FEE_SPLITFee split is invalid

Fee Recipient Factory Errors

ErrorParametersDescription
INVALID_TREASURY_FEETreasury fee is invalid

Router Errors

ErrorParametersDescription
EXPIREDDeadline has expired
IDENTICALTokens are identical
INSUFFICIENT_AMOUNTAmount is insufficient
INVALID_PATHPath is invalid
INSUFFICIENT_B_AMOUNTToken B amount is insufficient
INSUFFICIENT_A_AMOUNTToken A amount is insufficient
EXCESSIVE_INPUT_AMOUNTInput amount is excessive
ETH_TRANSFER_FAILEDETH transfer failed
INVALID_RESERVESReserves are invalid

Minter Errors

ErrorParametersDescription
STARTEDEpoch 0 has already started
EMISSIONS_NOT_STARTEDEmissions haven’t started
TOO_HIGHDeviation is too high
NO_CHANGENo value change detected
SAME_PERIODUpdating emissions in same period
INVALID_CONTRACTContract setup is invalid
FEE_SPLIT_WHEN_NO_GAUGE_IS_OFFLegacy factory doesn’t have feeSplitWhenNoGauge enabled

Access Hub Errors

ErrorParametersDescription
SAME_ADDRESSAddresses are identical
NOT_TIMELOCKaddress callerCaller is not the timelock
MANUAL_EXECUTION_FAILUREbytes reasonManual execution failed
KICK_FORBIDDENaddress targetKick operation is forbidden
FUNCTION_NOT_FOUNDFunction called on AccessHub is not found
FAILED_TO_ADDExpansion pack can’t be added
FAILED_TO_REMOVEExpansion pack can’t be removed
NOT_X33_ADAPTERCaller is not the x33Adapter

Vote Module Errors

ErrorParametersDescription
NOT_XRAMCaller is not xRAM
COOLDOWN_ACTIVECooldown period is still active
NOT_VOTEMODULECaller is not the vote module
UNAUTHORIZEDCaller is unauthorized
NOT_ACCESSHUBCaller is not the access hub
INVALID_ADDRESSAddress is invalid

x33 Errors

ErrorParametersDescription
ZEROValue is zero
NOT_ENOUGHAmount is insufficient
NOT_CONFORMED_TO_SCALEuint256 valueValue doesn’t conform to scale
LOCKEDContract is locked
REBASE_IN_PROGRESSRebase is in progress
AGGREGATOR_REVERTEDbytes reasonAggregator reverted
AMOUNT_OUT_TOO_LOWuint256 amountOutput amount is too low
AGGREGATOR_NOT_WHITELISTEDaddress aggregatorAggregator is not whitelisted
FORBIDDEN_TOKENaddress tokenToken is forbidden

xRAM Errors

ErrorParametersDescription
NOT_MINTERCaller is not the minter
NO_VESTNo vest exists
ALREADY_EXEMPTAlready exempt
NOT_EXEMPTNot exempt
CANT_RESCUERescue operation is not allowed
ARRAY_LENGTHSArray lengths mismatch
VEST_OVERLAPVesting periods overlap

V3 Factory Errors

ErrorParametersDescription
IDENTICAL_TOKENSTokens are identical
FEE_TOO_LARGEFee is too large
ADDRESS_ZEROAddress is zero
F0Fee is zero
OOBuint8 valueValue is out of bounds

CL Pool String Errors

Short string error codes used in the concentrated liquidity pool contracts.

Oracle.sol

  • OLD: The target must be chronologically after the oldest observation
  • I: The pool has not been initialized

Position.sol

  • NP: Burn cannot be called for a position with 0 liquidity

Tick.sol

  • LO: LiquidityGrossAfter must be less than MaxLiquidity

TickMath.sol

  • T: The given tick must be less than, or equal to, the maximum tick
  • R: Second inequality must be < because the price can never reach the price at the max tick

TransferHelper.sol

  • TF: Transfer failed

RamsesV3Pool.sol

  • LOK: Reentrancy guard — a transaction cannot re-enter the pool mid-swap
  • TLU: The lower tick must be below the upper tick
  • TLM: The lower tick must be greater than, or equal to, the minimum tick
  • TUM: The upper tick must be less than, or equal to, the maximum tick
  • AI: The pool is already initialized
  • M0: The balance of token0 before minting must be less than or equal to the balance after minting
  • M1: The balance of token1 before minting must be less than or equal to the balance after minting
  • AS: amountSpecified cannot be zero
  • SPL: Square root price limit violated
  • IIA: Insufficient input amount — not enough tokens sent during the callback
  • L: Liquidity must be greater than zero for a flash to be executed
  • F0: The balance of token0 before flash must be less than or equal to the balance after flash plus the fee
  • F1: The balance of token1 before flash must be less than or equal to the balance after flash plus the fee