Contract 0x660E1093AA3D7CB0f6A8dE172F85d0d7b010ef26

Contract Overview

Balance:
0 BNB

Token:
Txn Hash
Block
From
To
Value [Txn Fee]
0xba207a3678b32011a0abfcdfeb280d46e0b105e3d1a933c1b1d19a810f2982c8102832472021-07-03 22:59:0622 days 19 hrs ago0xb0c04e07a301927672a8a7a874db6930576c90b8 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00092666
0xa4e5c9f2986453f81f898022db3af68960e00bbd8213e99b2db0fa77196a14c391786282021-05-26 11:51:3461 days 6 hrs ago0x7a9f895b0bb3c7c30790d494b494005809fe7e09 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00092666
0xdcdf3844d7b0b3fda05f81b0418cbba06b1f22a7d0f3c5905c8b9c2ffdc7df3890892932021-05-23 9:24:4864 days 9 hrs ago0x54fb97d710c4c1e65edffa2b8b49bef0f7035501 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00044832
0x5515668ebf6e12a6672368f6e1ca87db0832c2a66e720f79c9ead43c91d136a690892052021-05-23 9:20:2464 days 9 hrs ago0x54fb97d710c4c1e65edffa2b8b49bef0f7035501 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00031799
0x9e0c93dfcbd9b4d5d539be7f2fdd21769582fdc29eafbe2e2d24df2efb1a1f9b90891392021-05-23 9:17:0664 days 9 hrs ago0x54fb97d710c4c1e65edffa2b8b49bef0f7035501 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00030472
0x6839dac3a4c1e132baeb72bbdd4408b1e008c2d7f243ca07654581bc92a46a5888090942021-05-13 15:26:0174 days 3 hrs ago0x54fb97d710c4c1e65edffa2b8b49bef0f7035501 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00150389
0x8ee4a45874643b097c984fabba0c536ca74b53a7345ceecfc0919f7c39bf431880541512021-04-17 9:43:46100 days 9 hrs ago0xda86ba1806fb75104da88413b1cdbe6ec4aa4c58 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00136479
0xcf4f05baa884917daa0349dd694bdc4d6760ac23ce0c25e14de229fa4cf7849280534212021-04-17 9:07:16100 days 9 hrs ago0xda86ba1806fb75104da88413b1cdbe6ec4aa4c58 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00092666
0x6b1817b411fbb0aa3a859babd563da9eeb48aaadcc7701d2af858478dc8dd9f674077822021-03-25 22:36:13122 days 20 hrs ago0xf9db539df03ed8e5d292363160308b041a9e2061 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00076614
0x82bc32c6c725ff15ee62a9786a0607b6301ca5b279542e6d95f54518eb2875c274077802021-03-25 22:36:07122 days 20 hrs ago0xf9db539df03ed8e5d292363160308b041a9e2061 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00076614
0x819eab9c2f9b571613367a6c246d95fd7a29be90bd24353f773456ec71a80bbd74077782021-03-25 22:36:01122 days 20 hrs ago0xf9db539df03ed8e5d292363160308b041a9e2061 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00076614
0x552d4b0f492401b4df597af322a28942033bd78f3709c2b57b72e4e17f79049c74066702021-03-25 21:40:37122 days 21 hrs ago0xf9db539df03ed8e5d292363160308b041a9e2061 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00185332
0x45743b669829d51aaad930edc2221c41b15b11b102d66f5b856fbf1fd293fce074066602021-03-25 21:40:07122 days 21 hrs ago0xf9db539df03ed8e5d292363160308b041a9e2061 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00124478
0xc8304338f9aa3576e800e4688715a432d881d507baf5ac12156056c9059eff4474061352021-03-25 21:13:52122 days 21 hrs ago0xf9db539df03ed8e5d292363160308b041a9e2061 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00185332
0xabeeba55c0708b70c7f912ed5a787e52b6fe70c56569b8eff1ccfc0b54ba8e8771380382021-03-16 13:21:04132 days 5 hrs ago0x54fb97d710c4c1e65edffa2b8b49bef0f7035501 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00027621
0xaf3fec56baf15288f27804592637132046d3ecb78e3dbabdb34f1181b86bf61e71378752021-03-16 13:12:55132 days 5 hrs ago0x54fb97d710c4c1e65edffa2b8b49bef0f7035501 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00044795
0x960207ea25a208363436fc7788136b6aa544e56b5698d19e232e95da3b32969a70450802021-03-13 7:25:00135 days 11 hrs ago0x61a195655172d901a62f31749d73c4ff5e4000b5 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00092688
0x28946213b779340a2de9858406ccb19480ae32e9566832ac33c45d8a3dbe68f669963352021-03-11 14:47:45137 days 3 hrs ago0xedaf9f1b649ac429587f309df2c4734b2ba061e2 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00121478
0x5af4f0e613dd834a8b3b2f2ee5453752737a241a564d5eefb41c831474188f2768214502021-03-05 12:15:09143 days 6 hrs ago0xa2a7c90ef757c15d6a074ff869b3e231432ca3a7 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00049112
0x733b944a4a6183904b847093b53321801a52af928e190c22fe1b011a0e3fc0ec68213852021-03-05 12:11:54143 days 6 hrs ago0xa2a7c90ef757c15d6a074ff869b3e231432ca3a7 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00185376
0x66842add4e7714ddc2327f00be1069d7f535794e87ea969d6949097f40c8d4fc68213362021-03-05 12:09:27143 days 6 hrs ago0xa2a7c90ef757c15d6a074ff869b3e231432ca3a7 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00049112
0x11a42031d58efce530d6096c88c0a0960535fa7b8a7dd6bfd621bd4442bd9b9a68212662021-03-05 12:05:57143 days 6 hrs ago0xa2a7c90ef757c15d6a074ff869b3e231432ca3a7 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00049112
0x72e8fa09013c3d3681a91c1d2f92dc60106ee8ff07aebcf2b99db9c0d5dc4a8566939702021-02-28 22:59:30147 days 19 hrs ago0xedaf9f1b649ac429587f309df2c4734b2ba061e2 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00121478
0x9494a717c71a24f0dea166180e5f8bca172ba8828b3bd7131598921d93325e5866540572021-02-27 13:20:01149 days 5 hrs ago0xfe4229f3d4cc851c94d2d13c74441426ea2e5bd4 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00092688
0x039752534fa045efcccf80b733971308638ceb3516de94bde4f39d82548b87fd66049542021-02-25 20:24:52150 days 22 hrs ago0xedaf9f1b649ac429587f309df2c4734b2ba061e2 IN  0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB0.00121478
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x8fd4e0c8d51a190c1db3ce4546ce6900b2593ed8884bd4f412d0d35d3d7cebba105240382021-07-12 9:43:0514 days 9 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0x587d9bdad29c99033b2c3c93d9b4aa75e9e2b2250 BNB
0x8fd4e0c8d51a190c1db3ce4546ce6900b2593ed8884bd4f412d0d35d3d7cebba105240382021-07-12 9:43:0514 days 9 hrs ago 0xcf0a303b541e8ed0f256089f17f224a6ba285070 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB
0x8fd4e0c8d51a190c1db3ce4546ce6900b2593ed8884bd4f412d0d35d3d7cebba105240382021-07-12 9:43:0514 days 9 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0xcf0a303b541e8ed0f256089f17f224a6ba2850700 BNB
0x8fd4e0c8d51a190c1db3ce4546ce6900b2593ed8884bd4f412d0d35d3d7cebba105240382021-07-12 9:43:0514 days 9 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0x587d9bdad29c99033b2c3c93d9b4aa75e9e2b2250 BNB
0x8fd4e0c8d51a190c1db3ce4546ce6900b2593ed8884bd4f412d0d35d3d7cebba105240382021-07-12 9:43:0514 days 9 hrs ago 0xcf0a303b541e8ed0f256089f17f224a6ba285070 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB
0x8fd4e0c8d51a190c1db3ce4546ce6900b2593ed8884bd4f412d0d35d3d7cebba105240382021-07-12 9:43:0514 days 9 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0x587d9bdad29c99033b2c3c93d9b4aa75e9e2b2250 BNB
0x8fd4e0c8d51a190c1db3ce4546ce6900b2593ed8884bd4f412d0d35d3d7cebba105240382021-07-12 9:43:0514 days 9 hrs ago 0xcf0a303b541e8ed0f256089f17f224a6ba285070 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB
0x3ff40c95fa8ac9b2cf42358a6b8d3803c1c0ffaae619ef07afb5542ce4115e5d105240022021-07-12 9:41:1714 days 9 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0xcf0a303b541e8ed0f256089f17f224a6ba2850700 BNB
0x3ff40c95fa8ac9b2cf42358a6b8d3803c1c0ffaae619ef07afb5542ce4115e5d105240022021-07-12 9:41:1714 days 9 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0x587d9bdad29c99033b2c3c93d9b4aa75e9e2b2250 BNB
0x3ff40c95fa8ac9b2cf42358a6b8d3803c1c0ffaae619ef07afb5542ce4115e5d105240022021-07-12 9:41:1714 days 9 hrs ago 0xcf0a303b541e8ed0f256089f17f224a6ba285070 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB
0x3ff40c95fa8ac9b2cf42358a6b8d3803c1c0ffaae619ef07afb5542ce4115e5d105240022021-07-12 9:41:1714 days 9 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0x587d9bdad29c99033b2c3c93d9b4aa75e9e2b2250 BNB
0x3ff40c95fa8ac9b2cf42358a6b8d3803c1c0ffaae619ef07afb5542ce4115e5d105240022021-07-12 9:41:1714 days 9 hrs ago 0xcf0a303b541e8ed0f256089f17f224a6ba285070 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB
0xba207a3678b32011a0abfcdfeb280d46e0b105e3d1a933c1b1d19a810f2982c8102832472021-07-03 22:59:0622 days 19 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0x587d9bdad29c99033b2c3c93d9b4aa75e9e2b2250 BNB
0x1b117006df0aef15d751a15e34ba2835ab6da9b798edfde04f8044bbcbc9e307102832342021-07-03 22:58:2722 days 19 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0x587d9bdad29c99033b2c3c93d9b4aa75e9e2b2250 BNB
0x1b117006df0aef15d751a15e34ba2835ab6da9b798edfde04f8044bbcbc9e307102832342021-07-03 22:58:2722 days 19 hrs ago 0x53189e25f7a76ce89ed027cb901f5524c92a7788 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB
0x1b117006df0aef15d751a15e34ba2835ab6da9b798edfde04f8044bbcbc9e307102832342021-07-03 22:58:2722 days 19 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0x53189e25f7a76ce89ed027cb901f5524c92a77880 BNB
0x1b117006df0aef15d751a15e34ba2835ab6da9b798edfde04f8044bbcbc9e307102832342021-07-03 22:58:2722 days 19 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0x53189e25f7a76ce89ed027cb901f5524c92a77880 BNB
0x1b117006df0aef15d751a15e34ba2835ab6da9b798edfde04f8044bbcbc9e307102832342021-07-03 22:58:2722 days 19 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0x587d9bdad29c99033b2c3c93d9b4aa75e9e2b2250 BNB
0x1b117006df0aef15d751a15e34ba2835ab6da9b798edfde04f8044bbcbc9e307102832342021-07-03 22:58:2722 days 19 hrs ago 0x53189e25f7a76ce89ed027cb901f5524c92a7788 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB
0x1b117006df0aef15d751a15e34ba2835ab6da9b798edfde04f8044bbcbc9e307102832342021-07-03 22:58:2722 days 19 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0x587d9bdad29c99033b2c3c93d9b4aa75e9e2b2250 BNB
0x1b117006df0aef15d751a15e34ba2835ab6da9b798edfde04f8044bbcbc9e307102832342021-07-03 22:58:2722 days 19 hrs ago 0x53189e25f7a76ce89ed027cb901f5524c92a7788 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB
0xa5221795baa8bc815afa624dd4b452681416c712df92c5eca2b50265e6491e86102832202021-07-03 22:57:4522 days 19 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0xcf0a303b541e8ed0f256089f17f224a6ba2850700 BNB
0xa5221795baa8bc815afa624dd4b452681416c712df92c5eca2b50265e6491e86102832202021-07-03 22:57:4522 days 19 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0x587d9bdad29c99033b2c3c93d9b4aa75e9e2b2250 BNB
0xa5221795baa8bc815afa624dd4b452681416c712df92c5eca2b50265e6491e86102832202021-07-03 22:57:4522 days 19 hrs ago 0xcf0a303b541e8ed0f256089f17f224a6ba285070 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef260 BNB
0xa5221795baa8bc815afa624dd4b452681416c712df92c5eca2b50265e6491e86102832202021-07-03 22:57:4522 days 19 hrs ago 0x660e1093aa3d7cb0f6a8de172f85d0d7b010ef26 0x587d9bdad29c99033b2c3c93d9b4aa75e9e2b2250 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x5cf748d498871Ae0A807d5bE5ECd24aE709Cd24d

