ETH Price: $2,606.37 (-3.00%)

Contract

0x5432526e75d45369970b8616F54b25c831d1e2b2
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...164917112023-01-26 14:53:11743 days ago1674744791IN
0x5432526e...831d1e2b2
0 ETH0.0006985224.22731953

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xC65D58A3...D9b6aCE6c
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
ConcentratorStrategy

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 15 : ConcentratorStrategy.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma abicoder v2;

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

import "./YieldStrategyBase.sol";
import "../interfaces/ICurveSwapPool.sol";
import "../../concentrator/interfaces/IAladdinCRVConvexVault.sol";
import "../../concentrator/interfaces/IAladdinCRV.sol";
import "../../interfaces/IZap.sol";
import "../../misc/checker/IPriceChecker.sol";

// solhint-disable reason-string

/// @title Concentrator Strategy for CLever.
///
/// @dev The gas usage is very high when combining CLever and Concentrator, we need a batch deposit version.
contract ConcentratorStrategy is Ownable, YieldStrategyBase {
  using SafeERC20 for IERC20;

  event UpdatePercentage(uint256 _percentage);
  event UpdateChecker(address _checker);

  uint256 internal constant PRECISION = 1e9;

  /// @dev The address of aCRV on mainnet.
  // solhint-disable-next-line const-name-snakecase
  address internal constant aCRV = 0x2b95A1Dcc3D405535f9ed33c219ab38E8d7e0884;

  /// @dev The address of cvxCRV on mainnet.
  // solhint-disable-next-line const-name-snakecase
  address internal constant cvxCRV = 0x62B9c7356A2Dc64a1969e19C23e4f579F9810Aa7;

  /// @notice The address of zap contract.
  address public immutable zap;

  /// @dev The address of Concentrator Vault on mainnet.
  address public immutable vault;

  /// @notice The address of curve pool for corresponding yield token.
  address public immutable curvePool;

  uint256 public immutable pid;

  uint256 public percentage;

  address public checker;

  constructor(
    address _zap,
    address _vault,
    uint256 _pid,
    uint256 _percentage,
    address _curvePool,
    address _yieldToken,
    address _underlyingToken,
    address _operator
  ) YieldStrategyBase(_yieldToken, _underlyingToken, _operator) {
    require(_curvePool != address(0), "ConcentratorStrategy: zero address");
    require(_percentage <= PRECISION, "ConcentratorStrategy: percentage too large");

    zap = _zap;
    vault = _vault;
    pid = _pid;
    percentage = _percentage;
    curvePool = _curvePool;

    // The Concentrator Vault is maintained by our team, it's safe to approve uint256.max.
    IERC20(_yieldToken).safeApprove(_vault, uint256(-1));
  }

  /// @inheritdoc IYieldStrategy
  function underlyingPrice() public view override returns (uint256) {
    return ICurveSwapPool(curvePool).get_virtual_price();
  }

  /// @inheritdoc IYieldStrategy
  ///
  /// @dev It is just an estimation, not accurate amount.
  function totalUnderlyingToken() external view override returns (uint256) {
    return (_totalYieldToken() * underlyingPrice()) / 1e18;
  }

  /// @inheritdoc IYieldStrategy
  function totalYieldToken() external view override returns (uint256) {
    return _totalYieldToken();
  }

  /// @inheritdoc IYieldStrategy
  function deposit(
    address,
    uint256 _amount,
    bool _isUnderlying
  ) external virtual override onlyOperator returns (uint256 _yieldAmount) {
    _yieldAmount = _zapBeforeDeposit(_amount, _isUnderlying);

    IAladdinCRVConvexVault(vault).deposit(pid, _yieldAmount);
  }

  /// @inheritdoc IYieldStrategy
  function withdraw(
    address _recipient,
    uint256 _amount,
    bool _asUnderlying
  ) external virtual override onlyOperator returns (uint256 _returnAmount) {
    _amount = _withdrawFromConcentrator(pid, _amount);

    _returnAmount = _zapAfterWithdraw(_recipient, _amount, _asUnderlying);
  }

  /// @inheritdoc IYieldStrategy
  function harvest()
    external
    virtual
    override
    onlyOperator
    returns (
      uint256 _underlyingAmount,
      address[] memory _rewardTokens,
      uint256[] memory _amounts
    )
  {
    // 1. claim aCRV from Concentrator Vault
    uint256 _aCRVAmount = IAladdinCRVConvexVault(vault).claim(pid, 0, IAladdinCRVConvexVault.ClaimOption.Claim);

    address _underlyingToken = underlyingToken;
    // 2. sell part of aCRV as underlying token
    if (percentage > 0) {
      uint256 _sellAmount = (_aCRVAmount * percentage) / PRECISION;
      _aCRVAmount -= _sellAmount;

      address _zap = zap;
      uint256 _cvxCRVAmount = IAladdinCRV(aCRV).withdraw(_zap, _sellAmount, 0, IAladdinCRV.WithdrawOption.Withdraw);
      _underlyingAmount = IZap(_zap).zap(cvxCRV, _cvxCRVAmount, _underlyingToken, 0);
    }

    // 3. transfer rewards to operator
    if (_underlyingAmount > 0) {
      IERC20(_underlyingToken).safeTransfer(msg.sender, _underlyingAmount);
    }
    if (_aCRVAmount > 0) {
      IERC20(aCRV).safeTransfer(msg.sender, _aCRVAmount);
    }

    _rewardTokens = new address[](1);
    _rewardTokens[0] = aCRV;

    _amounts = new uint256[](1);
    _amounts[0] = _aCRVAmount;
  }

  /// @inheritdoc IYieldStrategy
  function migrate(address _strategy) external virtual override onlyOperator returns (uint256 _yieldAmount) {
    IAladdinCRVConvexVault(vault).withdrawAllAndClaim(pid, 0, IAladdinCRVConvexVault.ClaimOption.None);

    address _yieldToken = yieldToken;
    _yieldAmount = IERC20(_yieldToken).balanceOf(address(this));
    IERC20(_yieldToken).safeTransfer(_strategy, _yieldAmount);
  }

  /// @inheritdoc IYieldStrategy
  function onMigrateFinished(uint256 _yieldAmount) external virtual override onlyOperator {
    IAladdinCRVConvexVault(vault).deposit(pid, _yieldAmount);
  }

  function updatePercentage(uint256 _percentage) external onlyOwner {
    require(_percentage <= PRECISION, "ConcentratorStrategy: percentage too large");

    percentage = _percentage;

    emit UpdatePercentage(_percentage);
  }

  function updateChecker(address _checker) external onlyOwner {
    checker = _checker;

    emit UpdateChecker(_checker);
  }

  function _withdrawFromConcentrator(uint256 _pid, uint256 _amount) internal returns (uint256) {
    uint256 _totalShare = IAladdinCRVConvexVault(vault).getTotalShare(_pid);
    uint256 _totalUnderlying = IAladdinCRVConvexVault(vault).getTotalUnderlying(_pid);
    uint256 _shares = (_amount * _totalShare) / _totalUnderlying;

    // @note reuse variable `_amount` to indicate the amount of yield token withdrawn.
    (_amount, ) = IAladdinCRVConvexVault(vault).withdrawAndClaim(
      _pid,
      _shares,
      0,
      IAladdinCRVConvexVault.ClaimOption.None
    );
    return _amount;
  }

  function _zapBeforeDeposit(uint256 _amount, bool _isUnderlying) internal returns (uint256) {
    if (_isUnderlying) {
      address _checker = checker;
      if (_checker != address(0)) {
        require(IPriceChecker(_checker).check(yieldToken), "price is manipulated");
      }
      // @todo add reserve check for curve lp to avoid flashloan attack.
      address _zap = zap;
      address _underlyingToken = underlyingToken;
      IERC20(_underlyingToken).safeTransfer(_zap, _amount);
      return IZap(_zap).zap(_underlyingToken, _amount, yieldToken, 0);
    } else {
      return _amount;
    }
  }

  function _zapAfterWithdraw(
    address _recipient,
    uint256 _amount,
    bool _asUnderlying
  ) internal returns (uint256) {
    address _token = yieldToken;
    if (_asUnderlying) {
      address _checker = checker;
      if (_checker != address(0)) {
        require(IPriceChecker(_checker).check(yieldToken), "price is manipulated");
      }
      address _zap = zap;
      address _underlyingToken = underlyingToken;
      IERC20(_token).safeTransfer(_zap, _amount);
      _amount = IZap(_zap).zap(_token, _amount, _underlyingToken, 0);
      _token = _underlyingToken;
    }
    IERC20(_token).safeTransfer(_recipient, _amount);
    return _amount;
  }

  function _totalYieldTokenInConcentrator(uint256 _pid) internal view returns (uint256) {
    address _vault = vault;
    uint256 _totalShare = IAladdinCRVConvexVault(_vault).getTotalShare(_pid);
    uint256 _totalUnderlying = IAladdinCRVConvexVault(_vault).getTotalUnderlying(_pid);
    uint256 _userShare = IAladdinCRVConvexVault(_vault).getUserShare(_pid, address(this));
    if (_userShare == 0) return 0;
    return (uint256(_userShare) * _totalUnderlying) / _totalShare;
  }

  function _totalYieldToken() internal view virtual returns (uint256) {
    return _totalYieldTokenInConcentrator(pid);
  }
}

