Skip to content

Commit

Permalink
add weth collateral
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0neerpat committed Jul 4, 2024
1 parent 4ebeef3 commit 57b7439
Show file tree
Hide file tree
Showing 13 changed files with 232 additions and 189 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Template: [`new-AddCollateral.json`](gov-input/anvil/new-AddCollateral.json)
- delayedOracle: Usually a DelayedOracle that enforces delays to fresh price feeds.
- safetyCRatio: RAY, CRatio used to compute the 'safePrice' - the price used when generating debt in SAFEEngine.
- liquidationCRatio: RAY, CRatio used to compute the 'liquidationPrice' the price used when liquidating SAFEs.
- CollateralAuctionHouseParams: - maximumDiscount: WAD, Maximum discount at which collateral is being sold - minimumBid: WAD, Minimum acceptable bid - minimumDiscount: WAD, Minimum discount at which collateral is being sold - perSecondDiscountUpdateRate: RAY, Rate at which the discount will be updated in an auction.
- CollateralAuctionHouseParams: - maxDiscount: WAD, Maximum discount at which collateral is being sold - minimumBid: WAD, Minimum acceptable bid - minDiscount: WAD, Minimum discount at which collateral is being sold - perSecondDiscountUpdateRate: RAY, Rate at which the discount will be updated in an auction.
This script proposes adding a new collateral to the system (deploys new contracts via the collateral join, collateral auction house factories and it adds the correct authorizations to the needed contracts).

