Skip to content

Commit

Permalink
added rate changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SidestreamIcedMango committed Nov 12, 2024
1 parent 5d6c05b commit bf24c2f
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 10 deletions.
54 changes: 54 additions & 0 deletions src/DssSpell.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ interface ProxyLike {
function exec(address target, bytes calldata args) external payable returns (bytes memory out);
}

interface SUsdsLike {
function file(bytes32, uint256) external;
function drip() external returns (uint256);
}

contract DssSpellAction is DssAction {
// Provides a descriptive tag for bot consumption
// This should be modified weekly to provide a summary of the actions
Expand All @@ -56,6 +61,16 @@ contract DssSpellAction is DssAction {
// https://ipfs.io/ipfs/QmVp4mhhbwWGTfbh2BzwQB9eiBrQBKiqcPRZCaAxNUaar6
//
// uint256 internal constant X_PCT_RATE = ;
uint256 internal constant SIX_PT_FIVE_PCT_RATE = 1000000001996917783620820123;
uint256 internal constant SEVEN_PCT_RATE = 1000000002145441671308778766;
uint256 internal constant SEVEN_PT_TWO_FIVE_PCT_RATE = 1000000002219443553326580536;
uint256 internal constant SEVEN_PT_FIVE_PCT_RATE = 1000000002293273137447730714;
uint256 internal constant SEVEN_PT_SEVEN_FIVE_PCT_RATE = 1000000002366931224128103346;
uint256 internal constant EIGHT_PCT_RATE = 1000000002440418608258400030;
uint256 internal constant EIGHT_PT_TWO_FIVE_PCT_RATE = 1000000002513736079215619839;
uint256 internal constant TEN_PCT_RATE = 1000000003022265980097387650;
uint256 internal constant TEN_PT_TWO_FIVE_PCT_RATE = 1000000003094251918120023627;
uint256 internal constant TEN_PT_SEVEN_FIVE_PCT_RATE = 1000000003237735385034516037;

// ---------- Math ----------
uint256 internal constant MILLION = 10 ** 6;
Expand All @@ -69,6 +84,7 @@ contract DssSpellAction is DssAction {
address internal immutable MCD_VEST_DAI = DssExecLib.getChangelogAddress("MCD_VEST_DAI");
address internal immutable MCD_VEST_MKR_TREASURY = DssExecLib.getChangelogAddress("MCD_VEST_MKR_TREASURY");
address internal immutable DIRECT_SPARK_DAI_PLAN = DssExecLib.getChangelogAddress("DIRECT_SPARK_DAI_PLAN");
address internal immutable SUSDS = DssExecLib.getChangelogAddress("SUSDS");
address internal constant GELATO_PAYMENT_ADAPTER = 0x0B5a34D084b6A5ae4361de033d1e6255623b41eD;
address internal constant GELATO_TREASURY_NEW = 0x5041c60C75633F29DEb2AED79cB0A9ed79202415;

Expand Down Expand Up @@ -100,6 +116,44 @@ contract DssSpellAction is DssAction {
address internal constant SPARK_SPELL = 0x8a3aaeAC45Cf3D76Cf82b0e4C63cCfa8c72BDCa7;

function actions() public override {
// ---------- Stability Fee Changes ----------
// Forum: https://forum.sky.money/t/stability-scope-parameter-changes-17-sfs-dsr-ssr-spark-effective-dai-borrow-rate/25522
// Forum: https://forum.sky.money/t/stability-scope-parameter-changes-17-sfs-dsr-ssr-spark-effective-dai-borrow-rate/25522/2

// Increase ETH-A Stability Fee by 1 percentage point from 6.25% to 7.25%
DssExecLib.setIlkStabilityFee("ETH-A", SEVEN_PT_TWO_FIVE_PCT_RATE, /* doDrip = */ true);

// Increase ETH-B Stability Fee by 1 percentage point from 6.75% to 7.75%
DssExecLib.setIlkStabilityFee("ETH-B", SEVEN_PT_SEVEN_FIVE_PCT_RATE, /* doDrip = */ true);

// Increase ETH-C Stability Fee by 1 percentage point from 6.00% to 7.00%
DssExecLib.setIlkStabilityFee("ETH-C", SEVEN_PCT_RATE, /* doDrip = */ true);

// Increase WSTETH-A Stability Fee by 1 percentage point from 7.25% to 8.25%
DssExecLib.setIlkStabilityFee("WSTETH-A", EIGHT_PT_TWO_FIVE_PCT_RATE, /* doDrip = */ true);

// Increase WSTETH-B Stability Fee by 1 percentage point from 7.00% to 8.00%
DssExecLib.setIlkStabilityFee("WSTETH-B", EIGHT_PCT_RATE, /* doDrip = */ true);

// Increase WBTC-A Stability Fee by 1 percentage point from 9.25% to 10.25%
DssExecLib.setIlkStabilityFee("WBTC-A", TEN_PT_TWO_FIVE_PCT_RATE, /* doDrip = */ true);

// Increase WBTC-B Stability Fee by 1 percentage point from 9.75% to 10.75%
DssExecLib.setIlkStabilityFee("WBTC-B", TEN_PT_SEVEN_FIVE_PCT_RATE, /* doDrip = */ true);

// Increase WBTC-C Stability Fee by 1 percentage point from 9.00% to 10.00%
DssExecLib.setIlkStabilityFee("WBTC-C", TEN_PCT_RATE, /* doDrip = */ true);

// ---------- Savings Rate Changes ----------
// Forum: https://forum.sky.money/t/stability-scope-parameter-changes-17-sfs-dsr-ssr-spark-effective-dai-borrow-rate/25522
// Forum: https://forum.sky.money/t/stability-scope-parameter-changes-17-sfs-dsr-ssr-spark-effective-dai-borrow-rate/25522/2

// Increase DSR by 1 percentage point from 5.50% to 6.50%
DssExecLib.setDSR(SIX_PT_FIVE_PCT_RATE, /* doDrip = */ true);

// Increase SSR by 1 percentage point from 6.50% to 7.50%
SUsdsLike(SUSDS).drip();
SUsdsLike(SUSDS).file("ssr", SEVEN_PT_FIVE_PCT_RATE);

// ---------- Increase SparkLend D3M Buffer Parameter ----------
// Forum: https://forum.sky.money/t/14-nov-2024-proposed-changes-to-spark-for-upcoming-spell/25466
Expand Down
20 changes: 10 additions & 10 deletions src/test/config.sol
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ contract Config {
// Values for all system configuration changes
//
afterSpell.line_offset = 680 * MILLION; // Offset between the global line against the sum of local lines
afterSpell.pot_dsr = 5_50; // In basis points
afterSpell.susds_ssr = 6_50; // In basis points
afterSpell.pot_dsr = 6_50; // In basis points
afterSpell.susds_ssr = 7_50; // In basis points
afterSpell.pause_delay = 16 hours; // In seconds
afterSpell.vow_wait = 156 hours; // In seconds
afterSpell.vow_dump = 250; // In whole Dai units
Expand Down Expand Up @@ -156,7 +156,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: 6_25, // In basis points
pct: 7_25, // In basis points
mat: 14500, // In basis points
liqType: "clip", // "" or "flip" or "clip"
liqOn: true, // If liquidations are enabled
Expand All @@ -181,7 +181,7 @@ contract Config {
aL_ttl: 6 hours,
line: 0,
dust: 25 * THOUSAND,
pct: 6_75,
pct: 7_75,
mat: 13000,
liqType: "clip",
liqOn: true,
Expand All @@ -206,7 +206,7 @@ contract Config {
aL_ttl: 8 hours,
line: 0,
dust: 3_500,
pct: 6_00,
pct: 7_00,
mat: 17000,
liqType: "clip",
liqOn: true,
Expand Down Expand Up @@ -306,7 +306,7 @@ contract Config {
aL_ttl: 0,
line: 0,
dust: 7_500,
pct: 9_25,
pct: 10_25,
mat: 15000,
liqType: "clip",
liqOn: true,
Expand All @@ -331,7 +331,7 @@ contract Config {
aL_ttl: 0,
line: 0,
dust: 25 * THOUSAND,
pct: 9_75,
pct: 10_75,
mat: 15000,
liqType: "clip",
liqOn: true,
Expand All @@ -356,7 +356,7 @@ contract Config {
aL_ttl: 0,
line: 0,
dust: 3_500,
pct: 9_00,
pct: 10_00,
mat: 17500,
liqType: "clip",
liqOn: true,
Expand Down Expand Up @@ -1506,7 +1506,7 @@ contract Config {
aL_ttl: 12 hours,
line: 0,
dust: 7_500,
pct: 7_25,
pct: 8_25,
mat: 150_00,
liqType: "clip",
liqOn: true,
Expand All @@ -1531,7 +1531,7 @@ contract Config {
aL_ttl: 12 hours,
line: 0,
dust: 3_500,
pct: 7_00,
pct: 8_00,
mat: 175_00,
liqType: "clip",
liqOn: true,
Expand Down

0 comments on commit bf24c2f

Please sign in to comment.