makerdao / protego

GNU Affero General Public License v3.0
10 stars 3 forks source link

Protego

Protego is a tool to permissionlessly deploy a spell which can be used to drop a particular plan in the MCD_PAUSE contract, or in extreme cases the Protego contract can itself be lifted to the hat, allowing any user to permissionlessly drop any scheduled plan.

Context

Usage

1. Create a single drop spell

deploy(address _usr, bytes32 _tag, bytes memory _fax, uint256 _eta)(address)

If there is sufficient ecosystem interest to cancel (drop) a particular scheduled set of actions (the target plan), Protego contains a factory to permissionlessly create a spell ("Emergency Drop Spell"), which – upon being given the hat – is able to drop the targeted plan in MCD_PAUSE.

2. Enable permissionless dropping of any plan

drop(address _usr, bytes32 _tag, bytes memory _fax, uint256 _eta)

In case of a governance attack, numerous spells could be created and planned by an attacker at a rate faster than a single hat spell can drop them. To mitigate this risk, the Protego contract itself can be given the hat, which allows any user to permissionlessly drop any plan.

It will immediately drop a plan in MCD_PAUSE using the parameters provided.

Additional functions

id()

id(address _usr, bytes32 _tag, bytes memory _fax, uint256 _eta)(bytes32)

Returns the bytes32 id of a given plan using the same method that hash does in MCD_PAUSE.

planned()

planned(address _usr, bytes32 _tag, bytes memory _fax, uint256 _eta)(bool)
planned(bytes32 _id)(bool)

Returns true if a plan has been scheduled for execution.