CRO Price: $0.08 (+1.52%)

Contract

0x47e5229d46A11A25FF5dCa210DF57d62345dEcf1
Transaction Hash
Method
Block
From
To
Mint157850232024-09-13 2:48:1835 hrs ago1726195698IN
0x47e5229d...2345dEcf1
0 CRO1.25799545,050
Borrow157780362024-09-12 15:49:3646 hrs ago1726156176IN
0x47e5229d...2345dEcf1
0 CRO3.509553055,050
Mint157680512024-09-12 0:06:502 days ago1726099610IN
0x47e5229d...2345dEcf1
0 CRO1.25799545,050
Approve157377172024-09-10 0:29:404 days ago1725928180IN
0x47e5229d...2345dEcf1
0 CRO0.264271555,050
Mint157376752024-09-10 0:25:454 days ago1725927945IN
0x47e5229d...2345dEcf1
0 CRO1.25793485,050
Borrow157237002024-09-09 2:31:115 days ago1725849071IN
0x47e5229d...2345dEcf1
0 CRO4.029460655,050
Mint157151292024-09-08 13:05:136 days ago1725800713IN
0x47e5229d...2345dEcf1
0 CRO1.25793485,050
Mint157110392024-09-08 6:41:246 days ago1725777684IN
0x47e5229d...2345dEcf1
0 CRO1.25793485,050
Repay Borrow156894492024-09-06 20:53:417 days ago1725656021IN
0x47e5229d...2345dEcf1
0 CRO1.1922045,050
Repay Borrow156879072024-09-06 18:28:417 days ago1725647321IN
0x47e5229d...2345dEcf1
0 CRO1.1922045,050
Repay Borrow156813742024-09-06 8:14:068 days ago1725610446IN
0x47e5229d...2345dEcf1
0 CRO1.277514075,045.63365
Repay Borrow156750832024-09-05 22:22:148 days ago1725574934IN
0x47e5229d...2345dEcf1
0 CRO1.1922045,050
Mint156736842024-09-05 20:11:038 days ago1725567063IN
0x47e5229d...2345dEcf1
0 CRO1.343981755,050
Repay Borrow156707482024-09-05 15:35:268 days ago1725550526IN
0x47e5229d...2345dEcf1
0 CRO1.1922045,050
Borrow156694672024-09-05 13:35:189 days ago1725543318IN
0x47e5229d...2345dEcf1
0 CRO3.16628945,050
Mint156679592024-09-05 11:13:389 days ago1725534818IN
0x47e5229d...2345dEcf1
0 CRO1.604895055,050
Redeem Underlyin...156309612024-09-03 1:14:4111 days ago1725326081IN
0x47e5229d...2345dEcf1
0 CRO4.03675795,050
Repay Borrow156088212024-09-01 14:24:0912 days ago1725200649IN
0x47e5229d...2345dEcf1
0 CRO1.1922045,050
Mint156060062024-09-01 9:58:5313 days ago1725184733IN
0x47e5229d...2345dEcf1
0 CRO1.25793485,050
Repay Borrow155936402024-08-31 14:32:5613 days ago1725114776IN
0x47e5229d...2345dEcf1
0 CRO1.265737055,050
Mint155818772024-08-30 20:04:2614 days ago1725048266IN
0x47e5229d...2345dEcf1
0 CRO1.431694015,048.5
Borrow155564002024-08-29 3:57:0216 days ago1724903822IN
0x47e5229d...2345dEcf1
0 CRO3.80201375,050
Borrow155531392024-08-28 22:48:4516 days ago1724885325IN
0x47e5229d...2345dEcf1
0 CRO3.836116355,050
Borrow155517932024-08-28 20:41:2916 days ago1724877689IN
0x47e5229d...2345dEcf1
0 CRO4.38222845,050
Mint155029732024-08-25 15:53:0719 days ago1724601187IN
0x47e5229d...2345dEcf1
0 CRO1.25793485,050
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TErc20Delegator

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 10 runs

Other Settings:
default evmVersion
File 1 of 5 : TErc20Delegator.sol
pragma solidity ^0.5.16;

import "./TTokenInterfaces.sol";

/**
 * @title Tectonic's TErc20Delegator Contract
 * @notice TTokens which wrap an EIP-20 underlying and delegate to an implementation
 * @author Tectonic
 */