### Modify Parameters
Expand Down
39 changes: 38 additions & 1 deletion gov-input/anvil/new-AddCollateral.json
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
{"chainid":"31337","description":"add NEWADDed as a collateral type","network":"anvil","newCollateralAddress":"0xa513E6E4b8f2a923D98304ec87F64353C4D5C853","newCollateralType":"NEWADD","proposalType":"AddCollateral","ProtocolToken_Address":"0xc6e7DF5E7b4f2A278906862b61205850344D4e7d","ODGovernor_Address":"0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f","SAFEEngine_Address":"0x67d269191c92Caf3cD7723F116c85e6E9bf55933","OracleRelayer_Address":"0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E","LiquidationEngine_Address":"0xa82fF9aFd8f496c3d6ac40E2a0F282E47488CFc9","TaxCollector_Address":"0x95401dc811bb5740090279Ba06cfA8fcF6113778","GlobalSettlement_Address":"0x5f3f1dBD7B74C6B46e8c44f98792A1dAf8d69154","SAFEEngineCollateralParams":{"collateralDebtCeiling":"500000000000000000000000000000000000000000000000","collateralDebtFloor":"100000000000000000000000000000000000000000000000"},"TaxCollectorCollateralParams":{"stabilityFee":"1000000000000000000000000000"},"LiquidationEngineCollateralParams":{"liquidationPenalty":"1000000000000000000","liquidationQuantity":"1000000000000000000000000000000000000000000000","newCAHChild":"0xf9b42E09Fd787d6864D6b2Cd8E1350fc93E6683D"},"OracleRelayerCollateralParams":{"delayedOracle":"0xa783CDc72e34a174CCa57a6d9a74904d0Bec05A9","safetyCRatio":"1000000000000000000000000000","liquidationCRatio":"1000000000000000000000000000"},"CollateralAuctionHouseParams":{"maximumDiscount":"1","minimumBid":"2","minimumDiscount":"3","perSecondDiscountUpdateRate":"999998607628240538157433861"}}
{
"chainid": "31337",
"description": "add NEWADDed as a collateral type",
"network": "anvil",
"newCollateralAddress": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853",
"newCollateralType": "NEWADD",
"proposalType": "AddCollateral",
"ProtocolToken_Address": "0xc6e7DF5E7b4f2A278906862b61205850344D4e7d",
"ODGovernor_Address": "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f",
"SAFEEngine_Address": "0x67d269191c92Caf3cD7723F116c85e6E9bf55933",
"OracleRelayer_Address": "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E",
"LiquidationEngine_Address": "0xa82fF9aFd8f496c3d6ac40E2a0F282E47488CFc9",
"TaxCollector_Address": "0x95401dc811bb5740090279Ba06cfA8fcF6113778",
"GlobalSettlement_Address": "0x5f3f1dBD7B74C6B46e8c44f98792A1dAf8d69154",
"SAFEEngineCollateralParams": {
"collateralDebtCeiling": "500000000000000000000000000000000000000000000000",
"collateralDebtFloor": "100000000000000000000000000000000000000000000000"
},
"TaxCollectorCollateralParams": {
"stabilityFee": "1000000000000000000000000000"
},
"LiquidationEngineCollateralParams": {
"liquidationPenalty": "1000000000000000000",
"liquidationQuantity": "1000000000000000000000000000000000000000000000",
"newCAHChild": "0xf9b42E09Fd787d6864D6b2Cd8E1350fc93E6683D"
},
"OracleRelayerCollateralParams": {
"delayedOracle": "0xa783CDc72e34a174CCa57a6d9a74904d0Bec05A9",
"safetyCRatio": "1000000000000000000000000000",
"liquidationCRatio": "1000000000000000000000000000"
},
"CollateralAuctionHouseParams": {
"maxDiscount": "1",
"minimumBid": "2",
"minDiscount": "3",
"perSecondDiscountUpdateRate": "999998607628240538157433861"
}
}
38 changes: 38 additions & 0 deletions gov-input/mainnet/AddCollateralWETH.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"chainid": "42161",
"description": "Add WETH collateral",
"network": "mainnet",
"newCollateralAddress": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
"newCollateralType": "WETH",
"proposalType": "AddCollateral",
"ProtocolToken_Address": "",
"ODGovernor_Address": "",
"SAFEEngine_Address": "",
"OracleRelayer_Address": "",
"LiquidationEngine_Address": "",
"TaxCollector_Address": "",
"GlobalSettlement_Address": "",
"SAFEEngineCollateralParams": {
"collateralDebtCeiling": "10000000000000000000000000000000000000000000000000000",
"collateralDebtFloor": "200000000000000000000000000000000000000000000000"
},
"TaxCollectorCollateralParams": {
"stabilityFee": "1000000000472114805215157978"
},
"LiquidationEngineCollateralParams": {
"newCAHChild": "0x293b702362918e990Dd5f48a80fB139FeAd64263",
"liquidationPenalty": "1050000000000000000",
"liquidationQuantity": "50000000000000000000000000000000000000000000000000"
},
"OracleRelayerCollateralParams": {
"delayedOracle": "0x562CCE2F4dc383862dC6A926AF10DeFf5fCd172F",
"safetyCRatio": "1200000000000000000000000000",
"liquidationCRatio": "1150000000000000000000000000"
},
"CollateralAuctionHouseParams": {
"maxDiscount": "900000000000000000",
"minimumBid": "100000000000000000000",
"minDiscount": "1000000000000000000",
"perSecondDiscountUpdateRate": "999985752120000000000000000"
}
}
4 changes: 2 additions & 2 deletions gov-input/mainnet/new-AddCollateral.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"liquidationCRatio": "1000000000000000000000000000"
},
"CollateralAuctionHouseParams": {
"maximumDiscount": "1",
"maxDiscount": "1",
"minimumBid": "2",
"minimumDiscount": "3",
"minDiscount": "3",
"perSecondDiscountUpdateRate": "999998607628240538157433861"
}
}
74 changes: 37 additions & 37 deletions gov-input/mainnet/new-AddGRT.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"chainid": "42161",
"description": "add GRT as a collateral type",
"network": "mainnet",
"newCollateralAddress": "0x9623063377ad1b27544c965ccd7342f7ea7e88c7",
"newCollateralType": "GRT",
"proposalType": "AddCollateral",
"ProtocolToken_Address": "",
"ODGovernor_Address": "",
"SAFEEngine_Address": "",
"OracleRelayer_Address": "",
"LiquidationEngine_Address": "",
"TaxCollector_Address": "",
"GlobalSettlement_Address": "",
"SAFEEngineCollateralParams": {
"collateralDebtCeiling": "TBD",
"collateralDebtFloor": "TBD"
},
"TaxCollectorCollateralParams": {
"stabilityFee": "TBD"
},
"LiquidationEngineCollateralParams": {
"newCAHChild": "",
"liquidationPenalty": "TBD",
"liquidationQuantity": "TBD"
},
"OracleRelayerCollateralParams": {
"delayedOracle": "TBD",
"safetyCRatio": "TBD",
"liquidationCRatio": "TBD"
},
"CollateralAuctionHouseParams": {
"maximumDiscount": "TBD",
"minimumBid": "TBD",
"minimumDiscount": "TBD",
"perSecondDiscountUpdateRate": "999998607628240538157433861"
}
}
"chainid": "42161",
"description": "add GRT as a collateral type",
"network": "mainnet",
"newCollateralAddress": "0x9623063377ad1b27544c965ccd7342f7ea7e88c7",
"newCollateralType": "GRT",
"proposalType": "AddCollateral",
"ProtocolToken_Address": "",
"ODGovernor_Address": "",
"SAFEEngine_Address": "",
"OracleRelayer_Address": "",
"LiquidationEngine_Address": "",
"TaxCollector_Address": "",
"GlobalSettlement_Address": "",
"SAFEEngineCollateralParams": {
"collateralDebtCeiling": "TBD",
"collateralDebtFloor": "TBD"
},
"TaxCollectorCollateralParams": {
"stabilityFee": "TBD"
},
"LiquidationEngineCollateralParams": {
"newCAHChild": "",
"liquidationPenalty": "TBD",
"liquidationQuantity": "TBD"
},
"OracleRelayerCollateralParams": {
"delayedOracle": "TBD",
"safetyCRatio": "TBD",
"liquidationCRatio": "TBD"
},
"CollateralAuctionHouseParams": {
"maxDiscount": "TBD",
"minimumBid": "TBD",
"minDiscount": "TBD",
"perSecondDiscountUpdateRate": "999998607628240538157433861"
}
}
74 changes: 37 additions & 37 deletions gov-input/mainnet/new-AddLINK.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"chainid": "42161",
"description": "add LINK as a collateral type",
"network": "mainnet",
"newCollateralAddress": "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4",
"newCollateralType": "LINK",
"proposalType": "AddCollateral",
"ProtocolToken_Address": "",
"ODGovernor_Address": "",
"SAFEEngine_Address": "",
"OracleRelayer_Address": "",
"LiquidationEngine_Address": "",
"TaxCollector_Address": "",
"GlobalSettlement_Address": "",
"SAFEEngineCollateralParams": {
"collateralDebtCeiling": "TBD",
"collateralDebtFloor": "TBD"
},
"TaxCollectorCollateralParams": {
"stabilityFee": "TBD"
},
"LiquidationEngineCollateralParams": {
"newCAHChild": "",
"liquidationPenalty": "TBD",
"liquidationQuantity": "TBD"
},
"OracleRelayerCollateralParams": {
"delayedOracle": "TBD",
"safetyCRatio": "TBD",
"liquidationCRatio": "TBD"
},
"CollateralAuctionHouseParams": {
"maximumDiscount": "TBD",
"minimumBid": "TBD",
"minimumDiscount": "TBD",
"perSecondDiscountUpdateRate": "999998607628240538157433861"
}
}
"chainid": "42161",
"description": "add LINK as a collateral type",
"network": "mainnet",
"newCollateralAddress": "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4",
"newCollateralType": "LINK",
"proposalType": "AddCollateral",
"ProtocolToken_Address": "",
"ODGovernor_Address": "",
"SAFEEngine_Address": "",
"OracleRelayer_Address": "",
"LiquidationEngine_Address": "",
"TaxCollector_Address": "",
"GlobalSettlement_Address": "",
"SAFEEngineCollateralParams": {
"collateralDebtCeiling": "TBD",
"collateralDebtFloor": "TBD"
},
"TaxCollectorCollateralParams": {
"stabilityFee": "TBD"
},
"LiquidationEngineCollateralParams": {
"newCAHChild": "",
"liquidationPenalty": "TBD",
"liquidationQuantity": "TBD"
},
"OracleRelayerCollateralParams": {
"delayedOracle": "TBD",
"safetyCRatio": "TBD",
"liquidationCRatio": "TBD"
},
"CollateralAuctionHouseParams": {
"maxDiscount": "TBD",
"minimumBid": "TBD",
"minDiscount": "TBD",
"perSecondDiscountUpdateRate": "999998607628240538157433861"
}
}
38 changes: 0 additions & 38 deletions gov-input/mainnet/new-AddWETH.json

This file was deleted.

6 changes: 3 additions & 3 deletions gov-input/sepolia/new-AddCollateral.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"liquidationCRatio": "7"
},
"CollateralAuctionHouseParams": {
"maximumDiscount": "8",
"maxDiscount": "8",
"minimumBid": "9",
"minimumDiscount": "10",
"minDiscount": "10",
"perSecondDiscountUpdateRate": "11"
}
}
}
20 changes: 0 additions & 20 deletions gov-output/mainnet/114846423-updateTimeDelay.json

This file was deleted.

35 changes: 0 additions & 35 deletions gov-output/mainnet/88375931-deploy-chainlink-relayer.json

This file was deleted.

Loading

0 comments on commit 57b7439

Please sign in to comment.