Contract 0x645c72e90ef4d56c6A37802024467170A618f3e9 1

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xfad9353662f0db27c45dafe25e530b453a2c507239021cff2544b1a7f6f27c820x60806040192239922022-08-02 19:39:31578 days 21 hrs ago0xb98d4d4e205aff4d4755e9df19bd0b8bd4e0f148 IN  Create: ProviderDForceArbitrum0 ETH0.00325894611 ETH0.16762624
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: VaultWETHDAI Fuji DAO: Provider DForce0 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: Provider DForce 0xee338313f022caee84034253174fa562495dcc150 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: Provider DForce 0xee338313f022caee84034253174fa562495dcc150 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: Provider DForce 0x410f9179ed194b8b3583abfebb5c3ef2acd62a340 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: VaultWETHDAI Fuji DAO: Provider DForce0 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: VaultWETHDAI Fuji DAO: Provider DForce0 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: Provider DForce dForce: iDAI Token0 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: Provider DForce 0x410f9179ed194b8b3583abfebb5c3ef2acd62a340 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: VaultWETHDAI Fuji DAO: Provider DForce0 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: Provider DForce dForce: iDAI Token0 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: Provider DForce 0x410f9179ed194b8b3583abfebb5c3ef2acd62a340 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: Controller Fuji DAO: Provider DForce0 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: Provider DForce 0xee338313f022caee84034253174fa562495dcc150 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: Provider DForce 0xee338313f022caee84034253174fa562495dcc150 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: Provider DForce 0x410f9179ed194b8b3583abfebb5c3ef2acd62a340 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: VaultWETHDAI Fuji DAO: Provider DForce0 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: Provider DForce dForce: iDAI Token0 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: Provider DForce 0x410f9179ed194b8b3583abfebb5c3ef2acd62a340 ETH
0x7860ad092bb76dd5bf12f44b166e6f08420eac0443b69607999b7685c736b13f597609422023-02-10 17:24:35386 days 23 hrs ago Fuji DAO: VaultWETHDAI Fuji DAO: Provider DForce0 ETH
0x0316e6cb6b642efa44a246a58828072ef0b167efe34395024f4b7aee43b8ff89597553162023-02-10 16:58:51386 days 23 hrs ago Fuji DAO: VaultWETHDAI Fuji DAO: Provider DForce0 ETH
0x0316e6cb6b642efa44a246a58828072ef0b167efe34395024f4b7aee43b8ff89597553162023-02-10 16:58:51386 days 23 hrs ago Fuji DAO: Provider DForce 0xee338313f022caee84034253174fa562495dcc150 ETH
0x0316e6cb6b642efa44a246a58828072ef0b167efe34395024f4b7aee43b8ff89597553162023-02-10 16:58:51386 days 23 hrs ago Fuji DAO: Provider DForce 0xee338313f022caee84034253174fa562495dcc150 ETH
0x0316e6cb6b642efa44a246a58828072ef0b167efe34395024f4b7aee43b8ff89597553162023-02-10 16:58:51386 days 23 hrs ago Fuji DAO: Provider DForce 0x410f9179ed194b8b3583abfebb5c3ef2acd62a340 ETH
0x0316e6cb6b642efa44a246a58828072ef0b167efe34395024f4b7aee43b8ff89597553162023-02-10 16:58:51386 days 23 hrs ago Fuji DAO: VaultWETHDAI Fuji DAO: Provider DForce0 ETH
0x0316e6cb6b642efa44a246a58828072ef0b167efe34395024f4b7aee43b8ff89597553162023-02-10 16:58:51386 days 23 hrs ago Fuji DAO: Provider DForce dForce: iDAI Token0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ProviderDForceArbitrum

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 11 : ProviderDForceArbitrum.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "../../interfaces/IFujiMappings.sol";
import "../../interfaces/IProvider.sol";
import "../../interfaces/dforce/IGenIToken.sol";
import "../../interfaces/dforce/IIErc20.sol";
import "../../interfaces/dforce/IIEth.sol";
import "../../interfaces/dforce/IController.sol";
import "../../libraries/LibUniversalERC20.sol";

