Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

makerdao/dss-darkspell

Repository files navigation

DSS Darkspell

Using the CREATE2 opcode, we can predetermine the deploy address of a contract if we have the following three items:

  • (bytes) init bytecode of the contract (currently undeployed)
  • (address) address of contract that will deploy the contract
  • (bytes32) salt (also referred to as the nonce)

The most simple option to fix a bug is to use a CREATE2 generated address as the 'action' address in a spell, deploy, lift to the hat, and schedule the spell. Then, once beyond the non-zero GSM delay, deploy the pre-authorized spell action contract, and then cast the plotted spell.

Typically, spells make use of a separate 'SpellAction' proxy contract to execute system changes. 'SpellAction' contracts consists of a handful of constant state variables and an execute() function with no parameters. Within the execute function are the privileged calls to the DSS system, where the bug fix would occur. This architecture requires no changes to the current spell infrastructure.

Requirements

Getting Started

Clone the repository:

git clone https://github.com/makerdao/dss-darkspell.git

Then, in the env-kovan file in this repo, with ETH_FROM, ETH_KEYSTORE, and ETH_PASSWORD environment variables set:

./test.sh

About

spell to conceal bug fix source and bytecode during pause delay

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published