Constants
Library of constants used throughout the implementation.
Conventions in the methods, variables and constants are as follows:
Prefixes:
- In constants, the prefix "Sn", where 1 <= n <= 4, denotes which slot the constant
pertains too. There are four storage slots that are bitpacked. For example,
"S2_OFFSET_ORACLE_TIMESTAMP" refers to the offset of the oracle timestamp in bit-
packed storage slot 2.
Suffixes:
- The suffix of a variable name denotes the type contained within the variable.
For instance "uint256 _incrementU96" is a 256-bit unsigned container representing
the 96-bit value "_increment".
In the case of "uint256 _balancerFeeDU1F18", the 256-bit unsigned container is
representing a 19 digit decimal value with 18 fractional digits. In this scenario,
the D=Decimal, U=Unsigned, F=Fractional.
Finally, "uint128 valueU128F64" is a 128-bit container representing a 128-bit value
with 64 fractional bits.
- The suffix of a function name denotes what slot it is proprietary too as a
matter of convention. While unchecked at run-time or by the compiler, the naming
convention easily aids in understanding what slot a packed value is stored within.
For instance the function "unpackFeeShiftS3" unpacks the fee shift from slot 3. If
the value of slot 2 were passed to this method, the unpacked value would be
incorrect._CRON_DEPLOYER_ADMIN
address CRON_DEPLOYER_ADMINNULL_ADDR
address NULL_ADDRFALSE
uint256 FALSEMAX_U256
uint256 MAX_U256MAX_U128
uint256 MAX_U128MAX_U112
uint256 MAX_U112MAX_U96
uint256 MAX_U96MAX_U64
uint256 MAX_U64MAX_U60
uint256 MAX_U60MAX_U32
uint256 MAX_U32MAX_U24
uint256 MAX_U24MAX_U20
uint256 MAX_U20MAX_U16
uint256 MAX_U16MAX_U10
uint256 MAX_U10MAX_U8
uint256 MAX_U8MAX_U3
uint256 MAX_U3MAX_U1
uint256 MAX_U1ONE_DU1_18
uint256 ONE_DU1_18DENOMINATOR_DU1_18
uint256 DENOMINATOR_DU1_18SECONDS_PER_BLOCK
uint256 SECONDS_PER_BLOCKINDEX_TOKEN0
uint256 INDEX_TOKEN0INDEX_TOKEN1
uint256 INDEX_TOKEN1CLEAR_MASK_PAIR_U96
uint256 CLEAR_MASK_PAIR_U96CLEAR_MASK_PAIR_U112
uint256 CLEAR_MASK_PAIR_U112CLEAR_MASK_ORACLE_TIMESTAMP
uint256 CLEAR_MASK_ORACLE_TIMESTAMPCLEAR_MASK_FEE_SHIFT
uint256 CLEAR_MASK_FEE_SHIFTCLEAR_MASK_BALANCER_FEE
uint256 CLEAR_MASK_BALANCER_FEES1_OFFSET_SHORT_TERM_FEE_FP
uint256 S1_OFFSET_SHORT_TERM_FEE_FPS1_OFFSET_PARTNER_FEE_FP
uint256 S1_OFFSET_PARTNER_FEE_FPS1_OFFSET_LONG_TERM_FEE_FP
uint256 S1_OFFSET_LONG_TERM_FEE_FPS2_OFFSET_ORACLE_TIMESTAMP
uint256 S2_OFFSET_ORACLE_TIMESTAMPS3_OFFSET_FEE_SHIFT_U3
uint256 S3_OFFSET_FEE_SHIFT_U3S4_OFFSET_PAUSE
uint256 S4_OFFSET_PAUSES4_OFFSET_CRON_FEE_ENABLED
uint256 S4_OFFSET_CRON_FEE_ENABLEDS4_OFFSET_COLLECT_BALANCER_FEES
uint256 S4_OFFSET_COLLECT_BALANCER_FEESS4_OFFSET_ZERO_CRONFI_FEES
uint256 S4_OFFSET_ZERO_CRONFI_FEESS4_OFFSET_BALANCER_FEE
uint256 S4_OFFSET_BALANCER_FEEMAX_DECIMALS
uint256 MAX_DECIMALSMIN_DECIMALS
uint256 MIN_DECIMALSMINIMUM_LIQUIDITY
uint256 MINIMUM_LIQUIDITYSTABLE_OBI
uint16 STABLE_OBILIQUID_OBI
uint16 LIQUID_OBIVOLATILE_OBI
uint16 VOLATILE_OBISTABLE_MAX_INTERVALS
uint24 STABLE_MAX_INTERVALSLIQUID_MAX_INTERVALS
uint24 LIQUID_MAX_INTERVALSVOLATILE_MAX_INTERVALS
uint24 VOLATILE_MAX_INTERVALSTOTAL_FP
uint256 TOTAL_FPMAX_FEE_FP
uint256 MAX_FEE_FPSTABLE_ST_FEE_FP
uint16 STABLE_ST_FEE_FPLIQUID_ST_FEE_FP
uint16 LIQUID_ST_FEE_FPVOLATILE_ST_FEE_FP
uint16 VOLATILE_ST_FEE_FPSTABLE_ST_PARTNER_FEE_FP
uint16 STABLE_ST_PARTNER_FEE_FPLIQUID_ST_PARTNER_FEE_FP
uint16 LIQUID_ST_PARTNER_FEE_FPVOLATILE_ST_PARTNER_FEE_FP
uint16 VOLATILE_ST_PARTNER_FEE_FPSTABLE_LT_FEE_FP
uint16 STABLE_LT_FEE_FPLIQUID_LT_FEE_FP
uint16 LIQUID_LT_FEE_FPVOLATILE_LT_FEE_FP
uint16 VOLATILE_LT_FEE_FPDEFAULT_FEE_SHIFT
uint8 DEFAULT_FEE_SHIFTLast updated