ETH Price: $2,842.55 (+7.10%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim123473292021-05-01 8:55:121286 days ago1619859312IN
0xbf794418...a088cD502
0 ETH0.0042221439
Claim117189122021-01-24 14:33:551383 days ago1611498835IN
0xbf794418...a088cD502
0 ETH0.0066663347.00000156
Claim115218472020-12-25 9:04:431413 days ago1608887083IN
0xbf794418...a088cD502
0 ETH0.0098624466.00000161
Claim114216292020-12-09 23:18:011428 days ago1607555881IN
0xbf794418...a088cD502
0 ETH0.0037863426.4
Claim114058962020-12-07 13:18:141431 days ago1607347094IN
0xbf794418...a088cD502
0 ETH0.0042054631
Stake113930842020-12-05 14:10:291433 days ago1607177429IN
0xbf794418...a088cD502
0 ETH0.0033489820.1
Stake113870342020-12-04 15:43:121434 days ago1607096592IN
0xbf794418...a088cD502
0 ETH0.0066651240
Stake113816042020-12-03 19:39:541434 days ago1607024394IN
0xbf794418...a088cD502
0 ETH0.0051769929
Stake113370082020-11-26 23:24:011441 days ago1606433041IN
0xbf794418...a088cD502
0 ETH0.0034991821
Claim112930672020-11-20 5:29:541448 days ago1605850194IN
0xbf794418...a088cD502
0 ETH0.008286950
Claim112883752020-11-19 12:14:541449 days ago1605788094IN
0xbf794418...a088cD502
0 ETH0.0032558424
Stake112577082020-11-14 19:22:451453 days ago1605381765IN
0xbf794418...a088cD502
0 ETH0.002804418
Stake112510392020-11-13 18:44:201454 days ago1605293060IN
0xbf794418...a088cD502
0 ETH0.0056653534
Stake112496122020-11-13 13:25:341455 days ago1605273934IN
0xbf794418...a088cD502
0 ETH0.00623240
Claim112494442020-11-13 12:48:291455 days ago1605271709IN
0xbf794418...a088cD502
0 ETH0.0058529357
Stake112490532020-11-13 11:20:171455 days ago1605266417IN
0xbf794418...a088cD502
0 ETH0.0034215342
Stake112490532020-11-13 11:20:171455 days ago1605266417IN
0xbf794418...a088cD502
0 ETH0.006543642
Claim112490422020-11-13 11:18:501455 days ago1605266330IN
0xbf794418...a088cD502
0 ETH0.0041073240
Stake112449602020-11-12 20:23:281455 days ago1605212608IN
0xbf794418...a088cD502
0 ETH0.002082712.50000056
Stake112446912020-11-12 19:26:061455 days ago1605209166IN
0xbf794418...a088cD502
0 ETH0.002025413
Stake112446722020-11-12 19:23:071455 days ago1605208987IN
0xbf794418...a088cD502
0 ETH0.002025413.00000145
Claim112446502020-11-12 19:19:281455 days ago1605208768IN
0xbf794418...a088cD502
0 ETH0.0017635813.00000269
Stake112429242020-11-12 12:58:271456 days ago1605185907IN
0xbf794418...a088cD502
0 ETH0.008331450.00000145
Stake112428942020-11-12 12:51:491456 days ago1605185509IN
0xbf794418...a088cD502
0 ETH0.0083902947
Stake112425242020-11-12 11:24:521456 days ago1605180292IN
0xbf794418...a088cD502
0 ETH0.004985632
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
112325392020-11-10 22:42:291457 days ago1605048149  Contract Creation0 ETH
Loading...
Loading

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

Contract Name:
StableV2

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 777 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-11-10
*/

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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, 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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * 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);
        uint256 c = a - b;

        return c;
    }

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

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts 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) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

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


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


/**
 * @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.
 */
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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view 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;
    }
}


interface IStableV2 {
    // Stable balances management
    function update() external;
    // Management functions callable only be Milker
    function shareMilk(address taker) external returns (uint256);
    function bandits(uint256 amount) external returns (uint256, uint256, uint256);
    // Contract getters
    function milker() external view returns (address);
    function token() external view returns (address);
    function startTime() external view returns (uint256);
    function stakerTokens(address staker) external view returns (uint256);
    function stakerCorrection(address staker) external view returns (uint256);
    function tokenSupply() external view returns (uint256);
    function milkSupply() external view returns (uint256);
    // MILK production related getters
    function level() external view returns (uint256);
    function levelProgress() external view returns (uint256);
    function production() external view returns (uint256);
    function produced() external view returns (uint256);
    function distributed() external view returns (uint256);
    function pending() external view returns (uint256);
    function pendingTo(address account) external view returns (uint256);
}

interface IMilker is IERC20 {
    // Token management accessed only from StableV2 contracts
    function produceMilk(uint256 amount) external returns (uint256);
    function takeMilk(address account) external returns (uint256);
    // Primary MILK tokenomics events
    function bandits(uint256 percent) external returns (uint256, uint256, uint256);
    function sheriffsVaultCommission() external returns (uint256);
    function sheriffsPotDistribution() external returns (uint256);
    // Getters
    function startTime() external view returns (uint256);
    function isWhitelisted(address account) external view returns (bool);
    function vaultOf(address account) external view returns (uint256);
    function period() external view returns (uint256);
    function periodProgress() external view returns (uint256);
    function periodLength() external view returns (uint256);
    function production() external view returns (uint256);
    function producedTotal() external view returns (uint256);
    function distributedTotal() external view returns (uint256);
    function pendingTotal() external view returns (uint256);
    function pendingTo(address account) external view returns (uint256);
}

// solium-disable security/no-block-members

