Constants
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
NULL_ADDR
FALSE
MAX_U256
MAX_U128
MAX_U112
MAX_U96
MAX_U64
MAX_U60
MAX_U32
MAX_U24
MAX_U20
MAX_U16
MAX_U10
MAX_U8
MAX_U3
MAX_U1
ONE_DU1_18
DENOMINATOR_DU1_18
SECONDS_PER_BLOCK
INDEX_TOKEN0
INDEX_TOKEN1
CLEAR_MASK_PAIR_U96
CLEAR_MASK_PAIR_U112
CLEAR_MASK_ORACLE_TIMESTAMP
CLEAR_MASK_FEE_SHIFT
CLEAR_MASK_BALANCER_FEE
S1_OFFSET_SHORT_TERM_FEE_FP
S1_OFFSET_PARTNER_FEE_FP
S1_OFFSET_LONG_TERM_FEE_FP
S2_OFFSET_ORACLE_TIMESTAMP
S3_OFFSET_FEE_SHIFT_U3
S4_OFFSET_PAUSE
S4_OFFSET_CRON_FEE_ENABLED
S4_OFFSET_COLLECT_BALANCER_FEES
S4_OFFSET_ZERO_CRONFI_FEES
S4_OFFSET_BALANCER_FEE
MAX_DECIMALS
MIN_DECIMALS
MINIMUM_LIQUIDITY
STABLE_OBI
LIQUID_OBI
VOLATILE_OBI
STABLE_MAX_INTERVALS
LIQUID_MAX_INTERVALS
VOLATILE_MAX_INTERVALS
TOTAL_FP
MAX_FEE_FP
STABLE_ST_FEE_FP
LIQUID_ST_FEE_FP
VOLATILE_ST_FEE_FP
STABLE_ST_PARTNER_FEE_FP
LIQUID_ST_PARTNER_FEE_FP
VOLATILE_ST_PARTNER_FEE_FP
STABLE_LT_FEE_FP
LIQUID_LT_FEE_FP
VOLATILE_LT_FEE_FP
DEFAULT_FEE_SHIFT
Last updated