Contract Name:
Unitroller

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : ControllerStorage.sol
pragma solidity ^0.7.4;

import "./PriceOracle.sol";

contract UnitrollerAdminStorage {
    /**
    * @notice Administrator for this contract
    */
    address public admin;

    /**
    * @notice Pending administrator for this contract
    */
    address public pendingAdmin;

    /**
    * @notice Active brains of Unitroller
    */
    address public controllerImplementation;

    /**
    * @notice Pending brains of Unitroller
    */
    address public pendingControllerImplementation;
}

contract ControllerStorage is UnitrollerAdminStorage {
    /**
     * @notice Oracle which gives the price of any given asset
     */
    PriceOracle public oracle;

    /**
     * @notice Multiplier used to calculate the maximum repayAmount when liquidating a borrow
     */
    uint public closeFactorMantissa;

    /**
     * @notice Multiplier representing the discount on collateral that a liquidator receives
     */
    uint public liquidationIncentiveMantissa;

    /**
     * @notice Max number of assets a single account can participate in (borrow or use as collateral)
     */
    uint public maxAssets;

    /**
     * @notice Per-account mapping of "assets you are in", capped by maxAssets
     */
    mapping(address => address[]) public accountAssets;

    /// @notice isListed Whether or not this market is listed
    /**
     * @notice collateralFactorMantissa Multiplier representing the most one can borrow against their collateral in this market.
     *  For instance, 0.9 to allow borrowing 90% of collateral value.
     *  Must be between 0 and 1, and stored as a mantissa.
     */
    /// @notice accountMembership Per-market mapping of "accounts in this asset"
    /// @notice isPied Whether or not this market receives PIE
    struct Market {
        bool isListed;
        uint collateralFactorMantissa;
        mapping(address => bool) accountMembership;
        bool isPied;
    }

    /**
     * @notice Official mapping of pTokens -> Market metadata
     * @dev Used e.g. to determine if a market is supported
     */
    mapping(address => Market) public markets;

    /**
     * @notice The Pause Guardian can pause certain actions as a safety mechanism.
     *  Actions which allow users to remove their own assets cannot be paused.
     *  Liquidation / seizing / transfer can only be paused globally, not by market.
     */
    address public pauseGuardian;
    bool public _mintGuardianPaused;
    bool public _borrowGuardianPaused;
    bool public transferGuardianPaused;
    bool public seizeGuardianPaused;
    mapping(address => bool) public mintGuardianPaused;
    mapping(address => bool) public borrowGuardianPaused;

    /// @notice index The market's last updated pieBorrowIndex or pieSupplyIndex
    /// @notice block The block number the index was last updated at
    struct PieMarketState {
        uint224 index;
        uint32 block;
    }

    /// @notice A list of all markets
    address[] public allMarkets;

    /// @notice The rate at which the flywheel distributes PIE, per block
    uint public pieRate;

    /// @notice Address of the PIE token
    address public pieAddress;

    // @notice Address of the factory
    address public factory;

    /// @notice The portion of pieRate that each market currently receives
    mapping(address => uint) public pieSpeeds;

    /// @notice The PIE market supply state for each market
    mapping(address => PieMarketState) public pieSupplyState;

    /// @notice The PIE market borrow state for each market
    mapping(address => PieMarketState) public pieBorrowState;

    /// @notice The PIE borrow index for each market for each supplier as of the last time they accrued PIE
    mapping(address => mapping(address => uint)) public pieSupplierIndex;

    /// @notice The PIE borrow index for each market for each borrower as of the last time they accrued PIE
    mapping(address => mapping(address => uint)) public pieBorrowerIndex;

    /// @notice The PIE accrued but not yet transferred to each user
    mapping(address => uint) public pieAccrued;
}