contract StableV2 is Ownable, IStableV2 {
    using SafeMath for uint256;

    // Stable contains info related to each staker.
    struct Staker {
        uint256 amount;      // amount of tokens currently staked to the Stable
        uint256 correction;  // value needed for correct calculation staker's share
        uint256 banditsCorrection;
        uint256 distributed; // amount of distributed MILK tokens
    }

    // Default deflationarity parameters.
    uint256 private constant REDUCING_INTERVAL = 7 days; // 7 days is time between reductions
    uint256 private constant REDUCING_FACTOR = 10;       // production is reduced by 10%

    // MILK token contract.
    IMilker private _milker;

    // ERC20 token contract staking to the Stable.
    IERC20 private _token;

    // Stakers info by token holders.
    mapping(address => Staker) private _stakers;

    // Common variables configuring of the Stable.
    uint256 private _startTime;

    // Common variables describing current state of the Stable.
    uint256 private _banditsCorrection = 1e18;
    uint256 private _tokensPerShare;
    uint256 private _distributed;
    uint256 private _production;
    uint256 private _produced;
    uint256 private _lastUpdateTime;


    // Events.
    event Initialized(uint256 startTime, uint256 initialProduction);
    event Bandits(
        uint256 indexed percent,
        uint256 totalAmount,
        uint256 arrestedAmount,
        uint256 burntAmount
    );
    event Staked(address indexed staker, uint256 amount);
    event Claimed(address indexed staker, uint256 amount);


    modifier onlyMilker() {
        require(address(_milker) == _msgSender(), "StableV2: caller is not the Milker contract");
        _;
    }


    constructor(address milker, address token) public {
        require(address(milker) != address(0), "StableV2: Milker contract address cannot be empty");
        require(address(token) != address(0), "StableV2: ERC20 token contract address cannot be empty");
        _milker = IMilker(milker);
        _token = IERC20(token);
        transferOwnership(Ownable(milker).owner());
    }

    function initialize(uint256 startTime, uint256 initialProductionPerDay) external onlyOwner {
        require(produced() == 0, "StableV2: already started");
        _startTime = startTime;
        _production = 7 * initialProductionPerDay;
        _lastUpdateTime = _startTime;
        emit Initialized(_startTime, _production);
    }

    function stake(uint256 amount) external {
        address staker = msg.sender;
        require(!_milker.isWhitelisted(staker), "StableV2: whitelisted MILK holders cannot stake tokens");

        // Recalculate stable shares
        update();

        // Transfer pending tokens (if any) to the staker
        _shareMilk(staker);

        if (amount > 0) {
            // Transfer staking tokens to the StableV2 contract
            bool ok = _token.transferFrom(staker, address(this), amount);
            require(ok, "StableV2: unable to transfer stake");
            // Register staking tokens
            _stakers[staker].amount = _stakers[staker].amount.add(amount);
        }

        // Adjust correction (staker's reward debt)
        uint256 correction = _stakers[staker].amount.mul(_tokensPerShare).div(1e12);
        _stakers[staker].correction = correction.mul(1e18).div(_banditsCorrection);
        _stakers[staker].banditsCorrection = _banditsCorrection;

        // Emit event to the logs so can be effectively used later
        emit Staked(staker, amount);
    }

    function claim(uint256 amount) external {
        address staker = msg.sender;
        require(!_milker.isWhitelisted(staker), "StableV2: whitelisted MILK holders cannot claim tokens");

        // Recalculate stable shares
        update();

        // Transfer pending tokens (if any) to the staker
        _shareMilk(staker);

        if (amount > 0) {
            // Unregister claimed tokens
            _stakers[staker].amount = _stakers[staker].amount.sub(amount);
            // Transfer requested tokens from the StableV2 contract
            bool ok = _token.transfer(staker, amount);
            require(ok, "StableV2: unable to transfer stake");
        }

        // Adjust correction (staker's reward debt)
        uint256 correction = _stakers[staker].amount.mul(_tokensPerShare).div(1e12);
        _stakers[staker].correction = correction.mul(1e18).div(_banditsCorrection);
        _stakers[staker].banditsCorrection = _banditsCorrection;

        // Emit event to the logs so can be effectively used later
        emit Claimed(staker, amount);
    }

    ////////////////////////////////////////////////////////////////
    // Updating stable state
    ////////////////////////////////////////////////////////////////

    // Updates stable's accumulative data until most recent block.
    function update() public override {
        if (block.timestamp <= _lastUpdateTime) {
            return;
        }
        uint256 productionNew = production();
        uint256 producedNew = produced();
        if (producedNew <= _produced) {
            _lastUpdateTime = block.timestamp;
            return;
        }
        uint256 supply = tokenSupply();
        if (supply == 0) {
            (_production, _produced) = (productionNew, producedNew);
            _lastUpdateTime = block.timestamp;
            return;
        }
        // Produce MILK tokens to this contract
        uint256 producedTotal = producedNew.sub(_produced);
        uint256 producedToStable = _milker.produceMilk(producedTotal);
        // Update stable share price
        _tokensPerShare = _tokensPerShare.add(producedToStable.mul(1e12).div(supply));
        // Update stable state
        _production = productionNew;
        _produced = producedNew;
        _lastUpdateTime = block.timestamp;
    }

    ////////////////////////////////////////////////////////////////
    // Management functions callable only be Milker
    ////////////////////////////////////////////////////////////////

    function shareMilk(address taker) public override onlyMilker returns (uint256) {
        return _shareMilk(taker);
    }

    function bandits(uint256 percent) external override onlyMilker returns (
        uint256 banditsAmount,
        uint256 arrestedAmount,
        uint256 burntAmount
    ) {
        // Recalculate stable shares
        update();

        // Ensure pending amount and total tokens staked are not zero
        uint256 pendingAmount = milkSupply();
        if (pendingAmount == 0) {
            return (0, 0, 0);
        }

        // Calculate bandits amounts
        banditsAmount = pendingAmount.mul(percent).div(100);
        burntAmount = banditsAmount.div(10);
        arrestedAmount = banditsAmount.sub(burntAmount);

        // Transfer arrested MILK to the Sheriff's Vault
        _safeTransferMilk(address(_milker), arrestedAmount);

        // Decrease pending of each staker
        _banditsCorrection = _banditsCorrection.sub(_banditsCorrection.mul(percent).div(100));
        _tokensPerShare = _tokensPerShare.sub(_tokensPerShare.mul(percent).div(100));

        // Emit event to the logs so can be effectively used later
        emit Bandits(percent, banditsAmount, arrestedAmount, burntAmount);
    }

    ////////////////////////////////////////////////////////////////
    // Contract getters
    ////////////////////////////////////////////////////////////////

    function milker() public view override returns (address) {
        return address(_milker);
    }

    function token() public view override returns (address) {
        return address(_token);
    }

    function startTime() public view override returns (uint256) {
        return _startTime;
    }

    function stakerTokens(address staker) public view override returns (uint256) {
        return _stakers[staker].amount;
    }

    function stakerCorrection(address staker) public view override returns (uint256) {
        return _stakers[staker].correction;
    }

    function tokenSupply() public view override returns (uint256) {
        return _token.balanceOf(address(this));
    }

    function milkSupply() public view override returns (uint256) {
        return _milker.balanceOf(address(this));
    }

    ////////////////////////////////////////////////////////////////
    // MILK production related getters
    ////////////////////////////////////////////////////////////////

    function level() public view override returns (uint256) {
        if (_startTime == 0 || _startTime >= block.timestamp) {
            return 0;
        }
        return (block.timestamp - _startTime) / REDUCING_INTERVAL;
    }

    function levelProgress() public view override returns (uint256) {
        if (_startTime == 0 || _startTime >= block.timestamp) {
            return 0;
        }
        uint256 d = block.timestamp - (_startTime + level() * REDUCING_INTERVAL);
        return d * 10**18 / REDUCING_INTERVAL;
    }

    function production() public view override returns(uint256) {
        if (_startTime == 0 || _startTime >= block.timestamp) {
            return 0;
        }
        uint256 prod = _production;
        uint256 lvlA = (_lastUpdateTime - _startTime) / REDUCING_INTERVAL;
        uint256 lvlB = (block.timestamp - _startTime) / REDUCING_INTERVAL;
        for (; lvlA < lvlB; lvlA++) {
            prod -= prod / REDUCING_FACTOR;
        }
        return prod;
    }

    function produced() public view override returns(uint256) {
        if (_startTime == 0 || _startTime >= block.timestamp) {
            return 0;
        }
        uint256 lvlA = (_lastUpdateTime - _startTime) / REDUCING_INTERVAL;
        uint256 lvlB = (block.timestamp - _startTime) / REDUCING_INTERVAL;
        if (lvlA == lvlB) {
            return _produced + (block.timestamp - _lastUpdateTime) * _production / REDUCING_INTERVAL;
        }
        uint256 amount = 0;
        uint256 prod = _production;
        // Count end of first level
        amount += ((_startTime + (lvlA+1) * REDUCING_INTERVAL) - _lastUpdateTime) * prod / REDUCING_INTERVAL;
        prod -= prod / REDUCING_FACTOR;
        for (lvlA++; lvlA < lvlB; lvlA++) {
            // Count full level
            amount += prod;
            prod -= prod / REDUCING_FACTOR;
        }
        // Count start of current level
        amount += (block.timestamp - (_startTime + lvlB * REDUCING_INTERVAL)) * prod / REDUCING_INTERVAL;
        return _produced + amount;
    }

    function distributed() public view override returns(uint256) {
        return _distributed;
    }

    function pending() public view override returns(uint256) {
        uint256 p = produced();
        if (p <= _distributed) {
            return 0;
        }
        return p.sub(_distributed);
    }

    function pendingTo(address account) public view override returns (uint256) {
        uint256 added = produced().sub(_produced);
        uint256 supply = tokenSupply();
        uint256 tokensPerShare = _tokensPerShare;
        if (added > 0 && supply > 0) {
            tokensPerShare = tokensPerShare.add(added.sub(added.div(20)).mul(1e12).div(supply));
        }
        uint256 tokens = _stakers[account].amount.mul(tokensPerShare).div(1e12);
        uint256 correction = _stakers[account].correction.mul(_banditsCorrection).div(1e18);
        if (_banditsCorrection != _stakers[account].banditsCorrection) {
            correction = correction.mul(_stakers[account].banditsCorrection).div(_banditsCorrection);
        }
        if (tokens <= correction) {
            return 0;
        }
        return tokens.sub(correction);
    }

    ////////////////////////////////////////////////////////////////
    // Internal functions
    ////////////////////////////////////////////////////////////////

    function _shareMilk(address taker) private returns (uint256 tokens) {

        // Calculate pending tokens
        Staker storage s = _stakers[taker];
        uint256 pendingAmount = s.amount.mul(_tokensPerShare).div(1e12);
        uint256 correction = s.correction.mul(_banditsCorrection).div(1e18);
        if (_banditsCorrection != s.banditsCorrection) {
            correction = correction.mul(s.banditsCorrection).div(_banditsCorrection);
            s.banditsCorrection = _banditsCorrection;
        }
        if (pendingAmount > correction) {
            uint256 balance = _milker.balanceOf(address(this));
            pendingAmount = pendingAmount.sub(correction);
            tokens = pendingAmount > balance ? balance : pendingAmount;
            // Unregister sharing tokens
            s.correction = correction.add(tokens).mul(1e18).div(_banditsCorrection);
            s.banditsCorrection = _banditsCorrection;
            _distributed = _distributed.add(tokens);
            // Transfer MILK tokens from the StableV2 contract to the taker
            _safeTransferMilk(taker, tokens);
        }

        return tokens;
    }

    function _safeTransferMilk(address to, uint256 amount) private {
        uint256 balance = _milker.balanceOf(address(this));
        uint256 tokens = amount > balance ? balance : amount;
        if (tokens > 0) {
            bool ok = _milker.transfer(to, tokens);
            require(ok, "StableV2: unable to transfer MILK");
        }
    }

    ////////////////////////////////////////////////////////////////
    // [TESTS] Test functions to check internal state
    // TODO: Remove it since only for tests !!!
    ////////////////////////////////////////////////////////////////

    function testProduction() public view returns (uint256) {
        return _production;
    }

    function testProduced() public view returns (uint256) {
        return _produced;
    }

    function testTokensPerShare() public view returns (uint256) {
        return _tokensPerShare;
    }

    function testLastUpdateTime() public view returns (uint256) {
        return _lastUpdateTime;
    }
}