contract TErc20Delegator is TTokenInterface, TErc20Interface, TDelegatorInterface {
    /**
     * @notice Construct a new money market
     * @param underlying_ The address of the underlying asset
     * @param tcore_ The address of the TectonicCore
     * @param interestRateModel_ The address of the interest rate model
     * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18
     * @param name_ ERC-20 name of this token
     * @param symbol_ ERC-20 symbol of this token
     * @param decimals_ ERC-20 decimal precision of this token
     * @param admin_ Address of the administrator of this token
     * @param implementation_ The address of the implementation the contract delegates to
     * @param becomeImplementationData The encoded args for becomeImplementation
     */
    constructor(address underlying_,
                TectonicCoreInterface tcore_,
                InterestRateModel interestRateModel_,
                uint initialExchangeRateMantissa_,
                string memory name_,
                string memory symbol_,
                uint8 decimals_,
                address payable admin_,
                address implementation_,
                bytes memory becomeImplementationData) public {
        // Creator of the contract is admin during initialization
        admin = msg.sender;

        // First delegate gets to initialize the delegator (i.e. storage contract)
        delegateTo(implementation_, abi.encodeWithSignature("initialize(address,address,address,uint256,string,string,uint8)",
                                                            underlying_,
                                                            tcore_,
                                                            interestRateModel_,
                                                            initialExchangeRateMantissa_,
                                                            name_,
                                                            symbol_,
                                                            decimals_));

        // New implementations always get set via the settor (post-initialize)
        _setImplementation(implementation_, false, becomeImplementationData);

        // Set the proper admin now that initialization is done
        admin = admin_;
    }

    /**
     * @notice Called by the admin to update the implementation of the delegator
     * @param implementation_ The address of the new implementation for delegation
     * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation
     * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation
     */
    function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public {
        require(msg.sender == admin, "TErc20Delegator::_setImplementation: Caller must be admin");

        if (allowResign) {
            delegateToImplementation(abi.encodeWithSignature("_resignImplementation()"));
        }

        address oldImplementation = implementation;
        implementation = implementation_;

        delegateToImplementation(abi.encodeWithSignature("_becomeImplementation(bytes)", becomeImplementationData));

        emit NewImplementation(oldImplementation, implementation);
    }

    /**
     * @notice Sender supplies assets into the market and receives tTokens in exchange
     * @dev Accrues interest whether or not the operation succeeds, unless reverted
     * @param mintAmount The amount of the underlying asset to supply
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function mint(uint mintAmount) external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("mint(uint256)", mintAmount));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Sender redeems tTokens in exchange for the underlying asset
     * @dev Accrues interest whether or not the operation succeeds, unless reverted
     * @param redeemTokens The number of tTokens to redeem into underlying
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function redeem(uint redeemTokens) external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("redeem(uint256)", redeemTokens));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Sender redeems tTokens in exchange for a specified amount of underlying asset
     * @dev Accrues interest whether or not the operation succeeds, unless reverted
     * @param redeemAmount The amount of underlying to redeem
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function redeemUnderlying(uint redeemAmount) external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("redeemUnderlying(uint256)", redeemAmount));
        return abi.decode(data, (uint));
    }

    /**
      * @notice Sender borrows assets from the protocol to their own address
      * @param borrowAmount The amount of the underlying asset to borrow
      * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
      */
    function borrow(uint borrowAmount) external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("borrow(uint256)", borrowAmount));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Sender repays their own borrow
     * @param repayAmount The amount to repay
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function repayBorrow(uint repayAmount) external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("repayBorrow(uint256)", repayAmount));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Sender repays a borrow belonging to borrower
     * @param borrower the account with the debt being payed off
     * @param repayAmount The amount to repay
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("repayBorrowBehalf(address,uint256)", borrower, repayAmount));
        return abi.decode(data, (uint));
    }

    /**
     * @notice The sender liquidates the borrowers collateral.
     *  The collateral seized is transferred to the liquidator.
     * @param borrower The borrower of this tToken to be liquidated
     * @param tTokenCollateral The market in which to seize collateral from the borrower
     * @param repayAmount The amount of the underlying borrowed asset to repay
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function liquidateBorrow(address borrower, uint repayAmount, TTokenInterface tTokenCollateral) external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("liquidateBorrow(address,uint256,address)", borrower, repayAmount, tTokenCollateral));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Transfer `amount` tokens from `msg.sender` to `dst`
     * @param dst The address of the destination account
     * @param amount The number of tokens to transfer
     * @return Whether or not the transfer succeeded
     */
    function transfer(address dst, uint amount) external returns (bool) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("transfer(address,uint256)", dst, amount));
        return abi.decode(data, (bool));
    }

    /**
     * @notice Transfer `amount` tokens from `src` to `dst`
     * @param src The address of the source account
     * @param dst The address of the destination account
     * @param amount The number of tokens to transfer
     * @return Whether or not the transfer succeeded
     */
    function transferFrom(address src, address dst, uint256 amount) external returns (bool) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("transferFrom(address,address,uint256)", src, dst, amount));
        return abi.decode(data, (bool));
    }

    /**
     * @notice Approve `spender` to transfer up to `amount` from `src`
     * @dev This will overwrite the approval amount for `spender`
     *  and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
     * @param spender The address of the account which may transfer tokens
     * @param amount The number of tokens that are approved (-1 means infinite)
     * @return Whether or not the approval succeeded
     */
    function approve(address spender, uint256 amount) external returns (bool) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("approve(address,uint256)", spender, amount));
        return abi.decode(data, (bool));
    }

    /**
     * @notice Get the current allowance from `owner` for `spender`
     * @param owner The address of the account which owns the tokens to be spent
     * @param spender The address of the account which may transfer tokens
     * @return The number of tokens allowed to be spent (-1 means infinite)
     */
    function allowance(address owner, address spender) external view returns (uint) {
        bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("allowance(address,address)", owner, spender));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Get the token balance of the `owner`
     * @param owner The address of the account to query
     * @return The number of tokens owned by `owner`
     */
    function balanceOf(address owner) external view returns (uint) {
        bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("balanceOf(address)", owner));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Get the underlying balance of the `owner`
     * @dev This also accrues interest in a transaction
     * @param owner The address of the account to query
     * @return The amount of underlying owned by `owner`
     */
    function balanceOfUnderlying(address owner) external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("balanceOfUnderlying(address)", owner));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Get a snapshot of the account's balances, and the cached exchange rate
     * @dev This is used by tectonicCore to more efficiently perform liquidity checks.
     * @param account Address of the account to snapshot
     * @return (possible error, token balance, borrow balance, exchange rate mantissa)
     */
    function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {
        bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("getAccountSnapshot(address)", account));
        return abi.decode(data, (uint, uint, uint, uint));
    }

    /**
     * @notice Returns the current per-block borrow interest rate for this tToken
     * @return The borrow interest rate per block, scaled by 1e18
     */
    function borrowRatePerBlock() external view returns (uint) {
        bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("borrowRatePerBlock()"));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Returns the current per-block supply interest rate for this tToken
     * @return The supply interest rate per block, scaled by 1e18
     */
    function supplyRatePerBlock() external view returns (uint) {
        bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("supplyRatePerBlock()"));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Returns the current total borrows plus accrued interest
     * @return The total borrows with interest
     */
    function totalBorrowsCurrent() external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("totalBorrowsCurrent()"));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex
     * @param account The address whose balance should be calculated after updating borrowIndex
     * @return The calculated balance
     */
    function borrowBalanceCurrent(address account) external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("borrowBalanceCurrent(address)", account));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Return the borrow balance of account based on stored data
     * @param account The address whose balance should be calculated
     * @return The calculated balance
     */
    function borrowBalanceStored(address account) public view returns (uint) {
        bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("borrowBalanceStored(address)", account));
        return abi.decode(data, (uint));
    }

   /**
     * @notice Accrue interest then return the up-to-date exchange rate
     * @return Calculated exchange rate scaled by 1e18
     */
    function exchangeRateCurrent() public returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("exchangeRateCurrent()"));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Calculates the exchange rate from the underlying to the TToken
     * @dev This function does not accrue interest before calculating the exchange rate
     * @return Calculated exchange rate scaled by 1e18
     */
    function exchangeRateStored() public view returns (uint) {
        bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("exchangeRateStored()"));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Get cash balance of this tToken in the underlying asset
     * @return The quantity of underlying asset owned by this contract
     */
    function getCash() external view returns (uint) {
        bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("getCash()"));
        return abi.decode(data, (uint));
    }

    /**
      * @notice Applies accrued interest to total borrows and reserves.
      * @dev This calculates interest accrued from the last checkpointed block
      *      up to the current block and writes new checkpoint to storage.
      */
    function accrueInterest() public returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("accrueInterest()"));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Transfers collateral tokens (this market) to the liquidator.
     * @dev Will fail unless called by another tToken during the process of liquidation.
     *  Its absolutely critical to use msg.sender as the borrowed tToken and not a parameter.
     * @param liquidator The account receiving seized collateral
     * @param borrower The account having collateral seized
     * @param seizeTokens The number of tTokens to seize
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("seize(address,address,uint256)", liquidator, borrower, seizeTokens));
        return abi.decode(data, (uint));
    }

    /**
     * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to admin (timelock)
     * @param token The address of the ERC-20 token to sweep
     */
    function sweepToken(EIP20NonStandardInterface token) external {
        delegateToImplementation(abi.encodeWithSignature("sweepToken(address)", token));
    }


    /*** Admin Functions ***/

    /**
      * @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 payable newPendingAdmin) external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setPendingAdmin(address)", newPendingAdmin));
        return abi.decode(data, (uint));
    }

    /**
      * @notice Sets a new tectonicCore for the market
      * @dev Admin function to set a new tectonicCore
      * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
      */
    function _setTectonicCore(TectonicCoreInterface newTectonicCore) public returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setTectonicCore(address)", newTectonicCore));
        return abi.decode(data, (uint));
    }

    /**
      * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh
      * @dev Admin function to accrue interest and set a new reserve factor
      * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
      */
    function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setReserveFactor(uint256)", newReserveFactorMantissa));
        return abi.decode(data, (uint));
    }

    /**
      * @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() external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("_acceptAdmin()"));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Accrues interest and adds reserves by transferring from admin
     * @param addAmount Amount of reserves to add
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function _addReserves(uint addAmount) external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("_addReserves(uint256)", addAmount));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Accrues interest and reduces reserves by transferring to admin
     * @param reduceAmount Amount of reduction to reserves
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function _reduceReserves(uint reduceAmount) external returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("_reduceReserves(uint256)", reduceAmount));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh
     * @dev Admin function to accrue interest and update the interest rate model
     * @param newInterestRateModel the new interest rate model to use
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) {
        bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setInterestRateModel(address)", newInterestRateModel));
        return abi.decode(data, (uint));
    }

    /**
     * @notice Internal method to delegate execution to another contract
     * @dev It returns to the external caller whatever the implementation returns or forwards reverts
     * @param callee The contract to delegatecall
     * @param data The raw data to delegatecall
     * @return The returned bytes from the delegatecall
     */
    function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returnData) = callee.delegatecall(data);
        assembly {
            if eq(success, 0) {
                revert(add(returnData, 0x20), returndatasize)
            }
        }
        return returnData;
    }

    /**
     * @notice Delegates execution to the implementation contract
     * @dev It returns to the external caller whatever the implementation returns or forwards reverts
     * @param data The raw data to delegatecall
     * @return The returned bytes from the delegatecall
     */
    function delegateToImplementation(bytes memory data) public returns (bytes memory) {
        return delegateTo(implementation, data);
    }

    /**
     * @notice Delegates execution to an implementation contract
     * @dev It returns to the external caller whatever the implementation returns or forwards reverts
     *  There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.
     * @param data The raw data to delegatecall
     * @return The returned bytes from the delegatecall
     */
    function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {
        (bool success, bytes memory returnData) = address(this).staticcall(abi.encodeWithSignature("delegateToImplementation(bytes)", data));
        assembly {
            if eq(success, 0) {
                revert(add(returnData, 0x20), returndatasize)
            }
        }
        return abi.decode(returnData, (bytes));
    }

    /**
     * @notice Delegates execution to an implementation contract
     * @dev It returns to the external caller whatever the implementation returns or forwards reverts
     */
    function () external payable {
        require(msg.value == 0,"TErc20Delegator:fallback: cannot send value to fallback");

        // delegate all other functions to current implementation
        (bool success, ) = implementation.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) }
        }
    }
}

