This repository has been archived by the owner on Jul 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 465
Remove read-only mode and associated code #2295
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…timelock for detaching)
jalextowle
approved these changes
Oct 27, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I think that we're making the right choice by removing this.
@@ -103,4 +103,37 @@ blockchainTests.resets('MixinProtocolFees', env => { | |||
expect(updatedEvent.args.updatedProtocolFeeCollector).to.be.eq(protocolFeeCollector); | |||
}); | |||
}); | |||
|
|||
blockchainTests.resets('detachProtocolFeeCollector', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
@@ -277,23 +263,10 @@ export async function deployAndConfigureContractsAsync( | |||
artifacts, | |||
); | |||
|
|||
const zrxVaultBackstopContract = await ZrxVaultBackstopContract.deployFrom0xArtifactAsync( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huge RIP
abandeali1
force-pushed
the
feat/staking/remove-read-only-mode
branch
from
October 27, 2019 23:54
ab389ae
to
f246314
Compare
dorothy-zbornak
approved these changes
Oct 28, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems legit
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR primarily removes read-only mode from the
StakingProxy
contract. Read-only mode was originally designed to control damage in case any vulnerabilities were discovered. TheZeroExGovernor
could 1) set ROM, 2) attach a new staking contract that fixes the bug and 3) turn off ROM. However, this seems to necessarily introduce points of centralization into the system and creates an upgrade path where users are no longer able to opt out of the new logic. The types of bugs that may exist in the current system are very isolated and would only result in minimal losses, even in the case of a critical vulnerability. This makes the tradeoff of introducing read-only mode not worth it, IMO.This change also allows us to remove the
ZrxVaultBackstop
contract.A
detachProtocolFeeCollector
function was added to theExchange
contract. The intent is for this function to have a timelock of 0, and calling it would become a part of standard damage control from any bugs found in the staking logic.Updates the default alpha from 1/2 to 2/3 (needed before deployment).
Testing instructions
Types of changes
Checklist:
[WIP]
if necessary.