File 2 of 4 : ErrorReporter.sol
pragma solidity ^0.7.4;

contract ControllerErrorReporter {
    enum Error {
        NO_ERROR,
        UNAUTHORIZED,
        CONTROLLER_MISMATCH,
        INSUFFICIENT_SHORTFALL,
        INSUFFICIENT_LIQUIDITY,
        INVALID_CLOSE_FACTOR,
        INVALID_COLLATERAL_FACTOR,
        INVALID_LIQUIDATION_INCENTIVE,
        MARKET_NOT_ENTERED, // no longer possible
        MARKET_NOT_LISTED,
        MARKET_ALREADY_LISTED,
        MATH_ERROR,
        NONZERO_BORROW_BALANCE,
        PRICE_ERROR,
        PRICE_UPDATE_ERROR,
        REJECTION,
        SNAPSHOT_ERROR,
        TOO_MANY_ASSETS,
        TOO_MUCH_REPAY
    }

    enum FailureInfo {
        ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
        ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,
        EXIT_MARKET_BALANCE_OWED,
        EXIT_MARKET_REJECTION,
        SET_CLOSE_FACTOR_OWNER_CHECK,
        SET_CLOSE_FACTOR_VALIDATION,
        SET_COLLATERAL_FACTOR_OWNER_CHECK,
        SET_COLLATERAL_FACTOR_NO_EXISTS,
        SET_COLLATERAL_FACTOR_VALIDATION,
        SET_COLLATERAL_FACTOR_WITHOUT_PRICE,
        SET_IMPLEMENTATION_OWNER_CHECK,
        SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,
        SET_LIQUIDATION_INCENTIVE_VALIDATION,
        SET_MAX_ASSETS_OWNER_CHECK,
        SET_PAUSE_GUARDIAN_OWNER_CHECK,
        SET_PENDING_ADMIN_OWNER_CHECK,
        SET_PENDING_IMPLEMENTATION_OWNER_CHECK,
        SET_PRICE_ORACLE_OWNER_CHECK,
        SUPPORT_MARKET_EXISTS,
        SUPPORT_MARKET_OWNER_CHECK
    }

    /**
      * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
      * contract-specific code that enables us to report opaque error codes from upgradeable contracts.
      **/
    event Failure(uint error, uint info, uint detail);

    /**
      * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
      */
    function fail(Error err, FailureInfo info) internal returns (uint) {
        emit Failure(uint(err), uint(info), 0);

        return uint(err);
    }

    /**
      * @dev use this when reporting an opaque error from an upgradeable collaborator contract
      */
    function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {
        emit Failure(uint(err), uint(info), opaqueError);

        return uint(err);
    }
}

