Appearance
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
| Parameter | Default | Cap / constraint | Meaning |
|---|---|---|---|
targetRate | 1e18 | > 0; immutable in USD mode (= $1.00/HAM, F20) | The peg target. |
deviationThreshold | 5e16 (5%) | <= 5e17 (50%) | Deadband half-width; no rebase inside ±this. |
rebaseLag | 10 | > 0 | Off-peg % is divided by this per rebase (damping). |
rebaseMintPerc | 1e17 (10%) | <= 1e18 | Share of a positive rebase minted toward the treasury. |
maxSlippageFactor | 9e17 (90%) | (0, 1e18] | Share of the treasury mint sold into the pool. |
minRebaseTimeIntervalSec | 12h | window must fit interval | Minimum spacing between rebases. |
rebaseWindowOffsetSec | 28800 (08:00 UTC) | < minInterval | Start of the twice-daily rebase window (08:00 and 20:00 UTC at the 12h interval). |
rebaseWindowLengthSec | 1h | (0, minInterval] | Length of the rebase window. |
rebaseDelay (TWAP warmup) | 12h | unbounded | Delay after init_twap before activate_rebasing. |
Oracles
| Parameter | Default | Cap / constraint | Meaning |
|---|---|---|---|
usdPegMode | constructor | immutable | True iff a reserve/USD oracle was set at deploy. |
reserveUsdOracle | constructor | USD mode: rotatable via 24h timelock; never unsettable | Primary reserve→USD feed. |
secondaryReserveUsdOracle | constructor | USD mode: required, distinct from primary; 24h-timelocked | Independent reserve→USD feed; bracketed every rebase. |
maxReserveOracleAge | 1h | USD mode: [1m, 2h] | Staleness bound for both reserve/USD feeds. |
maxCommitRevealOracleDrift | 2e16 (2%) | USD mode: [5e15, 1e17] (0.5%–10%) | Max reserve/USD move tolerated between commit and reveal. |
secondaryOracleEnabled | false | owner toggle; not required to activate | Optional Chainlink bracket on the pool-TWAP leg. |
secondaryOracle | 0 (set via setSecondaryOracle) | — | The TWAP-leg sanity oracle (both modes). |
maxOracleDeviation | 1e17 (10%) | [5e15, 2e17] (0.5%–20%) | Tolerance for the oracle brackets (TWAP-leg and the USD dual-feed bracket). |
maxSecondaryOracleAge | 1h | [1m, 2h] | Staleness bound for the TWAP-leg oracle. |
Constants (not configurable)
| Constant | Value | Meaning |
|---|---|---|
MIN_TWAP_WINDOW | 1h | _getTWAP() reverts on a shorter sample window. |
COMMIT_BLOCKS | 25 | Min blocks between commitRebase and revealAndRebase. |
REVEAL_BLOCKS | 50 | Reveal must land before this many blocks (else commit expires). |
MAX_RATE | 10e18 | Off-peg percentage cap (1000%). |
ORACLE_ROTATION_DELAY | 24h | Timelock on reserve/USD feed rotations. |
Token constants (HAM)
| Constant | Value |
|---|---|
BASE (fragment precision / genesis scaling factor) | 1e18 |
INTERNAL_DECIMALS (underlying precision) | 1e24 |
MIN_SCALING_FACTOR | 1e15 (0.001×) |
maxScalingFactor() | type(uint256).max / initSupply (shrinks as supply grows) |
| storage gap | uint256[45] __gap |