ETH Price: $3,587.08 (+4.79%)

Contract

0xC49A7a3109D8D5b233cCbB5511723C0244ceA672
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
201353652024-06-20 20:37:23160 days ago1718915843  Contract Creation0 ETH
Loading...
Loading

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

Contract Name:
VirtualBalanceRewardPool

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-05-18
*/

// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;


/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library MathUtil {
    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }
}

contract ReentrancyGuard {
    uint256 private _guardCounter;

    constructor () internal {
        _guardCounter = 1;
    }

    modifier nonReentrant() {
        _guardCounter += 1;
        uint256 localCounter = _guardCounter;
        _;
        require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call");
    }
}

interface ICurveGauge {
    function deposit(uint256) external;
    function balanceOf(address) external view returns (uint256);
    function withdraw(uint256) external;
    function claim_rewards() external;
    function reward_tokens(uint256) external view returns(address);//v2
    function rewarded_token() external view returns(address);//v1
}

interface ICurveVoteEscrow {
    function create_lock(uint256, uint256) external;
    function increase_amount(uint256) external;
    function increase_unlock_time(uint256) external;
    function withdraw() external;
    function smart_wallet_checker() external view returns (address);
}

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

interface IVoting{
    function vote(uint256, bool, bool) external; //voteId, support, executeIfDecided
    function getVote(uint256) external view returns(bool,bool,uint64,uint64,uint64,uint64,uint256,uint256,uint256,bytes memory); 
    function vote_for_gauge_weights(address,uint256) external;
}

interface IMinter{
    function mint(address) external;
}

interface IRegistry{
    function get_registry() external view returns(address);
    function get_address(uint256 _id) external view returns(address);
    function gauge_controller() external view returns(address);
    function get_lp_token(address) external view returns(address);
    function get_gauges(address) external view returns(address[10] memory,uint128[10] memory);
}

interface IStaker{
    function deposit(address, address) external;
    function withdraw(address) external;
    function withdraw(address, address, uint256) external;
    function withdrawAll(address, address) external;
    function createLock(uint256, uint256) external;
    function increaseAmount(uint256) external;
    function increaseTime(uint256) external;
    function release() external;
    function claimCrv(address) external returns (uint256);
    function claimRewards(address) external;
    function claimFees(address,address) external;
    function setStashAccess(address, bool) external;
    function vote(uint256,address,bool) external;
    function voteGaugeWeight(address,uint256) external;
    function balanceOfPool(address) external view returns (uint256);
    function operator() external view returns (address);
    function execute(address _to, uint256 _value, bytes calldata _data) external returns (bool, bytes memory);
}

interface IRewards{
    function stake(address, uint256) external;
    function stakeFor(address, uint256) external;
    function withdraw(address, uint256) external;
    function exit(address) external;
    function getReward(address) external;
    function queueNewRewards(uint256) external;
    function notifyRewardAmount(uint256) external;
    function addExtraReward(address) external;
    function stakingToken() external returns (address);
}

interface IStash{
    function stashRewards() external returns (bool);
    function processStash() external returns (bool);
    function claimRewards() external returns (bool);
}

interface IFeeDistro{
    function claim() external;
    function token() external view returns(address);
}

interface ITokenMinter{
    function mint(address,uint256) external;
    function burn(address,uint256) external;
}

interface IDeposit{
    function isShutdown() external view returns(bool);
    function balanceOf(address _account) external view returns(uint256);
    function totalSupply() external view returns(uint256);
    function poolInfo(uint256) external view returns(address,address,address,address,address, bool);
    function rewardClaimed(uint256,address,uint256) external;
    function withdrawTo(uint256,uint256,address) external;
    function claimRewards(uint256,address) external returns(bool);
    function rewardArbitrator() external returns(address);
}

interface ICrvDeposit{
    function deposit(uint256, bool) external;
    function lockIncentive() external view returns(uint256);
}

interface IRewardFactory{
    function setAccess(address,bool) external;
    function CreateCrvRewards(uint256,address) external returns(address);
    function CreateTokenRewards(address,address,address) external returns(address);
    function activeRewardCount(address) external view returns(uint256);
    function addActiveReward(address,uint256) external returns(bool);
    function removeActiveReward(address,uint256) external returns(bool);
}

interface IStashFactory{
    function CreateStash(uint256,address,address,uint256) external returns(address);
}

interface ITokenFactory{
    function CreateDepositToken(address) external returns(address);
}

