Skip to content

Constants ​

Git Source

Inherits:FluidAuthLevels

Constants ​

LIQUIDITY ​

solidity
IFluidLiquidity public immutable LIQUIDITY

VAULT_FACTORY ​

solidity
IFluidVaultFactory public immutable VAULT_FACTORY

DEX_FACTORY ​

solidity
IFluidDexFactory public immutable DEX_FACTORY

SMART_LENDING_FACTORY ​

solidity
IFluidSmartLendingFactory public immutable SMART_LENDING_FACTORY

AUTH_GATE ​

identity registry gating setPauseAuthContract.

solidity
IFluidAuthGate public immutable AUTH_GATE

X14 ​

solidity
uint256 internal constant X14 = 0x3fff

X18 ​

solidity
uint256 internal constant X18 = 0x3ffff

X24 ​

solidity
uint256 internal constant X24 = 0xffffff

DEFAULT_EXPONENT_SIZE ​

solidity
uint256 internal constant DEFAULT_EXPONENT_SIZE = 8

DEFAULT_EXPONENT_MASK ​

solidity
uint256 internal constant DEFAULT_EXPONENT_MASK = 0xFF

USER_BORROW_CONFIG_MASK ​

bits 162-235 of the user borrow word: the config updateUserBorrowConfigs rewrites

solidity
uint256 internal constant USER_BORROW_CONFIG_MASK = ((1 << 74) - 1) << DexSlotsLink.BITS_USER_BORROW_EXPAND_PERCENT

FREEZE_EXPAND_PERCENT ​

governance's parking preset (see inst-governance setBorrowProtocolLimitsPausedDex); the dust max caps the limit outright, expansion and base are backups

solidity
uint256 internal constant FREEZE_EXPAND_PERCENT = 1

FREEZE_EXPAND_DURATION ​

solidity
uint256 internal constant FREEZE_EXPAND_DURATION = X24

FREEZE_BASE_DEBT_CEILING ​

solidity
uint256 internal constant FREEZE_BASE_DEBT_CEILING = 10

FREEZE_MAX_DEBT_CEILING ​

solidity
uint256 internal constant FREEZE_MAX_DEBT_CEILING = 20

FREEZE_CONFIG_BITS ​

the preset as the pool stores it; 10 and 20 fit a BigNumber coefficient, so they encode as value << exponent bits

solidity
uint256 internal constant FREEZE_CONFIG_BITS =
    (FREEZE_EXPAND_PERCENT << DexSlotsLink.BITS_USER_BORROW_EXPAND_PERCENT)
        | (FREEZE_EXPAND_DURATION << DexSlotsLink.BITS_USER_BORROW_EXPAND_DURATION)
        | ((FREEZE_BASE_DEBT_CEILING << DEFAULT_EXPONENT_SIZE) << DexSlotsLink.BITS_USER_BORROW_BASE_BORROW_LIMIT)
        | ((FREEZE_MAX_DEBT_CEILING << DEFAULT_EXPONENT_SIZE) << DexSlotsLink.BITS_USER_BORROW_MAX_BORROW_LIMIT)