Skip to content

Reference: protocol parameters

All HAMRebaser policy parameters are seeded in the constructor and are owner-mutable within the caps below, except the peg mode and (in USD mode) targetRate, which are immutable. Values are 1e18 fixed-point unless noted. Source of truth: contracts/HAMRebaser.sol and docs/SPEC.md.

Rebase policy

ParameterDefaultCap / constraintMeaning
targetRate1e18> 0; immutable in USD mode (= $1.00/HAM, F20)The peg target.
deviationThreshold5e16 (5%)<= 5e17 (50%)Deadband half-width; no rebase inside ±this.
rebaseLag10> 0Off-peg % is divided by this per rebase (damping).
rebaseMintPerc1e17 (10%)<= 1e18Share of a positive rebase minted toward the treasury.
maxSlippageFactor9e17 (90%)(0, 1e18]Share of the treasury mint sold into the pool.
minRebaseTimeIntervalSec12hwindow must fit intervalMinimum spacing between rebases.
rebaseWindowOffsetSec28800 (08:00 UTC)< minIntervalStart of the twice-daily rebase window (08:00 and 20:00 UTC at the 12h interval).
rebaseWindowLengthSec1h(0, minInterval]Length of the rebase window.
rebaseDelay (TWAP warmup)12hunboundedDelay after init_twap before activate_rebasing.

Oracles

ParameterDefaultCap / constraintMeaning
usdPegModeconstructorimmutableTrue iff a reserve/USD oracle was set at deploy.
reserveUsdOracleconstructorUSD mode: rotatable via 24h timelock; never unsettablePrimary reserve→USD feed.
secondaryReserveUsdOracleconstructorUSD mode: required, distinct from primary; 24h-timelockedIndependent reserve→USD feed; bracketed every rebase.
maxReserveOracleAge1hUSD mode: [1m, 2h]Staleness bound for both reserve/USD feeds.
maxCommitRevealOracleDrift2e16 (2%)USD mode: [5e15, 1e17] (0.5%–10%)Max reserve/USD move tolerated between commit and reveal.
secondaryOracleEnabledfalseowner toggle; not required to activateOptional Chainlink bracket on the pool-TWAP leg.
secondaryOracle0 (set via setSecondaryOracle)The TWAP-leg sanity oracle (both modes).
maxOracleDeviation1e17 (10%)[5e15, 2e17] (0.5%–20%)Tolerance for the oracle brackets (TWAP-leg and the USD dual-feed bracket).
maxSecondaryOracleAge1h[1m, 2h]Staleness bound for the TWAP-leg oracle.

Constants (not configurable)

ConstantValueMeaning
MIN_TWAP_WINDOW1h_getTWAP() reverts on a shorter sample window.
COMMIT_BLOCKS25Min blocks between commitRebase and revealAndRebase.
REVEAL_BLOCKS50Reveal must land before this many blocks (else commit expires).
MAX_RATE10e18Off-peg percentage cap (1000%).
ORACLE_ROTATION_DELAY24hTimelock on reserve/USD feed rotations.

Token constants (HAM)

ConstantValue
BASE (fragment precision / genesis scaling factor)1e18
INTERNAL_DECIMALS (underlying precision)1e24
MIN_SCALING_FACTOR1e15 (0.001×)
maxScalingFactor()type(uint256).max / initSupply (shrinks as supply grows)
storage gapuint256[45] __gap

HAM // Elastic supply pegged to $1.00 · Not financial advice.