File 2 of 15 : IZap.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;

interface IZap {
  function zap(
    address _fromToken,
    uint256 _amountIn,
    address _toToken,
    uint256 _minOut
  ) external payable returns (uint256);

  function zapWithRoutes(
    address _fromToken,
    uint256 _amountIn,
    address _toToken,
    uint256[] calldata _routes,
    uint256 _minOut
  ) external payable returns (uint256);

  function zapFrom(
    address _fromToken,
    uint256 _amountIn,
    address _toToken,
    uint256 _minOut
  ) external payable returns (uint256);
}

File 3 of 15 : ICurveSwapPool.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;

// solhint-disable func-name-mixedcase

interface ICurveSwapPool {
  function get_virtual_price() external view returns (uint256);
}

File 4 of 15 : IAladdinCRVConvexVault.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;

interface IAladdinCRVConvexVault {
  enum ClaimOption {
    None,
    Claim,
    ClaimAsCvxCRV,
    ClaimAsCRV,
    ClaimAsCVX,
    ClaimAsETH
  }

  event Deposit(uint256 indexed _pid, address indexed _sender, uint256 _amount);
  event Withdraw(uint256 indexed _pid, address indexed _sender, uint256 _shares);
  event Claim(address indexed _sender, uint256 _reward, ClaimOption _option);
  event Harvest(address indexed _caller, uint256 _reward, uint256 _platformFee, uint256 _harvestBounty);