// solium-enable security/no-block-members

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"milker","type":"address"},{"internalType":"address","name":"token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"percent","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"arrestedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"burntAmount","type":"uint256"}],"name":"Bandits","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"initialProduction","type":"uint256"}],"name":"Initialized","type":"event"},{"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":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"inputs":[{"internalType":"uint256","name":"percent","type":"uint256"}],"name":"bandits","outputs":[{"internalType":"uint256","name":"banditsAmount","type":"uint256"},{"internalType":"uint256","name":"arrestedAmount","type":"uint256"},{"internalType":"uint256","name":"burntAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"initialProductionPerDay","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"level","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"levelProgress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"milkSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"milker","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":"pending","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"pendingTo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"produced","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"production","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"taker","type":"address"}],"name":"shareMilk","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"}],"name":"stakerCorrection","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"}],"name":"stakerTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"testLastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"testProduced","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"testProduction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"testTokensPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenSupply","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":"update","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101b95760003560e01c8063812de113116100f9578063ce3ba71a11610097578063e4a3011611610071578063e4a301161461037b578063f2fde38b1461039e578063f84b903e146103c4578063fc0c546a146103cc576101b9565b8063ce3ba71a14610345578063e20ccec31461034d578063e22a5b2614610355576101b9565b8063a2e62045116100d3578063a2e6204514610310578063a694fc3a14610318578063b5ad304214610335578063c1633d5c1461033d576101b9565b8063812de113146102da5780638da5cb5b146102e25780639058a51c146102ea576101b9565b8063379607f5116101665780636fd5ae15116101405780636fd5ae15146102ba578063715018a6146102c25780637824407f146102ca57806378e97925146102d2576101b9565b8063379607f514610258578063599946a0146102775780635b76c7121461027f576101b9565b80631ffe54b2116101975780631ffe54b2146101e8578063274b781b1461020e5780632b57434714610232576101b9565b806305e66729146101be57806305e88b69146101d857806312b4110f146101e0575b600080fd5b6101c66103d4565b60408051918252519081900360200190f35b6101c66103db565b6101c6610439565b6101c6600480360360208110156101fe57600080fd5b50356001600160a01b031661043f565b6102166105a4565b604080516001600160a01b039092168252519081900360200190f35b6101c66004803603602081101561024857600080fd5b50356001600160a01b03166105b3565b6102756004803603602081101561026e57600080fd5b5035610618565b005b6101c6610892565b61029c6004803603602081101561029557600080fd5b5035610898565b60408051938452602084019290925282820152519081900360600190f35b6101c66109f5565b610275610a2d565b6101c6610aee565b6101c6610b6a565b6101c6610b70565b610216610b76565b6101c66004803603602081101561030057600080fd5b50356001600160a01b0316610b85565b610275610ba0565b6102756004803603602081101561032e57600080fd5b5035610cc8565b6101c6610f52565b6101c6610fa8565b6101c6610ff3565b6101c66110dd565b6101c66004803603602081101561036b57600080fd5b50356001600160a01b0316611111565b6102756004803603604081101561039157600080fd5b508035906020013561112f565b610275600480360360208110156103b457600080fd5b50356001600160a01b0316611245565b6101c661135c565b610216611362565b6009545b90565b6000600454600014806103f057504260045410155b156103fd575060006103d8565b600854600454600a5462093a8090829003819004914203045b8082101561043157600a830490920391600190910190610416565b509091505090565b600a5490565b600080610456600954610450610ff3565b90611371565b90506000610462610aee565b60065490915082158015906104775750600082115b156104b7576104b46104ad836104a764e8d4a510006104a161049a8960146113ba565b8990611371565b906113fc565b906113ba565b8290611455565b90505b6001600160a01b0385166000908152600360205260408120546104e59064e8d4a51000906104a790856113fc565b6005546001600160a01b0388166000908152600360205260408120600101549293509161051f91670de0b6b3a7640000916104a7916113fc565b6001600160a01b03881660009081526003602052604090206002015460055491925014610578576005546001600160a01b03881660009081526003602052604090206002015461057591906104a79084906113fc565b90505b80821161058d5760009550505050505061059f565b6105978282611371565b955050505050505b919050565b6001546001600160a01b031690565b60006105bd6114af565b6001546001600160a01b039081169116146106095760405162461bcd60e51b815260040180806020018281038252602b81526020018061188e602b913960400191505060405180910390fd5b610612826114b3565b92915050565b60015460408051633af32abf60e01b81523360048201819052915191926001600160a01b031691633af32abf91602480820192602092909190829003018186803b15801561066557600080fd5b505afa158015610679573d6000803e3d6000fd5b505050506040513d602081101561068f57600080fd5b5051156106cd5760405162461bcd60e51b81526004018080602001828103825260368152602001806119436036913960400191505060405180910390fd5b6106d5610ba0565b6106de816114b3565b5081156107dc576001600160a01b0381166000908152600360205260409020546107089083611371565b6001600160a01b03808316600081815260036020908152604080832095909555600254855163a9059cbb60e01b8152600481019490945260248401889052945191949093169263a9059cbb926044808201939182900301818787803b15801561077057600080fd5b505af1158015610784573d6000803e3d6000fd5b505050506040513d602081101561079a57600080fd5b50519050806107da5760405162461bcd60e51b81526004018080602001828103825260228152602001806119006022913960400191505060405180910390fd5b505b6006546001600160a01b038216600090815260036020526040812054909161080f9164e8d4a51000916104a791906113fc565b60055490915061082b906104a783670de0b6b3a76400006113fc565b6001600160a01b03831660008181526003602090815260409182902060018101949094556005546002909401939093558051868152905191927fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a92918290030190a2505050565b60085490565b60008060006108a56114af565b6001546001600160a01b039081169116146108f15760405162461bcd60e51b815260040180806020018281038252602b81526020018061188e602b913960400191505060405180910390fd5b6108f9610ba0565b6000610903610fa8565b90508061091b576000806000935093509350506109ee565b61092a60646104a783886113fc565b935061093784600a6113ba565b91506109438483611371565b60015490935061095c906001600160a01b031684611634565b61098261097960646104a7886005546113fc90919063ffffffff16565b60055490611371565b6005556006546109a69061099d906064906104a790896113fc565b60065490611371565b6006556040805185815260208101859052808201849052905186917f976232a004b12cdbd7c3ce7d454fe1e8265752d8b7573d031e20184cfa1a07c6919081900360600190a2505b9193909250565b600060045460001480610a0a57504260045410155b15610a17575060006103d8565b62093a80600454420381610a2757fe5b04905090565b610a356114af565b6000546001600160a01b03908116911614610a97576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610b3957600080fd5b505afa158015610b4d573d6000803e3d6000fd5b505050506040513d6020811015610b6357600080fd5b5051905090565b60045490565b60065490565b6000546001600160a01b031690565b6001600160a01b031660009081526003602052604090205490565b600a544211610bae57610cc6565b6000610bb86103db565b90506000610bc4610ff3565b90506009548111610bda57505042600a55610cc6565b6000610be4610aee565b905080610bfb575060095560085542600a55610cc6565b6000610c126009548461137190919063ffffffff16565b60015460408051635018d7a960e01b81526004810184905290519293506000926001600160a01b0390921691635018d7a99160248082019260209290919082900301818787803b158015610c6557600080fd5b505af1158015610c79573d6000803e3d6000fd5b505050506040513d6020811015610c8f57600080fd5b50519050610cb2610ca9846104a78464e8d4a510006113fc565b60065490611455565b60065550505060089190915560095542600a555b565b60015460408051633af32abf60e01b81523360048201819052915191926001600160a01b031691633af32abf91602480820192602092909190829003018186803b158015610d1557600080fd5b505afa158015610d29573d6000803e3d6000fd5b505050506040513d6020811015610d3f57600080fd5b505115610d7d5760405162461bcd60e51b81526004018080602001828103825260368152602001806119796036913960400191505060405180910390fd5b610d85610ba0565b610d8e816114b3565b508115610e9c57600254604080516323b872dd60e01b81526001600160a01b03848116600483015230602483015260448201869052915160009392909216916323b872dd9160648082019260209290919082900301818787803b158015610df457600080fd5b505af1158015610e08573d6000803e3d6000fd5b505050506040513d6020811015610e1e57600080fd5b5051905080610e5e5760405162461bcd60e51b81526004018080602001828103825260228152602001806119006022913960400191505060405180910390fd5b6001600160a01b038216600090815260036020526040902054610e819084611455565b6001600160a01b038316600090815260036020526040902055505b6006546001600160a01b0382166000908152600360205260408120549091610ecf9164e8d4a51000916104a791906113fc565b600554909150610eeb906104a783670de0b6b3a76400006113fc565b6001600160a01b03831660008181526003602090815260409182902060018101949094556005546002909401939093558051868152905191927f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d92918290030190a2505050565b600060045460001480610f6757504260045410155b15610f74575060006103d8565b600062093a80610f826109f5565b02600454014203905062093a8081670de0b6b3a76400000281610fa157fe5b0491505090565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610b3957600080fd5b60006004546000148061100857504260045410155b15611015575060006103d8565b600062093a80600454600a54038161102957fe5b049050600062093a8060045442038161103e57fe5b0490508082141561106b5762093a80600854600a544203028161105d57fe5b0460095401925050506103d8565b600854600a80546004546001959095019462093a80868102909101919091038302049190810490035b828410156110b15790810190600a81600190950194049003611094565b62093a808162093a80850260045401420302816110ca57fe5b0482019150816009540194505050505090565b6000806110e8610ff3565b905060075481116110fd5760009150506103d8565b60075461110b908290611371565b91505090565b6001600160a01b031660009081526003602052604090206001015490565b6111376114af565b6000546001600160a01b03908116911614611199576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6111a1610ff3565b156111f3576040805162461bcd60e51b815260206004820152601960248201527f537461626c6556323a20616c7265616479207374617274656400000000000000604482015290519081900360640190fd5b6004829055600781026008819055600a83905560408051848152602081019290925280517f997896709b4e932ee42750e2e14ed1f7ab6c60bd911ff567aa2485cf0b20051b9281900390910190a15050565b61124d6114af565b6000546001600160a01b039081169116146112af576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166112f45760405162461bcd60e51b81526004018080602001828103825260268152602001806118b96026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60075490565b6002546001600160a01b031690565b60006113b383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611791565b9392505050565b60006113b383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611828565b60008261140b57506000610612565b8282028284828161141857fe5b04146113b35760405162461bcd60e51b81526004018080602001828103825260218152602001806119226021913960400191505060405180910390fd5b6000828201838110156113b3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b6001600160a01b0381166000908152600360205260408120600654815483916114e79164e8d4a51000916104a791906113fc565b90506000611510670de0b6b3a76400006104a760055486600101546113fc90919063ffffffff16565b90508260020154600554146115475761153c6005546104a78560020154846113fc90919063ffffffff16565b600554600285015590505b8082111561162c57600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561159a57600080fd5b505afa1580156115ae573d6000803e3d6000fd5b505050506040513d60208110156115c457600080fd5b505190506115d28383611371565b92508083116115e157826115e3565b805b600554909550611603906104a7670de0b6b3a76400006104a1868a611455565b6001850155600554600285015560075461161d9086611455565b60075561162a8686611634565b505b505050919050565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561167f57600080fd5b505afa158015611693573d6000803e3d6000fd5b505050506040513d60208110156116a957600080fd5b5051905060008183116116bc57826116be565b815b9050801561178b576001546040805163a9059cbb60e01b81526001600160a01b038781166004830152602482018590529151600093929092169163a9059cbb9160448082019260209290919082900301818787803b15801561171f57600080fd5b505af1158015611733573d6000803e3d6000fd5b505050506040513d602081101561174957600080fd5b50519050806117895760405162461bcd60e51b81526004018080602001828103825260218152602001806118df6021913960400191505060405180910390fd5b505b50505050565b600081848411156118205760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156117e55781810151838201526020016117cd565b50505050905090810190601f1680156118125780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836118775760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156117e55781810151838201526020016117cd565b50600083858161188357fe5b049594505050505056fe537461626c6556323a2063616c6c6572206973206e6f7420746865204d696c6b657220636f6e74726163744f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373537461626c6556323a20756e61626c6520746f207472616e73666572204d494c4b537461626c6556323a20756e61626c6520746f207472616e73666572207374616b65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77537461626c6556323a2077686974656c6973746564204d494c4b20686f6c646572732063616e6e6f7420636c61696d20746f6b656e73537461626c6556323a2077686974656c6973746564204d494c4b20686f6c646572732063616e6e6f74207374616b6520746f6b656e73a26469706673582212206adc4592aac4c61b6a7cb18c1dd17111182d432f838c8f11bd2be1eba8d4fc3664736f6c634300060c0033

Deployed Bytecode Sourcemap

13705:14302:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27697:89;;;:::i;:::-;;;;;;;;;;;;;;;;22926:473;;;:::i;27903:101::-;;;:::i;24795:851::-;;;;;;;;;;;;;;;;-1:-1:-1;24795:851:0;-1:-1:-1;;;;;24795:851:0;;:::i;21349:99::-;;;:::i;:::-;;;;-1:-1:-1;;;;;21349:99:0;;;;;;;;;;;;;;19905:122;;;;;;;;;;;;;;;;-1:-1:-1;19905:122:0;-1:-1:-1;;;;;19905:122:0;;:::i;17352:1091::-;;;;;;;;;;;;;;;;-1:-1:-1;17352:1091:0;;:::i;:::-;;27596:93;;;:::i;20035:1139::-;;;;;;;;;;;;;;;;-1:-1:-1;20035:1139:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;22377:231;;;:::i;10636:148::-;;;:::i;21941:119::-;;;:::i;21561:96::-;;;:::i;27794:101::-;;;:::i;9994:79::-;;;:::i;21665:126::-;;;;;;;;;;;;;;;;-1:-1:-1;21665:126:0;-1:-1:-1;;;;;21665:126:0;;:::i;18691:1011::-;;;:::i;16241:1103::-;;;;;;;;;;;;;;;;-1:-1:-1;16241:1103:0;;:::i;22616:302::-;;;:::i;22068:119::-;;;:::i;23407:1062::-;;;:::i;24584:203::-;;;:::i;21799:134::-;;;;;;;;;;;;;;;;-1:-1:-1;21799:134:0;-1:-1:-1;;;;;21799:134:0;;:::i;15894:339::-;;;;;;;;;;;;;;;;-1:-1:-1;15894:339:0;;;;;;;:::i;10939:244::-;;;;;;;;;;;;;;;;-1:-1:-1;10939:244:0;-1:-1:-1;;;;;10939:244:0;;:::i;24477:99::-;;;:::i;21456:97::-;;;:::i;27697:89::-;27769:9;;27697:89;;:::o;22926:473::-;22977:7;23001:10;;23015:1;23001:15;:48;;;;23034:15;23020:10;;:29;;23001:48;22997:89;;;-1:-1:-1;23073:1:0;23066:8;;22997:89;23111:11;;23167:10;;23149:15;;14227:6;23149:28;;;;23148:50;;;;23225:15;:28;23224:50;23285:85;23299:4;23292;:11;23285:85;;;14320:2;23336:4;:22;23328:30;;;;23305:6;;;;;23285:85;;;-1:-1:-1;23387:4:0;;-1:-1:-1;;22926:473:0;:::o;27903:101::-;27981:15;;27903:101;:::o;24795:851::-;24861:7;24881:13;24897:25;24912:9;;24897:10;:8;:10::i;:::-;:14;;:25::i;:::-;24881:41;;24933:14;24950:13;:11;:13::i;:::-;24999:15;;24933:30;;-1:-1:-1;25029:9:0;;;;;:23;;;25051:1;25042:6;:10;25029:23;25025:139;;;25086:66;25105:46;25144:6;25105:34;25134:4;25105:24;25115:13;:5;25125:2;25115:9;:13::i;:::-;25105:5;;:9;:24::i;:::-;:28;;:34::i;:::-;:38;;:46::i;:::-;25086:14;;:18;:66::i;:::-;25069:83;;25025:139;-1:-1:-1;;;;;25191:17:0;;25174:14;25191:17;;;:8;:17;;;;;:24;:54;;25240:4;;25191:44;;25220:14;25191:28;:44::i;:54::-;25310:18;;-1:-1:-1;;;;;25277:17:0;;25256:18;25277:17;;;:8;:17;;;;;:28;;;25174:71;;-1:-1:-1;25256:18:0;25277:62;;25334:4;;25277:52;;:32;:52::i;:62::-;-1:-1:-1;;;;;25376:17:0;;;;;;:8;:17;;;;;:35;;;25354:18;;25256:83;;-1:-1:-1;25354:57:0;25350:178;;25497:18;;-1:-1:-1;;;;;25456:17:0;;;;;;:8;:17;;;;;:35;;;25441:75;;25497:18;25441:51;;:10;;:14;:51::i;:75::-;25428:88;;25350:178;25552:10;25542:6;:20;25538:61;;25586:1;25579:8;;;;;;;;;25538:61;25616:22;:6;25627:10;25616;:22::i;:::-;25609:29;;;;;;;24795:851;;;;:::o;21349:99::-;21432:7;;-1:-1:-1;;;;;21432:7:0;21349:99;:::o;19905:122::-;19975:7;15408:12;:10;:12::i;:::-;15396:7;;-1:-1:-1;;;;;15396:7:0;;;15388:32;;;15380:88;;;;-1:-1:-1;;;15380:88:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20002:17:::1;20013:5;20002:10;:17::i;:::-;19995:24:::0;19905:122;-1:-1:-1;;19905:122:0:o;17352:1091::-;17450:7;;:29;;;-1:-1:-1;;;17450:29:0;;17420:10;17450:29;;;;;;;;17420:10;;-1:-1:-1;;;;;17450:7:0;;:21;;:29;;;;;;;;;;;;;;;:7;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;17450:29:0;17449:30;17441:97;;;;-1:-1:-1;;;17441:97:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17589:8;:6;:8::i;:::-;17669:18;17680:6;17669:10;:18::i;:::-;-1:-1:-1;17704:10:0;;17700:335;;-1:-1:-1;;;;;17799:16:0;;;;;;:8;:16;;;;;:23;:35;;17827:6;17799:27;:35::i;:::-;-1:-1:-1;;;;;17773:16:0;;;;;;;:8;:16;;;;;;;;:61;;;;17928:6;;:31;;-1:-1:-1;;;17928:31:0;;;;;;;;;;;;;;;;;17773:16;;17928:6;;;;:15;;:31;;;;;;;;;;;17773:16;17928:6;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;17928:31:0;;-1:-1:-1;17928:31:0;17974:49;;;;-1:-1:-1;;;17974:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17700:335;;18149:15;;-1:-1:-1;;;;;18121:16:0;;18100:18;18121:16;;;:8;:16;;;;;:23;18100:18;;18121:54;;18170:4;;18121:44;;:23;:27;:44::i;:54::-;18241:18;;18100:75;;-1:-1:-1;18216:44:0;;:20;18100:75;18231:4;18216:14;:20::i;:44::-;-1:-1:-1;;;;;18186:16:0;;;;;;:8;:16;;;;;;;;;:27;;;:74;;;;18308:18;;18271:34;;;;:55;;;;18412:23;;;;;;;18186:16;;18412:23;;;;;;;;;17352:1091;;;:::o;27596:93::-;27670:11;;27596:93;:::o;20035:1139::-;20117:21;20149:22;20182:19;15408:12;:10;:12::i;:::-;15396:7;;-1:-1:-1;;;;;15396:7:0;;;15388:32;;;15380:88;;;;-1:-1:-1;;;15380:88:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20258:8:::1;:6;:8::i;:::-;20350:21;20374:12;:10;:12::i;:::-;20350:36:::0;-1:-1:-1;20401:18:0;20397:67:::1;;20444:1;20447::::0;20450::::1;20436:16;;;;;;;;;20397:67;20530:35;20561:3;20530:26;:13:::0;20548:7;20530:17:::1;:26::i;:35::-;20514:51:::0;-1:-1:-1;20590:21:0::1;20514:51:::0;20608:2:::1;20590:17;:21::i;:::-;20576:35:::0;-1:-1:-1;20639:30:0::1;:13:::0;20576:35;20639:17:::1;:30::i;:::-;20766:7;::::0;20622:47;;-1:-1:-1;20740:51:0::1;::::0;-1:-1:-1;;;;;20766:7:0::1;20622:47:::0;20740:17:::1;:51::i;:::-;20869:64;20892:40;20928:3;20892:31;20915:7;20892:18;;:22;;:31;;;;:::i;:40::-;20869:18;::::0;;:22:::1;:64::i;:::-;20848:18;:85:::0;20982:15:::1;::::0;20962:58:::1;::::0;20982:37:::1;::::0;21015:3:::1;::::0;20982:28:::1;::::0;21002:7;20982:19:::1;:28::i;:37::-;20962:15;::::0;;:19:::1;:58::i;:::-;20944:15;:76:::0;21106:60:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;21114:7;;21106:60:::1;::::0;;;;;;;;::::1;15479:1;;20035:1139:::0;;;;;:::o;22377:231::-;22424:7;22448:10;;22462:1;22448:15;:48;;;;22481:15;22467:10;;:29;;22448:48;22444:89;;;-1:-1:-1;22520:1:0;22513:8;;22444:89;14227:6;22569:10;;22551:15;:28;22550:50;;;;;;22543:57;;22377:231;:::o;10636:148::-;10216:12;:10;:12::i;:::-;10206:6;;-1:-1:-1;;;;;10206:6:0;;;:22;;;10198:67;;;;;-1:-1:-1;;;10198:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10743:1:::1;10727:6:::0;;10706:40:::1;::::0;-1:-1:-1;;;;;10727:6:0;;::::1;::::0;10706:40:::1;::::0;10743:1;;10706:40:::1;10774:1;10757:19:::0;;-1:-1:-1;;10757:19:0::1;::::0;;10636:148::o;21941:119::-;22021:6;;:31;;;-1:-1:-1;;;22021:31:0;;22046:4;22021:31;;;;;;21994:7;;-1:-1:-1;;;;;22021:6:0;;:16;;:31;;;;;;;;;;;;;;:6;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22021:31:0;;-1:-1:-1;21941:119:0;:::o;21561:96::-;21639:10;;21561:96;:::o;27794:101::-;27872:15;;27794:101;:::o;9994:79::-;10032:7;10059:6;-1:-1:-1;;;;;10059:6:0;9994:79;:::o;21665:126::-;-1:-1:-1;;;;;21760:16:0;21733:7;21760:16;;;:8;:16;;;;;:23;;21665:126::o;18691:1011::-;18759:15;;18740;:34;18736:73;;18791:7;;18736:73;18819:21;18843:12;:10;:12::i;:::-;18819:36;;18866:19;18888:10;:8;:10::i;:::-;18866:32;;18928:9;;18913:11;:24;18909:111;;-1:-1:-1;;18972:15:0;18954;:33;19002:7;;18909:111;19030:14;19047:13;:11;:13::i;:::-;19030:30;-1:-1:-1;19075:11:0;19071:168;;-1:-1:-1;19117:9:0;19103:55;19104:11;19103:55;19191:15;19173;:33;19221:7;;19071:168;19298:21;19322:26;19338:9;;19322:11;:15;;:26;;;;:::i;:::-;19386:7;;:34;;;-1:-1:-1;;;19386:34:0;;;;;;;;;;19298:50;;-1:-1:-1;19359:24:0;;-1:-1:-1;;;;;19386:7:0;;;;:19;;:34;;;;;;;;;;;;;;;19359:24;19386:7;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19386:34:0;;-1:-1:-1;19487:59:0;19507:38;19538:6;19507:26;19386:34;19528:4;19507:20;:26::i;:38::-;19487:15;;;:19;:59::i;:::-;19469:15;:77;-1:-1:-1;;;19589:11:0;:27;;;;19627:9;:23;19679:15;19661;:33;18691:1011;:::o;16241:1103::-;16339:7;;:29;;;-1:-1:-1;;;16339:29:0;;16309:10;16339:29;;;;;;;;16309:10;;-1:-1:-1;;;;;16339:7:0;;:21;;:29;;;;;;;;;;;;;;;:7;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16339:29:0;16338:30;16330:97;;;;-1:-1:-1;;;16330:97:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16478:8;:6;:8::i;:::-;16558:18;16569:6;16558:10;:18::i;:::-;-1:-1:-1;16593:10:0;;16589:348;;16695:6;;:50;;;-1:-1:-1;;;16695:50:0;;-1:-1:-1;;;;;16695:50:0;;;;;;;16731:4;16695:50;;;;;;;;;;;;16685:7;;16695:6;;;;;:19;;:50;;;;;;;;;;;;;;;16685:7;16695:6;:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16695:50:0;;-1:-1:-1;16695:50:0;16760:49;;;;-1:-1:-1;;;16760:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16890:16:0;;;;;;:8;:16;;;;;:23;:35;;16918:6;16890:27;:35::i;:::-;-1:-1:-1;;;;;16864:16:0;;;;;;:8;:16;;;;;:61;-1:-1:-1;16589:348:0;17051:15;;-1:-1:-1;;;;;17023:16:0;;17002:18;17023:16;;;:8;:16;;;;;:23;17002:18;;17023:54;;17072:4;;17023:44;;:23;:27;:44::i;:54::-;17143:18;;17002:75;;-1:-1:-1;17118:44:0;;:20;17002:75;17133:4;17118:14;:20::i;:44::-;-1:-1:-1;;;;;17088:16:0;;;;;;:8;:16;;;;;;;;;:27;;;:74;;;;17210:18;;17173:34;;;;:55;;;;17314:22;;;;;;;17088:16;;17314:22;;;;;;;;;16241:1103;;;:::o;22616:302::-;22671:7;22695:10;;22709:1;22695:15;:48;;;;22728:15;22714:10;;:29;;22695:48;22691:89;;;-1:-1:-1;22767:1:0;22760:8;;22691:89;22790:9;14227:6;22834:7;:5;:7::i;:::-;:27;22821:10;;:40;22802:15;:60;22790:72;;14227:6;22880:1;22884:6;22880:10;:30;;;;;;22873:37;;;22616:302;:::o;22068:119::-;22147:7;;:32;;;-1:-1:-1;;;22147:32:0;;22173:4;22147:32;;;;;;22120:7;;-1:-1:-1;;;;;22147:7:0;;:17;;:32;;;;;;;;;;;;;;:7;:32;;;;;;;;;;23407:1062;23456:7;23480:10;;23494:1;23480:15;:48;;;;23513:15;23499:10;;:29;;23480:48;23476:89;;;-1:-1:-1;23552:1:0;23545:8;;23476:89;23575:12;14227:6;23609:10;;23591:15;;:28;23590:50;;;;;;23575:65;;23651:12;14227:6;23685:10;;23667:15;:28;23666:50;;;;;;23651:65;;23739:4;23731;:12;23727:133;;;14227:6;23817:11;;23798:15;;23780;:33;23779:49;:69;;;;;;23767:9;;:81;23760:88;;;;;;23727:133;23914:11;;24030:15;;;23985:10;;24004:1;23999:6;;;;;14227;23998:28;;;23985:41;;;23984:61;;;;23983:70;;:90;;24092:22;;;24084:30;;24125:153;24145:4;24138;:11;24125:153;;;24207:14;;;;14320:2;24217:4;24151:6;;;;;24244:22;24236:30;;24125:153;;;14227:6;24401:4;14227:6;24372:4;:24;24359:10;;:37;24340:15;:57;24339:66;:86;;;;;;24329:96;;;;24455:6;24443:9;;:18;24436:25;;;;;;23407:1062;:::o;24584:203::-;24632:7;24652:9;24664:10;:8;:10::i;:::-;24652:22;;24694:12;;24689:1;:17;24685:58;;24730:1;24723:8;;;;;24685:58;24766:12;;24760:19;;:1;;:5;:19::i;:::-;24753:26;;;24584:203;:::o;21799:134::-;-1:-1:-1;;;;;21898:16:0;21871:7;21898:16;;;:8;:16;;;;;:27;;;;21799:134::o;15894:339::-;10216:12;:10;:12::i;:::-;10206:6;;-1:-1:-1;;;;;10206:6:0;;;:22;;;10198:67;;;;;-1:-1:-1;;;10198:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16004:10:::1;:8;:10::i;:::-;:15:::0;15996:53:::1;;;::::0;;-1:-1:-1;;;15996:53:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;16060:10;:22:::0;;;16107:1:::1;:27:::0;::::1;16093:11;:41:::0;;;16145:15:::1;:28:::0;;;16189:36:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;::::1;::::0;;;;;;;;::::1;15894:339:::0;;:::o;10939:244::-;10216:12;:10;:12::i;:::-;10206:6;;-1:-1:-1;;;;;10206:6:0;;;:22;;;10198:67;;;;;-1:-1:-1;;;10198:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;11028:22:0;::::1;11020:73;;;;-1:-1:-1::0;;;11020:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11130:6;::::0;;11109:38:::1;::::0;-1:-1:-1;;;;;11109:38:0;;::::1;::::0;11130:6;::::1;::::0;11109:38:::1;::::0;::::1;11158:6;:17:::0;;-1:-1:-1;;11158:17:0::1;-1:-1:-1::0;;;;;11158:17:0;;;::::1;::::0;;;::::1;::::0;;10939:244::o;24477:99::-;24556:12;;24477:99;:::o;21456:97::-;21538:6;;-1:-1:-1;;;;;21538:6:0;21456:97;:::o;1376:136::-;1434:7;1461:43;1465:1;1468;1461:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;1454:50;1376:136;-1:-1:-1;;;1376:136:0:o;3213:132::-;3271:7;3298:39;3302:1;3305;3298:39;;;;;;;;;;;;;;;;;:3;:39::i;2266:471::-;2324:7;2569:6;2565:47;;-1:-1:-1;2599:1:0;2592:8;;2565:47;2636:5;;;2640:1;2636;:5;:1;2660:5;;;;;:10;2652:56;;;;-1:-1:-1;;;2652:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;912:181;970:7;1002:5;;;1026:6;;;;1018:46;;;;;-1:-1:-1;;;1018:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;8630:106;8718:10;8630:106;:::o;25823:1162::-;-1:-1:-1;;;;;25960:15:0;;25875:14;25960:15;;;:8;:15;;;;;26023;;26010:8;;25875:14;;26010:39;;26044:4;;26010:29;;:8;:12;:29::i;:39::-;25986:63;;26060:18;26081:46;26122:4;26081:36;26098:18;;26081:1;:12;;;:16;;:36;;;;:::i;:46::-;26060:67;;26164:1;:19;;;26142:18;;:41;26138:201;;26213:59;26253:18;;26213:35;26228:1;:19;;;26213:10;:14;;:35;;;;:::i;:59::-;26309:18;;26287:19;;;:40;26200:72;-1:-1:-1;26138:201:0;26369:10;26353:13;:26;26349:603;;;26414:7;;:32;;;-1:-1:-1;;;26414:32:0;;26440:4;26414:32;;;;;;26396:15;;-1:-1:-1;;;;;26414:7:0;;:17;;:32;;;;;;;;;;;;;;:7;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26414:32:0;;-1:-1:-1;26477:29:0;:13;26495:10;26477:17;:29::i;:::-;26461:45;;26546:7;26530:13;:23;:49;;26566:13;26530:49;;;26556:7;26530:49;26688:18;;26521:58;;-1:-1:-1;26651:56:0;;:32;26678:4;26651:22;:10;26521:58;26651:14;:22::i;:56::-;26636:12;;;:71;26744:18;;26722:19;;;:40;26792:12;;:24;;26809:6;26792:16;:24::i;:::-;26777:12;:39;26908:32;26926:5;26933:6;26908:17;:32::i;:::-;26349:603;;26964:13;;;25823:1162;;;:::o;26993:349::-;27085:7;;:32;;;-1:-1:-1;;;27085:32:0;;27111:4;27085:32;;;;;;27067:15;;-1:-1:-1;;;;;27085:7:0;;:17;;:32;;;;;;;;;;;;;;:7;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27085:32:0;;-1:-1:-1;27128:14:0;27145:16;;;:35;;27174:6;27145:35;;;27164:7;27145:35;27128:52;-1:-1:-1;27195:10:0;;27191:144;;27232:7;;:28;;;-1:-1:-1;;;27232:28:0;;-1:-1:-1;;;;;27232:28:0;;;;;;;;;;;;;;;27222:7;;27232;;;;;:16;;:28;;;;;;;;;;;;;;;27222:7;27232;:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27232:28:0;;-1:-1:-1;27232:28:0;27275:48;;;;-1:-1:-1;;;27275:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27191:144;;26993:349;;;;:::o;1815:192::-;1901:7;1937:12;1929:6;;;;1921:29;;;;-1:-1:-1;;;1921:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1973:5:0;;;1815:192::o;3841:278::-;3927:7;3962:12;3955:5;3947:28;;;;-1:-1:-1;;;3947:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3986:9;4002:1;3998;:5;;;;;;;3841:278;-1:-1:-1;;;;;3841:278:0:o

Swarm Source

ipfs://6adc4592aac4c61b6a7cb18c1dd17111182d432f838c8f11bd2be1eba8d4fc36

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  ]
[ 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.