@@ -917,12 +917,12 @@ contract UnitrollerAdminStorage {
917
917
/**
918
918
* @notice Active brains of Unitroller
919
919
*/
920
- address public joetrollerImplementation ;
920
+ address public implementation ;
921
921
922
922
/**
923
923
* @notice Pending brains of Unitroller
924
924
*/
925
- address public pendingJoetrollerImplementation ;
925
+ address public pendingImplementation ;
926
926
}
927
927
928
928
contract JoetrollerV1Storage is UnitrollerAdminStorage {
@@ -1508,7 +1508,7 @@ contract JWrappedNativeInterface is JErc20Interface {
1508
1508
/**
1509
1509
* @notice Flash loan fee ratio
1510
1510
*/
1511
- uint256 public constant flashFeeBips = 3 ;
1511
+ uint256 public constant flashFeeBips = 8 ;
1512
1512
1513
1513
/*** Market Events ***/
1514
1514
@@ -1550,7 +1550,7 @@ contract JCapableErc20Interface is JErc20Interface, JSupplyCapStorage {
1550
1550
/**
1551
1551
* @notice Flash loan fee ratio
1552
1552
*/
1553
- uint256 public constant flashFeeBips = 3 ;
1553
+ uint256 public constant flashFeeBips = 8 ;
1554
1554
1555
1555
/*** Market Events ***/
1556
1556
@@ -3916,17 +3916,17 @@ contract RewardDistributor is RewardDistributorStorage, Exponential {
3916
3916
3917
3917
/**
3918
3918
* @title JoetrollerCore
3919
- * @dev Storage for the joetroller is at this address, while execution is delegated to the `joetrollerImplementation `.
3919
+ * @dev Storage for the joetroller is at this address, while execution is delegated to the `implementation `.
3920
3920
* JTokens should reference this contract as their joetroller.
3921
3921
*/
3922
3922
contract Unitroller is UnitrollerAdminStorage , JoetrollerErrorReporter {
3923
3923
/**
3924
- * @notice Emitted when pendingJoetrollerImplementation is changed
3924
+ * @notice Emitted when pendingImplementation is changed
3925
3925
*/
3926
3926
event NewPendingImplementation (address oldPendingImplementation , address newPendingImplementation );
3927
3927
3928
3928
/**
3929
- * @notice Emitted when pendingJoetrollerImplementation is accepted, which means joetroller implementation is updated
3929
+ * @notice Emitted when pendingImplementation is accepted, which means joetroller implementation is updated
3930
3930
*/
3931
3931
event NewImplementation (address oldImplementation , address newImplementation );
3932
3932
@@ -3951,11 +3951,11 @@ contract Unitroller is UnitrollerAdminStorage, JoetrollerErrorReporter {
3951
3951
return fail (Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);
3952
3952
}
3953
3953
3954
- address oldPendingImplementation = pendingJoetrollerImplementation ;
3954
+ address oldPendingImplementation = pendingImplementation ;
3955
3955
3956
- pendingJoetrollerImplementation = newPendingImplementation;
3956
+ pendingImplementation = newPendingImplementation;
3957
3957
3958
- emit NewPendingImplementation (oldPendingImplementation, pendingJoetrollerImplementation );
3958
+ emit NewPendingImplementation (oldPendingImplementation, pendingImplementation );
3959
3959
3960
3960
return uint256 (Error.NO_ERROR);
3961
3961
}
@@ -3967,20 +3967,20 @@ contract Unitroller is UnitrollerAdminStorage, JoetrollerErrorReporter {
3967
3967
*/
3968
3968
function _acceptImplementation () public returns (uint256 ) {
3969
3969
// Check caller is pendingImplementation and pendingImplementation ≠ address(0)
3970
- if (msg .sender != pendingJoetrollerImplementation || pendingJoetrollerImplementation == address (0 )) {
3970
+ if (msg .sender != pendingImplementation || pendingImplementation == address (0 )) {
3971
3971
return fail (Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);
3972
3972
}
3973
3973
3974
3974
// Save current values for inclusion in log
3975
- address oldImplementation = joetrollerImplementation ;
3976
- address oldPendingImplementation = pendingJoetrollerImplementation ;
3975
+ address oldImplementation = implementation ;
3976
+ address oldPendingImplementation = pendingImplementation ;
3977
3977
3978
- joetrollerImplementation = pendingJoetrollerImplementation ;
3978
+ implementation = pendingImplementation ;
3979
3979
3980
- pendingJoetrollerImplementation = address (0 );
3980
+ pendingImplementation = address (0 );
3981
3981
3982
- emit NewImplementation (oldImplementation, joetrollerImplementation );
3983
- emit NewPendingImplementation (oldPendingImplementation, pendingJoetrollerImplementation );
3982
+ emit NewImplementation (oldImplementation, implementation );
3983
+ emit NewPendingImplementation (oldPendingImplementation, pendingImplementation );
3984
3984
3985
3985
return uint256 (Error.NO_ERROR);
3986
3986
}
@@ -4043,7 +4043,7 @@ contract Unitroller is UnitrollerAdminStorage, JoetrollerErrorReporter {
4043
4043
*/
4044
4044
function () external payable {
4045
4045
// delegate all other functions to current implementation
4046
- (bool success , ) = joetrollerImplementation .delegatecall (msg .data );
4046
+ (bool success , ) = implementation .delegatecall (msg .data );
4047
4047
4048
4048
assembly {
4049
4049
let free_mem_ptr := mload (0x40 )
@@ -5414,7 +5414,7 @@ contract Joetroller is JoetrollerV1Storage, JoetrollerInterface, JoetrollerError
5414
5414
* @notice Checks caller is admin, or this contract is becoming the new implementation
5415
5415
*/
5416
5416
function adminOrInitializing () internal view returns (bool ) {
5417
- return msg .sender == admin || msg .sender == joetrollerImplementation ;
5417
+ return msg .sender == admin || msg .sender == implementation ;
5418
5418
}
5419
5419
5420
5420
/*** Reward distribution functions ***/
@@ -5624,7 +5624,8 @@ contract JoeLens is Exponential {
5624
5624
vars.underlyingTokenAllowance = underlying.allowance (account, address (jToken));
5625
5625
}
5626
5626
5627
- (, vars.jTokenBalance, , ) = jToken.getAccountSnapshot (account);
5627
+ // (, vars.jTokenBalance, , ) = jToken.getAccountSnapshot(account);
5628
+ vars.jTokenBalance = jToken.balanceOf (account);
5628
5629
vars.borrowBalanceCurrent = jToken.borrowBalanceCurrent (account);
5629
5630
5630
5631
vars.balanceOfUnderlyingCurrent = jToken.balanceOfUnderlying (account);
0 commit comments