ConstantVariables ​
State Variables ​
GOVERNANCE_SLOT ​
Storage slot with the admin of the contract. Logic from "proxy.sol". This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is validated in the constructor.
bytes32 internal constant GOVERNANCE_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
EXCHANGE_PRICES_PRECISION ​
uint256 internal constant EXCHANGE_PRICES_PRECISION = 1e12;
NATIVE_TOKEN_ADDRESS ​
address that is mapped to the chain native token
address internal constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
NATIVE_TOKEN_DECIMALS ​
decimals for native token
uint8 internal constant NATIVE_TOKEN_DECIMALS = 18;
MIN_TOKEN_DECIMALS ​
Minimum token decimals for any token that can be listed at Liquidity (inclusive)
uint8 internal constant MIN_TOKEN_DECIMALS = 6;
MAX_TOKEN_DECIMALS ​
Maximum token decimals for any token that can be listed at Liquidity (inclusive)
uint8 internal constant MAX_TOKEN_DECIMALS = 18;
SECONDS_PER_YEAR ​
Ignoring leap years
uint256 internal constant SECONDS_PER_YEAR = 365 days;
MAX_TOKEN_AMOUNT_CAP ​
limit any total amount to be half of type(uint128).max (~3.4e38) at type(int128).max (~1.7e38) as safety measure for any potential overflows / unexpected outcomes. This is checked for total borrow / supply.
uint256 internal constant MAX_TOKEN_AMOUNT_CAP = uint256(uint128(type(int128).max));
MAX_INPUT_AMOUNT_EXCESS ​
limit for triggering a revert if sent along excess input amount diff is bigger than this percentage (in 1e2)
uint256 internal constant MAX_INPUT_AMOUNT_EXCESS = 100;
SKIP_TRANSFERS ​
if this bytes32 is set in the calldata, then token transfers are skipped as long as Liquidity layer is on the winning side.
bytes32 internal constant SKIP_TRANSFERS = keccak256(bytes("SKIP_TRANSFERS"));
FORCE_STORAGE_WRITE_AFTER_TIME ​
time after which a write to storage of exchangePricesAndConfig will happen always.
uint256 internal constant FORCE_STORAGE_WRITE_AFTER_TIME = 1 days;
SMALL_COEFFICIENT_SIZE ​
constants used for BigMath conversion from and to storage
uint256 internal constant SMALL_COEFFICIENT_SIZE = 10;
DEFAULT_COEFFICIENT_SIZE ​
uint256 internal constant DEFAULT_COEFFICIENT_SIZE = 56;
DEFAULT_EXPONENT_SIZE ​
uint256 internal constant DEFAULT_EXPONENT_SIZE = 8;
DEFAULT_EXPONENT_MASK ​
uint256 internal constant DEFAULT_EXPONENT_MASK = 0xFF;
FOUR_DECIMALS ​
constants to increase readability for using bit masks
uint256 internal constant FOUR_DECIMALS = 1e4;
TWELVE_DECIMALS ​
uint256 internal constant TWELVE_DECIMALS = 1e12;
X8 ​
uint256 internal constant X8 = 0xff;
X14 ​
uint256 internal constant X14 = 0x3fff;
X15 ​
uint256 internal constant X15 = 0x7fff;
X16 ​
uint256 internal constant X16 = 0xffff;
X18 ​
uint256 internal constant X18 = 0x3ffff;
X24 ​
uint256 internal constant X24 = 0xffffff;
X33 ​
uint256 internal constant X33 = 0x1ffffffff;
X64 ​
uint256 internal constant X64 = 0xffffffffffffffff;