  event UpdateWithdrawalFeePercentage(uint256 indexed _pid, uint256 _feePercentage);
  event UpdatePlatformFeePercentage(uint256 indexed _pid, uint256 _feePercentage);
  event UpdateHarvestBountyPercentage(uint256 indexed _pid, uint256 _percentage);
  event UpdatePlatform(address indexed _platform);
  event UpdateZap(address indexed _zap);
  event UpdatePoolRewardTokens(uint256 indexed _pid, address[] _rewardTokens);
  event AddPool(uint256 indexed _pid, uint256 _convexPid, address[] _rewardTokens);
  event PausePoolDeposit(uint256 indexed _pid, bool _status);
  event PausePoolWithdraw(uint256 indexed _pid, bool _status);

  /// @notice Return the amount of pending AladdinCRV rewards for specific pool.
  /// @param _pid - The pool id.
  /// @param _account - The address of user.
  function pendingReward(uint256 _pid, address _account) external view returns (uint256);

  /// @notice Return the amount of pending AladdinCRV rewards for all pool.
  /// @param _account - The address of user.
  function pendingRewardAll(address _account) external view returns (uint256);

  /// @notice Return the user share for specific user.
  /// @param _pid The pool id to query.
  /// @param _account The address of user.
  function getUserShare(uint256 _pid, address _account) external view returns (uint256);

  /// @notice Return the total underlying token deposited.
  /// @param _pid The pool id to query.
  function getTotalUnderlying(uint256 _pid) external view returns (uint256);

  /// @notice Return the total pool share deposited.
  /// @param _pid The pool id to query.
  function getTotalShare(uint256 _pid) external view returns (uint256);

  /// @notice Deposit some token to specific pool.
  /// @dev This function is deprecated.
  /// @param _pid The pool id to query
  /// @param _amount The amount of token to deposit.
  /// @return share The amount of share after deposit.
  function deposit(uint256 _pid, uint256 _amount) external returns (uint256 share);

  /// @notice Deposit some token to specific pool for someone.
  /// @param _pid The pool id.
  /// @param _recipient The address of recipient who will recieve the token.
  /// @param _amount The amount of token to deposit.
  /// @return share The amount of share after deposit.
  function deposit(
    uint256 _pid,
    address _recipient,
    uint256 _amount
  ) external returns (uint256 share);

  /// @notice Deposit all token of the caller to specific pool.
  /// @dev This function is deprecated.
  /// @param _pid The pool id.
  /// @return share The amount of share after deposit.
  function depositAll(uint256 _pid) external returns (uint256 share);

  /// @notice Deposit all token of the caller to specific pool for someone.
  /// @param _pid The pool id.
  /// @param _recipient The address of recipient who will recieve the token.
  /// @return share The amount of share after deposit.
  function depositAll(uint256 _pid, address _recipient) external returns (uint256 share);

  /// @notice Deposit some token to specific pool with zap.
  /// @dev This function is deprecated.
  /// @param _pid The pool id.
  /// @param _token The address of token to deposit.
  /// @param _amount The amount of token to deposit.
  /// @param _minAmount The minimum amount of share to deposit.
  /// @return share The amount of share after deposit.
  function zapAndDeposit(
    uint256 _pid,
    address _token,
    uint256 _amount,
    uint256 _minAmount
  ) external payable returns (uint256 share);

  /// @notice Deposit some token to specific pool with zap for someone.
  /// @param _pid The pool id.
  /// @param _recipient The address of recipient who will recieve the token.
  /// @param _token The address of token to deposit.
  /// @param _amount The amount of token to deposit.
  /// @param _minAmount The minimum amount of share to deposit.
  /// @return share The amount of share after deposit.
  function zapAndDeposit(
    uint256 _pid,
    address _recipient,
    address _token,
    uint256 _amount,
    uint256 _minAmount
  ) external payable returns (uint256 share);

  /// @notice Deposit all token to specific pool with zap.
  /// @dev This function is deprecated.
  /// @param _pid The pool id.
  /// @param _token The address of token to deposit.
  /// @param _minAmount The minimum amount of share to deposit.
  /// @return share The amount of share after deposit.
  function zapAllAndDeposit(
    uint256 _pid,
    address _token,
    uint256 _minAmount
  ) external payable returns (uint256);

  /// @notice Deposit all token to specific pool with zap for someone.
  /// @param _pid The pool id.
  /// @param _recipient The address of recipient who will recieve the token.
  /// @param _token The address of token to deposit.
  /// @param _minAmount The minimum amount of share to deposit.
  /// @return share The amount of share after deposit.
  function zapAllAndDeposit(
    uint256 _pid,
    address _recipient,
    address _token,
    uint256 _minAmount
  ) external payable returns (uint256);

  /// @notice Withdraw some token from specific pool and zap to token.
  /// @param _pid - The pool id.
  /// @param _shares - The share of token want to withdraw.
  /// @param _token - The address of token zapping to.
  /// @param _minOut - The minimum amount of token to receive.
  /// @return withdrawn - The amount of token sent to caller.
  function withdrawAndZap(
    uint256 _pid,
    uint256 _shares,
    address _token,
    uint256 _minOut
  ) external returns (uint256);

  /// @notice Withdraw all token from specific pool and zap to token.
  /// @param _pid - The pool id.
  /// @param _token - The address of token zapping to.
  /// @param _minOut - The minimum amount of token to receive.
  /// @return withdrawn - The amount of token sent to caller.
  function withdrawAllAndZap(
    uint256 _pid,
    address _token,
    uint256 _minOut
  ) external returns (uint256);

