Constants
Protocol-wide constants used throughout the Omnipair program.Global Constants
Nine-decimal fixed point unit (1e9 scaling), similar to WAD (1e18) by Maker. Used for price and rate calculations.
Number of decimal places for NAD scaling.
Basis points denominator (100% = 10000 bps).
Close factor for liquidations (50%). Percentage of debt that can be liquidated per transaction.
Maximum collateral factor cap (85%) for dynamic collateral factor calculation.
LTV buffer (5%) between borrow limit and liquidation threshold. Creates safety margin.
Flash loan fee (0.05%) charged on flash loan amount.
Liquidation incentive (3%) paid to liquidator from liquidated collateral.
Pair creation fee in lamports (0.2 SOL).
EMA Constants
Minimum EMA half-life in seconds (1 minute).
Maximum EMA half-life in seconds (12 hours).
Number of terms in Taylor series expansion for exponential calculations.
Natural logarithm of 2 scaled by NAD (ln(2) * 1e9).
Pair Constants
Minimum liquidity (10^3) permanently locked in each pair to prevent share inflation attacks.
Initial interest rate (2%) in basis points.
Minimum interest rate (1%) in basis points.
Rate Model Constants
Lower bound of target utilization band (50%).
Upper bound of target utilization band (85%).
Number of seconds in a year (365 days).
Seed Prefixes
Seed prefix for pair PDA derivation.
Seed prefix for user position PDA derivation.
Seed prefix for futarchy authority PDA derivation.
Seed prefix for metadata PDA derivation.
Current protocol version.