---
# System prepended metadata

title: HAI Mainnet Parameters
tags: [HAI, public]

---

# HAI Production Deployment Parameters

## Relevant Files
- Testnet Params: https://github.com/hai-on-op/core/blob/main/script/GoerliParams.s.sol
- Mainnet Params: https://github.com/hai-on-op/core/blob/main/script/MainnetParams.s.sol
- Params: https://github.com/hai-on-op/core/blob/main/script/Params.s.sol
- Common: https://github.com/hai-on-op/core/blob/main/script/Common.s.sol

# Governance


### Gnosis Safe (Treasury)
Protocol treasury owned by the timelock.
Address: `0xDCb421Cc4Cbb7267F3b2cAcAb44Ec18AEbEd6724`

### Admin Safe
Governance owned 1 of 1 (2nd secondary tax receiver)
Address: `0x468c572c41DB8B206B3919AC9a41ad8dE2eAc822`

### Timelock Controller
Address: `0x00`
Contract: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v5.0/contracts/governance/TimelockController.sol

### HaiGovernor

Address: `0xe807f3282f3391d237BA8B9bECb0d8Ea3ba23777`
Contract: https://github.com/hai-on-op/core/blob/dev/src/contracts/governance/HaiGovernor.sol

```solidity
votingDelay: 43_200 // 12 hours - Delay since proposal is created until voting starts.
votingPeriod: 129_600 // 36 hours - Length of period during which people can cast their vote.
proposalThreshold: 5_000 * WAD // 5k - Minimum number of votes an account must have to create a proposal.
quorumNumeratorValue: 1 // 1% - Quorum required for a proposal to pass.
quorumVoteExtension: 86_400 // Minimum voting period after quorum is reached as a security protection against large voters
timelockMinDelay: 86_400 // 1 day - Initial minimum delay for operations
```

### Multi-Signature Safes