contract TokenErrorReporter {
    enum Error {
        NO_ERROR,
        UNAUTHORIZED,
        BAD_INPUT,
        CONTROLLER_REJECTION,
        CONTROLLER_CALCULATION_ERROR,
        INTEREST_RATE_MODEL_ERROR,
        INVALID_ACCOUNT_PAIR,
        INVALID_CLOSE_AMOUNT_REQUESTED,
        INVALID_COLLATERAL_FACTOR,
        MATH_ERROR,
        MARKET_NOT_FRESH,
        MARKET_NOT_LISTED,
        TOKEN_INSUFFICIENT_ALLOWANCE,
        TOKEN_INSUFFICIENT_BALANCE,
        TOKEN_INSUFFICIENT_CASH,
        TOKEN_TRANSFER_IN_FAILED,
        TOKEN_TRANSFER_OUT_FAILED
    }

    /*
     * Note: FailureInfo (but not Error) is kept in alphabetical order
     *       This is because FailureInfo grows significantly faster, and
     *       the order of Error has some meaning, while the order of FailureInfo
     *       is entirely arbitrary.
     */
    enum FailureInfo {
        ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
        ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,
        ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,
        ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,
        ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,
        ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,
        ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,
        BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,
        BORROW_ACCRUE_INTEREST_FAILED,
        BORROW_CASH_NOT_AVAILABLE,
        BORROW_FRESHNESS_CHECK,
        BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,
        BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,
        BORROW_MARKET_NOT_LISTED,
        BORROW_CONTROLLER_REJECTION,
        LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,
        LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,
        LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,
        LIQUIDATE_CONTROLLER_REJECTION,
        LIQUIDATE_CONTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,
        LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,
        LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,
        LIQUIDATE_FRESHNESS_CHECK,
        LIQUIDATE_LIQUIDATOR_IS_BORROWER,
        LIQUIDATE_REPAY_BORROW_FRESH_FAILED,
        LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,
        LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,
        LIQUIDATE_SEIZE_CONTROLLER_REJECTION,
        LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,
        LIQUIDATE_SEIZE_TOO_MUCH,
        MINT_ACCRUE_INTEREST_FAILED,
        MINT_CONTROLLER_REJECTION,
        MINT_EXCHANGE_CALCULATION_FAILED,
        MINT_EXCHANGE_RATE_READ_FAILED,
        MINT_FRESHNESS_CHECK,
        MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,
        MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,
        MINT_TRANSFER_IN_FAILED,
        MINT_TRANSFER_IN_NOT_POSSIBLE,
        REDEEM_ACCRUE_INTEREST_FAILED,
        REDEEM_CONTROLLER_REJECTION,
        REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,
        REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,
        REDEEM_EXCHANGE_RATE_READ_FAILED,
        REDEEM_FRESHNESS_CHECK,
        REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,
        REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,
        REDEEM_TRANSFER_OUT_NOT_POSSIBLE,
        REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,
        REDUCE_RESERVES_ADMIN_CHECK,
        REDUCE_RESERVES_CASH_NOT_AVAILABLE,
        REDUCE_RESERVES_FRESH_CHECK,
        REDUCE_RESERVES_VALIDATION,
        REPAY_BEHALF_ACCRUE_INTEREST_FAILED,
        REPAY_BORROW_ACCRUE_INTEREST_FAILED,
        REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,
        REPAY_BORROW_CONTROLLER_REJECTION,
        REPAY_BORROW_FRESHNESS_CHECK,
        REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,
        REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,
        REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,
        SET_COLLATERAL_FACTOR_OWNER_CHECK,
        SET_COLLATERAL_FACTOR_VALIDATION,
        SET_CONTROLLER_OWNER_CHECK,
        SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,
        SET_INTEREST_RATE_MODEL_FRESH_CHECK,
        SET_INTEREST_RATE_MODEL_OWNER_CHECK,
        SET_MAX_ASSETS_OWNER_CHECK,
        SET_ORACLE_MARKET_NOT_LISTED,
        SET_PENDING_ADMIN_OWNER_CHECK,
        SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,
        SET_RESERVE_FACTOR_ADMIN_CHECK,
        SET_RESERVE_FACTOR_FRESH_CHECK,
        SET_RESERVE_FACTOR_BOUNDS_CHECK,
        TRANSFER_CONTROLLER_REJECTION,
        TRANSFER_NOT_ALLOWED,
        TRANSFER_NOT_ENOUGH,
        TRANSFER_TOO_MUCH,
        ADD_RESERVES_ACCRUE_INTEREST_FAILED,
        ADD_RESERVES_FRESH_CHECK,
        ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,
        SET_NEW_IMPLEMENTATION
    }

    /**
      * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
      * contract-specific code that enables us to report opaque error codes from upgradeable contracts.
      **/
    event Failure(uint error, uint info, uint detail);

    /**
      * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
      */
    function fail(Error err, FailureInfo info) internal returns (uint) {
        emit Failure(uint(err), uint(info), 0);

        return uint(err);
    }

    /**
      * @dev use this when reporting an opaque error from an upgradeable collaborator contract
      */
    function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {
        emit Failure(uint(err), uint(info), opaqueError);

        return uint(err);
    }
}

