Constants
Author: luoyhang003
Provides commonly used mathematical and configuration constants
Designed to be inherited by other contracts that require fixed values
State Variables
D18
Scaling factor for 18-decimal precision (commonly used in ERC20 tokens)
Equal to 10^18
uint256 internal constant D18 = 1e18;
D6
Scaling factor for 6-decimal precision
Equal to 10^6
uint256 internal constant D6 = 1e6;
BASE_DECIMALS
Default number of decimals used for calculations
Typically corresponds to 18-decimal precision
uint256 internal constant BASE_DECIMALS = 18;
FEE_DENOMINATOR
Denominator used for fee calculations
Basis point system: denominator = 10,000 (e.g., 100 = 1%)
uint256 internal constant FEE_DENOMINATOR = 1e4;
BPS_DENOMINATOR
Denominator for basis points calculations (10000 = 100%)
Basis point system: denominator = 10,000 (e.g., 100 = 1%)
uint256 internal constant BPS_DENOMINATOR = 1e4;
INIT_EXCHANGE_PRICE
Initial exchange price for tokenized vault lp
Set to 1 * 10^18 (represents a price of 1.0 in 18 decimals)
uint256 internal constant INIT_EXCHANGE_PRICE = 1e18;
STABLECOIN_BASE_PRICE
The base reference price for a stablecoin, normalized to 18 decimals.
Set to 1 * 10^18 (represents a price of 1.0 in 18 decimals)
uint256 internal constant STABLECOIN_BASE_PRICE = 1e18;