---
# System prepended metadata

title: Add SNX Collateral Proposal Overview

---

### Overview

The DAO has decided to make Rocket Pool ETH (rETH) the next new added collateral. There has been discussion both in the discord and on the forum about it.

[Forum Discussion](https://commonwealth.im/lets-get-hai/discussion/17265-adding-reth-rocket-pool-eth-as-a-collateral-type)

We have already deployed an oracle for SNX in an earlier governance proposal.

[SNX Oracle Deployment Proposal](https://www.tally.xyz/gov/hai/proposal/48379714720447898130208187942049199496686265410963900235384225561640628363527)

### Details

Adding a new collateral to the system requires deploying multiple contracts and calling functions on existing ones to initialize the new collateral.

Each collateral has it's own set of parameters that define how it interacts with the rest of the HAI system.

Descriptions of what the parameters represent can be found in the following document.

[HAI New Collateral Parameter Guide](https://hackmd.io/@lets-get-hai/new-collateral-parameters)

The parameters used in the other collaterals can be found in the following document.

[HAI Mainnet Paramters Guide](https://hackmd.io/@lets-get-hai/mainnet-params)

### This proposal will have 9 actions

```solidity!
// 0x534e580000000000000000000000000000000000000000000000000000000000
bytes32 constant SNX = bytes32("SNX"); 
```

**1.** Deploy a new collateral join for SNX in the [Collateral Join Factory](https://optimistic.etherscan.io/address/0xfE7987b1Ee45a8d592B15e8E924d50BFC8536143) [*Executable Code Function 1*]

```solidity!
address OP_SNX_ADDRESS = 0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4;

collateralJoinFactory.deployCollateralJoin({_cType: SNX, _collateral: OP_SNX_ADDRESS});
```

**2.** Initialize new collateral in the [Collateral Auction House Factory](https://optimistic.etherscan.io/address/0x81c5C2DA8C1a74c6077B03aD69ca04b74b94B427). This will deploy a new collateral auction house for SNX. [*Executable Code Function 2*]

```solidity!
 _collateralAuctionHouseParams[SNX] = ICollateralAuctionHouse
    .CollateralAuctionHouseParams({
        minimumBid: 100 * WAD, // 100 HAI
        minDiscount: 1e18, // no discount
        maxDiscount: 0.9e18, // -10%
        perSecondDiscountUpdateRate: 999_985_366_702_115_272_120_527_460 // -10% / 2hs
});

// Encoded Params: 0x0000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000c7d713b49da00000000000000000000000000000000000000000000033b2b235a02f09ce7b6ea64

collateralAuctionHouseFactory.initializeCollateralType(SNX, abi.encode(_collateralAuctionHouseParams[SNX]));
```

**3.** Initialize the new collateral in the [SAFE (Vault) Engine](https://optimistic.etherscan.io/address/0x9Ff826860689483181C5FAc9628fd2F70275A700) [*Executable Code Function 3*]

```solidity!
_safeEngineCParams[SNX] = ISAFEEngine.SAFEEngineCollateralParams({
    debtCeiling: 1_500_000 * RAD, // 1.5M HAI
    debtFloor: 150 * RAD // 150 HAI
});

// Encoded Params: 0x0000000000000000000004025776499f9401f5597c4e1adda0dc0000000000000000000000000000000000001a463b8d8ef089acfcf74dc68649c00000000000

safeEngine.initializeCollateralType(SNX, abi.encode(_safeEngineCParams[SNX]));
```

**4.** Initialize the new collateral in the [Oracle Relayer](https://optimistic.etherscan.io/address/0x6270403b908505F02Da05BE5c1956aBB59FDb3A6) [*Executable Code Function 4*]

```solidity!
delayedOracle[SNX] = IDelayedOracle(
    0x1F2355c09655154fcB11e905eB3C128D3CaEc631
);

_oracleRelayerCParams[WSTETH] = IOracleRelayer.OracleRelayerCollateralParams({
    oracle: delayedOracle[SNX],
    safetyCRatio: 2e27, // 200%
    liquidationCRatio: 1.9e27 // 190%
});

// Encoded Params: 0x0000000000000000000000001f2355c09655154fcb11e905eb3c128d3caec631000000000000000000000000000000000000000006765c793fa10079d000000000000000000000000000000000000000000000000623a4a662d8f3a6ec000000

oracleRelayer.initializeCollateralType(SNX, abi.encode(_oracleRelayerCParams[SNX]));

```

**5.** Initialize the new collateral in the [Liquidation Engine](https://optimistic.etherscan.io/address/0x8Be588895BE9B75F9a9dAee185e0c2ad89891b56) [*Executable Code Function 5*]


```solidity!
address SNX_CAH = 0x007E5F18697b937d26f7F2BfFd44DD1b3e5c7300; // Simulated from step 2

_liquidationEngineCParams[SNX] = ILiquidationEngine
    .LiquidationEngineCollateralParams({
        collateralAuctionHouse: SNX_CAH, // CAH from step 2
        liquidationPenalty: 1.2e18, // 20%
        liquidationQuantity: 50_000 * RAD // 50k HAI
});

// Encoded Params: 0x000000000000000000000000007e5f18697b937d26f7f2bffd44dd1b3e5c730000000000000000000000000000000000000000000000000010a741a462780000000000000000000000000022361d8afcc93343e962029a7edab2000000000000

liquidationEngine.initializeCollateralType(SNX, abi.encode(_liquidationEngineCParams[SNX]));
```

**6.** Initialize the new collateral in the [Tax Collector](https://optimistic.etherscan.io/address/0x62B82ccE08f8F2D808348409E9418c65EB1973C3) [*Executable Code Function 6*]

```solidity!
_taxCollectorCParams[SNX].stabilityFee = 1_000_000_001_547_125_957_863_212_448; // 5%/yr

// Encoded Params: 0x0000000000000000000000000000000000000000033b2e3cb548ff197d3905a0

taxCollector.initializeCollateralType(SNX, abi.encode(_taxCollectorCParams[SNX]));

```

**7.** Add first secondary tax receiver: [Stability Fee Treasury](https://optimistic.etherscan.io/address/0xE9E54c55d41D6622933F9F736e0c55484b3c4f6f) [*Executable Code Function 7*]

```solidity!
// 0x7365636f6e646172795461785265636569766572000000000000000000000000
bytes32 constant SECONDARY_TAX_RECEIVER = bytes32("secondaryTaxReceiver"); 
```

*note:* These are the same [secondary tax receivers](https://github.com/hai-on-op/core/blob/main/script/MainnetParams.s.sol#L65-L79) that are set on the system's other collaterals.

```solidity!
ITaxCollector.TaxReceiver memory firstSecondaryReceiver = ITaxCollector.TaxReceiver({
    receiver: 0xE9E54c55d41D6622933F9F736e0c55484b3c4f6f, // Stability Fee Treasury
    canTakeBackTax: true, // [bool]
    taxPercentage: 0.2e18 // 20%
});

// Encoded Params: 0x000000000000000000000000e9e54c55d41d6622933f9f736e0c55484b3c4f6f000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000002c68af0bb140000

taxCollector.modifyParameters(SNX, SECONDARY_TAX_RECEIVER, abi.encode(firstSecondaryReceiver));

```

**8.** Add second secondary tax receiver: [Admin Safe](https://optimistic.etherscan.io/address/0x468c572c41DB8B206B3919AC9a41ad8dE2eAc822) [*Executable Code Function 8*]

```solidity!
ITaxCollector.TaxReceiver memory secondSecondaryReceiver = ITaxCollector.TaxReceiver({
    receiver: 0x468c572c41DB8B206B3919AC9a41ad8dE2eAc822, // Admin Safe
    canTakeBackTax: true, // [bool]
    taxPercentage: 0.21e18 // 21%
});

// Encoded Params: 0x000000000000000000000000468c572c41db8b206b3919ac9a41ad8de2eac822000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000002ea11e32ad50000

```

**9.** Setup initial price for the collateral. [*Executable Code Function 9*]

```solidity!
oracleRelayer.updateCollateralPrice(SNX);
```

### Contracts referenced in this proposal


1. [Chainlink Relayer (SNX)](https://optimistic.etherscan.io/address/0xa96453cB039db394651e78E627E3e2B91872a508) -`0xa96453cB039db394651e78E627E3e2B91872a508` 
2. [Delayed Oracle (SNX)](https://optimistic.etherscan.io/address/0x1F2355c09655154fcB11e905eB3C128D3CaEc631) -`0x1F2355c09655154fcB11e905eB3C128D3CaEc631`
3. [Collateral Join Factory](https://optimistic.etherscan.io/address/0xfE7987b1Ee45a8d592B15e8E924d50BFC8536143
) -`0xfE7987b1Ee45a8d592B15e8E924d50BFC8536143`
4. [Collateral Auction House Factory](https://optimistic.etherscan.io/address/0x81c5C2DA8C1a74c6077B03aD69ca04b74b94B427) -`0x81c5C2DA8C1a74c6077B03aD69ca04b74b94B427` 
5. [SAFE (Vault) Engine](https://optimistic.etherscan.io/address/0x9Ff826860689483181C5FAc9628fd2F70275A700) -`0x9Ff826860689483181C5FAc9628fd2F70275A700`
6. [Oracle Relayer](https://optimistic.etherscan.io/address/0x6270403b908505F02Da05BE5c1956aBB59FDb3A6) -`0x6270403b908505F02Da05BE5c1956aBB59FDb3A6`
7. [Liquidation Engine](https://optimistic.etherscan.io/address/0x8Be588895BE9B75F9a9dAee185e0c2ad89891b56) -`0x8Be588895BE9B75F9a9dAee185e0c2ad89891b56` 
8. [Tax Collector](https://optimistic.etherscan.io/address/0x62B82ccE08f8F2D808348409E9418c65EB1973C3) -`0x62B82ccE08f8F2D808348409E9418c65EB1973C3` 
9. [Stability Fee Treasury](https://optimistic.etherscan.io/address/0xE9E54c55d41D6622933F9F736e0c55484b3c4f6f) -`0xE9E54c55d41D6622933F9F736e0c55484b3c4f6f` 
10. [Admin Safe](https://optimistic.etherscan.io/address/0x468c572c41DB8B206B3919AC9a41ad8dE2eAc822) - `0x468c572c41DB8B206B3919AC9a41ad8dE2eAc822`
11. [SNX Token](https://optimistic.etherscan.io/address/0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4) - `0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4`