contract HelperFunct {
  function _isNative(address token) internal pure returns (bool) {
    return (token == address(0) || token == address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE));
  }

  function _getMappingAddr() internal pure returns (address) {
    return 0x410f9179eD194b8b3583abfEbB5C3ef2aCD62A34; // Fuji dForce Arbitrum Mapping
  }

  function _getControllerAddress() internal pure returns (address) {
    return 0x8E7e9eA9023B81457Ae7E6D2a51b003D421E5408; // dForce Arbitrum
  }

  // dForce functions

  /**
   * @dev Approves vault's assets as collateral for dForce Protocol.
   * @param _iTokenAddress: asset type to be approved as collateral.
   */
  function _enterCollatMarket(address _iTokenAddress) internal {
    // Create a reference to the corresponding network Comptroller
    IController controller = IController(_getControllerAddress());

    address[] memory iTokenMarkets = new address[](1);
    iTokenMarkets[0] = _iTokenAddress;
    controller.enterMarkets(iTokenMarkets);
  }

  /**
   * @dev Removes vault's assets as collateral for dForce Protocol.
   * @param _iTokenAddress: asset type to be removed as collateral.
   */
  function _exitCollatMarket(address _iTokenAddress) internal {
    // Create a reference to the corresponding network Comptroller
    IController controller = IController(_getControllerAddress());

    address[] memory iTokenMarkets = new address[](1);
    iTokenMarkets[0] = _iTokenAddress;
    controller.exitMarkets(iTokenMarkets);
  }
}