contract OracleErrorReporter {
    enum Error {
        NO_ERROR,
        UNAUTHORIZED,
        UPDATE_PRICE
    }

    enum FailureInfo {
        ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
        NO_RESERVES,
        PERIOD_NOT_ELAPSED,
        SET_NEW_ADDRESSES,
        SET_NEW_IMPLEMENTATION,
        SET_PENDING_ADMIN_OWNER_CHECK
    }

    /**
      * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
      * contract-specific code that enables us to report opaque error codes from upgradeable contracts.
      **/
    event Failure(uint error, uint info, uint detail);

    /**
      * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
      */
    function fail(Error err, FailureInfo info) internal returns (uint) {
        emit Failure(uint(err), uint(info), 0);

        return uint(err);
    }
}

contract FactoryErrorReporter {
    enum Error {
        NO_ERROR,
        INVALID_POOL,
        MARKET_NOT_LISTED,
        UNAUTHORIZED
    }

    enum FailureInfo {
        ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
        CREATE_PETH_POOL,
        CREATE_PPIE_POOL,
        DEFICIENCY_ETH_LIQUIDITY_IN_POOL,
        PAIR_IS_NOT_EXIST,
        SET_MIN_LIQUIDITY_OWNER_CHECK,
        SET_NEW_CONTROLLER,
        SET_NEW_DECIMALS,
        SET_NEW_EXCHANGE_RATE,
        SET_NEW_IMPLEMENTATION,
        SET_NEW_INTEREST_RATE_MODEL,
        SET_NEW_ORACLE,
        SET_NEW_RESERVE_FACTOR,
        SET_PENDING_ADMIN_OWNER_CHECK,
        SUPPORT_MARKET_BAD_RESULT
    }

    /**
      * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
      * contract-specific code that enables us to report opaque error codes from upgradeable contracts.
      **/
    event Failure(uint error, uint info, uint detail);

    /**
      * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
      */
    function fail(Error err, FailureInfo info) internal returns (uint) {
        emit Failure(uint(err), uint(info), 0);

        return uint(err);
    }
}