  /// @notice Withdraw some token from specific pool and claim pending rewards.
  /// @param _pid - The pool id.
  /// @param _shares - The share of token want to withdraw.
  /// @param _minOut - The minimum amount of pending reward to receive.
  /// @param _option - The claim option (don't claim, as aCRV, cvxCRV, CRV, CVX, or ETH)
  /// @return withdrawn - The amount of token sent to caller.
  /// @return claimed - The amount of reward sent to caller.
  function withdrawAndClaim(
    uint256 _pid,
    uint256 _shares,
    uint256 _minOut,
    ClaimOption _option
  ) external returns (uint256, uint256);

  /// @notice Withdraw all share of token from specific pool and claim pending rewards.
  /// @param _pid - The pool id.
  /// @param _minOut - The minimum amount of pending reward to receive.
  /// @param _option - The claim option (as aCRV, cvxCRV, CRV, CVX, or ETH)
  /// @return withdrawn - The amount of token sent to caller.
  /// @return claimed - The amount of reward sent to caller.
  function withdrawAllAndClaim(
    uint256 _pid,
    uint256 _minOut,
    ClaimOption _option
  ) external returns (uint256, uint256);

  /// @notice claim pending rewards from specific pool.
  /// @param _pid - The pool id.
  /// @param _minOut - The minimum amount of pending reward to receive.
  /// @param _option - The claim option (as aCRV, cvxCRV, CRV, CVX, or ETH)
  /// @return claimed - The amount of reward sent to caller.
  function claim(
    uint256 _pid,
    uint256 _minOut,
    ClaimOption _option
  ) external returns (uint256);

  /// @notice claim pending rewards from all pools.
  /// @param _minOut - The minimum amount of pending reward to receive.
  /// @param _option - The claim option (as aCRV, cvxCRV, CRV, CVX, or ETH)
  /// @return claimed - The amount of reward sent to caller.
  function claimAll(uint256 _minOut, ClaimOption _option) external returns (uint256);

  /// @notice Harvest the pending reward and convert to aCRV.
  /// @param _pid - The pool id.
  /// @param _recipient - The address of account to receive harvest bounty.
  /// @param _minimumOut - The minimum amount of cvxCRV should get.
  /// @return harvested - The amount of cvxCRV harvested after zapping all other tokens to it.
  function harvest(
    uint256 _pid,
    address _recipient,
    uint256 _minimumOut
  ) external returns (uint256);
}

File 5 of 15 : YieldStrategyBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;

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

import "../interfaces/IYieldStrategy.sol";

/// @title YieldStrategyBase for CLever and Furnace.
abstract contract YieldStrategyBase is IYieldStrategy {
  using SafeERC20 for IERC20;

  /// @inheritdoc IYieldStrategy
  address public immutable override yieldToken;

  /// @inheritdoc IYieldStrategy
  address public immutable override underlyingToken;

  /// @notice The address of operator.
  address public immutable operator;

  modifier onlyOperator() {
    require(msg.sender == operator, "YieldStrategy: only operator");
    _;
  }

  constructor(
    address _yieldToken,
    address _underlyingToken,
    address _operator
  ) {
    require(_yieldToken != address(0), "YieldStrategy: zero address");
    require(_underlyingToken != address(0), "YieldStrategy: zero address");
    require(_operator != address(0), "YieldStrategy: zero address");

    yieldToken = _yieldToken;
    underlyingToken = _underlyingToken;
    operator = _operator;
  }

  /// @inheritdoc IYieldStrategy
  function migrate(address _strategy) external virtual override onlyOperator returns (uint256 _yieldAmount) {
    address _yieldToken = yieldToken;
    _yieldAmount = IERC20(_yieldToken).balanceOf(address(this));
    IERC20(_yieldToken).safeTransfer(_strategy, _yieldAmount);
  }

  /// @inheritdoc IYieldStrategy
  // solhint-disable-next-line no-empty-blocks
  function onMigrateFinished(uint256 _yieldAmount) external virtual override onlyOperator {}

  /// @inheritdoc IYieldStrategy
  function execute(
    address _to,
    uint256 _value,
    bytes calldata _data
  ) external payable override onlyOperator returns (bool, bytes memory) {
    // solhint-disable-next-line avoid-low-level-calls
    (bool success, bytes memory result) = _to.call{ value: _value }(_data);
    return (success, result);
  }
}

File 6 of 15 : IAladdinCRV.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;

import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";

interface IAladdinCRV is IERC20Upgradeable {
  event Harvest(address indexed _caller, uint256 _amount);
  event Deposit(address indexed _sender, address indexed _recipient, uint256 _amount);
  event Withdraw(
    address indexed _sender,
    address indexed _recipient,
    uint256 _shares,
    IAladdinCRV.WithdrawOption _option
  );

  event UpdateWithdrawalFeePercentage(uint256 _feePercentage);
  event UpdatePlatformFeePercentage(uint256 _feePercentage);
  event UpdateHarvestBountyPercentage(uint256 _percentage);
  event UpdatePlatform(address indexed _platform);
  event UpdateZap(address indexed _zap);

  enum WithdrawOption {
    Withdraw,
    WithdrawAndStake,
    WithdrawAsCRV,
    WithdrawAsCVX,
    WithdrawAsETH
  }

  /// @dev return the total amount of cvxCRV staked.
  function totalUnderlying() external view returns (uint256);

  /// @dev return the amount of cvxCRV staked for user
  function balanceOfUnderlying(address _user) external view returns (uint256);

  function deposit(address _recipient, uint256 _amount) external returns (uint256);