File 2 of 5 : TTokenInterfaces.sol
pragma solidity ^0.5.16;

import "./Interfaces/EIP20NonStandardInterface.sol";
import "./TectonicCoreInterface.sol";
import "./InterestModels/InterestRateModel.sol";

contract TTokenStorage {
    /**
     * @dev Guard variable for re-entrancy checks
     */
    bool internal _notEntered;

    /**
     * @notice EIP-20 token name for this token
     */
    string public name;

    /**
     * @notice EIP-20 token symbol for this token
     */
    string public symbol;

    /**
     * @notice EIP-20 token decimals for this token
     */
    uint8 public decimals;

    /**
     * @notice Maximum borrow rate that can ever be applied (.0005% / block)
     */

    uint internal constant borrowRateMaxMantissa = 0.0005e16;

    /**
     * @notice Maximum fraction of interest that can be set aside for reserves
     */
    uint internal constant reserveFactorMaxMantissa = 1e18;

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

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

    /**
     * @notice Contract which oversees inter-tToken operations
     */
    TectonicCoreInterface public tectonicCore;

    /**
     * @notice Model which tells what the current interest rate should be
     */
    InterestRateModel public interestRateModel;

    /**
     * @notice Initial exchange rate used when minting the first TTokens (used when totalSupply = 0)
     */
    uint internal initialExchangeRateMantissa;

    /**
     * @notice Fraction of interest currently set aside for reserves
     */
    uint public reserveFactorMantissa;

    /**
     * @notice Block number that interest was last accrued at
     */
    uint public accrualBlockNumber;

    /**
     * @notice Accumulator of the total earned interest rate since the opening of the market
     */
    uint public borrowIndex;

    /**
     * @notice Total amount of outstanding borrows of the underlying in this market
     */
    uint public totalBorrows;

    /**
     * @notice Total amount of reserves of the underlying held in this market
     */
    uint public totalReserves;

    /**
     * @notice Total number of tokens in circulation
     */
    uint public totalSupply;

    /**
     * @notice Official record of token balances for each account
     */
    mapping (address => uint) internal accountTokens;

    /**
     * @notice Approved token transfer amounts on behalf of others
     */
    mapping (address => mapping (address => uint)) internal transferAllowances;

    /**
     * @notice Container for borrow balance information
     * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action
     * @member interestIndex Global borrowIndex as of the most recent balance-changing action
     */
    struct BorrowSnapshot {
        uint principal;
        uint interestIndex;
    }

    /**
     * @notice Mapping of account addresses to outstanding borrow balances
     */
    mapping(address => BorrowSnapshot) internal accountBorrows;

    /**
     * @notice Share of seized collateral that is added to reserves
     */
    uint public constant protocolSeizeShareMantissa = 2.8e16; //2.8%

}

contract TTokenInterface is TTokenStorage {
    /**
     * @notice Indicator that this is a TToken contract (for inspection)
     */
    bool public constant isTToken = true;


    /*** Market Events ***/

    /**
     * @notice Event emitted when interest is accrued
     */
    event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);

    /**
     * @notice Event emitted when tokens are minted
     */
    event Mint(address minter, uint mintAmount, uint mintTokens);

    /**
     * @notice Event emitted when tokens are redeemed
     */
    event Redeem(address redeemer, uint redeemAmount, uint redeemTokens);

    /**
     * @notice Event emitted when underlying is borrowed
     */
    event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);

    /**
     * @notice Event emitted when a borrow is repaid
     */
    event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);

    /**
     * @notice Event emitted when a borrow is repaid
     */
    event RepayBorrowWithTToken(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows, uint accountTokens);

    /**
     * @notice Event emitted when a borrow is liquidated
     */
    event LiquidateBorrow(address liquidator, address borrower, uint repayAmount, address tTokenCollateral, uint seizeTokens);


    /*** Admin Events ***/

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

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

    /**
     * @notice Event emitted when tectonicCore is changed
     */
    event NewTectonicCore(TectonicCoreInterface oldTectonicCore, TectonicCoreInterface newTectonicCore);

    /**
     * @notice Event emitted when interestRateModel is changed
     */
    event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);

    /**
     * @notice Event emitted when the reserve factor is changed
     */
    event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);

    /**
     * @notice Event emitted when the reserves are added
     */
    event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);

    /**
     * @notice Event emitted when the reserves are reduced
     */
    event ReservesReduced(address admin, uint reduceAmount, uint newTotalReserves);

    /**
     * @notice EIP20 Transfer event
     */
    event Transfer(address indexed from, address indexed to, uint amount);

    /**
     * @notice EIP20 Approval event
     */
    event Approval(address indexed owner, address indexed spender, uint amount);

    /**
     * @notice Failure event
     */
    event Failure(uint error, uint info, uint detail);


    /*** User Interface ***/

    function transfer(address dst, uint amount) external returns (bool);
    function transferFrom(address src, address dst, uint amount) external returns (bool);
    function approve(address spender, uint amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function balanceOfUnderlying(address owner) external returns (uint);
    function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);
    function borrowRatePerBlock() external view returns (uint);
    function supplyRatePerBlock() external view returns (uint);
    function totalBorrowsCurrent() external returns (uint);
    function borrowBalanceCurrent(address account) external returns (uint);
    function borrowBalanceStored(address account) public view returns (uint);
    function exchangeRateCurrent() public returns (uint);
    function exchangeRateStored() public view returns (uint);
    function getCash() external view returns (uint);
    function accrueInterest() public returns (uint);
    function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);


    /*** Admin Functions ***/

    function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);
    function _acceptAdmin() external returns (uint);
    function _setTectonicCore(TectonicCoreInterface newTectonicCore) public returns (uint);
    function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);
    function _reduceReserves(uint reduceAmount) external returns (uint);
    function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);
}

contract TErc20Storage {
    /**
     * @notice Underlying asset for this TToken
     */
    address public underlying;

    /**
     * @notice Implementation address for this contract
     */
    address public implementation;

    /**
     * @notice address of deferLiquidityCheck adapter
     */
    address public deferLiquidityCheckAdapterAddress;
}

contract TErc20Interface is TErc20Storage {

    /*** User Interface ***/

    function mint(uint mintAmount) external returns (uint);
    function redeem(uint redeemTokens) external returns (uint);
    function redeemUnderlying(uint redeemAmount) external returns (uint);
    function borrow(uint borrowAmount) external returns (uint);
    function repayBorrow(uint repayAmount) external returns (uint);
    function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);
    function liquidateBorrow(address borrower, uint repayAmount, TTokenInterface tTokenCollateral) external returns (uint);
    function sweepToken(EIP20NonStandardInterface token) external;


    /*** Admin Functions ***/

    function _addReserves(uint addAmount) external returns (uint);
}

contract TDelegatorInterface {
    /**
     * @notice Emitted when implementation is changed
     */
    event NewImplementation(address oldImplementation, address newImplementation);

    /**
     * @notice Called by the admin to update the implementation of the delegator
     * @param implementation_ The address of the new implementation for delegation
     * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation
     * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation
     */
    function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public;
}

contract TDelegateInterface {
    /**
     * @notice Called by the delegator on a delegate to initialize it for duty
     * @dev Should revert if any issues arise which make it unfit for delegation
     * @param data The encoded bytes data for any initialization
     */
    function _becomeImplementation(bytes memory data) public;

    /**
     * @notice Called by the delegator on a delegate to forfeit its responsibility
     */
    function _resignImplementation() public;
}

File 3 of 5 : EIP20NonStandardInterface.sol
pragma solidity ^0.5.16;