contract RegistryErrorReporter {
    enum Error {
        NO_ERROR,
        UNAUTHORIZED
    }

    enum FailureInfo {
        ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
        SET_NEW_IMPLEMENTATION,
        SET_PENDING_ADMIN_OWNER_CHECK,
        SET_NEW_FACTORY
    }

    /**
      * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
      * contract-specific code that enables us to report opaque error codes from upgradeable contracts.
      **/
    event Failure(uint error, uint info, uint detail);

    /**
      * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
      */
    function fail(Error err, FailureInfo info) internal returns (uint) {
        emit Failure(uint(err), uint(info), 0);

        return uint(err);
    }
}

File 3 of 4 : PriceOracle.sol
pragma solidity ^0.7.4;

abstract contract PriceOracle {
    /// @notice Indicator that this is a PriceOracle contract (for inspection)
    bool public constant isPriceOracle = true;

    event PriceUpdated(address asset, uint price);

    /**
      * @notice Get the underlying price of a pToken asset
      * @param pToken The pToken to get the underlying price of
      * @return The underlying asset price mantissa (scaled by 1e18).
      *  Zero means the price is unavailable.
      */
    function getUnderlyingPrice(address pToken) external view virtual returns (uint);

    function updateUnderlyingPrice(address pToken) external virtual returns (uint);
}