| Safe          | Address                                      | Security | Signers | Description                       |
| ------------- |:-------------------------------------------- |:-------- | ------- |:--------------------------------- |
| Incentives    | `0x21a1Ec8c62bbdad4680742B88695F06f55a51bda` | `2/4`    |   Ameen, Reza, Pies, Kingfish      | Early Usage Alignment (Incentives |
| FLX Alignment | `0x638d5CcAF57446363e8Ca5BD09b220EE7A87e8C6` | `2/4`    |    Ameen, Reza, Pies, Kingfish    | Altar of RAI                      |
| Internal Vest | `0xDC1e6DD8bDf7FD3b8F9fE663Ee5E3340cEfaC854` | `3/5`    |     Ameen, Reza, Pies, Kingfish, Number Group    | To Internal member streams        |
| Partnership   | `0x1eF475097fd67A8429DFC1065F774C0368e6312D` | `2/4`    |     Ameen, Reza, Pies, Kingfish    | Partnership streams      
| OP Grant   | `0x7Cb4a147A54e1406AEA3C8BE623A26bdd554322B` | `2/4`    |     Ameen, Reza, Pies, Kingfish    | OP from the initial grant      

### Multi-Signature Signers


| User | Adress |
| -------- | -------- |
| Ameen     | ameen.eth (`0x297BF847Dcb01f3e870515628b36EAbad491e5E8`)     |
| Reza     | reza.eth (`0x0a453F46f8AE9a99b2B901A26b53e92BE6c3c43E`)     |
| Pies     | 0xpies.eth (`0x2825803b02ddACe519de971F512568Ed983faB96`)     |
| Kingfish     | `0x9640F1cB81B370186d1fcD3B9CBFA2854e49555e`     |
| Number Group     | numbergroup.eth (`0xB8eB653DD6D0eD6f7FE15D7A3E216bbf147eAF99`)     |

### Grants

## Optimism Cycle 14

[HAI grant application](https://app.charmverse.io/op-grants/page-5989100035328812)

[Cycle 14 results](https://gov.optimism.io/t/cycle-14-final-grants-roundup/6676)

# Miscellaneous

### Token Distrubtor

```solidity
root: bytes32(keccak256("420")), // TBD
totalClaimable: 1_000_000 * WAD,
claimPeriodStart: block.timestamp + 7 days, // 1 week after deploy
claimPeriodEnd: 1_735_689_599 // Last second of 2024 UTC
```

### HAI Params

```solidity
bytes32 constant HAI = bytes32('HAI'); // 0x4841490000000000000000000000000000000000000000000000000000000000
uint256 constant HAI_USD_INITIAL_PRICE = 1e18; // 1 HAI = 1 USD
```

### Job Params
```solidity
uint256 constant JOB_REWARD = 1e18; // 1 HAI
```

# Protocol

### Constants
```solidity
uint256 constant MINUS_0_5_PERCENT_PER_HOUR = 999_998_607_628_240_588_157_433_861;
```

### SAFE Engine
Params: `SAFEEngineParams`
Address: `0x9Ff826860689483181C5FAc9628fd2F70275A700`
Contract: https://github.com/hai-on-op/core/blob/dev/src/contracts/SAFEEngine.sol

```solidity
safeDebtCeiling: 1_000_000 * WAD, // WAD - 1M
globalDebtCeiling: 0 // RAD - For launch
// globalDebtCeiling: 55_000_000 * RAD // RAD * Change to 55M w/ proposal
```

### Accounting Engine
Params: `AccountingEngineParams`
Address: `0xa4900795EbFfadc12790f05f7c4AC42CD765Bd10`
Contract: https://github.com/hai-on-op/core/blob/dev/src/contracts/AccountingEngine.sol
```solidity
surplusIsTransferred: 0, // Surplus is auctioned - Boolean: whether the surplus is transferred or auctione)
surplusDelay: 1 days, // Delay since last surplus auction trigger
popDebtDelay: 14 days, // ~ 14 - 21 - Delay between collateral auction and protocol debt settlement
disableCooldown: 3 days, // Time after GS to transfer the surplus to the PostGSSurplusAuctioneer
surplusAmount: 42_000 * RAD, // 42k HAI - Amount over target needed to trigger auction
surplusBuffer: 100_000 * RAD, // > 100k HAI or .1% - Target of surplus Buffer
debtAuctionMintedTokens: 10_000 * WAD, // 10k KITE - Lot size of debt auction (Governance Tokens)
debtAuctionBidSize: 10_000 * RAD // 10k HAI - Bid size of system debt token during Debt Auction
```

### Debt Auction House
Params: `DebtAuctionHouseParams`
Address: `0x7CdE0d7296725aFB80EA091Eca8D06A377f617b3`
Contract https://github.com/hai-on-op/core/blob/dev/src/contracts/DebtAuctionHouse.sol

```solidity
bidDecrease: 1.025 * WAD, // 2.5% - Minimum bid change size in Debt Auction
amountSoldIncrease: 1.5 * WAD, // 50% - Increse in token lot size upon auction restart
bidDuration: 3 hours, // Maximum length of an auction before it can be settled
totalAuctionLength: 2 days // Minimum length of an auction before it can be settled
```

### Surplus Auction House
Params: `SurplusAuctionHouseParams`
Address: `0x096125Fa7E2181DbA78136782365a39c3a1778E9`
Contract https://github.com/hai-on-op/core/blob/dev/src/contracts/SurplusAuctionHouse.sol

```solidity
bidIncrease: 1.01 * WAD, // 1% - Minimum bid change
bidDuration: 6 hours, // maximum time after bid before Surplus Auction closes
totalAuctionLength: 1 days, // Deadline for an auction to be settled (no more bids after time elapsed, can be restarted if no bids)
bidReceiver: governor, // Governor = Timelock for Rabbit
recyclingPercentage:  0 // 100% is burned
```

### Liquidation Engine
Params: `LiquidationEngineParams`
Address: `0x8Be588895BE9B75F9a9dAee185e0c2ad89891b56`
Contract https://github.com/hai-on-op/core/blob/main/src/contracts/LiquidationEngine.sol

```solidity
onAuctionSystemCoinLimit: 10_000_000 * RAD, // 10M HAI - Maximum Size of debt that can be liquidated at one time (global, all liquidations)
saviourGasLimit: 10_000_000 // 10M gas - We are not launching with saviours so this doesn't do anything
```

### Stability Fee Treasury
Params: `StabilityFeeTreasuryParams`
Address: `0xE9E54c55d41D6622933F9F736e0c55484b3c4f6f`
Contract https://github.com/hai-on-op/core/blob/main/src/contracts/StabilityFeeTreasury.sol

```solidity
treasuryCapacity: 1_000_000 * RAD, // 1M HAI - At which amount of surplus the Treasury can give back funds to AccEngine
pullFundsMinThreshold: 0, // no threshold - Minimum amount in SF Treasury that will allow funds to be pulled 
surplusTransferDelay: 1 days // Time between transfer back to AccountingEngine
```

### Tax Collector
Params: `taxCollectorParams`
Address: `0x62B82ccE08f8F2D808348409E9418c65EB1973C3`
Contract https://github.com/hai-on-op/core/blob/main/src/contracts/TaxCollector.sol

```solidity
primaryTaxReceiver: address(accountingEngine), // 59%
globalStabilityFee: RAY, // no global SF
maxStabilityFeeRange: RAY - MINUS_0_5_PERCENT_PER_HOUR, // +- 0.5% per hour
maxSecondaryReceivers: 5 // stabilityFeeTreasury

// Secondary Tax Receiver
// per all collaterals:
receiver: address(stabilityFeeTreasury),
canTakeBackTax: true, // [bool]
taxPercentage: 0.2 * WAD // [wad%] 20%

// Tertiary Tax Receiver (For all admin stuff, e.g. protocol pay taxes etc...)
// per all collaterals:
receiver: 0x468c572c41DB8B206B3919AC9a41ad8dE2eAc822,
canTakeBackTax: true, // [bool]
taxPercentage: 0.21 * WAD // [wad%] 21%
```

# PID

### Constants
```solidity!
// See - https://github.com/makerdao/spells-mainnet/blob/master/scripts/rates.sh
REDEMPTION_RATE_UPPER_BOUND = 1000000074561623060142516377 // 950 %
REDEMPTION_RATE_LOWER_BOUND = 99999999999997789272222624 // -90% (10%)
```

### Oracle Relayer
Params: `OracleRelayerParams`
Address: `0x6270403b908505F02Da05BE5c1956aBB59FDb3A6`
Contract https://github.com/hai-on-op/core/blob/main/src/contracts/OracleRelayer.sol

```solidity!
redemptionRateUpperBound: REDEMPTION_RATE_UPPER_BOUND, // 950% - Maximum value of redemption rate
// 950%: 1000000074561623060142516377
redemptionRateLowerBound: REDEMPTION_RATE_LOWER_BOUND // -90% (10%) - Minimum value of redemption rate
```

### PID Controller
Params: `PIDControllerParams`
Address: `0x6f9aeC3c0DF4DF7A0Da66453a38B8C767972f609`
Contract https://github.com/hai-on-op/core/blob/main/src/contracts/PIDController.sol


```solidity!
// uint256 constant HALF_LIFE_30_DAYS = 999_999_732_582_000_000_000_000_000;
perSecondCumulativeLeak: HALF_LIFE_30_DAYS, // .999999732582e27 - Controls weight of previously observed integral error

noiseBarrier: .995 * WAD, // 0.5 %
feedbackOutputLowerBound: -int256(RAY - 1), // unbounded - Governor for how quickly redemption rate can change from one update to next
feedbackOutputUpperBound: RAD, // unbounded - Governor for how quickly redemption rate can change from one update to next
integralPeriodSize: 1 hours // ASK BERT - Min amount of time that has to pass for I-term to incorporate data
```

### PID Controller Gains
Params: `ControllerGains`
Address: `0x6f9aeC3c0DF4DF7A0Da66453a38B8C767972f609`
Contract https://github.com/hai-on-op/core/blob/main/src/contracts/PIDController.sol

```solidity!
// GET VALUES HERE - NOTE: imported from https://etherscan.io/address/0x5CC4878eA3E6323FdA34b3D28551E1543DEe54C6

// RAI Values
// uint256 constant PROPORTIONAL_GAIN = 222_002_205_862;
// uint256 constant INTEGRAL_GAIN = 16_442;

// HAI (We will use these)
// kp: 111_001_102_931 (50% of RAI)
// ki: 32_884 (200% of RAI)

kp: int256(PROPORTIONAL_GAIN), // 30 - 50% of current RAI
ki: int256(INTEGRAL_GAIN) // 100 - 150% of current RAI

```

### PID Rate Setter
Params: `PIDRateSetterParams`
Address: `0x1F76F20C9D9075dc160d0E47cd214dF0B7434d2f`
Contract https://github.com/hai-on-op/core/blob/main/src/contracts/PIDRateSetter.sol

```solidity
updateRateDelay: 1 hours // Frequency that redemption rate can be updated
```

# Global Settlement

### Global Settlement
Params: `GlobalSettlementParams`
Address: `0x75880aca7230462a630Ad65ad5444cb1E1864218`
Contract https://github.com/hai-on-op/core/blob/main/src/contracts/settlement/GlobalSettlement.sol

```solidity!
shutdownCooldown: 3 days // Time delay from start of GS process to freeze system (e.g., coin supply)
```

### Post Settlement Surplus Auction House
Params: `PostSettlementSAHParams`
Address: `0x1fa281EA8d0e9DB78bEAA1F5b1a452058F956d66`
Contract https://github.com/hai-on-op/core/blob/main/src/contracts/settlement/PostSettlementSurplusAuctionHouse.sol

```solidity!
bidIncrease: 1.01 * WAD, // + 1 %
bidDuration: 3 hours,
totalAuctionLength: 1 days // doesn't really matter
```


# Collateral

### Constants

```solidity!
DEBT_FLOOR = 150 * RAD // 150 HAI - Minimum debt minted per safe
LIQUIDATION_QUANTITY = 50_000 * RAD // 50k HAI - ceiling of debt that can be auctioned at once (lot size max)
```

### WETH

```solidity
// OracleRelayerCollateralParams
oracle: 0x00, // TBD - Collateral Oracle
safetyCRatio: 1.30 * RAY // 135% - Minimum collateral ratio (usage)
liquidationCRatio: 1.25 * RAY // 130% - Minimum collateral ratio (liquidation)

// TaxCollectorCollateralParams
stabilityFee: 1000000000472114805215157978 // 1.5% / yr - WETH safe stability fee (additive to global)

// SAFEEngineCollateralParams
debtCeiling: 25_000_000 * RAD, // 25M HAI - Maximum debt minted from WETH Safes
debtFloor: DEBT_FLOOR

// LiquidationEngineCollateralParams
collateralAuctionHouse: 0x00 // TBD
liquidationPenalty: 1.1 * WAD // 10% - Additional collateral auctioned to satisfy safe debt
liquidationQuantity: LIQUIDATION_QUANTITY

// CollateralAuctionHouseParams
minimumBid: 100 * WAD, // 100 HAI - Minimum liquidation auction bid size
minDiscount: 1 * WAD, // no discount - Discount that a collateral starts at
maxDiscount: 0.9 * WAD, // 10% - Max discount that a collateral can have
perSecondDiscountUpdateRate: 999985366702115272120527460 // RAY - 10% / 2hs
```

### WSTETH

```solidity
// OracleRelayerCollateralParams
oracle: 0x00, // TBD - WETH / USD Oracle
safetyCRatio: 1.35 * RAY // 140% - Minimum collateral ratio (usage)
liquidationCRatio: 1.30 * RAY // 135% - Minimum collateral ratio (liquidation)


// TaxCollectorCollateralParams
stabilityFee: 1000000000627937192491029810 // 2% / yr - WSTETH safe stability fee (additive to global)

// SAFEEngineCollateralParams
debtCeiling: 25_000_000 * RAD, // 25M HAI - Maximum debt minted from WSTETH Safes
debtFloor: DEBT_FLOOR

// LiquidationEngineCollateralParams
collateralAuctionHouse: 0x00 // TBD
liquidationPenalty: 1.1 * WAD // 10% - Additional collateral auctioned to satisfy safe debt
liquidationQuantity: LIQUIDATION_QUANTITY

// CollateralAuctionHouseParams
minimumBid: 100 * WAD, // 100 HAI - Minimum liquidation auction bid size
minDiscount: 1 * WAD, // no discount - Discount that a collateral starts at
maxDiscount: .9 * WAD, // 10 % - Max discount that a collateral can have
perSecondDiscountUpdateRate: 999985366702115272120527460 // RAY - 10% / 2hs
```

### OP

```solidity
// OracleRelayerCollateralParams
oracle: 0x00, // TBD - OP / USD Oracle
safetyCRatio: 1.80 * RAY // 165% - Minimum collateral ratio (usage)
liquidationCRatio: 1.75 * RAY // 160% - Minimum collateral ratio (liquidation)

// TaxCollectorCollateralParams
stabilityFee: 1000000001547125957863212448 // 5% / yr - OP safe stability fee (additive to global)

// SAFEEngineCollateralParams
debtCeiling: 5_000_000 * RAD, // 5M - Maximum debt minted from WETH Safes
debtFloor: DEBT_FLOOR

// LiquidationEngineCollateralParams
collateralAuctionHouse: 0x00 // TBD
liquidationPenalty: 1.15 * WAD // 15% - Additional collateral auctioned to satisfy safe debt
liquidationQuantity: LIQUIDATION_QUANTITY

// CollateralAuctionHouseParams
minimumBid: 100 * WAD, // 100 HAI - Minimum liquidation auction bid size
minDiscount: 1 * WAD, // no discount - Discount that a collateral starts at
maxDiscount: .85 * WAD, // 15% - Max discount that a collateral can have
perSecondDiscountUpdateRate: 999977428181205977622596568 // RAY - 15% / 2hs
```