/**
 * @title EIP20NonStandardInterface
 * @dev Version of ERC20 with no return values for `transfer` and `transferFrom`
 *  See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca
 */
interface EIP20NonStandardInterface {

    /**
     * @notice Get the total number of tokens in circulation
     * @return The supply of tokens
     */
    function totalSupply() external view returns (uint256);

    /**
     * @notice Gets the balance of the specified address
     * @param owner The address from which the balance will be retrieved
     * @return The balance
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    ///
    /// !!!!!!!!!!!!!!
    /// !!! NOTICE !!! `transfer` does not return a value, in violation of the ERC-20 specification
    /// !!!!!!!!!!!!!!
    ///

    /**
      * @notice Transfer `amount` tokens from `msg.sender` to `dst`
      * @param dst The address of the destination account
      * @param amount The number of tokens to transfer
      */
    function transfer(address dst, uint256 amount) external;

    ///
    /// !!!!!!!!!!!!!!
    /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the ERC-20 specification
    /// !!!!!!!!!!!!!!
    ///

    /**
      * @notice Transfer `amount` tokens from `src` to `dst`
      * @param src The address of the source account
      * @param dst The address of the destination account
      * @param amount The number of tokens to transfer
      */
    function transferFrom(address src, address dst, uint256 amount) external;

    /**
      * @notice Approve `spender` to transfer up to `amount` from `src`
      * @dev This will overwrite the approval amount for `spender`
      *  and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
      * @param spender The address of the account which may transfer tokens
      * @param amount The number of tokens that are approved
      * @return Whether or not the approval succeeded
      */
    function approve(address spender, uint256 amount) external returns (bool success);

    /**
      * @notice Get the current allowance from `owner` for `spender`
      * @param owner The address of the account which owns the tokens to be spent
      * @param spender The address of the account which may transfer tokens
      * @return The number of tokens allowed to be spent
      */
    function allowance(address owner, address spender) external view returns (uint256 remaining);

    event Transfer(address indexed from, address indexed to, uint256 amount);
    event Approval(address indexed owner, address indexed spender, uint256 amount);
}

File 4 of 5 : TectonicCoreInterface.sol
pragma solidity ^0.5.16;

contract TectonicCoreInterface {
    /// @notice Indicator that this is a TectonicCore contract (for inspection)
    bool public constant isTectonicCore = true;

    /*** Assets You Are In ***/

    function enterMarkets(address[] calldata tTokens) external returns (uint[] memory);
    function exitMarket(address tToken) external returns (uint);

    /*** Policy Hooks ***/

    function mintAllowed(address tToken, address minter, uint mintAmount) external returns (uint);

    function redeemAllowed(address tToken, address redeemer, uint redeemTokens) external returns (uint);
    function redeemVerify(address tToken, address redeemer, uint redeemAmount, uint redeemTokens) external;

    function borrowAllowed(address tToken, address borrower, uint borrowAmount) external returns (uint);

    function repayBorrowAllowed(
        address tToken,
        address payer,
        address borrower,
        uint repayAmount) external returns (uint);

    function liquidateBorrowAllowed(
        address tTokenBorrowed,
        address tTokenCollateral,
        address liquidator,
        address borrower,
        uint repayAmount) external returns (uint);

    function seizeAllowed(
        address tTokenCollateral,
        address tTokenBorrowed,
        address liquidator,
        address borrower,
        uint seizeTokens) external returns (uint);

    function transferAllowed(address tToken, address src, address dst, uint transferTokens) external returns (uint);

    /*** Liquidity/Liquidation Calculations ***/

    function liquidateCalculateSeizeTokens(
        address tTokenBorrowed,
        address tTokenCollateral,
        uint repayAmount) external view returns (uint, uint);

    function getAccountLiquidity(address account) external view returns (uint, uint, uint);
}

File 5 of 5 : InterestRateModel.sol
pragma solidity ^0.5.16;

/**
  * @title Tectonic's InterestRateModel Interface
  * @author Tectonic
  */
contract InterestRateModel {
    /// @notice Indicator that this is an InterestRateModel contract (for inspection)
    bool public constant isInterestRateModel = true;

    /**
      * @notice Calculates the current borrow interest rate per block
      * @param cash The total amount of cash the market has
      * @param borrows The total amount of borrows the market has outstanding
      * @param reserves The total amount of reserves the market has
      * @return The borrow rate per block (as a percentage, and scaled by 1e18)
      */
    function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);

    /**
      * @notice Calculates the current supply interest rate per block
      * @param cash The total amount of cash the market has
      * @param borrows The total amount of borrows the market has outstanding
      * @param reserves The total amount of reserves the market has
      * @param reserveFactorMantissa The current reserve factor the market has
      * @return The supply rate per block (as a percentage, and scaled by 1e18)
      */
    function getSupplyRate(uint cash, uint borrows, uint reserves, uint reserveFactorMantissa) external view returns (uint);

}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 10
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"underlying_","type":"address"},{"internalType":"contract TectonicCoreInterface","name":"tcore_","type":"address"},{"internalType":"contract InterestRateModel","name":"interestRateModel_","type":"address"},{"internalType":"uint256","name":"initialExchangeRateMantissa_","type":"uint256"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"address payable","name":"admin_","type":"address"},{"internalType":"address","name":"implementation_","type":"address"},{"internalType":"bytes","name":"becomeImplementationData","type":"bytes"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cashPrior","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"interestAccumulated","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"borrowIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBorrows","type":"uint256"}],"name":"AccrueInterest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"borrowAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accountBorrows","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBorrows","type":"uint256"}],"name":"Borrow","type":"event"},{"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":"liquidator","type":"address"},{"indexed":false,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"repayAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"tTokenCollateral","type":"address"},{"indexed":false,"internalType":"uint256","name":"seizeTokens","type":"uint256"}],"name":"LiquidateBorrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintTokens","type":"uint256"}],"name":"Mint","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":"contract InterestRateModel","name":"oldInterestRateModel","type":"address"},{"indexed":false,"internalType":"contract InterestRateModel","name":"newInterestRateModel","type":"address"}],"name":"NewMarketInterestRateModel","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":"uint256","name":"oldReserveFactorMantissa","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newReserveFactorMantissa","type":"uint256"}],"name":"NewReserveFactor","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract TectonicCoreInterface","name":"oldTectonicCore","type":"address"},{"indexed":false,"internalType":"contract TectonicCoreInterface","name":"newTectonicCore","type":"address"}],"name":"NewTectonicCore","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"redeemer","type":"address"},{"indexed":false,"internalType":"uint256","name":"redeemAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"redeemTokens","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"payer","type":"address"},{"indexed":false,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"repayAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accountBorrows","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBorrows","type":"uint256"}],"name":"RepayBorrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"payer","type":"address"},{"indexed":false,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"repayAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accountBorrows","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBorrows","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accountTokens","type":"uint256"}],"name":"RepayBorrowWithTToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"benefactor","type":"address"},{"indexed":false,"internalType":"uint256","name":"addAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotalReserves","type":"uint256"}],"name":"ReservesAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"admin","type":"address"},{"indexed":false,"internalType":"uint256","name":"reduceAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotalReserves","type":"uint256"}],"name":"ReservesReduced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":false,"inputs":[],"name":"_acceptAdmin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"addAmount","type":"uint256"}],"name":"_addReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"reduceAmount","type":"uint256"}],"name":"_reduceReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"implementation_","type":"address"},{"internalType":"bool","name":"allowResign","type":"bool"},{"internalType":"bytes","name":"becomeImplementationData","type":"bytes"}],"name":"_setImplementation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract InterestRateModel","name":"newInterestRateModel","type":"address"}],"name":"_setInterestRateModel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"newPendingAdmin","type":"address"}],"name":"_setPendingAdmin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"newReserveFactorMantissa","type":"uint256"}],"name":"_setReserveFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract TectonicCoreInterface","name":"newTectonicCore","type":"address"}],"name":"_setTectonicCore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"accrualBlockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"accrueInterest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"internalType":"address payable","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOfUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"borrowAmount","type":"uint256"}],"name":"borrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"borrowBalanceCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"borrowBalanceStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"borrowIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"borrowRatePerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"deferLiquidityCheckAdapterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"delegateToImplementation","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"delegateToViewImplementation","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"exchangeRateCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"exchangeRateStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAccountSnapshot","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCash","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"interestRateModel","outputs":[{"internalType":"contract InterestRateModel","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isTToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"repayAmount","type":"uint256"},{"internalType":"contract TTokenInterface","name":"tTokenCollateral","type":"address"}],"name":"liquidateBorrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingAdmin","outputs":[{"internalType":"address payable","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"protocolSeizeShareMantissa","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"redeemTokens","type":"uint256"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"redeemAmount","type":"uint256"}],"name":"redeemUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"repayAmount","type":"uint256"}],"name":"repayBorrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"repayAmount","type":"uint256"}],"name":"repayBorrowBehalf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"reserveFactorMantissa","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"liquidator","type":"address"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"seizeTokens","type":"uint256"}],"name":"seize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"supplyRatePerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"contract EIP20NonStandardInterface","name":"token","type":"address"}],"name":"sweepToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tectonicCore","outputs":[{"internalType":"contract TectonicCoreInterface","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalBorrows","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"totalBorrowsCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b50604051620025723803806200257283398181016040526101408110156200003857600080fd5b81516020830151604080850151606086015160808701805193519597949692959194919392820192846401000000008211156200007457600080fd5b9083019060208201858111156200008a57600080fd5b8251640100000000811182820188101715620000a557600080fd5b82525081516020918201929091019080838360005b83811015620000d4578181015183820152602001620000ba565b50505050905090810190601f168015620001025780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200012657600080fd5b9083019060208201858111156200013c57600080fd5b82516401000000008111828201881017156200015757600080fd5b82525081516020918201929091019080838360005b83811015620001865781810151838201526020016200016c565b50505050905090810190601f168015620001b45780820380516001836020036101000a031916815260200191505b50604081815260208301519083015160608401516080909401805192969195919284640100000000821115620001e957600080fd5b908301906020820185811115620001ff57600080fd5b82516401000000008111828201881017156200021a57600080fd5b82525081516020918201929091019080838360005b83811015620002495781810151838201526020016200022f565b50505050905090810190601f168015620002775780820380516001836020036101000a031916815260200191505b5060405250505033600360016101000a8154816001600160a01b0302191690836001600160a01b0316021790555062000424828b8b8b8b8b8b8b60405160240180886001600160a01b03166001600160a01b03168152602001876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b0316815260200185815260200180602001806020018460ff1660ff168152602001838103835286818151815260200191508051906020019080838360005b838110156200035157818101518382015260200162000337565b50505050905090810190601f1680156200037f5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015620003b45781810151838201526020016200039a565b50505050905090810190601f168015620003e25780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b03908116631a31d46560e01b17909152909a50620004721698505050505050505050565b506200043c826000836001600160e01b036200053916565b5050600380546001600160a01b0390921661010002610100600160a81b0319909216919091179055506200071a95505050505050565b606060006060846001600160a01b0316846040518082805190602001908083835b60208310620004b45780518252601f19909201916020918201910162000493565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811462000516576040519150601f19603f3d011682016040523d82523d6000602084013e6200051b565b606091505b5091509150600082141562000531573d60208201fd5b949350505050565b60035461010090046001600160a01b03163314620005895760405162461bcd60e51b8152600401808060200182810382526039815260200180620025396039913960400191505060405180910390fd5b8115620005cb576040805160048152602481019091526020810180516001600160e01b0390811663153ab50560e01b17909152620005c99190620006f016565b505b601280546001600160a01b038581166001600160a01b03198316179092556040516020602482018181528551604484015285519490931693620006a1938693909283926064909201919085019080838360005b83811015620006385781810151838201526020016200061e565b50505050905090810190601f168015620006665780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b03908116630adccee560e31b17909152909350620006f016915050565b50601254604080516001600160a01b038085168252909216602083015280517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9281900390910190a150505050565b60125460609062000714906001600160a01b0316836001600160e01b036200047216565b92915050565b611e0f806200072a6000396000f3fe60806040526004361061025a5760003560e01c806306fdde031461031a5780630933c1ed146103a4578063095ea7b3146104555780630e752702146104a2578063173b9904146104de57806317bfdfbc146104f357806318160ddd14610526578063182df0f51461053b5780631be195601461055057806323b872dd146105855780632608f818146105c85780632678224714610601578063313ce567146106325780633af9e6691461065d5780633b1d21a2146106905780633e941010146106a55780634487152f146106cf57806347bd371814610780578063555bcc40146107955780635c60da1b1461085d578063601a0bf1146108725780636752e7021461089c5780636c540baf146108b15780636f307dc3146108c657806370a08231146108db57806373acee981461090e578063852a12e3146109235780638f840ddd1461094d57806395d89b411461096257806395dd919314610977578063a0097b58146109aa578063a0712d68146109bf578063a6afed95146109e9578063a9059cbb146109fe578063aa5af0fd14610a37578063ae9d70b014610a4c578063b2a02ff114610a61578063b71d1a0c14610aa4578063b79b3c8a14610ad7578063bd6d894d14610b0a578063c16a61ec14610b1f578063c37f68e214610b34578063c5ebeaec14610b8d578063db006a7514610bb7578063dd62ed3e14610be1578063e9c714f214610c1c578063f2b3abbd14610c31578063f3fdb15a14610c64578063f5e3c46214610c79578063f851a44014610cbc578063f8f9da2814610cd1578063fca7820b14610ce6578063ff06d65114610d10575b34156102975760405162461bcd60e51b8152600401808060200182810382526037815260200180611d6b6037913960400191505060405180910390fd5b6012546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d80600081146102fa576040519150601f19603f3d011682016040523d82523d6000602084013e6102ff565b606091505b505090506040513d6000823e818015610316573d82f35b3d82fd5b34801561032657600080fd5b5061032f610d25565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610369578181015183820152602001610351565b50505050905090810190601f1680156103965780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103b057600080fd5b5061032f600480360360208110156103c757600080fd5b810190602081018135600160201b8111156103e157600080fd5b8201836020820111156103f357600080fd5b803590602001918460018302840111600160201b8311171561041457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610db2945050505050565b34801561046157600080fd5b5061048e6004803603604081101561047857600080fd5b506001600160a01b038135169060200135610dd1565b604080519115158252519081900360200190f35b3480156104ae57600080fd5b506104cc600480360360208110156104c557600080fd5b5035610e48565b60408051918252519081900360200190f35b3480156104ea57600080fd5b506104cc610eaf565b3480156104ff57600080fd5b506104cc6004803603602081101561051657600080fd5b50356001600160a01b0316610eb5565b34801561053257600080fd5b506104cc610f07565b34801561054757600080fd5b506104cc610f0d565b34801561055c57600080fd5b506105836004803603602081101561057357600080fd5b50356001600160a01b0316610f64565b005b34801561059157600080fd5b5061048e600480360360608110156105a857600080fd5b506001600160a01b03813581169160208101359091169060400135610fb3565b3480156105d457600080fd5b506104cc600480360360408110156105eb57600080fd5b506001600160a01b038135169060200135611033565b34801561060d57600080fd5b50610616611089565b604080516001600160a01b039092168252519081900360200190f35b34801561063e57600080fd5b50610647611098565b6040805160ff9092168252519081900360200190f35b34801561066957600080fd5b506104cc6004803603602081101561068057600080fd5b50356001600160a01b03166110a1565b34801561069c57600080fd5b506104cc6110f3565b3480156106b157600080fd5b506104cc600480360360208110156106c857600080fd5b503561112b565b3480156106db57600080fd5b5061032f600480360360208110156106f257600080fd5b810190602081018135600160201b81111561070c57600080fd5b82018360208201111561071e57600080fd5b803590602001918460018302840111600160201b8311171561073f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611172945050505050565b34801561078c57600080fd5b506104cc611391565b3480156107a157600080fd5b50610583600480360360608110156107b857600080fd5b6001600160a01b03823516916020810135151591810190606081016040820135600160201b8111156107e957600080fd5b8201836020820111156107fb57600080fd5b803590602001918460018302840111600160201b8311171561081c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611397945050505050565b34801561086957600080fd5b5061061661153a565b34801561087e57600080fd5b506104cc6004803603602081101561089557600080fd5b5035611549565b3480156108a857600080fd5b506104cc611590565b3480156108bd57600080fd5b506104cc61159b565b3480156108d257600080fd5b506106166115a1565b3480156108e757600080fd5b506104cc600480360360208110156108fe57600080fd5b50356001600160a01b03166115b0565b34801561091a57600080fd5b506104cc611602565b34801561092f57600080fd5b506104cc6004803603602081101561094657600080fd5b503561163a565b34801561095957600080fd5b506104cc611681565b34801561096e57600080fd5b5061032f611687565b34801561098357600080fd5b506104cc6004803603602081101561099a57600080fd5b50356001600160a01b03166116df565b3480156109b657600080fd5b5061048e611731565b3480156109cb57600080fd5b506104cc600480360360208110156109e257600080fd5b5035611736565b3480156109f557600080fd5b506104cc61177d565b348015610a0a57600080fd5b5061048e60048036036040811015610a2157600080fd5b506001600160a01b0381351690602001356117b5565b348015610a4357600080fd5b506104cc61180b565b348015610a5857600080fd5b506104cc611811565b348015610a6d57600080fd5b506104cc60048036036060811015610a8457600080fd5b506001600160a01b03813581169160208101359091169060400135611849565b348015610ab057600080fd5b506104cc60048036036020811015610ac757600080fd5b50356001600160a01b03166118a7565b348015610ae357600080fd5b506104cc60048036036020811015610afa57600080fd5b50356001600160a01b03166118f9565b348015610b1657600080fd5b506104cc61194b565b348015610b2b57600080fd5b50610616611983565b348015610b4057600080fd5b50610b6760048036036020811015610b5757600080fd5b50356001600160a01b0316611992565b604080519485526020850193909352838301919091526060830152519081900360800190f35b348015610b9957600080fd5b506104cc60048036036020811015610bb057600080fd5b5035611a24565b348015610bc357600080fd5b506104cc60048036036020811015610bda57600080fd5b5035611a6b565b348015610bed57600080fd5b506104cc60048036036040811015610c0457600080fd5b506001600160a01b0381358116916020013516611ab2565b348015610c2857600080fd5b506104cc611b0c565b348015610c3d57600080fd5b506104cc60048036036020811015610c5457600080fd5b50356001600160a01b0316611b44565b348015610c7057600080fd5b50610616611b96565b348015610c8557600080fd5b506104cc60048036036060811015610c9c57600080fd5b506001600160a01b03813581169160208101359160409091013516611ba5565b348015610cc857600080fd5b50610616611c06565b348015610cdd57600080fd5b506104cc611c1a565b348015610cf257600080fd5b506104cc60048036036020811015610d0957600080fd5b5035611c52565b348015610d1c57600080fd5b50610616611c99565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610daa5780601f10610d7f57610100808354040283529160200191610daa565b820191906000526020600020905b815481529060010190602001808311610d8d57829003601f168201915b505050505081565b601254606090610dcb906001600160a01b031683611ca8565b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052600090606090610e2790610db2565b9050808060200190516020811015610e3e57600080fd5b5051949350505050565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663073a938160e11b179052600090606090610e8f90610db2565b9050808060200190516020811015610ea657600080fd5b50519392505050565b60085481565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166305eff7ef60e21b179052600090606090610e8f90610db2565b600d5481565b6040805160048152602481019091526020810180516001600160e01b031663182df0f560e01b179052600090606090610f4590611172565b9050808060200190516020811015610f5c57600080fd5b505191505090565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b031662df0cab60e51b179052610faf90610db2565b5050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905260009060609061101190610db2565b905080806020019051602081101561102857600080fd5b505195945050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03166304c11f0360e31b179052600090606090610e2790610db2565b6004546001600160a01b031681565b60035460ff1681565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316633af9e66960e01b179052600090606090610e8f90610db2565b6040805160048152602481019091526020810180516001600160e01b0316631d8e90d160e11b179052600090606090610f4590611172565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b03166303e9410160e41b179052600090606090610e8f90610db2565b606060006060306001600160a01b0316846040516024018080602001828103825283818151815260200191508051906020019080838360005b838110156111c35781810151838201526020016111ab565b50505050905090810190601f1680156111f05780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b0316630933c1ed60e01b178152905182519295509350839250908083835b6020831061124b5780518252601f19909201916020918201910161122c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146112ab576040519150601f19603f3d011682016040523d82523d6000602084013e6112b0565b606091505b509150915060008214156112c5573d60208201fd5b8080602001905160208110156112da57600080fd5b8101908080516040519392919084600160201b8211156112f957600080fd5b90830190602082018581111561130e57600080fd5b8251600160201b81118282018810171561132757600080fd5b82525081516020918201929091019080838360005b8381101561135457818101518382015260200161133c565b50505050905090810190601f1680156113815780820380516001836020036101000a031916815260200191505b5060405250505092505050919050565b600b5481565b60035461010090046001600160a01b031633146113e55760405162461bcd60e51b8152600401808060200182810382526039815260200180611da26039913960400191505060405180910390fd5b811561141f576040805160048152602481019091526020810180516001600160e01b031663153ab50560e01b17905261141d90610db2565b505b601280546001600160a01b038581166001600160a01b031983161790925560405160206024820181815285516044840152855194909316936114eb938693909283926064909201919085019080838360005b83811015611489578181015183820152602001611471565b50505050905090810190601f1680156114b65780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b0316630adccee560e31b1790529250610db2915050565b50601254604080516001600160a01b038085168252909216602083015280517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9281900390910190a150505050565b6012546001600160a01b031681565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663601a0bf160e01b179052600090606090610e8f90610db2565b666379da05b6000081565b60095481565b6011546001600160a01b031681565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166370a0823160e01b179052600090606090610e8f90611172565b6040805160048152602481019091526020810180516001600160e01b0316630e759dd360e31b179052600090606090610f4590610db2565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663852a12e360e01b179052600090606090610e8f90610db2565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610daa5780601f10610d7f57610100808354040283529160200191610daa565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166395dd919360e01b179052600090606090610e8f90611172565b600181565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663140e25ad60e31b179052600090606090610e8f90610db2565b6040805160048152602481019091526020810180516001600160e01b031663a6afed9560e01b179052600090606090610f4590610db2565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052600090606090610e2790610db2565b600a5481565b6040805160048152602481019091526020810180516001600160e01b0316630ae9d70b60e41b179052600090606090610f4590611172565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b031663b2a02ff160e01b17905260009060609061101190610db2565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316632dc7468360e21b179052600090606090610e8f90610db2565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316635bcd9e4560e11b179052600090606090610e8f90610db2565b6040805160048152602481019091526020810180516001600160e01b031663bd6d894d60e01b179052600090606090610f4590610db2565b6005546001600160a01b031681565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166361bfb47160e11b1790526000908190819081906060906119ea90611172565b9050808060200190516080811015611a0157600080fd5b508051602082015160408301516060909301519199909850919650945092505050565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663317afabb60e21b179052600090606090610e8f90610db2565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663db006a7560e01b179052600090606090610e8f90610db2565b604080516001600160a01b03808516602483015283166044808301919091528251808303909101815260649091019091526020810180516001600160e01b0316636eb1769f60e11b179052600090606090610e2790611172565b6040805160048152602481019091526020810180516001600160e01b03166374e38a7960e11b179052600090606090610f4590610db2565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b031663f2b3abbd60e01b179052600090606090610e8f90610db2565b6006546001600160a01b031681565b604080516001600160a01b0380861660248301526044820185905283166064808301919091528251808303909101815260849091019091526020810180516001600160e01b0316637af1e23160e11b17905260009060609061101190610db2565b60035461010090046001600160a01b031681565b6040805160048152602481019091526020810180516001600160e01b0316631f1f3b4560e31b179052600090606090610f4590611172565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663fca7820b60e01b179052600090606090610e8f90610db2565b6013546001600160a01b031681565b606060006060846001600160a01b0316846040518082805190602001908083835b60208310611ce85780518252601f199092019160209182019101611cc9565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114611d48576040519150601f19603f3d011682016040523d82523d6000602084013e611d4d565b606091505b50915091506000821415611d62573d60208201fd5b94935050505056fe54457263323044656c656761746f723a66616c6c6261636b3a2063616e6e6f742073656e642076616c756520746f2066616c6c6261636b54457263323044656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d7573742062652061646d696ea265627a7a7231582085b05ddf22354dd0b2d5eb70ca954e53076f545b0a185fa9b5739cf6356a45de64736f6c6343000510003254457263323044656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d7573742062652061646d696e000000000000000000000000ebaceb7f193955b946cc5dd8f8724a80671a1f2f0000000000000000000000008312a8d5d1dec499d00eb28e1a2723b13aa53c1e00000000000000000000000040db2372eab7bb3ea690d8c24536c9e8bee0ec5d0000000000000000000000000000000000000000033b2e3c9fd0803ce800000000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000957896fcb916bacccfdb55caecfaecfb5870000000000000000000000009b29c7c7a4e7b6e63e181542f651925ba28132d100000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000014546563746f6e6963206243524f202844656669290000000000000000000000000000000000000000000000000000000000000000000000000000000000000006746243524f6400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061025a5760003560e01c806306fdde031461031a5780630933c1ed146103a4578063095ea7b3146104555780630e752702146104a2578063173b9904146104de57806317bfdfbc146104f357806318160ddd14610526578063182df0f51461053b5780631be195601461055057806323b872dd146105855780632608f818146105c85780632678224714610601578063313ce567146106325780633af9e6691461065d5780633b1d21a2146106905780633e941010146106a55780634487152f146106cf57806347bd371814610780578063555bcc40146107955780635c60da1b1461085d578063601a0bf1146108725780636752e7021461089c5780636c540baf146108b15780636f307dc3146108c657806370a08231146108db57806373acee981461090e578063852a12e3146109235780638f840ddd1461094d57806395d89b411461096257806395dd919314610977578063a0097b58146109aa578063a0712d68146109bf578063a6afed95146109e9578063a9059cbb146109fe578063aa5af0fd14610a37578063ae9d70b014610a4c578063b2a02ff114610a61578063b71d1a0c14610aa4578063b79b3c8a14610ad7578063bd6d894d14610b0a578063c16a61ec14610b1f578063c37f68e214610b34578063c5ebeaec14610b8d578063db006a7514610bb7578063dd62ed3e14610be1578063e9c714f214610c1c578063f2b3abbd14610c31578063f3fdb15a14610c64578063f5e3c46214610c79578063f851a44014610cbc578063f8f9da2814610cd1578063fca7820b14610ce6578063ff06d65114610d10575b34156102975760405162461bcd60e51b8152600401808060200182810382526037815260200180611d6b6037913960400191505060405180910390fd5b6012546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d80600081146102fa576040519150601f19603f3d011682016040523d82523d6000602084013e6102ff565b606091505b505090506040513d6000823e818015610316573d82f35b3d82fd5b34801561032657600080fd5b5061032f610d25565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610369578181015183820152602001610351565b50505050905090810190601f1680156103965780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103b057600080fd5b5061032f600480360360208110156103c757600080fd5b810190602081018135600160201b8111156103e157600080fd5b8201836020820111156103f357600080fd5b803590602001918460018302840111600160201b8311171561041457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610db2945050505050565b34801561046157600080fd5b5061048e6004803603604081101561047857600080fd5b506001600160a01b038135169060200135610dd1565b604080519115158252519081900360200190f35b3480156104ae57600080fd5b506104cc600480360360208110156104c557600080fd5b5035610e48565b60408051918252519081900360200190f35b3480156104ea57600080fd5b506104cc610eaf565b3480156104ff57600080fd5b506104cc6004803603602081101561051657600080fd5b50356001600160a01b0316610eb5565b34801561053257600080fd5b506104cc610f07565b34801561054757600080fd5b506104cc610f0d565b34801561055c57600080fd5b506105836004803603602081101561057357600080fd5b50356001600160a01b0316610f64565b005b34801561059157600080fd5b5061048e600480360360608110156105a857600080fd5b506001600160a01b03813581169160208101359091169060400135610fb3565b3480156105d457600080fd5b506104cc600480360360408110156105eb57600080fd5b506001600160a01b038135169060200135611033565b34801561060d57600080fd5b50610616611089565b604080516001600160a01b039092168252519081900360200190f35b34801561063e57600080fd5b50610647611098565b6040805160ff9092168252519081900360200190f35b34801561066957600080fd5b506104cc6004803603602081101561068057600080fd5b50356001600160a01b03166110a1565b34801561069c57600080fd5b506104cc6110f3565b3480156106b157600080fd5b506104cc600480360360208110156106c857600080fd5b503561112b565b3480156106db57600080fd5b5061032f600480360360208110156106f257600080fd5b810190602081018135600160201b81111561070c57600080fd5b82018360208201111561071e57600080fd5b803590602001918460018302840111600160201b8311171561073f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611172945050505050565b34801561078c57600080fd5b506104cc611391565b3480156107a157600080fd5b50610583600480360360608110156107b857600080fd5b6001600160a01b03823516916020810135151591810190606081016040820135600160201b8111156107e957600080fd5b8201836020820111156107fb57600080fd5b803590602001918460018302840111600160201b8311171561081c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611397945050505050565b34801561086957600080fd5b5061061661153a565b34801561087e57600080fd5b506104cc6004803603602081101561089557600080fd5b5035611549565b3480156108a857600080fd5b506104cc611590565b3480156108bd57600080fd5b506104cc61159b565b3480156108d257600080fd5b506106166115a1565b3480156108e757600080fd5b506104cc600480360360208110156108fe57600080fd5b50356001600160a01b03166115b0565b34801561091a57600080fd5b506104cc611602565b34801561092f57600080fd5b506104cc6004803603602081101561094657600080fd5b503561163a565b34801561095957600080fd5b506104cc611681565b34801561096e57600080fd5b5061032f611687565b34801561098357600080fd5b506104cc6004803603602081101561099a57600080fd5b50356001600160a01b03166116df565b3480156109b657600080fd5b5061048e611731565b3480156109cb57600080fd5b506104cc600480360360208110156109e257600080fd5b5035611736565b3480156109f557600080fd5b506104cc61177d565b348015610a0a57600080fd5b5061048e60048036036040811015610a2157600080fd5b506001600160a01b0381351690602001356117b5565b348015610a4357600080fd5b506104cc61180b565b348015610a5857600080fd5b506104cc611811565b348015610a6d57600080fd5b506104cc60048036036060811015610a8457600080fd5b506001600160a01b03813581169160208101359091169060400135611849565b348015610ab057600080fd5b506104cc60048036036020811015610ac757600080fd5b50356001600160a01b03166118a7565b348015610ae357600080fd5b506104cc60048036036020811015610afa57600080fd5b50356001600160a01b03166118f9565b348015610b1657600080fd5b506104cc61194b565b348015610b2b57600080fd5b50610616611983565b348015610b4057600080fd5b50610b6760048036036020811015610b5757600080fd5b50356001600160a01b0316611992565b604080519485526020850193909352838301919091526060830152519081900360800190f35b348015610b9957600080fd5b506104cc60048036036020811015610bb057600080fd5b5035611a24565b348015610bc357600080fd5b506104cc60048036036020811015610bda57600080fd5b5035611a6b565b348015610bed57600080fd5b506104cc60048036036040811015610c0457600080fd5b506001600160a01b0381358116916020013516611ab2565b348015610c2857600080fd5b506104cc611b0c565b348015610c3d57600080fd5b506104cc60048036036020811015610c5457600080fd5b50356001600160a01b0316611b44565b348015610c7057600080fd5b50610616611b96565b348015610c8557600080fd5b506104cc60048036036060811015610c9c57600080fd5b506001600160a01b03813581169160208101359160409091013516611ba5565b348015610cc857600080fd5b50610616611c06565b348015610cdd57600080fd5b506104cc611c1a565b348015610cf257600080fd5b506104cc60048036036020811015610d0957600080fd5b5035611c52565b348015610d1c57600080fd5b50610616611c99565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610daa5780601f10610d7f57610100808354040283529160200191610daa565b820191906000526020600020905b815481529060010190602001808311610d8d57829003601f168201915b505050505081565b601254606090610dcb906001600160a01b031683611ca8565b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052600090606090610e2790610db2565b9050808060200190516020811015610e3e57600080fd5b5051949350505050565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663073a938160e11b179052600090606090610e8f90610db2565b9050808060200190516020811015610ea657600080fd5b50519392505050565b60085481565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166305eff7ef60e21b179052600090606090610e8f90610db2565b600d5481565b6040805160048152602481019091526020810180516001600160e01b031663182df0f560e01b179052600090606090610f4590611172565b9050808060200190516020811015610f5c57600080fd5b505191505090565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b031662df0cab60e51b179052610faf90610db2565b5050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905260009060609061101190610db2565b905080806020019051602081101561102857600080fd5b505195945050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03166304c11f0360e31b179052600090606090610e2790610db2565b6004546001600160a01b031681565b60035460ff1681565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316633af9e66960e01b179052600090606090610e8f90610db2565b6040805160048152602481019091526020810180516001600160e01b0316631d8e90d160e11b179052600090606090610f4590611172565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b03166303e9410160e41b179052600090606090610e8f90610db2565b606060006060306001600160a01b0316846040516024018080602001828103825283818151815260200191508051906020019080838360005b838110156111c35781810151838201526020016111ab565b50505050905090810190601f1680156111f05780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b0316630933c1ed60e01b178152905182519295509350839250908083835b6020831061124b5780518252601f19909201916020918201910161122c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146112ab576040519150601f19603f3d011682016040523d82523d6000602084013e6112b0565b606091505b509150915060008214156112c5573d60208201fd5b8080602001905160208110156112da57600080fd5b8101908080516040519392919084600160201b8211156112f957600080fd5b90830190602082018581111561130e57600080fd5b8251600160201b81118282018810171561132757600080fd5b82525081516020918201929091019080838360005b8381101561135457818101518382015260200161133c565b50505050905090810190601f1680156113815780820380516001836020036101000a031916815260200191505b5060405250505092505050919050565b600b5481565b60035461010090046001600160a01b031633146113e55760405162461bcd60e51b8152600401808060200182810382526039815260200180611da26039913960400191505060405180910390fd5b811561141f576040805160048152602481019091526020810180516001600160e01b031663153ab50560e01b17905261141d90610db2565b505b601280546001600160a01b038581166001600160a01b031983161790925560405160206024820181815285516044840152855194909316936114eb938693909283926064909201919085019080838360005b83811015611489578181015183820152602001611471565b50505050905090810190601f1680156114b65780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b0316630adccee560e31b1790529250610db2915050565b50601254604080516001600160a01b038085168252909216602083015280517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9281900390910190a150505050565b6012546001600160a01b031681565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663601a0bf160e01b179052600090606090610e8f90610db2565b666379da05b6000081565b60095481565b6011546001600160a01b031681565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166370a0823160e01b179052600090606090610e8f90611172565b6040805160048152602481019091526020810180516001600160e01b0316630e759dd360e31b179052600090606090610f4590610db2565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663852a12e360e01b179052600090606090610e8f90610db2565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610daa5780601f10610d7f57610100808354040283529160200191610daa565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166395dd919360e01b179052600090606090610e8f90611172565b600181565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663140e25ad60e31b179052600090606090610e8f90610db2565b6040805160048152602481019091526020810180516001600160e01b031663a6afed9560e01b179052600090606090610f4590610db2565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052600090606090610e2790610db2565b600a5481565b6040805160048152602481019091526020810180516001600160e01b0316630ae9d70b60e41b179052600090606090610f4590611172565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b031663b2a02ff160e01b17905260009060609061101190610db2565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316632dc7468360e21b179052600090606090610e8f90610db2565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316635bcd9e4560e11b179052600090606090610e8f90610db2565b6040805160048152602481019091526020810180516001600160e01b031663bd6d894d60e01b179052600090606090610f4590610db2565b6005546001600160a01b031681565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166361bfb47160e11b1790526000908190819081906060906119ea90611172565b9050808060200190516080811015611a0157600080fd5b508051602082015160408301516060909301519199909850919650945092505050565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663317afabb60e21b179052600090606090610e8f90610db2565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663db006a7560e01b179052600090606090610e8f90610db2565b604080516001600160a01b03808516602483015283166044808301919091528251808303909101815260649091019091526020810180516001600160e01b0316636eb1769f60e11b179052600090606090610e2790611172565b6040805160048152602481019091526020810180516001600160e01b03166374e38a7960e11b179052600090606090610f4590610db2565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b031663f2b3abbd60e01b179052600090606090610e8f90610db2565b6006546001600160a01b031681565b604080516001600160a01b0380861660248301526044820185905283166064808301919091528251808303909101815260849091019091526020810180516001600160e01b0316637af1e23160e11b17905260009060609061101190610db2565b60035461010090046001600160a01b031681565b6040805160048152602481019091526020810180516001600160e01b0316631f1f3b4560e31b179052600090606090610f4590611172565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663fca7820b60e01b179052600090606090610e8f90610db2565b6013546001600160a01b031681565b606060006060846001600160a01b0316846040518082805190602001908083835b60208310611ce85780518252601f199092019160209182019101611cc9565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114611d48576040519150601f19603f3d011682016040523d82523d6000602084013e611d4d565b606091505b50915091506000821415611d62573d60208201fd5b94935050505056fe54457263323044656c656761746f723a66616c6c6261636b3a2063616e6e6f742073656e642076616c756520746f2066616c6c6261636b54457263323044656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d7573742062652061646d696ea265627a7a7231582085b05ddf22354dd0b2d5eb70ca954e53076f545b0a185fa9b5739cf6356a45de64736f6c63430005100032

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000ebaceb7f193955b946cc5dd8f8724a80671a1f2f0000000000000000000000008312a8d5d1dec499d00eb28e1a2723b13aa53c1e00000000000000000000000040db2372eab7bb3ea690d8c24536c9e8bee0ec5d0000000000000000000000000000000000000000033b2e3c9fd0803ce800000000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000957896fcb916bacccfdb55caecfaecfb5870000000000000000000000009b29c7c7a4e7b6e63e181542f651925ba28132d100000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000014546563746f6e6963206243524f202844656669290000000000000000000000000000000000000000000000000000000000000000000000000000000000000006746243524f6400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : underlying_ (address): 0xeBAceB7F193955b946cC5dd8f8724a80671a1F2F
Arg [1] : tcore_ (address): 0x8312A8d5d1deC499D00eb28e1a2723b13aA53C1e
Arg [2] : interestRateModel_ (address): 0x40DB2372eaB7Bb3eA690D8c24536C9e8BeE0Ec5d
Arg [3] : initialExchangeRateMantissa_ (uint256): 1000000000000000000000000000
Arg [4] : name_ (string): Tectonic bCRO (Defi)
Arg [5] : symbol_ (string): tbCROd
Arg [6] : decimals_ (uint8): 8
Arg [7] : admin_ (address): 0x00000957896FCB916BACcCFdb55caecFaECfB587
Arg [8] : implementation_ (address): 0x9B29c7C7a4E7B6e63E181542F651925bA28132d1
Arg [9] : becomeImplementationData (bytes): 0x

-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 000000000000000000000000ebaceb7f193955b946cc5dd8f8724a80671a1f2f
Arg [1] : 0000000000000000000000008312a8d5d1dec499d00eb28e1a2723b13aa53c1e
Arg [2] : 00000000000000000000000040db2372eab7bb3ea690d8c24536c9e8bee0ec5d
Arg [3] : 0000000000000000000000000000000000000000033b2e3c9fd0803ce8000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [7] : 00000000000000000000000000000957896fcb916bacccfdb55caecfaecfb587
Arg [8] : 0000000000000000000000009b29c7c7a4e7b6e63e181542f651925ba28132d1
Arg [9] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [11] : 546563746f6e6963206243524f20284465666929000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [13] : 746243524f640000000000000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Gas Used Reward
view all blocks validated

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.