contract ProviderDForceArbitrum is IProvider, HelperFunct {
  using LibUniversalERC20 for IERC20;

  // Provider Core Functions

  /**
   * @dev Deposit '_asset'.
   * @param _asset: token address to deposit.
   * @param _amount: token amount to deposit.
   */
  function deposit(address _asset, uint256 _amount) external payable override {
    // Get iToken address from mapping
    address iTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset);

    // Enter and/or ensure collateral market is enacted
    _enterCollatMarket(iTokenAddr);

    if (_isNative(_asset)) {
      // Create a reference to the iToken contract
      IIEth iToken = IIEth(iTokenAddr);

      // dForce protocol Mints iTokens, ETH method
      iToken.mint{ value: _amount }(address(this));
    } else {
      // Create reference to the ERC20 contract
      IERC20 erc20token = IERC20(_asset);

      // Create a reference to the iToken contract
      IIErc20 iToken = IIErc20(iTokenAddr);

      // Checks, Vault balance of ERC20 to make deposit
      require(erc20token.balanceOf(address(this)) >= _amount, "Not enough Balance");

      // Approve to move ERC20tokens
      erc20token.univApprove(address(iTokenAddr), _amount);

      // dForce Protocol mints iTokens
      iToken.mint(address(this), _amount);
    }
  }

  /**
   * @dev Withdraw '_asset'.
   * @param _asset: token address to withdraw.
   * @param _amount: token amount to withdraw.
   */
  function withdraw(address _asset, uint256 _amount) external payable override {
    // Get iToken address from mapping
    address iTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset);

    // Create a reference to the corresponding iToken contract
    IGenIToken iToken = IGenIToken(iTokenAddr);

    // dForce Protocol Redeem Process, throw errow if not.
    iToken.redeemUnderlying(address(this), _amount);
  }

  /**
   * @dev Borrow '_asset'.
   * @param _asset token address to borrow.
   * @param _amount: token amount to borrow.
   */
  function borrow(address _asset, uint256 _amount) external payable override {
    // Get iToken address from mapping
    address iTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset);

    // Create a reference to the corresponding iToken contract
    IGenIToken iToken = IGenIToken(iTokenAddr);

    // dForce Protocol Borrow Process, throw errow if not.
    iToken.borrow(_amount);
  }

  /**
   * @dev Payback borrowed '_asset'.
   * @param _asset token address to payback.
   * @param _amount: token amount to payback.
   */
  function payback(address _asset, uint256 _amount) external payable override {
    // Get iToken address from mapping
    address iTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset);

    if (_isNative(_asset)) {
      // Create a reference to the corresponding iToken contract
      IIEth iToken = IIEth(iTokenAddr);

      iToken.repayBorrow{ value: msg.value }();
    } else {
      // Create reference to the ERC20 contract
      IERC20 erc20token = IERC20(_asset);

      // Create a reference to the corresponding iToken contract
      IIErc20 iToken = IIErc20(iTokenAddr);

      // Check there is enough balance to pay
      require(erc20token.balanceOf(address(this)) >= _amount, "Not-enough-token");
      erc20token.univApprove(address(iTokenAddr), _amount);
      iToken.repayBorrow(_amount);
    }
  }

  /**
   * @dev Returns the current borrowing rate (APR) of '_asset', in ray(1e27).
   * @param _asset: token address to query the current borrowing rate.
   */
  function getBorrowRateFor(address _asset) external view override returns (uint256) {
    address iTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset);

    // Block Rate transformed for common mantissa for Fuji in ray (1e27), Note: dForce uses base 1e18
    uint256 bRateperBlock = IGenIToken(iTokenAddr).borrowRatePerBlock() * 10**9;

    // The approximate number of blocks per year that is assumed by the dForce interest rate model
    uint256 blocksperYear = 2102400;
    return bRateperBlock * blocksperYear;
  }

  /**
   * @dev Returns the current deposit rate (APR) of '_asset', in ray(1e27).
   * @param _asset: token address to query the current deposit rate.
   */
  function getDepositRateFor(address _asset) external view returns (uint256) {
    address iTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset);

    // Block Rate transformed for common mantissa for Fuji in ray (1e27), Note: dForce uses base 1e18
    uint256 bRateperBlock = IGenIToken(iTokenAddr).supplyRatePerBlock() * 10**9;

    // The approximate number of blocks per year that is assumed by the dForce interest rate model
    uint256 blocksperYear = 2102400;
    return bRateperBlock * blocksperYear;
  }

  /**
   * @dev Returns the borrow balance of '_asset' of caller.
   * NOTE: Returned value is at the last update state of provider.
   * @param _asset: token address to query the balance.
   */
  function getBorrowBalance(address _asset) external view override returns (uint256) {
    address iTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset);

    return IGenIToken(iTokenAddr).borrowBalanceStored(msg.sender);
  }

  /**
   * @dev Return borrow balance of '_asset' of caller.
   * This function updates the state of provider contract to return latest borrow balance.
   * It costs ~84K gas and is not a view function.
   * @param _asset token address to query the balance.
   * @param _who address of the account.
   */
  function getBorrowBalanceOf(address _asset, address _who) external override returns (uint256) {
    address iTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset);

    return IGenIToken(iTokenAddr).borrowBalanceCurrent(_who);
  }

  /**
   * @dev Returns the deposit balance of '_asset' of caller.
   * @param _asset: token address to query the balance.
   */
  function getDepositBalance(address _asset) external view override returns (uint256) {
    address iTokenAddr = IFujiMappings(_getMappingAddr()).addressMapping(_asset);
    uint256 iTokenBal = IGenIToken(iTokenAddr).balanceOf(msg.sender);
    uint256 exRate = IGenIToken(iTokenAddr).exchangeRateStored();

    return (exRate * iTokenBal) / 1e18;
  }
}

File 2 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 3 of 11 : IFujiMappings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IFujiMappings {
  // FujiMapping Events

  /**
   * @dev Log a change in address mapping
   */
  event MappingChanged(address keyAddress, address mappedAddress);
  /**
   * @dev Log a change in URI
   */
  event UriChanged(string newUri);

  function addressMapping(address) external view returns (address);
}

File 4 of 11 : IProvider.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IProvider {
  //Basic Core Functions

  function deposit(address _collateralAsset, uint256 _collateralAmount) external payable;

  function borrow(address _borrowAsset, uint256 _borrowAmount) external payable;

  function withdraw(address _collateralAsset, uint256 _collateralAmount) external payable;

  function payback(address _borrowAsset, uint256 _borrowAmount) external payable;

  // returns the borrow annualized rate for an asset in ray (1e27)
  //Example 8.5% annual interest = 0.085 x 10^27 = 85000000000000000000000000 or 85*(10**24)
  function getBorrowRateFor(address _asset) external view returns (uint256);

  function getBorrowBalance(address _asset) external view returns (uint256);

  function getDepositBalance(address _asset) external view returns (uint256);

  function getBorrowBalanceOf(address _asset, address _who) external returns (uint256);
}

File 5 of 11 : IGenIToken.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IGenIToken is IERC20 {
  function redeem(address from, uint256 redeemTokens) external;

  function redeemUnderlying(address _from, uint256 _redeemUnderlying) external;

  function borrow(uint256 _borrowAmount) external;

  function exchangeRateCurrent() external returns (uint256);

  function exchangeRateStored() external view returns (uint256);

  function borrowRatePerBlock() external view returns (uint256);

  function supplyRatePerBlock() external view returns (uint256);

  function balanceOfUnderlying(address _account) external returns (uint256);

  function borrowBalanceCurrent(address _user) external returns (uint256);

  function borrowBalanceStored(address _user) external view returns (uint256);
}

File 6 of 11 : IIErc20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "./IGenIToken.sol";

interface IIErc20 is IGenIToken {
  function mint(address _recipient, uint256 _mintAmount) external;

  function mintForSelfAndEnterMarket(uint256 _mintAmount) external;

  function repayBorrow(uint256 _repayAmount) external;

  function repayBorrowBehalf(address _borrower, uint256 _repayAmount) external;
}

File 7 of 11 : IIEth.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "./IGenIToken.sol";

interface IIEth is IGenIToken {
  function mint(address _recipient) external payable;

  function mintForSelfAndEnterMarket() external payable;

  function repayBorrow() external payable;

  function repayBorrowBehalf(address _borrower) external payable;
}

File 8 of 11 : IController.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IController {
  function enterMarkets(address[] calldata iTokens)
        external
        returns (bool[] memory);

  function exitMarkets(address[] calldata iTokens)
        external
        returns (bool[] memory);
}

File 9 of 11 : LibUniversalERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

library LibUniversalERC20 {
  using SafeERC20 for IERC20;

  IERC20 private constant _NATIVE_ADDRESS = IERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);
  IERC20 private constant _ZERO_ADDRESS = IERC20(0x0000000000000000000000000000000000000000);

  function isNative(IERC20 token) internal pure returns (bool) {
    return (token == _ZERO_ADDRESS || token == _NATIVE_ADDRESS);
  }

  function univBalanceOf(IERC20 token, address account) internal view returns (uint256) {
    if (isNative(token)) {
      return account.balance;
    } else {
      return token.balanceOf(account);
    }
  }

  function univTransfer(
    IERC20 token,
    address payable to,
    uint256 amount
  ) internal {
    if (amount > 0) {
      if (isNative(token)) {
        (bool sent, ) = to.call{ value: amount }("");
        require(sent, "Failed to send Native");
      } else {
        token.safeTransfer(to, amount);
      }
    }
  }

  function univApprove(
    IERC20 token,
    address to,
    uint256 amount
  ) internal {
    require(!isNative(token), "Approve called on Native");

    if (amount == 0) {
      token.safeApprove(to, 0);
    } else {
      uint256 allowance = token.allowance(address(this), to);
      if (allowance < amount) {
        if (allowance > 0) {
          token.safeApprove(to, 0);
        }
        token.safeApprove(to, amount);
      }
    }
  }
}

File 10 of 11 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 11 of 11 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"borrow","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"getBorrowBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"address","name":"_who","type":"address"}],"name":"getBorrowBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"getBorrowRateFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"getDepositBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"getDepositRateFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"payback","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]

608060405234801561001057600080fd5b506115f5806100206000396000f3fe6080604052600436106100865760003560e01c80637d6af079116100595780637d6af079146100f8578063ed05ae7814610118578063f17cca4a14610138578063f3fef3a314610158578063fb99192c1461016b57600080fd5b806335ed8ab81461008b57806347e7ef24146100a05780634b8a3529146100b357806351724377146100c6575b600080fd5b61009e61009936600461135a565b61018b565b005b61009e6100ae36600461135a565b6103b8565b61009e6100c136600461135a565b6105b9565b3480156100d257600080fd5b506100e66100e1366004611322565b6106b1565b60405190815260200160405180910390f35b34801561010457600080fd5b506100e66101133660046112ea565b6107cb565b34801561012457600080fd5b506100e66101333660046112ea565b6108df565b34801561014457600080fd5b506100e66101533660046112ea565b610a8c565b61009e61016636600461135a565b610bb2565b34801561017757600080fd5b506100e66101863660046112ea565b610c7c565b600073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b1580156101e557600080fd5b505afa1580156101f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061021d9190611306565b905061022883610d4c565b1561028c576000819050806001600160a01b0316634e4d9fea346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561026d57600080fd5b505af1158015610281573d6000803e3d6000fd5b505050505050505050565b6040516370a0823160e01b81523060048201528390829084906001600160a01b038416906370a082319060240160206040518083038186803b1580156102d157600080fd5b505afa1580156102e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103099190611466565b101561035c5760405162461bcd60e51b815260206004820152601060248201527f4e6f742d656e6f7567682d746f6b656e0000000000000000000000000000000060448201526064015b60405180910390fd5b6103706001600160a01b0383168486610d86565b60405163073a938160e11b8152600481018590526001600160a01b03821690630e752702906024015b600060405180830381600087803b15801561026d57600080fd5b505050565b600073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b15801561041257600080fd5b505afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a9190611306565b905061045581610eb8565b61045e83610d4c565b156104a7576040516335313c2160e11b815230600482015281906001600160a01b03821690636a6278429085906024016000604051808303818588803b15801561026d57600080fd5b6040516370a0823160e01b81523060048201528390829084906001600160a01b038416906370a082319060240160206040518083038186803b1580156104ec57600080fd5b505afa158015610500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105249190611466565b10156105725760405162461bcd60e51b815260206004820152601260248201527f4e6f7420656e6f7567682042616c616e636500000000000000000000000000006044820152606401610353565b6105866001600160a01b0383168486610d86565b6040516340c10f1960e01b8152306004820152602481018590526001600160a01b038216906340c10f1990604401610399565b600073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b15801561061357600080fd5b505afa158015610627573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064b9190611306565b60405163317afabb60e21b81526004810184905290915081906001600160a01b0382169063c5ebeaec906024015b600060405180830381600087803b15801561069357600080fd5b505af11580156106a7573d6000803e3d6000fd5b5050505050505050565b60008073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0386811660048301529190911690630494cd9a9060240160206040518083038186803b15801561070c57600080fd5b505afa158015610720573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107449190611306565b6040516305eff7ef60e21b81526001600160a01b038581166004830152919250908216906317bfdfbc90602401602060405180830381600087803b15801561078b57600080fd5b505af115801561079f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c39190611466565b949350505050565b60008073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b15801561082657600080fd5b505afa15801561083a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085e9190611306565b6040516395dd919360e01b81523360048201529091506001600160a01b038216906395dd91939060240160206040518083038186803b1580156108a057600080fd5b505afa1580156108b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d89190611466565b9392505050565b60008073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b15801561093a57600080fd5b505afa15801561094e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109729190611306565b6040516370a0823160e01b81523360048201529091506000906001600160a01b038316906370a082319060240160206040518083038186803b1580156109b757600080fd5b505afa1580156109cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ef9190611466565b90506000826001600160a01b031663182df0f56040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2c57600080fd5b505afa158015610a40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a649190611466565b9050670de0b6b3a7640000610a79838361153a565b610a83919061151a565b95945050505050565b60008073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b158015610ae757600080fd5b505afa158015610afb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1f9190611306565b90506000816001600160a01b031663f8f9da286040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5c57600080fd5b505afa158015610b70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b949190611466565b610ba290633b9aca0061153a565b905062201480610a83818361153a565b600073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b158015610c0c57600080fd5b505afa158015610c20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c449190611306565b6040516312c5282f60e31b81523060048201526024810184905290915081906001600160a01b03821690639629417890604401610679565b60008073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b158015610cd757600080fd5b505afa158015610ceb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0f9190611306565b90506000816001600160a01b031663ae9d70b06040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5c57600080fd5b60006001600160a01b0382161580610d8057506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145b92915050565b610d8f83610d4c565b15610ddc5760405162461bcd60e51b815260206004820152601860248201527f417070726f76652063616c6c6564206f6e204e617469766500000000000000006044820152606401610353565b80610df6576103b36001600160a01b038416836000610fa4565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e9060440160206040518083038186803b158015610e4157600080fd5b505afa158015610e55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e799190611466565b905081811015610eb2578015610e9e57610e9e6001600160a01b038516846000610fa4565b610eb26001600160a01b0385168484610fa4565b50505050565b604080516001808252818301909252738e7e9ea9023b81457ae7e6d2a51b003d421e54089160009190602080830190803683370190505090508281600081518110610f1357634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152604051631853304760e31b81529083169063c299823890610f4e90849060040161149a565b600060405180830381600087803b158015610f6857600080fd5b505af1158015610f7c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610eb29190810190611385565b80158061102d5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015610ff357600080fd5b505afa158015611007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102b9190611466565b155b61109f5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610353565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663095ea7b360e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908401526103b3928692916000916111449185169084906111c1565b8051909150156103b35780806020019051810190611162919061144c565b6103b35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610353565b60606107c38484600085856001600160a01b0385163b6112235760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610353565b600080866001600160a01b0316858760405161123f919061147e565b60006040518083038185875af1925050503d806000811461127c576040519150601f19603f3d011682016040523d82523d6000602084013e611281565b606091505b509150915061129182828661129c565b979650505050505050565b606083156112ab5750816108d8565b8251156112bb5782518084602001fd5b8160405162461bcd60e51b815260040161035391906114e7565b805180151581146112e557600080fd5b919050565b6000602082840312156112fb578081fd5b81356108d8816115a7565b600060208284031215611317578081fd5b81516108d8816115a7565b60008060408385031215611334578081fd5b823561133f816115a7565b9150602083013561134f816115a7565b809150509250929050565b6000806040838503121561136c578182fd5b8235611377816115a7565b946020939093013593505050565b60006020808385031215611397578182fd5b825167ffffffffffffffff808211156113ae578384fd5b818501915085601f8301126113c1578384fd5b8151818111156113d3576113d3611591565b8060051b604051601f19603f830116810181811085821117156113f8576113f8611591565b604052828152858101935084860182860187018a1015611416578788fd5b8795505b8386101561143f5761142b816112d5565b85526001959095019493860193860161141a565b5098975050505050505050565b60006020828403121561145d578081fd5b6108d8826112d5565b600060208284031215611477578081fd5b5051919050565b60008251611490818460208701611565565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156114db5783516001600160a01b0316835292840192918401916001016114b6565b50909695505050505050565b6020815260008251806020840152611506816040850160208701611565565b601f01601f19169190910160400192915050565b60008261153557634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561156057634e487b7160e01b81526011600452602481fd5b500290565b60005b83811015611580578181015183820152602001611568565b83811115610eb25750506000910152565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146115bc57600080fd5b5056fea2646970667358221220e2deed89bf3c9d32f408dc7d81fa5ed75192f546bb2b350f4c417b94ba1d764764736f6c63430008040033

Deployed Bytecode

0x6080604052600436106100865760003560e01c80637d6af079116100595780637d6af079146100f8578063ed05ae7814610118578063f17cca4a14610138578063f3fef3a314610158578063fb99192c1461016b57600080fd5b806335ed8ab81461008b57806347e7ef24146100a05780634b8a3529146100b357806351724377146100c6575b600080fd5b61009e61009936600461135a565b61018b565b005b61009e6100ae36600461135a565b6103b8565b61009e6100c136600461135a565b6105b9565b3480156100d257600080fd5b506100e66100e1366004611322565b6106b1565b60405190815260200160405180910390f35b34801561010457600080fd5b506100e66101133660046112ea565b6107cb565b34801561012457600080fd5b506100e66101333660046112ea565b6108df565b34801561014457600080fd5b506100e66101533660046112ea565b610a8c565b61009e61016636600461135a565b610bb2565b34801561017757600080fd5b506100e66101863660046112ea565b610c7c565b600073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b1580156101e557600080fd5b505afa1580156101f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061021d9190611306565b905061022883610d4c565b1561028c576000819050806001600160a01b0316634e4d9fea346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561026d57600080fd5b505af1158015610281573d6000803e3d6000fd5b505050505050505050565b6040516370a0823160e01b81523060048201528390829084906001600160a01b038416906370a082319060240160206040518083038186803b1580156102d157600080fd5b505afa1580156102e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103099190611466565b101561035c5760405162461bcd60e51b815260206004820152601060248201527f4e6f742d656e6f7567682d746f6b656e0000000000000000000000000000000060448201526064015b60405180910390fd5b6103706001600160a01b0383168486610d86565b60405163073a938160e11b8152600481018590526001600160a01b03821690630e752702906024015b600060405180830381600087803b15801561026d57600080fd5b505050565b600073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b15801561041257600080fd5b505afa158015610426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044a9190611306565b905061045581610eb8565b61045e83610d4c565b156104a7576040516335313c2160e11b815230600482015281906001600160a01b03821690636a6278429085906024016000604051808303818588803b15801561026d57600080fd5b6040516370a0823160e01b81523060048201528390829084906001600160a01b038416906370a082319060240160206040518083038186803b1580156104ec57600080fd5b505afa158015610500573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105249190611466565b10156105725760405162461bcd60e51b815260206004820152601260248201527f4e6f7420656e6f7567682042616c616e636500000000000000000000000000006044820152606401610353565b6105866001600160a01b0383168486610d86565b6040516340c10f1960e01b8152306004820152602481018590526001600160a01b038216906340c10f1990604401610399565b600073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b15801561061357600080fd5b505afa158015610627573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064b9190611306565b60405163317afabb60e21b81526004810184905290915081906001600160a01b0382169063c5ebeaec906024015b600060405180830381600087803b15801561069357600080fd5b505af11580156106a7573d6000803e3d6000fd5b5050505050505050565b60008073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0386811660048301529190911690630494cd9a9060240160206040518083038186803b15801561070c57600080fd5b505afa158015610720573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107449190611306565b6040516305eff7ef60e21b81526001600160a01b038581166004830152919250908216906317bfdfbc90602401602060405180830381600087803b15801561078b57600080fd5b505af115801561079f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c39190611466565b949350505050565b60008073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b15801561082657600080fd5b505afa15801561083a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085e9190611306565b6040516395dd919360e01b81523360048201529091506001600160a01b038216906395dd91939060240160206040518083038186803b1580156108a057600080fd5b505afa1580156108b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d89190611466565b9392505050565b60008073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b15801561093a57600080fd5b505afa15801561094e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109729190611306565b6040516370a0823160e01b81523360048201529091506000906001600160a01b038316906370a082319060240160206040518083038186803b1580156109b757600080fd5b505afa1580156109cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ef9190611466565b90506000826001600160a01b031663182df0f56040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2c57600080fd5b505afa158015610a40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a649190611466565b9050670de0b6b3a7640000610a79838361153a565b610a83919061151a565b95945050505050565b60008073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b158015610ae757600080fd5b505afa158015610afb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1f9190611306565b90506000816001600160a01b031663f8f9da286040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5c57600080fd5b505afa158015610b70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b949190611466565b610ba290633b9aca0061153a565b905062201480610a83818361153a565b600073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b158015610c0c57600080fd5b505afa158015610c20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c449190611306565b6040516312c5282f60e31b81523060048201526024810184905290915081906001600160a01b03821690639629417890604401610679565b60008073410f9179ed194b8b3583abfebb5c3ef2acd62a3460405163024a66cd60e11b81526001600160a01b0385811660048301529190911690630494cd9a9060240160206040518083038186803b158015610cd757600080fd5b505afa158015610ceb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0f9190611306565b90506000816001600160a01b031663ae9d70b06040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5c57600080fd5b60006001600160a01b0382161580610d8057506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145b92915050565b610d8f83610d4c565b15610ddc5760405162461bcd60e51b815260206004820152601860248201527f417070726f76652063616c6c6564206f6e204e617469766500000000000000006044820152606401610353565b80610df6576103b36001600160a01b038416836000610fa4565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e9060440160206040518083038186803b158015610e4157600080fd5b505afa158015610e55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e799190611466565b905081811015610eb2578015610e9e57610e9e6001600160a01b038516846000610fa4565b610eb26001600160a01b0385168484610fa4565b50505050565b604080516001808252818301909252738e7e9ea9023b81457ae7e6d2a51b003d421e54089160009190602080830190803683370190505090508281600081518110610f1357634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152604051631853304760e31b81529083169063c299823890610f4e90849060040161149a565b600060405180830381600087803b158015610f6857600080fd5b505af1158015610f7c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610eb29190810190611385565b80158061102d5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b158015610ff357600080fd5b505afa158015611007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102b9190611466565b155b61109f5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610353565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663095ea7b360e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908401526103b3928692916000916111449185169084906111c1565b8051909150156103b35780806020019051810190611162919061144c565b6103b35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610353565b60606107c38484600085856001600160a01b0385163b6112235760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610353565b600080866001600160a01b0316858760405161123f919061147e565b60006040518083038185875af1925050503d806000811461127c576040519150601f19603f3d011682016040523d82523d6000602084013e611281565b606091505b509150915061129182828661129c565b979650505050505050565b606083156112ab5750816108d8565b8251156112bb5782518084602001fd5b8160405162461bcd60e51b815260040161035391906114e7565b805180151581146112e557600080fd5b919050565b6000602082840312156112fb578081fd5b81356108d8816115a7565b600060208284031215611317578081fd5b81516108d8816115a7565b60008060408385031215611334578081fd5b823561133f816115a7565b9150602083013561134f816115a7565b809150509250929050565b6000806040838503121561136c578182fd5b8235611377816115a7565b946020939093013593505050565b60006020808385031215611397578182fd5b825167ffffffffffffffff808211156113ae578384fd5b818501915085601f8301126113c1578384fd5b8151818111156113d3576113d3611591565b8060051b604051601f19603f830116810181811085821117156113f8576113f8611591565b604052828152858101935084860182860187018a1015611416578788fd5b8795505b8386101561143f5761142b816112d5565b85526001959095019493860193860161141a565b5098975050505050505050565b60006020828403121561145d578081fd5b6108d8826112d5565b600060208284031215611477578081fd5b5051919050565b60008251611490818460208701611565565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156114db5783516001600160a01b0316835292840192918401916001016114b6565b50909695505050505050565b6020815260008251806020840152611506816040850160208701611565565b601f01601f19169190910160400192915050565b60008261153557634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561156057634e487b7160e01b81526011600452602481fd5b500290565b60005b83811015611580578181015183820152602001611568565b83811115610eb25750506000910152565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146115bc57600080fd5b5056fea2646970667358221220e2deed89bf3c9d32f408dc7d81fa5ed75192f546bb2b350f4c417b94ba1d764764736f6c63430008040033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.