  function depositAll(address _recipient) external returns (uint256);

  function depositWithCRV(address _recipient, uint256 _amount) external returns (uint256);

  function depositAllWithCRV(address _recipient) external returns (uint256);

  function withdraw(
    address _recipient,
    uint256 _shares,
    uint256 _minimumOut,
    WithdrawOption _option
  ) external returns (uint256);

  function withdrawAll(
    address _recipient,
    uint256 _minimumOut,
    WithdrawOption _option
  ) external returns (uint256);

  function harvest(address _recipient, uint256 _minimumOut) external returns (uint256);
}

File 7 of 15 : IPriceChecker.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;

interface IPriceChecker {
  function check(address lp) external view returns (bool);
}

File 8 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @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);
}

File 9 of 15 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

import "./IERC20.sol";
import "../../math/SafeMath.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 SafeMath for uint256;
    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'
        // solhint-disable-next-line max-line-length
        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).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _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
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 10 of 15 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

import "../utils/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 11 of 15 : IYieldStrategy.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;

interface IYieldStrategy {
  /// @notice Return the the address of the yield token.
  function yieldToken() external view returns (address);

  /// @notice Return the the address of the underlying token.
  /// @dev The underlying token maybe the same as the yield token.
  function underlyingToken() external view returns (address);

  /// @notice Return the number of underlying token for each yield token worth, multiplied by 1e18.
  function underlyingPrice() external view returns (uint256);

  /// @notice Return the total number of underlying token in the contract.
  function totalUnderlyingToken() external view returns (uint256);

  /// @notice Return the total number of yield token in the contract.
  function totalYieldToken() external view returns (uint256);

  /// @notice Deposit underlying token or yield token to corresponding strategy.
  /// @dev Requirements:
  ///   + Caller should make sure the token is already transfered into the strategy contract.
  ///   + Caller should make sure the deposit amount is greater than zero.
  ///
  /// @param _recipient The address of recipient who will receive the share.
  /// @param _amount The amount of token to deposit.
  /// @param _isUnderlying Whether the deposited token is underlying token.
  ///
  /// @return _yieldAmount The amount of yield token deposited.
  function deposit(
    address _recipient,
    uint256 _amount,
    bool _isUnderlying
  ) external returns (uint256 _yieldAmount);

  /// @notice Withdraw underlying token or yield token from corresponding strategy.
  /// @dev Requirements:
  ///   + Caller should make sure the withdraw amount is greater than zero.
  ///
  /// @param _recipient The address of recipient who will receive the token.
  /// @param _amount The amount of yield token to withdraw.
  /// @param _asUnderlying Whether the withdraw as underlying token.
  ///
  /// @return _returnAmount The amount of token sent to `_recipient`.
  function withdraw(
    address _recipient,
    uint256 _amount,
    bool _asUnderlying
  ) external returns (uint256 _returnAmount);

  /// @notice Harvest possible rewards from strategy.
  /// @dev Part of the reward tokens will be sold to underlying token.
  ///
  /// @return _underlyingAmount The amount of underlying token harvested.
  /// @return _rewardTokens The address list of extra reward tokens.
  /// @return _amounts The list of amount of corresponding extra reward token.
  function harvest()
    external
    returns (
      uint256 _underlyingAmount,
      address[] memory _rewardTokens,
      uint256[] memory _amounts
    );

  /// @notice Migrate all yield token in current strategy to another strategy.
  /// @param _strategy The address of new yield strategy.
  function migrate(address _strategy) external returns (uint256 _yieldAmount);

  /// @notice Notify the target strategy that the migration is finished.
  /// @param _yieldAmount The amount of yield token migrated.
  function onMigrateFinished(uint256 _yieldAmount) external;

  /// @notice Emergency function to execute arbitrary call.
  /// @dev This function should be only used in case of emergency. It should never be called explicitly
  ///  in any contract in normal case.
  ///
  /// @param _to The address of target contract to call.
  /// @param _value The value passed to the target contract.
  /// @param _data The calldata pseed to the target contract.
  function execute(
    address _to,
    uint256 _value,
    bytes calldata _data
  ) external payable returns (bool, bytes memory);
}

File 12 of 15 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 13 of 15 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 14 of 15 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @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);
}