File 4 of 4 : Unitroller.sol
pragma solidity ^0.7.4;

import "./ErrorReporter.sol";
import "./ControllerStorage.sol";
/**
 * @title ControllerCore
 * @dev Storage for the controller is at this address, while execution is delegated to the `controllerImplementation`.
 * PTokens should reference this contract as their controller.
 */
contract Unitroller is UnitrollerAdminStorage, ControllerErrorReporter {

    /**
      * @notice Emitted when pendingControllerImplementation is changed
      */
    event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);

    /**
      * @notice Emitted when pendingControllerImplementation is accepted, which means controller implementation is updated
      */
    event NewImplementation(address oldImplementation, address newImplementation);

    /**
      * @notice Emitted when pendingAdmin is changed
      */
    event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);

    /**
      * @notice Emitted when pendingAdmin is accepted, which means admin is updated
      */
    event NewAdmin(address oldAdmin, address newAdmin);

    constructor() {
        // Set admin to caller
        admin = msg.sender;
    }

    /*** Admin Functions ***/
    function _setPendingImplementation(address newPendingImplementation) public returns (uint) {

        if (msg.sender != admin) {
            return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);
        }

        address oldPendingImplementation = pendingControllerImplementation;

        pendingControllerImplementation = newPendingImplementation;

        emit NewPendingImplementation(oldPendingImplementation, pendingControllerImplementation);

        return uint(Error.NO_ERROR);
    }

    /**
    * @notice Accepts new implementation of controller. msg.sender must be pendingImplementation
    * @dev Admin function for new implementation to accept it's role as implementation
    * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
    */
    function _acceptImplementation() public returns (uint) {
        // Check caller is pendingImplementation and pendingImplementation ≠ address(0)
        if (msg.sender != pendingControllerImplementation || pendingControllerImplementation == address(0)) {
            return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);
        }

        // Save current values for inclusion in log
        address oldImplementation = controllerImplementation;
        address oldPendingImplementation = pendingControllerImplementation;

        controllerImplementation = pendingControllerImplementation;

        pendingControllerImplementation = address(0);

        emit NewImplementation(oldImplementation, controllerImplementation);
        emit NewPendingImplementation(oldPendingImplementation, pendingControllerImplementation);

        return uint(Error.NO_ERROR);
    }


    /**
      * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.
      * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.
      * @param newPendingAdmin New pending admin.
      * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
      */
    function _setPendingAdmin(address newPendingAdmin) public returns (uint) {
        // Check caller = admin
        if (msg.sender != admin) {
            return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);
        }

        // Save current value, if any, for inclusion in log
        address oldPendingAdmin = pendingAdmin;

        // Store pendingAdmin with value newPendingAdmin
        pendingAdmin = newPendingAdmin;

        // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)
        emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);

        return uint(Error.NO_ERROR);
    }

    /**
      * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin
      * @dev Admin function for pending admin to accept role and update admin
      * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
      */
    function _acceptAdmin() public returns (uint) {
        // Check caller is pendingAdmin
        if (msg.sender != pendingAdmin) {
            return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);
        }

        // Save current values for inclusion in log
        address oldAdmin = admin;
        address oldPendingAdmin = pendingAdmin;

        // Store admin with value pendingAdmin
        admin = pendingAdmin;

        // Clear the pending value
        pendingAdmin = address(0);

        emit NewAdmin(oldAdmin, admin);
        emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);

        return uint(Error.NO_ERROR);
    }

    /**
     * @dev Delegates execution to an implementation contract.
     * It returns to the external caller whatever the implementation returns
     * or forwards reverts.
     */
    fallback() payable external {
        // delegate all other functions to current implementation
        (bool success, ) = controllerImplementation.delegatecall(msg.data);

        assembly {
        let free_mem_ptr := mload(0x40)
            returndatacopy(free_mem_ptr, 0, returndatasize())

            switch success
            case 0 { revert(free_mem_ptr, returndatasize()) }
            default { return(free_mem_ptr, returndatasize()) }
        }
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"error","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"info","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"detail","type":"uint256"}],"name":"Failure","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"NewAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldImplementation","type":"address"},{"indexed":false,"internalType":"address","name":"newImplementation","type":"address"}],"name":"NewImplementation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldPendingAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newPendingAdmin","type":"address"}],"name":"NewPendingAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldPendingImplementation","type":"address"},{"indexed":false,"internalType":"address","name":"newPendingImplementation","type":"address"}],"name":"NewPendingImplementation","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"_acceptAdmin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"_acceptImplementation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPendingAdmin","type":"address"}],"name":"_setPendingAdmin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPendingImplementation","type":"address"}],"name":"_setPendingImplementation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"controllerImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingControllerImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50600080546001600160a01b031916331790556105da806100326000396000f3fe60806040526004361061007b5760003560e01c8063c1e803341161004e578063c1e803341461019e578063e992a041146101b3578063e9c714f2146101e6578063f851a440146101fb5761007b565b806326782247146100fe5780638e6c09591461012f5780639788e73114610144578063b71d1a0c14610159575b6002546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d80600081146100de576040519150601f19603f3d011682016040523d82523d6000602084013e6100e3565b606091505b505090506040513d6000823e8180156100fa573d82f35b3d82fd5b34801561010a57600080fd5b50610113610210565b604080516001600160a01b039092168252519081900360200190f35b34801561013b57600080fd5b5061011361021f565b34801561015057600080fd5b5061011361022e565b34801561016557600080fd5b5061018c6004803603602081101561017c57600080fd5b50356001600160a01b031661023d565b60408051918252519081900360200190f35b3480156101aa57600080fd5b5061018c6102ce565b3480156101bf57600080fd5b5061018c600480360360208110156101d657600080fd5b50356001600160a01b03166103c9565b3480156101f257600080fd5b5061018c61044d565b34801561020757600080fd5b50610113610528565b6001546001600160a01b031681565b6002546001600160a01b031681565b6003546001600160a01b031681565b600080546001600160a01b031633146102635761025c6001600f610537565b90506102c9565b600180546001600160a01b038481166001600160a01b0319831681179093556040805191909216808252602082019390935281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a160005b9150505b919050565b6003546000906001600160a01b0316331415806102f457506003546001600160a01b0316155b1561030b57610304600180610537565b90506103c6565b60028054600380546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a92908290030190a1600354604080516001600160a01b038085168252909216602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a160005b925050505b90565b600080546001600160a01b031633146103e85761025c60016010610537565b600380546001600160a01b038481166001600160a01b0319831617928390556040805192821680845293909116602083015280517fe945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d8159281900390910190a160006102c5565b6001546000906001600160a01b0316331461046e5761030460016000610537565b60008054600180546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92908290030190a1600154604080516001600160a01b038085168252909216602083015280517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a99281900390910190a160006103c1565b6000546001600160a01b031681565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa083601281111561056657fe5b83601381111561057257fe5b604080519283526020830191909152600082820152519081900360600190a182601281111561059d57fe5b939250505056fea264697066735822122058f4d199b5e521172e0cf3f3696dcaf0e253985f5e1c8d70793f14b0c492a55d64736f6c63430007060033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading