Skip to main content

Constants

Git Source

Author: Struct Finance

State Variables

DECIMAL_FACTOR

All the percentage values are 6 decimals so it is used to perform the calculation.

uint256 public constant DECIMAL_FACTOR = 10 ** 6;

WAD

Used in calculations

uint256 public constant WAD = 10 ** 18;

DAYS_IN_YEAR

uint256 public constant DAYS_IN_YEAR = 365;

YEAR_IN_SECONDS

uint256 public constant YEAR_IN_SECONDS = 31536000;

MAX_DEVIATION

The price maximum deviation allowed between struct price oracle and the AMM

uint256 public constant MAX_DEVIATION = 50000;

DEFAULT_SLIPPAGE

Slippage settings

uint256 public constant DEFAULT_SLIPPAGE = 30000;

MAX_SLIPPAGE

uint256 public constant MAX_SLIPPAGE = 500000;

GMX_PRICE_DIVISOR

GMX prices are scaled to 10e30. This is required to descale them to 10e18

uint256 public constant GMX_PRICE_DIVISOR = 10 ** 12;