Skip to content
oddaf edited this page Mar 28, 2025 · 5 revisions

This document provides step-by-step instructions for MakerDAO Governance Facilitators on how to use the emergency spells to manage and respond to critical situations. These spells allow governance to bypass the pause delay and directly perform crucial actions such as stopping an oracle, setting a debt ceiling to zero, disabling a D3M integration, or stopping liquidations for a collateral. These Spells are all reusable, meaning they can be executed several times if needed, or voted again on a later date to be executed again.

Prerequisites:

  • A Web3 wallet (e.g., MetaMask) connected to the Ethereum network.
  • A small amount of Sepolia ETH (less than 1 eth, faucets outlined below).
  • Familiarity with using Etherscan to send transactions (optional, we'll go into detail on how to use it).

Emergency spell contract addresses can be checked in the chainlog. You can search the chainlog for the contract name, then click on Etherscan to open it there. Names/addresses are below:

EMSP_CLIP_BREAKER_FAB   = 0x867852D30bb3CB1411fB4e404FAE28EF742b1023;
EMSP_LINE_WIPE_FAB  	= 0x8646F8778B58a0dF118FacEdf522181bA7277529;
EMSP_LITE_PSM_HALT_FAB  = 0xB261b73698F6dBC03cB1E998A3176bdD81C3514A;
EMSP_SPLITTER_STOP  	= 0x12531afC02aC18a9597Cfe8a889b7B948243a60b;

General Steps for Using Emergency Spells

1. GroupedLineWipeSpell

This spell will perform an Auto Line MOM Wipe (set debt ceiling to zero) on a set group of Ilks. It can be used if a collateral fails (i.e.: A stablecoin depegs, the protocol that provides the token is hacked, etc.). Users will still be able to exit their positions, but no debt will be allowed to be created for the collateral.

  1. To create a spell, head to the GroupedLineWipeSpell on Etherscan.

  2. Click on Contract, and then on Write Contract. This is what you should be seeing:

image

  1. Connect your wallet of choice by the button Connect to Web3. The button icon will change to green and you should see your address in it.

  2. Fill the ilks (bytes32[]) field with an array of collaterals that need the autoline to be wiped. Notice that the field has a bytes32 type, so you will need to convert the readable string collateral name to bytes32. There are several ways of doing this, the easiest is using any of the available online converters. We will be using [Web3 type converter] (https://web3-type-converter.onbrn.com/) here:

image

The above is a conversion for "ETH-A". Make sure to select bytes32/hex in the "Convert to" dropdown, and apply padding (on Etherscan that is optional, other block explorers might require it). For a full list of Ilks check https://makerburn.com/#/rundown.

[0x4554482d41000000000000000000000000000000000000000000000000000000,0x4554482d42000000000000000000000000000000000000000000000000000000]

Arrays on Etherscan are declared as above, the example includes ETH-A and ETH-B.

  1. Paste the ilks (bytes32) on Etherscan and press Write:

image

  1. Once you press Write a second button View your transaction will appear, click on it to be taken to the transaction view on Etherscan:

image

  1. Then click on the Logs(1) button above, and you will see a Deploy event:

image

  1. As you might've guessed already, the address in the spell field in the data section is the emergency spell. This address can now be communicated to the community and voted on.

2. MultiLineWipeSpell

This emergency spell will wipe all autolines, setting all collaterals debt ceilings (lines) to zero. Users will still be able to exit their positions, but no debt will be allowed to be created for any collateral.

This one does not require a deployment as the one above, the spell is already deployed at MultiAutoLineWipeSpell.

  1. Fetch the MultiAutoLineWipeSpell from chainlog.

  2. Communicate to the community so voting starts.

3. GroupedClipBreakerSpell

This spell can be used in an emergency to stop liquidations for a group of collaterals.

  1. To create a spell, head to the GroupedClipBreakerSpell on Etherscan.

  2. Click on Contract, and then on Write Contract. This is what you should be seeing:

image

  1. Connect your wallet of choice by the button Connect to Web3. The button icon will change to green and you should see your address in it.

  2. Fill the ilks (bytes32[]) field with an array of collaterals that need the autoline to be wiped. Notice that the field has a bytes32 type, so you will need to convert the readable string collateral name to bytes32. There are several ways of doing this, the easiest is using any of the available online converters. We will be using [Web3 type converter] (https://web3-type-converter.onbrn.com/) here:

image

The above is a conversion for "ETH-A". Make sure to select bytes32/hex in the "Convert to" dropdown, and apply padding (on Etherscan that is optional, other block explorers might require it). For a full list of Ilks check https://makerburn.com/#/rundown.

[0x4554482d41000000000000000000000000000000000000000000000000000000,0x4554482d42000000000000000000000000000000000000000000000000000000]

Arrays on Etherscan are declared as above, the example includes ETH-A and ETH-B.

  1. Paste the ilks (bytes32) on Etherscan and press Write:

image

  1. Once you press Write a second button View your transaction will appear, click on it to be taken to the transaction view on Etherscan:

image

  1. Then click on the Logs(1) button above, and you will see a Deploy event:

image

  1. As you might've guessed already, the address in the spell field in the data section is the emergency spell. This address can now be communicated to the community and voted on.

4. MultiClipBreakerSpell

This emergency spell will freeze liquidations for all collaterals.

This one does not require a deployment as the one above, the spell is already deployed at MultiClipBreakerSpell.

  1. Fetch the MultiClipBreakerSpell from chainlog.

  2. Communicate to the community so voting starts.

5. SingleOsmStopSpell

This spell can be used in an emergency to freeze an OSM (price feed) for a single collateral. If the oracle price provider fails for some reason, governance can act before the OSM registers the next price, allowing for the problem to be fixed with no impact on the system.

This spell, being a single collateral one, will require a transaction to deploy the actual spell from a factory.

The process is the same as in single collateral spells seen previously.

  1. To create a spell, head to the SingleOsmStopSpell on Etherscan.

  2. Click on Contract, and then on Write Contract. This is what you should be seeing:

image

  1. Connect your wallet of choice by the button Connect to Web3. The button icon will change to green and you should see your address in it.

  2. Fill the ilk (bytes32) field with the collateral that needs the autoline to be wiped. Notice that the field has a bytes32 type, so you will need to convert the readable string collateral name to bytes32. There are several ways of doing this, the easiest is using any of the available online converters. We will be using [Web3 type converter] (https://web3-type-converter.onbrn.com/) here:

image

The above is a conversion for "ETH-A". Make sure to select bytes32/hex in the "Convert to" dropdown, and apply padding (on Etherscan that is optional, other block explorers might require it).

  1. Paste the collateral name (bytes32) on Etherscan and press Write:

image

  1. Once you press Write a second button View your transaction will appear, click on it to be taken to the transaction view on Etherscan:

image

  1. Then click on the Logs(1) button above, and you will see a Deploy event:

image

  1. The address in the spell field in the data section is the emergency spell. This address can now be communicated to the community and voted on.

6. MultiOsmStopSpell

This emergency spell will freeze all OSMs (delayed price feeds). If the oracle price provider fails for some reason, governance can act before the OSM registers the next price, allowing for the problem to be fixed with no impact on the system.

This one does not require a deployment as the one above, the spell is already deployed at MultiOsmStopSpell.

  1. Fetch the MultiOsmStopSpell from chainlog.

  2. Communicate to the community so voting starts.

7. SingleDdmDisableSpell

This spell can be used in an emergency to disable a D3M integration. If any of the D3M partners have problems (ie: a hack) this emergency spell can be used to prevent abuse. Dai already on the other protocol may be irrecoverable, but using this will prevent further damage. The DDM Mom will call disable on the DDMPlan contract, that will instruct the DDMHub to unwind (set target rate or buffer to zero depending on the implementation).

This spell, being a single collateral one, will require a transaction to deploy the actual spell from a factory.

The process is the same as in single collateral spells seen previously.

  1. To create a spell, head to the SingleDdmDisableSpell on Etherscan.

  2. Click on Contract, and then on Write Contract. This is what you should be seeing:

image

  1. Connect your wallet of choice by the button Connect to Web3. The button icon will change to green and you should see your address in it.

  2. Fill the ilk (bytes32) field with the collateral that needs the ddm to be disabled. Notice that the field has a bytes32 type, so you will need to convert the readable string collateral name to bytes32. There are several ways of doing this, the easiest is using any of the available online converters. We will be using Web3 type converter here:

image

The above is a conversion for "DIRECT-SPARK-MORPHO-DAI". Make sure to select bytes32/hex in the "Convert to" dropdown, and apply padding (on Etherscan that is optional, other block explorers might require it).

  1. Paste the collateral name (bytes32) on Etherscan and press Write:

image

  1. Once you press Write a second button View your transaction will appear, click on it to be taken to the transaction view on Etherscan:

image

  1. Then click on the Logs(1) button above, and you will see a Deploy event:

image

  1. The address in the spell field in the data section is the emergency spell. This address can now be communicated to the community and voted on.

8. SingleLitePsmHaltFactory

This spell will halt trading on an instance of lite-psm. Trading can be fully halted, or halted in one direction only.

The Lite PSM could be halted by a number of reasons:

  • The module itself is malfunctioning.
  • GEM has lost the peg for some reason.
  • To avoid bank runs that could destabilize the peg (temporarily halt buying GEM in a GEM liquidity shock).
  1. To create a spell, head to the SingleLitePsmHaltFactory on Etherscan.

  2. Click on Contract, and then on Write Contract. This is what you should be seeing:

image

  1. Connect your wallet of choice by the button Connect to Web3. The button icon will change to green and you should see your address in it.

  2. Fill the psm field with the address of the PSM to be halted, and flow with one of the options below:

  • 0: Only selling gem will be halted
  • 1: Only buying gem will be halted
  • 2: Trading in both directions will be halted
  1. Once the fields are filled, press Write:

image

  1. Once you press Write a second button View your transaction will appear, click on it to be taken to the transaction view on Etherscan:

image

  1. Then click on the Logs(1) button above, and you will see a Deploy event:

image

  1. As you might've guessed already, the address in the spell field in the data section is the emergency spell. This address can now be communicated to the community and voted on.

9. SplitterStopSpell

This emergency spell will disable the Splitter (Smart Burn Engine, former Flap auctions).

This one does not require a deployment as the one above, the spell is already deployed at SplitterStopSpell.

  1. Fetch the SplitterStopSpell from chainlog.

  2. Communicate to the community so voting starts.

10. SPBEAMHaltSpell

This emergency spell will halt the Stability Parameter Bounded External Access Module. The module will stop setting rates in the system. This spell will not touch on the rates, so they will remain the same until governance updates them through the Spell process.

This spell does not require a deployment as the one above, the spell is already deployed at SPBEAMHaltSpell.

  1. Fetch the SPBEAMHaltSpell from chainlog.

  2. Communicate to the community so voting starts.

Exercises

Collateral names

Compute the bytes32 value for the collaterals below:

ETH-C WSTETH-A WBTC-A

Send the bytes32 values to the instructor.

Spell address generation

These are mock contracts deployed at the Sepolia network, go through the instructions, and send back one spell address for each item to the instructor (the addresses you'd communicate the comunity to vote on), please also send the address you used to sign the transactions.

For single collateral spells, use a collateral not used on the examples and previous exercise. For the exercise you can make up a collateral name (ie: PEPE-A), but on mainnet an incorrect collateral name will cause the transaction to revert. For the PSM spell any address can be used. Also send to the instructor the collateral name of your choice.

For a full list of collaterals (Ilks) check MakerBurn.

  • GroupedLineWipeSpell: 0x921AEB85DDC7A942d85d01DE90Ee0220985a1df9
  • MultiLineWipeSpell: 0xB68B8483cB520386ca42f07c01C0Ec86cCa1399d
  • GroupedClipBreakerSpellFactory: 0xEBe76ED3eB276A5DCB5abA70D7678FCE3dAeF200
  • MultiClipBreakerSpell: 0x1F7160E2755E90B976eb20348ACd6C18C8028fCa
  • SingleOsmStopSpell: 0x5A9007c1Cad2965D606DDFf468CC7D409500d8B3
  • MultiOsmStopSpell: 0xCF4B15D819231439015B3A36d6E5B833bA37595B
  • SingleDdmDisableSpell: 0x26BF7a45fE1d223614FE569b42295a8Af0875a43
  • SingleLitePsmHaltSpellFactory: 0xDf1BC3dFBdCc0883EE4123a9E4C658f541e0791f
  • SplitterStopSpell: 0xA872621864FD0026b610f25746743B5932Af5cDe
  • SPBEAMHaltSpell: 0xc2E3333D530d6EB03629056280C009db66d8f5D5

Sepolia Faucets:

https://faucetlink.to/sepolia

Etherscan: https://sepolia.etherscan.io