Skip to content

Commit

Permalink
Removed refreshCompSpeeds + removed automatic comp claims + added `…
Browse files Browse the repository at this point in the history
…_setCompSpeed` (#83)

* removed refreshCompSpeeds and automatic comp claims, added setCompSpeed for markets

* dont claim 0 comp

* fixed typo in NatSpec + added gas profiling + borrowing scenario

* added post deploy and post propose scripts

* updated network json configs
  • Loading branch information
Pet3ris authored Dec 28, 2020
1 parent a5591d5 commit 4e99ea3
Show file tree
Hide file tree
Showing 28 changed files with 10,997 additions and 2,053 deletions.
193 changes: 56 additions & 137 deletions contracts/Comptroller.sol

Large diffs are not rendered by default.

1,414 changes: 1,414 additions & 0 deletions contracts/ComptrollerG6.sol

Large diffs are not rendered by default.

285 changes: 209 additions & 76 deletions gasCosts.json
Original file line number Diff line number Diff line change
@@ -1,89 +1,222 @@
{
"first mint": {
"fee": 129978,
"opcodes": {}
},
"second mint": {
"fee": 86450,
"fee": 90506,
"opcodes": {
"PUSH1 @ 3": 589,
"MSTORE @ 12": 9,
"CALLDATASIZE @ 2": 19,
"LT @ 3": 34,
"PUSH2 @ 3": 322,
"JUMPI @ 10": 182,
"CALLDATALOAD @ 3": 24,
"SHR @ 3": 9,
"DUP1 @ 3": 196,
"PUSH4 @ 3": 73,
"GT @ 3": 46,
"JUMPDEST @ 1": 273,
"EQ @ 3": 48,
"CALLVALUE @ 2": 9,
"PUSH1 @ 3": 371,
"MSTORE @ 3": 165,
"PUSH1 @ 12": 1,
"CALLDATASIZE @ 3": 20,
"LT @ 2": 10,
"PUSH2 @ 3": 338,
"JUMPI @ 3": 212,
"PUSH1 @ 10": 18,
"CALLDATALOAD @ 3": 23,
"SHR @ 3": 10,
"DUP1 @ 3": 179,
"PUSH4 @ 3": 70,
"GT @ 3": 63,
"DUP1 @ 10": 24,
"JUMPDEST @ 10": 162,
"DUP1 @ 1": 14,
"EQ @ 3": 28,
"CALLVALUE @ 1": 1,
"DUP1 @ 2": 21,
"ISZERO @ 3": 91,
"POP @ 2": 308,
"SUB @ 3": 62,
"DUP2 @ 3": 183,
"JUMP @ 8": 128,
"SLOAD @ 800": 38,
"MLOAD @ 3": 93,
"SWAP2 @ 3": 108,
"SHL @ 3": 35,
"SWAP1 @ 3": 231,
"AND @ 3": 51,
"DUP3 @ 3": 77,
"DUP4 @ 3": 75,
"DUP5 @ 3": 22,
"CALLDATACOPY @ 18": 1,
"SWAP3 @ 3": 77,
"ADD @ 3": 130,
"SWAP5 @ 3": 10,
"SWAP4 @ 3": 35,
"DUP6 @ 3": 24,
"POP @ 1": 52,
"PUSH2 @ 2": 14,
"SUB @ 2": 10,
"DUP2 @ 3": 206,
"LT @ 3": 28,
"CALLDATALOAD @ 2": 6,
"JUMP @ 3": 127,
"JUMPDEST @ 8": 175,
"PUSH1 @ 1": 136,
"MLOAD @ 3": 100,
"DUP3 @ 3": 91,
"ADD @ 3": 145,
"DUP5 @ 3": 26,
"SWAP1 @ 3": 208,
"DUP3 @ 15": 1,
"DUP4 @ 3": 83,
"SUB @ 3": 55,
"SWAP2 @ 3": 106,
"SHL @ 3": 39,
"AND @ 3": 49,
"OR @ 3": 3,
"SLOAD @ 3": 29,
"PUSH1 @ 800": 23,
"JUMPDEST @ 3": 2,
"PUSH1 @ 6": 14,
"NOT @ 3": 5,
"SWAP3 @ 3": 64,
"EXP @ 3": 1,
"SUB @ 60": 1,
"AND @ 6": 1,
"DUP6 @ 3": 23,
"POP @ 3": 211,
"POP @ 2": 125,
"SWAP1 @ 2": 48,
"ADD @ 2": 2,
"PUSH1 @ 2": 75,
"GAS @ 3": 1,
"DELEGATECALL @ 2": 1,
"PUSH1 @ 312830": 1,
"CALLVALUE @ 12": 9,
"PUSH2 @ 1": 30,
"DUP2 @ 800": 6,
"SSTORE @ 3": 11,
"PUSH2 @ 5000": 1,
"SWAP1 @ 800": 4,
"ADDRESS @ 9": 1,
"SWAP1 @ 6": 6,
"DUP7 @ 3": 32,
"EXTCODESIZE @ 3": 8,
"ISZERO @ 700": 8,
"GAS @ 2": 8,
"DELEGATECALL @ 700": 1,
"NOT @ 3": 4,
"SSTORE @ 5000": 7,
"MSTORE @ 3": 91,
"MSTORE @ 9": 8,
"MSTORE @ 6": 30,
"MSTORE @ 24": 1,
"ADDRESS @ 2": 7,
"DUP7 @ 3": 19,
"EXTCODESIZE @ 700": 7,
"STATICCALL @ 700": 5,
"SHA3 @ 42": 14,
"RETURN @ 0": 9,
"RETURNDATASIZE @ 2": 13,
"DUP8 @ 3": 12,
"SWAP6 @ 3": 7,
"SWAP7 @ 3": 2,
"STATICCALL @ 2": 5,
"PUSH1 @ 307780": 1,
"SHA3 @ 3": 15,
"SLOAD @ 42": 9,
"MLOAD @ 9": 5,
"RETURN @ 3": 9,
"ISZERO @ -307080": 1,
"RETURNDATASIZE @ 3": 10,
"MLOAD @ 2": 8,
"DUP8 @ 3": 19,
"SWAP6 @ 3": 8,
"SWAP7 @ 3": 5,
"SWAP4 @ 2": 17,
"SWAP5 @ 3": 8,
"SWAP4 @ 3": 14,
"PUSH1 @ 307685": 1,
"POP @ 10": 8,
"SWAP4 @ 1": 13,
"JUMP @ 2": 48,
"SWAP1 @ 1": 34,
"PUSH2 @ 800": 5,
"PUSH8 @ 3": 8,
"PUSH32 @ 3": 5,
"DIV @ 5": 11,
"PUSH6 @ 3": 1,
"DUP9 @ 3": 11,
"CODECOPY @ 12": 1,
"CODECOPY @ 16": 2,
"CODECOPY @ 15": 4,
"DUP13 @ 3": 1,
"DUP12 @ 3": 1,
"DUP7 @ 800": 1,
"SWAP3 @ 1": 24,
"PUSH1 @ 9": 1,
"PUSH32 @ 3": 4,
"POP @ 6": 9,
"DIV @ 1": 6,
"SWAP6 @ 5": 1,
"JUMPDEST @ 2": 13,
"SWAP2 @ 1": 4,
"MLOAD @ 6": 4,
"ISZERO @ -306985": 1,
"PUSH6 @ 2": 1,
"DUP10 @ 3": 2,
"DUP2 @ 2": 6,
"SWAP3 @ 2": 26,
"EQ @ 1": 26,
"DUP11 @ 3": 2,
"DUP8 @ 2": 1,
"SWAP8 @ 3": 7,
"SWAP5 @ 2": 2,
"DUP13 @ 3": 3,
"MLOAD @ 1": 4,
"DIV @ 3": 5,
"SWAP1 @ 5": 4,
"DUP6 @ 2": 2,
"DUP7 @ 1": 2,
"SWAP2 @ 2": 8,
"DUP12 @ 3": 2,
"DUP15 @ 3": 1,
"SSTORE @ 800": 4,
"PUSH1 @ 5000": 3,
"DUP14 @ 3": 1,
"MSTORE @ 7": 4,
"LOG1 @ 1774": 1,
"DUP1 @ 6": 1,
"LOG1 @ 3": 2,
"PUSH1 @ 1774": 1,
"SWAP15 @ 3": 1,
"CALLER @ 2": 3,
"CALL @ 700": 2,
"MUL @ 5": 3,
"CALLER @ 3": 1,
"ADDRESS @ 3": 5,
"CALL @ 2": 3,
"PUSH1 @ 307403": 1,
"JUMPDEST @ 800": 1,
"SWAP5 @ 1": 2,
"ISZERO @ -306703": 1,
"EQ @ 800": 1,
"PUSH1 @ 7": 1,
"ADDRESS @ 6": 2,
"PUSH1 @ 307277": 1,
"ISZERO @ -306577": 1,
"DUP4 @ 1": 3,
"MUL @ 3": 3,
"DUP4 @ 5": 3,
"EQ @ 5": 3,
"DUP9 @ 3": 7,
"SWAP2 @ 5": 2,
"SWAP9 @ 3": 2,
"SWAP8 @ 3": 2,
"LOG3 @ 1756": 2,
"RETURNDATACOPY @ 6": 2,
"LOG1 @ 1518": 1,
"CODECOPY @ 6": 1,
"OR @ 3": 1,
"RETURNDATACOPY @ 9": 1
"SWAP6 @ 2": 2,
"PUSH1 @ 307175": 1,
"ISZERO @ -306475": 1,
"SWAP2 @ 7": 1,
"PUSH1 @ 307130": 1,
"PUSH22 @ 9": 1,
"CALLER @ 42": 2,
"DUP3 @ 2": 3,
"DUP5 @ 2": 1,
"SWAP5 @ 42": 2,
"DUP4 @ 5000": 1,
"PUSH20 @ 6": 1,
"SWAP3 @ 6": 1,
"SWAP6 @ 42": 1,
"DUP5 @ 5000": 1,
"PUSH16 @ 6": 1,
"SWAP4 @ 6": 1,
"DUP1 @ 5000": 1,
"LOG3 @ 3": 2,
"POP @ 1756": 1,
"ISZERO @ -306430": 1,
"RETURNDATACOPY @ 3": 2,
"PUSH1 @ 306754": 1,
"ISZERO @ -306054": 1,
"DUP3 @ 800": 1,
"SWAP4 @ 42": 1,
"SWAP5 @ 6": 1,
"DUP3 @ 6": 1,
"PUSH1 @ 1518": 1,
"CODECOPY @ 3": 1,
"DUP2 @ 6": 1,
"PUSH1 @ 1756": 1,
"PUSH1 @ 306426": 1,
"PUSH1 @ 5": 1,
"STOP @ 1": 1,
"ISZERO @ -305726": 1,
"DUP2 @ 1": 1,
"SWAP2 @ -312130": 1,
"RETURNDATASIZE @ 2": 1,
"PUSH2 @ 6": 1
}
},
"redeem": 94077,
"first mint": 134954,
"second mint, no interest accrued": 70851
"second mint, no interest accrued": {
"fee": 66475,
"opcodes": {}
},
"redeem": {
"fee": 96782,
"opcodes": {}
},
"unitroller-g6 second mint with comp accrued": {
"fee": 145034,
"opcodes": {}
},
"unitroller-g6 claim comp": {
"fee": 142390,
"opcodes": {}
},
"unitroller second mint with comp accrued": {
"fee": 124317,
"opcodes": {}
},
"unitroller claim comp": {
"fee": 150385,
"opcodes": {}
}
}
Loading

0 comments on commit 4e99ea3

Please sign in to comment.