interface IPools{
    function addPool(address _lptoken, address _gauge, uint256 _stashVersion) external returns(bool);
    function shutdownPool(uint256 _pid) external returns(bool);
    function poolInfo(uint256) external view returns(address,address,address,address,address,bool);
    function poolLength() external view returns (uint256);
    function gaugeMap(address) external view returns(bool);
    function setPoolManager(address _poolM) external;
}

interface IVestedEscrow{
    function fund(address[] calldata _recipient, uint256[] calldata _amount) external returns(bool);
}

// File: @openzeppelin\contracts\math\SafeMath.sol
pragma solidity >=0.6.0 <0.8.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: @openzeppelin\contracts\token\ERC20\IERC20.sol

pragma solidity >=0.6.0 <0.8.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: @openzeppelin\contracts\utils\Address.sol

pragma solidity >=0.6.2 <0.8.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: @openzeppelin\contracts\token\ERC20\SafeERC20.sol

pragma solidity >=0.6.0 <0.8.0;

/**
 * @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: contracts\VirtualBalanceRewardPool.sol

pragma solidity 0.6.12;
/**
 *Submitted for verification at Etherscan.io on 2020-07-17
 */

/*
   ____            __   __        __   _
  / __/__ __ ___  / /_ / /  ___  / /_ (_)__ __
 _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
     /___/

* Synthetix: VirtualBalanceRewardPool.sol
*
* Docs: https://docs.synthetix.io/
*
*
* MIT License
* ===========
*
* Copyright (c) 2020 Synthetix
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/



contract VirtualBalanceWrapper {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    IDeposit public deposits;

    function totalSupply() public view returns (uint256) {
        return deposits.totalSupply();
    }

    function balanceOf(address account) public view returns (uint256) {
        return deposits.balanceOf(account);
    }
}

contract VirtualBalanceRewardPool is VirtualBalanceWrapper {
    using SafeERC20 for IERC20;
    
    IERC20 public rewardToken;
    uint256 public constant duration = 7 days;

    address public operator;

    uint256 public periodFinish = 0;
    uint256 public rewardRate = 0;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;
    uint256 public queuedRewards = 0;
    uint256 public currentRewards = 0;
    uint256 public historicalRewards = 0;
    uint256 public newRewardRatio = 830;
    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public rewards;

    event RewardAdded(uint256 reward);
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event RewardPaid(address indexed user, uint256 reward);

    constructor(
        address deposit_,
        address reward_,
        address op_
    ) public {
        deposits = IDeposit(deposit_);
        rewardToken = IERC20(reward_);
        operator = op_;
    }


    modifier updateReward(address account) {
        rewardPerTokenStored = rewardPerToken();
        lastUpdateTime = lastTimeRewardApplicable();
        if (account != address(0)) {
            rewards[account] = earned(account);
            userRewardPerTokenPaid[account] = rewardPerTokenStored;
        }
        _;
    }

    function lastTimeRewardApplicable() public view returns (uint256) {
        return MathUtil.min(block.timestamp, periodFinish);
    }

    function rewardPerToken() public view returns (uint256) {
        if (totalSupply() == 0) {
            return rewardPerTokenStored;
        }
        return
            rewardPerTokenStored.add(
                lastTimeRewardApplicable()
                    .sub(lastUpdateTime)
                    .mul(rewardRate)
                    .mul(1e18)
                    .div(totalSupply())
            );
    }

    function earned(address account) public view returns (uint256) {
        return
            balanceOf(account)
                .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))
                .div(1e18)
                .add(rewards[account]);
    }

    //update reward, emit, call linked reward's stake
    function stake(address _account, uint256 amount)
        external
        updateReward(_account)
    {
        require(msg.sender == address(deposits), "!authorized");
       // require(amount > 0, 'VirtualDepositRewardPool: Cannot stake 0');
        emit Staked(_account, amount);
    }

    function withdraw(address _account, uint256 amount)
        public
        updateReward(_account)
    {
        require(msg.sender == address(deposits), "!authorized");
        //require(amount > 0, 'VirtualDepositRewardPool : Cannot withdraw 0');

        emit Withdrawn(_account, amount);
    }

    function getReward(address _account) public updateReward(_account){
        uint256 reward = earned(_account);
        if (reward > 0) {
            rewards[_account] = 0;
            rewardToken.safeTransfer(_account, reward);
            emit RewardPaid(_account, reward);
        }
    }

    function getReward() external{
        getReward(msg.sender);
    }

    function donate(uint256 _amount) external returns(bool){
        IERC20(rewardToken).safeTransferFrom(msg.sender, address(this), _amount);
        queuedRewards = queuedRewards.add(_amount);
    }

    function queueNewRewards(uint256 _rewards) external{
        require(msg.sender == operator, "!authorized");

        _rewards = _rewards.add(queuedRewards);

        if (block.timestamp >= periodFinish) {
            notifyRewardAmount(_rewards);
            queuedRewards = 0;
            return;
        }

        //et = now - (finish-duration)
        uint256 elapsedTime = block.timestamp.sub(periodFinish.sub(duration));
        //current at now: rewardRate * elapsedTime
        uint256 currentAtNow = rewardRate * elapsedTime;
        uint256 queuedRatio = currentAtNow.mul(1000).div(_rewards);
        if(queuedRatio < newRewardRatio){
            notifyRewardAmount(_rewards);
            queuedRewards = 0;
        }else{
            queuedRewards = _rewards;
        }
    }

    function notifyRewardAmount(uint256 reward)
        internal
        updateReward(address(0))
    {
        historicalRewards = historicalRewards.add(reward);
        if (block.timestamp >= periodFinish) {
            rewardRate = reward.div(duration);
        } else {
            uint256 remaining = periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardRate);
            reward = reward.add(leftover);
            rewardRate = reward.div(duration);
        }
        currentRewards = reward;
        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp.add(duration);
        emit RewardAdded(reward);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"deposit_","type":"address"},{"internalType":"address","name":"reward_","type":"address"},{"internalType":"address","name":"op_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposits","outputs":[{"internalType":"contract IDeposit","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"donate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"historicalRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newRewardRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewards","type":"uint256"}],"name":"queueNewRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"queuedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101725760003560e01c80637b0a47ee116100de578063c8f33c9111610097578063ebe2b12b11610071578063ebe2b12b1461031e578063f14faf6f14610326578063f3fef3a314610357578063f7c618c11461038357610172565b8063c8f33c9114610306578063cd3daf9d1461030e578063df136d651461031657610172565b80637b0a47ee1461027657806380faa57d1461027e5780638b87634714610286578063901a7d53146102ac578063adc9772e146102b4578063c00007b0146102e057610172565b80633d18b912116101305780633d18b91214610211578063570ca7351461021b578063590a41f51461022357806363d38c3b146102405780636c8bcee81461024857806370a082311461025057610172565b80628cc262146101775780630700037d146101af5780630fb5a6b4146101d557806318160ddd146101dd578063262d3d6d146101e5578063323a5e0b146101ed575b600080fd5b61019d6004803603602081101561018d57600080fd5b50356001600160a01b031661038b565b60408051918252519081900360200190f35b61019d600480360360208110156101c557600080fd5b50356001600160a01b03166103f9565b61019d61040b565b61019d610412565b61019d610493565b6101f5610499565b604080516001600160a01b039092168252519081900360200190f35b6102196104a8565b005b6101f56104b3565b6102196004803603602081101561023957600080fd5b50356104c2565b61019d6105a5565b61019d6105ab565b61019d6004803603602081101561026657600080fd5b50356001600160a01b03166105b1565b61019d610631565b61019d610637565b61019d6004803603602081101561029c57600080fd5b50356001600160a01b031661064a565b61019d61065c565b610219600480360360408110156102ca57600080fd5b506001600160a01b038135169060200135610662565b610219600480360360208110156102f657600080fd5b50356001600160a01b031661074e565b61019d61082a565b61019d610830565b61019d61087e565b61019d610884565b6103436004803603602081101561033c57600080fd5b503561088a565b604080519115158252519081900360200190f35b6102196004803603604081101561036d57600080fd5b506001600160a01b0381351690602001356108ba565b6101f56109a6565b6001600160a01b0381166000908152600c6020908152604080832054600b9092528220546103f391906103ed90670de0b6b3a7640000906103e7906103d8906103d2610830565b906109b5565b6103e1886105b1565b90610a12565b90610a72565b90610ad9565b92915050565b600c6020526000908152604090205481565b62093a8081565b60008060009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561046157600080fd5b505afa158015610475573d6000803e3d6000fd5b505050506040513d602081101561048b57600080fd5b505190505b90565b60095481565b6000546001600160a01b031681565b6104b13361074e565b565b6002546001600160a01b031681565b6002546001600160a01b0316331461050f576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b60075461051d908290610ad9565b9050600354421061053b5761053181610b33565b60006007556105a2565b600061055f61055862093a806003546109b590919063ffffffff16565b42906109b5565b60045490915081026000610579846103e7846103e8610a12565b9050600a548110156105985761058e84610b33565b600060075561059e565b60078490555b5050505b50565b60075481565b600a5481565b60008054604080516370a0823160e01b81526001600160a01b038581166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156105ff57600080fd5b505afa158015610613573d6000803e3d6000fd5b505050506040513d602081101561062957600080fd5b505192915050565b60045481565b600061064542600354610c59565b905090565b600b6020526000908152604090205481565b60085481565b8161066b610830565b600655610676610637565b6005556001600160a01b038116156106bd576106918161038b565b6001600160a01b0382166000908152600c6020908152604080832093909355600654600b909152919020555b6000546001600160a01b0316331461070a576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b6040805183815290516001600160a01b038516917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2505050565b80610757610830565b600655610762610637565b6005556001600160a01b038116156107a95761077d8161038b565b6001600160a01b0382166000908152600c6020908152604080832093909355600654600b909152919020555b60006107b48361038b565b90508015610825576001600160a01b038084166000908152600c60205260408120556001546107e591168483610c6f565b6040805182815290516001600160a01b038516917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505050565b60055481565b600061083a610412565b6108475750600654610490565b610645610875610855610412565b6103e7670de0b6b3a76400006103e16004546103e16005546103d2610637565b60065490610ad9565b60065481565b60035481565b6001546000906108a5906001600160a01b0316333085610cc1565b6007546108b29083610ad9565b600755919050565b816108c3610830565b6006556108ce610637565b6005556001600160a01b03811615610915576108e98161038b565b6001600160a01b0382166000908152600c6020908152604080832093909355600654600b909152919020555b6000546001600160a01b03163314610962576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b6040805183815290516001600160a01b038516917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2505050565b6001546001600160a01b031681565b600082821115610a0c576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082610a21575060006103f3565b82820282848281610a2e57fe5b0414610a6b5760405162461bcd60e51b815260040180806020018281038252602181526020018061100c6021913960400191505060405180910390fd5b9392505050565b6000808211610ac8576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381610ad157fe5b049392505050565b600082820183811015610a6b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000610b3d610830565b600655610b48610637565b6005556001600160a01b03811615610b8f57610b638161038b565b6001600160a01b0382166000908152600c6020908152604080832093909355600654600b909152919020555b600954610b9c9083610ad9565b6009556003544210610bbd57610bb58262093a80610a72565b600455610c07565b600354600090610bcd90426109b5565b90506000610be660045483610a1290919063ffffffff16565b9050610bf28482610ad9565b9350610c018462093a80610a72565b60045550505b6008829055426005819055610c1f9062093a80610ad9565b6003556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b6000818310610c685781610a6b565b5090919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610825908490610d17565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261059e9085905b6060610d6c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610dc89092919063ffffffff16565b80519091501561082557808060200190516020811015610d8b57600080fd5b50516108255760405162461bcd60e51b815260040180806020018281038252602a81526020018061102d602a913960400191505060405180910390fd5b6060610dd78484600085610ddf565b949350505050565b606082471015610e205760405162461bcd60e51b8152600401808060200182810382526026815260200180610fe66026913960400191505060405180910390fd5b610e2985610f3b565b610e7a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310610eb95780518252601f199092019160209182019101610e9a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610f1b576040519150601f19603f3d011682016040523d82523d6000602084013e610f20565b606091505b5091509150610f30828286610f41565b979650505050505050565b3b151590565b60608315610f50575081610a6b565b825115610f605782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610faa578181015183820152602001610f92565b50505050905090810190601f168015610fd75780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220b1846f38f03004027517b5b4eb8715888a9f20b003182accc0cf65bce3d2999264736f6c634300060c0033

Deployed Bytecode Sourcemap

30013:5034:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32016:265;;;;;;;;;;;;;;;;-1:-1:-1;32016:265:0;-1:-1:-1;;;;;32016:265:0;;:::i;:::-;;;;;;;;;;;;;;;;30612:42;;;;;;;;;;;;;;;;-1:-1:-1;30612:42:0;-1:-1:-1;;;;;30612:42:0;;:::i;30150:41::-;;;:::i;29778:101::-;;;:::i;30463:36::-;;;:::i;29745:24::-;;;:::i;:::-;;;;-1:-1:-1;;;;;29745:24:0;;;;;;;;;;;;;;33263:69;;;:::i;:::-;;30200:23;;;:::i;33547:809::-;;;;;;;;;;;;;;;;-1:-1:-1;33547:809:0;;:::i;30384:32::-;;;:::i;30506:35::-;;;:::i;29887:119::-;;;;;;;;;;;;;;;;-1:-1:-1;29887:119:0;-1:-1:-1;;;;;29887:119:0;;:::i;30270:29::-;;;:::i;31445:135::-;;;:::i;30548:57::-;;;;;;;;;;;;;;;;-1:-1:-1;30548:57:0;-1:-1:-1;;;;;30548:57:0;;:::i;30423:33::-;;;:::i;32344:294::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;32344:294:0;;;;;;;;:::i;32958:297::-;;;;;;;;;;;;;;;;-1:-1:-1;32958:297:0;-1:-1:-1;;;;;32958:297:0;;:::i;30306:29::-;;;:::i;31588:420::-;;;:::i;30342:35::-;;;:::i;30232:31::-;;;:::i;33340:199::-;;;;;;;;;;;;;;;;-1:-1:-1;33340:199:0;;:::i;:::-;;;;;;;;;;;;;;;;;;32646:304;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;32646:304:0;;;;;;;;:::i;30118:25::-;;;:::i;32016:265::-;-1:-1:-1;;;;;32256:16:0;;32070:7;32256:16;;;:7;:16;;;;;;;;;32172:22;:31;;;;;;32110:163;;32256:16;32110:123;;32228:4;;32110:95;;32151:53;;:16;:14;:16::i;:::-;:20;;:53::i;:::-;32110:18;32120:7;32110:9;:18::i;:::-;:40;;:95::i;:::-;:117;;:123::i;:::-;:145;;:163::i;:::-;32090:183;32016:265;-1:-1:-1;;32016:265:0:o;30612:42::-;;;;;;;;;;;;;:::o;30150:41::-;30185:6;30150:41;:::o;29778:101::-;29822:7;29849:8;;;;;;;;;-1:-1:-1;;;;;29849:8:0;-1:-1:-1;;;;;29849:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;29849:22:0;;-1:-1:-1;29778:101:0;;:::o;30463:36::-;;;;:::o;29745:24::-;;;-1:-1:-1;;;;;29745:24:0;;:::o;33263:69::-;33303:21;33313:10;33303:9;:21::i;:::-;33263:69::o;30200:23::-;;;-1:-1:-1;;;;;30200:23:0;;:::o;33547:809::-;33631:8;;-1:-1:-1;;;;;33631:8:0;33617:10;:22;33609:46;;;;;-1:-1:-1;;;33609:46:0;;;;;;;;;;;;-1:-1:-1;;;33609:46:0;;;;;;;;;;;;;;;33692:13;;33679:27;;:8;;:12;:27::i;:::-;33668:38;;33742:12;;33723:15;:31;33719:145;;33771:28;33790:8;33771:18;:28::i;:::-;33830:1;33814:13;:17;33846:7;;33719:145;33916:19;33938:47;33958:26;30185:6;33958:12;;:16;;:26;;;;:::i;:::-;33938:15;;:19;:47::i;:::-;34071:10;;33916:69;;-1:-1:-1;34071:24:0;;34048:20;34128:36;34155:8;34128:22;34071:24;34145:4;34128:16;:22::i;:36::-;34106:58;;34192:14;;34178:11;:28;34175:174;;;34222:28;34241:8;34222:18;:28::i;:::-;34281:1;34265:13;:17;34175:174;;;34313:13;:24;;;34175:174;33547:809;;;;;:::o;30384:32::-;;;;:::o;30506:35::-;;;;:::o;29887:119::-;29944:7;29971:8;;:27;;;-1:-1:-1;;;29971:27:0;;-1:-1:-1;;;;;29971:27:0;;;;;;;;;:8;;;;;:18;;:27;;;;;;;;;;;;;;:8;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;29971:27:0;;29887:119;-1:-1:-1;;29887:119:0:o;30270:29::-;;;;:::o;31445:135::-;31502:7;31529:43;31542:15;31559:12;;31529;:43::i;:::-;31522:50;;31445:135;:::o;30548:57::-;;;;;;;;;;;;;:::o;30423:33::-;;;;:::o;32344:294::-;32433:8;31180:16;:14;:16::i;:::-;31157:20;:39;31224:26;:24;:26::i;:::-;31207:14;:43;-1:-1:-1;;;;;31265:21:0;;;31261:157;;31322:15;31329:7;31322:6;:15::i;:::-;-1:-1:-1;;;;;31303:16:0;;;;;;:7;:16;;;;;;;;:34;;;;31386:20;;31352:22;:31;;;;;;:54;31261:157;32489:8:::1;::::0;-1:-1:-1;;;;;32489:8:0::1;32467:10;:31;32459:55;;;::::0;;-1:-1:-1;;;32459:55:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;32459:55:0;;;;;;;;;;;;;::::1;;32606:24;::::0;;;;;;;-1:-1:-1;;;;;32606:24:0;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;32344:294:::0;;;:::o;32958:297::-;33015:8;31180:16;:14;:16::i;:::-;31157:20;:39;31224:26;:24;:26::i;:::-;31207:14;:43;-1:-1:-1;;;;;31265:21:0;;;31261:157;;31322:15;31329:7;31322:6;:15::i;:::-;-1:-1:-1;;;;;31303:16:0;;;;;;:7;:16;;;;;;;;:34;;;;31386:20;;31352:22;:31;;;;;;:54;31261:157;33035:14:::1;33052:16;33059:8;33052:6;:16::i;:::-;33035:33:::0;-1:-1:-1;33083:10:0;;33079:169:::1;;-1:-1:-1::0;;;;;33110:17:0;;::::1;33130:1;33110:17:::0;;;:7:::1;:17;::::0;;;;:21;33146:11:::1;::::0;:42:::1;::::0;:11:::1;33118:8:::0;33181:6;33146:24:::1;:42::i;:::-;33208:28;::::0;;;;;;;-1:-1:-1;;;;;33208:28:0;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;33079:169;31428:1;32958:297:::0;;:::o;30306:29::-;;;;:::o;31588:420::-;31635:7;31659:13;:11;:13::i;:::-;31655:78;;-1:-1:-1;31701:20:0;;31694:27;;31655:78;31763:237;31806:179;31971:13;:11;:13::i;:::-;31806:138;31939:4;31806:106;31901:10;;31806:68;31859:14;;31806:26;:24;:26::i;:179::-;31763:20;;;:24;:237::i;30342:35::-;;;;:::o;30232:31::-;;;;:::o;33340:199::-;33413:11;;33390:4;;33406:72;;-1:-1:-1;;;;;33413:11:0;33443:10;33463:4;33470:7;33406:36;:72::i;:::-;33505:13;;:26;;33523:7;33505:17;:26::i;:::-;33489:13;:42;33340:199;;-1:-1:-1;33340:199:0:o;32646:304::-;32736:8;31180:16;:14;:16::i;:::-;31157:20;:39;31224:26;:24;:26::i;:::-;31207:14;:43;-1:-1:-1;;;;;31265:21:0;;;31261:157;;31322:15;31329:7;31322:6;:15::i;:::-;-1:-1:-1;;;;;31303:16:0;;;;;;:7;:16;;;;;;;;:34;;;;31386:20;;31352:22;:31;;;;;;:54;31261:157;32792:8:::1;::::0;-1:-1:-1;;;;;32792:8:0::1;32770:10;:31;32762:55;;;::::0;;-1:-1:-1;;;32762:55:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;32762:55:0;;;;;;;;;;;;;::::1;;32915:27;::::0;;;;;;;-1:-1:-1;;;;;32915:27:0;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;32646:304:::0;;;:::o;30118:25::-;;;-1:-1:-1;;;;;30118:25:0;;:::o;9291:158::-;9349:7;9382:1;9377;:6;;9369:49;;;;;-1:-1:-1;;;9369:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9436:5:0;;;9291:158::o;9708:220::-;9766:7;9790:6;9786:20;;-1:-1:-1;9805:1:0;9798:8;;9786:20;9829:5;;;9833:1;9829;:5;:1;9853:5;;;;;:10;9845:56;;;;-1:-1:-1;;;9845:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9919:1;9708:220;-1:-1:-1;;;9708:220:0:o;10406:153::-;10464:7;10496:1;10492;:5;10484:44;;;;;-1:-1:-1;;;10484:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;10550:1;10546;:5;;;;;;;10406:153;-1:-1:-1;;;10406:153:0:o;8829:179::-;8887:7;8919:5;;;8943:6;;;;8935:46;;;;;-1:-1:-1;;;8935:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;34364:680;34456:1;31180:16;:14;:16::i;:::-;31157:20;:39;31224:26;:24;:26::i;:::-;31207:14;:43;-1:-1:-1;;;;;31265:21:0;;;31261:157;;31322:15;31329:7;31322:6;:15::i;:::-;-1:-1:-1;;;;;31303:16:0;;;;;;:7;:16;;;;;;;;:34;;;;31386:20;;31352:22;:31;;;;;;:54;31261:157;34496:17:::1;::::0;:29:::1;::::0;34518:6;34496:21:::1;:29::i;:::-;34476:17;:49:::0;34559:12:::1;::::0;34540:15:::1;:31;34536:334;;34601:20;:6:::0;30185::::1;34601:10;:20::i;:::-;34588:10;:33:::0;34536:334:::1;;;34674:12;::::0;34654:17:::1;::::0;34674:33:::1;::::0;34691:15:::1;34674:16;:33::i;:::-;34654:53;;34722:16;34741:25;34755:10;;34741:9;:13;;:25;;;;:::i;:::-;34722:44:::0;-1:-1:-1;34790:20:0::1;:6:::0;34722:44;34790:10:::1;:20::i;:::-;34781:29:::0;-1:-1:-1;34838:20:0::1;34781:29:::0;30185:6:::1;34838:10;:20::i;:::-;34825:10;:33:::0;-1:-1:-1;;34536:334:0::1;34880:14;:23:::0;;;34931:15:::1;34914:14;:32:::0;;;34972:29:::1;::::0;30185:6:::1;34972:19;:29::i;:::-;34957:12;:44:::0;35017:19:::1;::::0;;;;;;;::::1;::::0;;;;::::1;::::0;;::::1;34364:680:::0;;:::o;231:106::-;289:7;320:1;316;:5;:13;;328:1;316:13;;;-1:-1:-1;324:1:0;;309:20;-1:-1:-1;231:106:0:o;24990:177::-;25100:58;;;-1:-1:-1;;;;;25100:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;25100:58:0;-1:-1:-1;;;25100:58:0;;;25073:86;;25093:5;;25073:19;:86::i;25175:205::-;25303:68;;;-1:-1:-1;;;;;25303:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;25303:68:0;-1:-1:-1;;;25303:68:0;;;25276:96;;25296:5;;27295:761;27719:23;27745:69;27773:4;27745:69;;;;;;;;;;;;;;;;;27753:5;-1:-1:-1;;;;;27745:27:0;;;:69;;;;;:::i;:::-;27829:17;;27719:95;;-1:-1:-1;27829:21:0;27825:224;;27971:10;27960:30;;;;;;;;;;;;;;;-1:-1:-1;27960:30:0;27952:85;;;;-1:-1:-1;;;27952:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19991:195;20094:12;20126:52;20148:6;20156:4;20162:1;20165:12;20126:21;:52::i;:::-;20119:59;19991:195;-1:-1:-1;;;;19991:195:0:o;21043:530::-;21170:12;21228:5;21203:21;:30;;21195:81;;;;-1:-1:-1;;;21195:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21295:18;21306:6;21295:10;:18::i;:::-;21287:60;;;;;-1:-1:-1;;;21287:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;21421:12;21435:23;21462:6;-1:-1:-1;;;;;21462:11:0;21482:5;21490:4;21462:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;21462:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21420:75;;;;21513:52;21531:7;21540:10;21552:12;21513:17;:52::i;:::-;21506:59;21043:530;-1:-1:-1;;;;;;;21043:530:0:o;17073:422::-;17440:20;17479:8;;;17073:422::o;23583:742::-;23698:12;23727:7;23723:595;;;-1:-1:-1;23758:10:0;23751:17;;23723:595;23872:17;;:21;23868:439;;24135:10;24129:17;24196:15;24183:10;24179:2;24175:19;24168:44;24083:148;24278:12;24271:20;;-1:-1:-1;;;24271:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Swarm Source

ipfs://b1846f38f03004027517b5b4eb8715888a9f20b003182accc0cf65bce3d29992

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.