Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexkroeger/e60fa4acf49d230f4f537bf826537426 to your computer and use it in GitHub Desktop.
Save alexkroeger/e60fa4acf49d230f4f537bf826537426 to your computer and use it in GitHub Desktop.
a=0x374abb8ce19a73f2c4efad642bda76c797f19233, b=0x7102A09B55A6e39B75DEd6073a2e0337255abf02
diff --git a/old_comptroller.sol b/new_comptroller.sol
index 9ba55ab..e079d10 100644
--- a/old_comptroller.sol
+++ b/new_comptroller.sol
@@ -1077,39 +1077,6 @@ contract Comptroller is ComptrollerV6Storage, ComptrollerInterface, ComptrollerE
function _become(Unitroller unitroller) public {
require(msg.sender == unitroller.admin(), "only unitroller admin can change brains");
require(unitroller._acceptImplementation() == 0, "change not authorized");
-
- // TODO: Remove this post upgrade
- Comptroller(address(unitroller))._upgradeSplitCompRewards();
- }
-
- function _upgradeSplitCompRewards() public {
- require(msg.sender == comptrollerImplementation, "only brains can become itself");
-
- uint32 blockNumber = safe32(getBlockNumber(), "block number exceeds 32 bits");
-
- // compSpeeds -> compBorrowSpeeds & compSupplySpeeds t
- for (uint i = 0; i < allMarkets.length; i ++) {
- compBorrowSpeeds[address(allMarkets[i])] = compSupplySpeeds[address(allMarkets[i])] = compSpeeds[address(allMarkets[i])];
- delete compSpeeds[address(allMarkets[i])];
-
- /*
- * Ensure supply and borrow state indices are all set. If not set, update to default value
- */
- CompMarketState storage supplyState = compSupplyState[address(allMarkets[i])];
- CompMarketState storage borrowState = compBorrowState[address(allMarkets[i])];
-
- if (supplyState.index == 0) {
- // Initialize supply state index with default value
- supplyState.index = compInitialIndex;
- supplyState.block = blockNumber;
- }
-
- if (borrowState.index == 0) {
- // Initialize borrow state index with default value
- borrowState.index = compInitialIndex;
- borrowState.block = blockNumber;
- }
- }
}
/**
@@ -1348,6 +1315,8 @@ contract Comptroller is ComptrollerV6Storage, ComptrollerInterface, ComptrollerE
* @return The amount of COMP which was NOT transferred to the user
*/
function grantCompInternal(address user, uint amount) internal returns (uint) {
+ require(false, "COMP rewards paused");
+
Comp comp = Comp(getCompAddress());
uint compRemaining = comp.balanceOf(address(this));
if (amount > 0 && amount <= compRemaining) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment