Skip to content

Commit

Permalink
add parameter changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SidestreamColdMelon committed Jul 6, 2023
1 parent f175614 commit 56fc860
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 17 deletions.
73 changes: 73 additions & 0 deletions src/DssSpell.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,93 @@ contract DssSpellAction is DssAction {
//
// uint256 internal constant X_PCT_RATE = ;

uint256 internal constant THREE_PT_ONE_NINE_PCT_RATE = 1000000000995743377573746041;
uint256 internal constant THREE_PT_FOUR_FOUR_PCT_RATE = 1000000001072474267302354182;
uint256 internal constant THREE_PT_NINE_FOUR_PCT_RATE = 1000000001225381266358479708;
uint256 internal constant FIVE_PT_SIX_NINE_PCT_RATE = 1000000001754822903403114680;
uint256 internal constant SIX_PT_ONE_NINE_PCT_RATE = 1000000001904482384730282575;
uint256 internal constant FIVE_PT_FOUR_FOUR_PCT_RATE = 1000000001679727448331902751;

function actions() public override {
// ----- Deploy Multiswap Conduit for RWA015-A -----

// ----- Deploy FlapperUniV2 -----

// ----- Scope Defined Parameter Changes -----
// Forum: https://forum.makerdao.com/t/stability-scope-parameter-changes-3/21238/6

// Reduce DSR by 0.30% from 3.49% to 3.19%
DssExecLib.setDSR(THREE_PT_ONE_NINE_PCT_RATE, /* doDrip = */ true);

// Reduce WSTETH-A Liquidation Ratio by 10% from 160% to 150%
DssExecLib.setIlkLiquidationRatio("WSTETH-A", 150_00);

// Reduce WSTETH-B Liquidation Ratio by 10% from 185% to 175%
DssExecLib.setIlkLiquidationRatio("WSTETH-B", 175_00);

// Reduce RETH-A Liquidation Ratio by 20% from 170% to 150%
DssExecLib.setIlkLiquidationRatio("RETH-A", 150_00);

// Reduce the ETH-A Stability Fee (SF) by 0.30% from 3.74% to 3.44%
DssExecLib.setIlkStabilityFee("ETH-A", THREE_PT_FOUR_FOUR_PCT_RATE, /* doDrip = */ true);

// Reduce the ETH-B Stability Fee (SF) by 0.30% from 4.24% to 3.94%
DssExecLib.setIlkStabilityFee("ETH-B", THREE_PT_NINE_FOUR_PCT_RATE, /* doDrip = */ true);

// Reduce the ETH-C Stability Fee (SF) by 0.30% from 3.49% to 3.19%
DssExecLib.setIlkStabilityFee("ETH-C", THREE_PT_ONE_NINE_PCT_RATE, /* doDrip = */ true);

// Reduce the WSTETH-A Stability Fee (SF) by 0.30% from 3.74% to 3.44%
DssExecLib.setIlkStabilityFee("WSTETH-A", THREE_PT_FOUR_FOUR_PCT_RATE, /* doDrip = */ true);

// Reduce the WSTETH-B Stability Fee (SF) by 0.30% from 3.49% to 3.19%
DssExecLib.setIlkStabilityFee("WSTETH-B", THREE_PT_ONE_NINE_PCT_RATE, /* doDrip = */ true);

// Reduce the RETH-A Stability Fee (SF) by 0.30% from 3.74% to 3.44%
DssExecLib.setIlkStabilityFee("RETH-A", THREE_PT_FOUR_FOUR_PCT_RATE, /* doDrip = */ true);

// Reduce the WBTC-A Stability Fee (SF) by 0.11% from 5.80% to 5.69%
DssExecLib.setIlkStabilityFee("WBTC-A", FIVE_PT_SIX_NINE_PCT_RATE, /* doDrip = */ true);

// Reduce the WBTC-B Stability Fee (SF) by 0.11% from 6.30% to 6.19%
DssExecLib.setIlkStabilityFee("WBTC-B", SIX_PT_ONE_NINE_PCT_RATE, /* doDrip = */ true);

// Reduce the WBTC-C Stability Fee (SF) by 0.11% from 5.55% to 5.44%
DssExecLib.setIlkStabilityFee("WBTC-C", FIVE_PT_FOUR_FOUR_PCT_RATE, /* doDrip = */ true);

// ----- Delegate Compensation for June 2023 -----
// TODO: add as soon as it's in the exec

// ----- CRVV1ETHSTETH-A 1st Stage Offboarding -----
// Forum: https://forum.makerdao.com/t/stability-scope-parameter-changes-3/21238/6

// Set CRVV1ETHSTETH-A Debt Ceiling to 0
DssExecLib.setIlkDebtCeiling("CRVV1ETHSTETH-A", 0);

// Remove CRVV1ETHSTETH-A from autoline
DssExecLib.removeIlkFromAutoLine("CRVV1ETHSTETH-A");

// ----- Ecosystem Actor Dai Budget Stream -----
// Poll: https://vote.makerdao.com/polling/QmdnSKPu#poll-detail
// Forum: https://forum.makerdao.com/t/mip102c2-sp8-mip-amendment-subproposals/20761
// Mip: https://mips.makerdao.com/mips/details/MIP106#7-4-2-1a-

// Chronicle Labs Auditor Wallet | 2023-07-01 00:00:00 to 2024-06-30 23:59:59 | 3,721,800 DAI | 0x68D0ca2d5Ac777F6A9b0d1be44332BB3d5981C2f
// TODO: add

// ----- Ecosystem Actor MKR Budget Stream -----
// Poll: https://vote.makerdao.com/polling/QmdnSKPu#poll-detail
// Forum: https://forum.makerdao.com/t/mip102c2-sp8-mip-amendment-subproposals/20761
// Mip: https://mips.makerdao.com/mips/details/MIP106#7-4-2-1a-

// Chronicle Labs Auditor Wallet | 2023-07-01 00:00:00 to 2024-06-30 23:59:59 | 2,216.4 MKR | 0x68D0ca2d5Ac777F6A9b0d1be44332BB3d5981C2f
// TODO: add

// ----- Core Unit MKR Vesting Transfer -----
// Mip: https://mips.makerdao.com/mips/details/MIP40c3SP36#mkr-vesting

// DECO-001 - 125 MKR - 0xF482D1031E5b172D42B2DAA1b6e5Cbf6519596f7
// TODO: add
}
}