File 15 of 15 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_zap","type":"address"},{"internalType":"address","name":"_vault","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_percentage","type":"uint256"},{"internalType":"address","name":"_curvePool","type":"address"},{"internalType":"address","name":"_yieldToken","type":"address"},{"internalType":"address","name":"_underlyingToken","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_checker","type":"address"}],"name":"UpdateChecker","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"UpdatePercentage","type":"event"},{"inputs":[],"name":"checker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"curvePool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_isUnderlying","type":"bool"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"_yieldAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"execute","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"harvest","outputs":[{"internalType":"uint256","name":"_underlyingAmount","type":"uint256"},{"internalType":"address[]","name":"_rewardTokens","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"migrate","outputs":[{"internalType":"uint256","name":"_yieldAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_yieldAmount","type":"uint256"}],"name":"onMigrateFinished","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"percentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalUnderlyingToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalYieldToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlyingPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_checker","type":"address"}],"name":"updateChecker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"updatePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_asUnderlying","type":"bool"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"_returnAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yieldToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"zap","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x6080604052600436106101405760003560e01c80638da5cb5b116100b6578063e8df9ccd1161006f578063e8df9ccd14610316578063ead5d35914610336578063efa32d4914610356578063f10684541461036b578063f2fde38b14610380578063fbfa77cf146103a057610140565b80638da5cb5b146102815780639ce2e5b414610296578063b61d27f6146102ab578063c78ad77f146102cc578063ce5494bb146102e1578063cf5303cf1461030157610140565b80634641257d116101085780634641257d146101e9578063570ca7351461020d5780635c2930b61461022257806365d2cb0814610242578063715018a61461025757806376d5de851461026c57610140565b806312b76bf214610145578063218751b2146101675780632495a59914610192578063262d6152146101a75780633edd1128146101bc575b600080fd5b34801561015157600080fd5b50610165610160366004611e84565b6103b5565b005b34801561017357600080fd5b5061017c61046d565b6040516101899190611fdc565b60405180910390f35b34801561019e57600080fd5b5061017c610491565b3480156101b357600080fd5b5061017c6104b5565b3480156101c857600080fd5b506101dc6101d7366004611e9e565b6104d9565b6040516101899190612126565b3480156101f557600080fd5b506101fe61061b565b60405161018993929190612146565b34801561021957600080fd5b5061017c6109c9565b34801561022e57600080fd5b5061016561023d366004611f7b565b6109ed565b34801561024e57600080fd5b506101dc610ab1565b34801561026357600080fd5b50610165610ac0565b34801561027857600080fd5b5061017c610b6c565b34801561028d57600080fd5b5061017c610b90565b3480156102a257600080fd5b506101dc610b9f565b6102be6102b9366004611edd565b610bc8565b604051610189929190612051565b3480156102d857600080fd5b506101dc610cad565b3480156102ed57600080fd5b506101dc6102fc366004611e84565b610cb3565b34801561030d57600080fd5b5061017c610e9e565b34801561032257600080fd5b50610165610331366004611f7b565b610ead565b34801561034257600080fd5b506101dc610351366004611e9e565b610fdc565b34801561036257600080fd5b506101dc611088565b34801561037757600080fd5b506101dc61111b565b34801561038c57600080fd5b5061016561039b366004611e84565b61113f565b3480156103ac57600080fd5b5061017c611241565b6103bd611393565b6001600160a01b03166103ce610b90565b6001600160a01b031614610417576040805162461bcd60e51b815260206004820181905260248201526000805160206122a5833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383161790556040517fb01664a1a81b03a7bab628b8e1cf615a49e6e11601e6f7b09b24e1504ee37a9890610462908390611fdc565b60405180910390a150565b7f00000000000000000000000084c333e94aea4a51a21f6cf0c7f528c50dc7592c81565b7f000000000000000000000000853d955acef822db058eb8505911ed77f175b99e81565b7f0000000000000000000000001104b4df568fa7af90b1bed1d78a2f71e748dc8a81565b6000336001600160a01b037f0000000000000000000000002c37f1dced208530a05b061a183d8937f686157e1614610546576040805162461bcd60e51b815260206004820152601c6024820152600080516020612239833981519152604482015290519081900360640190fd5b6105508383611397565b604051631c57762b60e31b81529091506001600160a01b037f0000000000000000000000003cf54f3a1969be9916dad548f3c084331c4450b5169063e2bbb158906105c1907f00000000000000000000000000000000000000000000000000000000000000269085906004016121ee565b602060405180830381600087803b1580156105db57600080fd5b505af11580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106139190611f93565b509392505050565b6000606080336001600160a01b037f0000000000000000000000002c37f1dced208530a05b061a183d8937f686157e161461068b576040805162461bcd60e51b815260206004820152601c6024820152600080516020612239833981519152604482015290519081900360640190fd5b6040516369af14ad60e11b81526000906001600160a01b037f0000000000000000000000003cf54f3a1969be9916dad548f3c084331c4450b5169063d35e295a906106ff907f00000000000000000000000000000000000000000000000000000000000000269085906001906004016121d3565b602060405180830381600087803b15801561071957600080fd5b505af115801561072d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107519190611f93565b6001549091507f000000000000000000000000853d955acef822db058eb8505911ed77f175b99e90156108f1576000633b9aca0060015484028161079157fe5b6040516315980d8960e01b8152919004938490039391507f0000000000000000000000001104b4df568fa7af90b1bed1d78a2f71e748dc8a90600090732b95a1dcc3d405535f9ed33c219ab38e8d7e0884906315980d89906107fd90859087908690819060040161201a565b602060405180830381600087803b15801561081757600080fd5b505af115801561082b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084f9190611f93565b6040516349df439160e01b81529091506001600160a01b038316906349df439190610899907362b9c7356a2dc64a1969e19c23e4f579f9810aa79085908990600090600401611ff0565b602060405180830381600087803b1580156108b357600080fd5b505af11580156108c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108eb9190611f93565b97505050505b841561090b5761090b6001600160a01b0382163387611577565b811561093057610930732b95a1dcc3d405535f9ed33c219ab38e8d7e08843384611577565b6040805160018082528183019092529060208083019080368337019050509350732b95a1dcc3d405535f9ed33c219ab38e8d7e08848460008151811061097257fe5b6001600160a01b039290921660209283029190910182015260408051600180825281830190925291828101908036833701905050925081836000815181106109b657fe5b6020026020010181815250505050909192565b7f0000000000000000000000002c37f1dced208530a05b061a183d8937f686157e81565b6109f5611393565b6001600160a01b0316610a06610b90565b6001600160a01b031614610a4f576040805162461bcd60e51b815260206004820181905260248201526000805160206122a5833981519152604482015290519081900360640190fd5b633b9aca00811115610a7c5760405162461bcd60e51b8152600401610a73906120ae565b60405180910390fd5b60018190556040517f0f5eafb387d7dc47812fe3a49ef896faf32108ac04238ec0814e9b0f90e4687890610462908390612126565b6000610abb6115c9565b905090565b610ac8611393565b6001600160a01b0316610ad9610b90565b6001600160a01b031614610b22576040805162461bcd60e51b815260206004820181905260248201526000805160206122a5833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b7f00000000000000000000000084c333e94aea4a51a21f6cf0c7f528c50dc7592c81565b6000546001600160a01b031690565b6000670de0b6b3a7640000610bb2611088565b610bba6115c9565b0281610bc257fe5b04905090565b60006060336001600160a01b037f0000000000000000000000002c37f1dced208530a05b061a183d8937f686157e1614610c37576040805162461bcd60e51b815260206004820152601c6024820152600080516020612239833981519152604482015290519081900360640190fd5b600080876001600160a01b0316878787604051808383808284376040519201945060009350909150508083038185875af1925050503d8060008114610c98576040519150601f19603f3d011682016040523d82523d6000602084013e610c9d565b606091505b5090999098509650505050505050565b60015481565b6000336001600160a01b037f0000000000000000000000002c37f1dced208530a05b061a183d8937f686157e1614610d20576040805162461bcd60e51b815260206004820152601c6024820152600080516020612239833981519152604482015290519081900360640190fd5b604051631e8640d360e01b81526001600160a01b037f0000000000000000000000003cf54f3a1969be9916dad548f3c084331c4450b51690631e8640d390610d91907f00000000000000000000000000000000000000000000000000000000000000269060009081906004016121d3565b6040805180830381600087803b158015610daa57600080fd5b505af1158015610dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de29190611fab565b50506040516370a0823160e01b81527f00000000000000000000000084c333e94aea4a51a21f6cf0c7f528c50dc7592c906001600160a01b038216906370a0823190610e32903090600401611fdc565b60206040518083038186803b158015610e4a57600080fd5b505afa158015610e5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e829190611f93565b9150610e986001600160a01b0382168484611577565b50919050565b6002546001600160a01b031681565b336001600160a01b037f0000000000000000000000002c37f1dced208530a05b061a183d8937f686157e1614610f18576040805162461bcd60e51b815260206004820152601c6024820152600080516020612239833981519152604482015290519081900360640190fd5b604051631c57762b60e31b81526001600160a01b037f0000000000000000000000003cf54f3a1969be9916dad548f3c084331c4450b5169063e2bbb15890610f86907f00000000000000000000000000000000000000000000000000000000000000269085906004016121ee565b602060405180830381600087803b158015610fa057600080fd5b505af1158015610fb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd89190611f93565b5050565b6000336001600160a01b037f0000000000000000000000002c37f1dced208530a05b061a183d8937f686157e1614611049576040805162461bcd60e51b815260206004820152601c6024820152600080516020612239833981519152604482015290519081900360640190fd5b6110737f0000000000000000000000000000000000000000000000000000000000000026846115f4565b92506110808484846117f4565b949350505050565b60007f00000000000000000000000084c333e94aea4a51a21f6cf0c7f528c50dc7592c6001600160a01b031663bb7b8b806040518163ffffffff1660e01b815260040160206040518083038186803b1580156110e357600080fd5b505afa1580156110f7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abb9190611f93565b7f000000000000000000000000000000000000000000000000000000000000002681565b611147611393565b6001600160a01b0316611158610b90565b6001600160a01b0316146111a1576040805162461bcd60e51b815260206004820181905260248201526000805160206122a5833981519152604482015290519081900360640190fd5b6001600160a01b0381166111e65760405162461bcd60e51b81526004018080602001828103825260268152602001806122596026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b7f0000000000000000000000003cf54f3a1969be9916dad548f3c084331c4450b581565b8015806112eb575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156112bd57600080fd5b505afa1580156112d1573d6000803e3d6000fd5b505050506040513d60208110156112e757600080fd5b5051155b6113265760405162461bcd60e51b81526004018080602001828103825260368152602001806122ef6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526113789084906119e6565b505050565b60606110808484600085611a97565b9392505050565b3390565b6000811561156e576002546001600160a01b0316801561146957604051631846d2f560e31b81526001600160a01b0382169063c23697a8906113fd907f00000000000000000000000084c333e94aea4a51a21f6cf0c7f528c50dc7592c90600401611fdc565b60206040518083038186803b15801561141557600080fd5b505afa158015611429573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144d9190611f5f565b6114695760405162461bcd60e51b8152600401610a73906120f8565b7f0000000000000000000000001104b4df568fa7af90b1bed1d78a2f71e748dc8a7f000000000000000000000000853d955acef822db058eb8505911ed77f175b99e6114bf6001600160a01b0382168388611577565b6040516349df439160e01b81526001600160a01b038316906349df4391906115129084908a907f00000000000000000000000084c333e94aea4a51a21f6cf0c7f528c50dc7592c90600090600401611ff0565b602060405180830381600087803b15801561152c57600080fd5b505af1158015611540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115649190611f93565b9350505050611571565b50815b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526113789084906119e6565b6000610abb7f0000000000000000000000000000000000000000000000000000000000000026611bf2565b6000807f0000000000000000000000003cf54f3a1969be9916dad548f3c084331c4450b56001600160a01b03166321e69d08856040518263ffffffff1660e01b81526004016116439190612126565b60206040518083038186803b15801561165b57600080fd5b505afa15801561166f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116939190611f93565b905060007f0000000000000000000000003cf54f3a1969be9916dad548f3c084331c4450b56001600160a01b0316637d292ce7866040518263ffffffff1660e01b81526004016116e39190612126565b60206040518083038186803b1580156116fb57600080fd5b505afa15801561170f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117339190611f93565b90506000818386028161174257fe5b0490507f0000000000000000000000003cf54f3a1969be9916dad548f3c084331c4450b56001600160a01b031663995bca0187836000806040518563ffffffff1660e01b815260040161179894939291906121fc565b6040805180830381600087803b1580156117b157600080fd5b505af11580156117c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e99190611fab565b509695505050505050565b60007f00000000000000000000000084c333e94aea4a51a21f6cf0c7f528c50dc7592c82156119c9576002546001600160a01b031680156118e757604051631846d2f560e31b81526001600160a01b0382169063c23697a89061187b907f00000000000000000000000084c333e94aea4a51a21f6cf0c7f528c50dc7592c90600401611fdc565b60206040518083038186803b15801561189357600080fd5b505afa1580156118a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118cb9190611f5f565b6118e75760405162461bcd60e51b8152600401610a73906120f8565b7f0000000000000000000000001104b4df568fa7af90b1bed1d78a2f71e748dc8a7f000000000000000000000000853d955acef822db058eb8505911ed77f175b99e61193d6001600160a01b0385168389611577565b6040516349df439160e01b81526001600160a01b038316906349df4391906119709087908b908690600090600401611ff0565b602060405180830381600087803b15801561198a57600080fd5b505af115801561199e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c29190611f93565b9650925050505b6119dd6001600160a01b0382168686611577565b50919392505050565b6000611a3b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661137d9092919063ffffffff16565b80519091501561137857808060200190516020811015611a5a57600080fd5b50516113785760405162461bcd60e51b815260040180806020018281038252602a8152602001806122c5602a913960400191505060405180910390fd5b606082471015611ad85760405162461bcd60e51b815260040180806020018281038252602681526020018061227f6026913960400191505060405180910390fd5b611ae185611dc3565b611b32576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310611b705780518252601f199092019160209182019101611b51565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611bd2576040519150601f19603f3d011682016040523d82523d6000602084013e611bd7565b606091505b5091509150611be7828286611dc9565b979650505050505050565b60405163043cd3a160e31b81526000907f0000000000000000000000003cf54f3a1969be9916dad548f3c084331c4450b59082906001600160a01b038316906321e69d0890611c45908790600401612126565b60206040518083038186803b158015611c5d57600080fd5b505afa158015611c71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c959190611f93565b90506000826001600160a01b0316637d292ce7866040518263ffffffff1660e01b8152600401611cc59190612126565b60206040518083038186803b158015611cdd57600080fd5b505afa158015611cf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d159190611f93565b90506000836001600160a01b0316630ea5e46287306040518363ffffffff1660e01b8152600401611d4792919061212f565b60206040518083038186803b158015611d5f57600080fd5b505afa158015611d73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d979190611f93565b905080611dab576000945050505050611dbe565b8282820281611db657fe5b049450505050505b919050565b3b151590565b60608315611dd857508161138c565b825115611de85782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611e32578181015183820152602001611e1a565b50505050905090810190601f168015611e5f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b80356001600160a01b0381168114611dbe57600080fd5b600060208284031215611e95578081fd5b61138c82611e6d565b600080600060608486031215611eb2578182fd5b611ebb84611e6d565b9250602084013591506040840135611ed281612227565b809150509250925092565b60008060008060608587031215611ef2578081fd5b611efb85611e6d565b935060208501359250604085013567ffffffffffffffff80821115611f1e578283fd5b818701915087601f830112611f31578283fd5b813581811115611f3f578384fd5b886020828501011115611f50578384fd5b95989497505060200194505050565b600060208284031215611f70578081fd5b815161138c81612227565b600060208284031215611f8c578081fd5b5035919050565b600060208284031215611fa4578081fd5b5051919050565b60008060408385031215611fbd578182fd5b505080516020909101519092909150565b60068110611fd857fe5b9052565b6001600160a01b0391909116815260200190565b6001600160a01b039485168152602081019390935292166040820152606081019190915260800190565b6001600160a01b03851681526020810184905260408101839052608081016005831061204257fe5b82606083015295945050505050565b6000831515825260206040818401528351806040850152825b818110156120865785810183015185820160600152820161206a565b818111156120975783606083870101525b50601f01601f191692909201606001949350505050565b6020808252602a908201527f436f6e63656e747261746f7253747261746567793a2070657263656e7461676560408201526920746f6f206c6172676560b01b606082015260800190565b6020808252601490820152731c1c9a58d9481a5cc81b585b9a5c1d5b185d195960621b604082015260600190565b90815260200190565b9182526001600160a01b0316602082015260400190565b60006060820185835260206060818501528186518084526080860191508288019350845b8181101561218f5784516001600160a01b03168352938301939183019160010161216a565b505084810360408601528551808252908201925081860190845b818110156121c5578251855293830193918301916001016121a9565b509298975050505050505050565b83815260208101839052606081016110806040830184611fce565b918252602082015260400190565b84815260208101849052604081018390526080810161221e6060830184611fce565b95945050505050565b801515811461223557600080fd5b5056fe5969656c6453747261746567793a206f6e6c79206f70657261746f72000000004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220d039089783d14daec1459e920848479799c31c696e1f9bb42c45688ba5472a5164736f6c63430007060033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.