Expand Down
34 changes: 17 additions & 17 deletions src/test/config.sol
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ contract Config {
// Values for all system configuration changes
//
afterSpell.line_offset = 750 * MILLION; // Offset between the global line against the sum of local lines
afterSpell.pot_dsr = 349; // In basis points
afterSpell.pot_dsr = 319; // In basis points
afterSpell.pause_delay = 48 hours; // In seconds
afterSpell.vow_wait = 156 hours; // In seconds
afterSpell.vow_dump = 250; // In whole Dai units
Expand Down Expand Up @@ -148,7 +148,7 @@ contract Config {
aL_ttl: 6 hours, // In seconds
line: 0, // In whole Dai units // Not checked here as there is auto line
dust: 7_500, // In whole Dai units
pct: 3_74, // In basis points
pct: 3_44, // In basis points
mat: 14500, // In basis points
liqType: "clip", // "" or "flip" or "clip"
liqOn: true, // If liquidations are enabled
Expand Down Expand Up @@ -178,7 +178,7 @@ contract Config {
aL_ttl: 6 hours,
line: 0,
dust: 25 * THOUSAND,
pct: 4_24,
pct: 3_94,
mat: 13000,
liqType: "clip",
liqOn: true,
Expand Down Expand Up @@ -208,7 +208,7 @@ contract Config {
aL_ttl: 8 hours,
line: 0,
dust: 3_500,
pct: 3_49,
pct: 3_19,
mat: 17000,
liqType: "clip",
liqOn: true,
Expand Down Expand Up @@ -328,7 +328,7 @@ contract Config {
aL_ttl: 24 hours,
line: 0,
dust: 7_500,
pct: 5_80,
pct: 5_69,
mat: 14500,
liqType: "clip",
liqOn: true,
Expand Down Expand Up @@ -358,7 +358,7 @@ contract Config {
aL_ttl: 24 hours,
line: 0,
dust: 25 * THOUSAND,
pct: 6_30,
pct: 6_19,
mat: 13000,
liqType: "clip",
liqOn: true,
Expand Down Expand Up @@ -388,7 +388,7 @@ contract Config {
aL_ttl: 24 hours,
line: 0,
dust: 3_500,
pct: 5_55,
pct: 5_44,
mat: 17500,
liqType: "clip",
liqOn: true,
Expand Down Expand Up @@ -1738,8 +1738,8 @@ contract Config {
aL_ttl: 12 hours,
line: 0,
dust: 7_500,
pct: 3_74,
mat: 16000,
pct: 3_44,
mat: 150_00,
liqType: "clip",
liqOn: true,
chop: 1300,
Expand Down Expand Up @@ -1768,8 +1768,8 @@ contract Config {
aL_ttl: 16 hours,
line: 0,
dust: 3_500,
pct: 3_49,
mat: 18500,
pct: 3_19,
mat: 175_00,
liqType: "clip",
liqOn: true,
chop: 1300,
Expand Down Expand Up @@ -1912,10 +1912,10 @@ contract Config {
offboarding: false
});
afterSpell.collaterals["CRVV1ETHSTETH-A"] = CollateralValues({
aL_enabled: true,
aL_line: 100 * MILLION,
aL_gap: 10 * MILLION,
aL_ttl: 8 hours,
aL_enabled: false,
aL_line: 0,
aL_gap: 0,
aL_ttl: 0,
line: 0,
dust: 25 * THOUSAND,
pct: 4_24,
Expand Down Expand Up @@ -1978,8 +1978,8 @@ contract Config {
aL_ttl: 8 hours,
line: 0,
dust: 7_500,
pct: 3_74,
mat: 170_00,
pct: 3_44,
mat: 150_00,
liqType: "clip",
liqOn: true,
chop: 13_00,
Expand Down
6 changes: 6 additions & 0 deletions src/test/rates.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ contract Rates {
rates[ 250] = 1000000000782997609082909351;
rates[ 275] = 1000000000860244400048238898;
rates[ 300] = 1000000000937303470807876289;
rates[ 319] = 1000000000995743377573746041;
rates[ 325] = 1000000001014175731521720677;
rates[ 344] = 1000000001072474267302354182;
rates[ 349] = 1000000001087798189708544327;
rates[ 350] = 1000000001090862085746321732;
rates[ 374] = 1000000001164306917698440949;
rates[ 375] = 1000000001167363430498603315;
rates[ 394] = 1000000001225381266358479708;
rates[ 400] = 1000000001243680656318820312;
rates[ 424] = 1000000001316772794769098706;
rates[ 425] = 1000000001319814647332759691;
Expand All @@ -52,11 +55,14 @@ contract Rates {
rates[ 490] = 1000000001516911765932351183;
rates[ 500] = 1000000001547125957863212448;
rates[ 525] = 1000000001622535724756171269;
rates[ 544] = 1000000001679727448331902751;
rates[ 550] = 1000000001697766583380253701;
rates[ 555] = 1000000001712791360746325100;
rates[ 569] = 1000000001754822903403114680;
rates[ 575] = 1000000001772819380639683201;
rates[ 580] = 1000000001787808646832390371;
rates[ 600] = 1000000001847694957439350562;
rates[ 619] = 1000000001904482384730282575;
rates[ 625] = 1000000001922394148741344865;
rates[ 630] = 1000000001937312893803622469;
rates[ 650] = 1000000001996917783620820123;
Expand Down

0 comments on commit 56fc860

Please sign in to comment.