Contract 0x0574b119317b8b97af63c6becc08262f07d5ee3c

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x28cd26fce4a4359dd7b8023da70a7858c2674104fb4a75f18e4234d9e1db0af1Withdraw81672402021-06-10 5:35:13133 days 21 hrs ago0x260d886b8f95c6c09f7809d7e7990a01142e44ba IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.00073586
0x5457feffa416d7e75f03acd355798b2b7072c95a4b4d9cf843d78de243015d73Withdraw77181022021-05-25 13:57:08149 days 13 hrs ago0x49ad20c29211e89bf576a97f06eb3fde3747a786 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.00041954
0xd008c7b58c12b38fdee6ba7c39ab4639224d61e5187381b951011dac849ef229Claim Reward77180932021-05-25 13:56:41149 days 13 hrs ago0x49ad20c29211e89bf576a97f06eb3fde3747a786 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000442065
0xca8af4be9c5f9e642fa47efe7d3de5e97ffa014dcd403ad641f8798123006bc5Exit75426902021-05-19 11:05:44155 days 16 hrs ago0x315330dd121e77bc8e0bad326dbc5651275470be IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000739265
0x5032e4364a4a9afe9b219f3248375c4355b51c10215941a16204b92cb3ee06cbExit75245492021-05-18 19:41:10156 days 7 hrs ago0xb4a2e11ab6069aee8551b1384581440b61fc7bf2 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000887118
0xe40d419b6aa60f0766ac90154e14ad23dcc6a2ad6a65053170588f7ef776345bExit75069312021-05-18 4:36:42156 days 22 hrs ago0xf6222a8aa9e7c5089a118798dd39aff7defc3bb4 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000664265
0xa0906a2b971150c72f28f847c7cc191c2915800704c4c4f3030c428db9c5046dExit75005792021-05-17 23:15:18157 days 4 hrs ago0x10c9124939a543e5c2c3f1fdbb9b17c0848ee279 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000589265
0x943e45902df718633c5bcfc008c77ce1ba31682602c69caee60092dde64047dfWithdraw74996722021-05-17 22:29:57157 days 4 hrs ago0x0771e5732eb9d576408f23a2e5ab6e1cc1a0ad08 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.00117728
0xa0eb709d6144f232a5b7510579560f50d29ca5570c2f8bb78473e0236e9c64d5Exit74983232021-05-17 21:22:30157 days 5 hrs ago0xd376f87249f959555efd518129e29d4d792d4847 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000610265
0x62857078f232c5716d0449d6dc13b53f1a8e921206066d29c3272c2143f9ccf7Withdraw74978692021-05-17 20:59:35157 days 6 hrs ago0x7b2710b1750f7d3862ba62aa335f2f14e1cf3477 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.0006608
0x977849150872f8417a280a6a664073f91b706482d4520a185dff57c1c4b51fc2Exit74953442021-05-17 18:51:50157 days 8 hrs ago0xf51aa518c1571a792831070d585cd336c07fc12c IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000739265
0x09edfbb45895853878fa55d002b2b4180add1d08cf102c3163ab164363d0e8e1Exit74935632021-05-17 17:21:55157 days 9 hrs ago0xc30bd79d8a637d301d676480902bddbfe08582f3 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000589265
0xc849949dadf3ed26ca4508439256c8e6f9ce1f215711c40afc47355776f5d16aWithdraw74896692021-05-17 14:06:25157 days 13 hrs ago0xaf9237403b25c9ca0a3c4400d8b8adc6d9727b86 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.0004946
0x7b2f988c86909ff3317d8c857b64ee88775e54af07d7042dcc1e58b2b3fd5c3bClaim Reward74896652021-05-17 14:06:13157 days 13 hrs ago0xaf9237403b25c9ca0a3c4400d8b8adc6d9727b86 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000442065
0xb9ee06d02cc2440d91b9ad645f7ba58ac52bdff765074d635a2d8d92c8b96264Exit74858552021-05-17 10:51:13157 days 16 hrs ago0xa0bb05028c43847ac4e098d90cf026f7c25adebb IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000739265
0x439d3cca294346f6368da784b74da149450e49d68acb5ba4480980580a8ad4c9Withdraw74844622021-05-17 9:39:40157 days 17 hrs ago0x402293a05fd5e6ed2a6cf828c77272f6b71b9eb8 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.0006818
0x3e9feb8b92c07d023a6a3254603939834b80280b9bdc9b93c29878d8a24f2c4cWithdraw74825422021-05-17 8:03:38157 days 19 hrs ago0xbbe21151c726f9eec42516524f58d0057261cc8a IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.00066086
0x394c0406241111a8fb872f24ad722bae564f030c4a3534e80db306fe5fcb373bWithdraw74820362021-05-17 7:37:22157 days 19 hrs ago0x57c26e0a6c846bbd8b356b8f21cd95a9e658c51b IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.0006068
0x78f61c5605316d9851739fe93cef96f8028f1dec5f1d9614babda1586fe49532Exit74769482021-05-17 3:20:38157 days 23 hrs ago0x21d183e81463c5c374a44baa6bc45c646eae7644 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000535265
0x9f46ce2494898e6944e3f945a93ab7592c323b3191e9d6473b4ec4f9f69f0cf7Exit74769202021-05-17 3:19:14157 days 23 hrs ago0x77358ec8cfdd61cb9e7b6862a287572b61f7cc06 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000535265
0x2609584e81b344858a6c8735145335e8a5e32c5ceaf406eb2f5a0fba6495a7d7Exit74755822021-05-17 2:11:53158 days 1 hr ago0x69237fe42d00a361f1e101a0e6a8f04d79486d3c IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000739265
0xf8afe5acb8560d013d6cbc22879205260aaec142895be3d075c2c01db190c7bfExit74755282021-05-17 2:09:11158 days 1 hr ago0xdbed6afa1278fb67a7ed6328c936a22c4ffec950 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000707118
0xfc32ef73af3d0631a6ba4135c39e876f4293f794ea617c9f4dae44f2f4dca4b6Withdraw74751502021-05-17 1:50:17158 days 1 hr ago0x146f64e9299287119bc0ca609e2669c34f6427f0 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.0004196
0xa3ec79c76b1f295b50ea2800c25472191c4fe49d112959d1315961484955afa4Exit74743162021-05-17 1:08:35158 days 2 hrs ago0x6a862f995a266cad1a731c073a65b4ca46f8a442 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000664265
0xa43ebfe08fb50eb7c11b47fb75a15e7a7f1e23064b87234f0b8833b1221de465Exit74740702021-05-17 0:56:17158 days 2 hrs ago0x0ba4f835e38c2d0f2c72d44d6ff82a8a4a6ea8e2 IN  0x0574b119317b8b97af63c6becc08262f07d5ee3c0 BNB0.000610265
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x22210d79264B77c3545eb3E12415796AE2CA108c

Contract Name:
Foundry

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

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

pragma solidity >=0.6.0 <0.8.0;

import "../utils/Context.sol";

File 2 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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 4 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT

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 5 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

File 6 of 12 : Address.sol
// SPDX-License-Identifier: MIT

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 7 of 12 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

File 8 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 9 of 12 : Foundry.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;

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

import "./interfaces/ITreasury.sol";
import "./interfaces/IOracle.sol";
import "./Operator.sol";

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

    address public share;

    uint256 private _totalSupply;
    mapping(address => uint256) private _balances;

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

    function balanceOf(address account) public view returns (uint256) {
        return _balances[account];
    }

    function stake(uint256 amount) public virtual {
        _totalSupply = _totalSupply.add(amount);
        _balances[msg.sender] = _balances[msg.sender].add(amount);
        IERC20(share).safeTransferFrom(msg.sender, address(this), amount);
    }

    function withdraw(uint256 amount) public virtual {
        uint256 blacksmithShare = _balances[msg.sender];
        require(blacksmithShare >= amount, "withdraw > staked");
        _totalSupply = _totalSupply.sub(amount);
        _balances[msg.sender] = blacksmithShare.sub(amount);
        IERC20(share).safeTransfer(msg.sender, amount);
    }
}

contract Foundry is ShareWrapper, ReentrancyGuard, Operator {
    using SafeERC20 for IERC20;
    using Address for address;
    using SafeMath for uint256;

    /* ========== DATA STRUCTURES ========== */

    struct FoundryPosition {
        uint256 lastSnapshotIndex;
        uint256 rewardEarned;
        uint256 epochTimerStart;
    }

    struct FoundrySnapshot {
        uint256 time;
        uint256 rewardReceived;
        uint256 rewardPerShare;
    }

    /* ========== STATE VARIABLES ========== */

    // flags
    bool public initialized = false;

    address public treasury;
    address public collateral;
    // address public oracle; // oracle to get price of collateral

    mapping(address => FoundryPosition) public blacksmiths;
    FoundrySnapshot[] public foundryHistory;

    uint256 public withdrawLockupEpochs;
    uint256 public constant PRECISION = 1e6;

    /* ========== EVENTS ========== */

    event Initialized(address indexed executor, uint256 at);
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event RewardPaid(address indexed user, uint256 reward);
    event RewardAdded(address indexed user, uint256 reward);
    event TreasuryChanged(address indexed newTreasury);

    /* ========== Modifiers =============== */
    modifier blacksmithExists {
        require(balanceOf(msg.sender) > 0, "!staked");
        _;
    }

    modifier updateReward(address blacksmith) {
        if (blacksmith != address(0)) {
            FoundryPosition storage position = blacksmiths[blacksmith];
            position.rewardEarned = earned(blacksmith);
            position.lastSnapshotIndex = latestSnapshotIndex();
            blacksmiths[blacksmith] = position;
        }
        _;
    }

    modifier notInitialized {
        require(!initialized, "alreadyInitialized");
        _;
    }

    modifier onlyTreasury() {
        require(msg.sender == address(treasury), "!treasury");
        _;
    }

    /* ========== GOVERNANCE ========== */

    function initialize(
        address _collateral,
        address _share,
        address _treasury
    ) public notInitialized {
        collateral = _collateral;
        share = _share;
        treasury = _treasury;

        FoundrySnapshot memory genesisSnapshot = FoundrySnapshot({time: block.number, rewardReceived: 0, rewardPerShare: 0});
        foundryHistory.push(genesisSnapshot);
        withdrawLockupEpochs = 4; // Lock for 8 epochs before release withdraw
        initialized = true;
        emit Initialized(msg.sender, block.number);
    }

    function setLockUp(uint256 _withdrawLockupEpochs) external onlyOperator {
        require(_withdrawLockupEpochs <= 56, "_withdrawLockupEpochs: out of range"); // <= 2 week
        withdrawLockupEpochs = _withdrawLockupEpochs;
    }

    /* ========== VIEW FUNCTIONS ========== */

    function info()
        public
        view
        returns (
            uint256,
            uint256,
            uint256,
            uint256,
            uint256
        )
    {
        (uint256 _epoch, uint256 _nextEpochPoint, uint256 _epoch_length) = ITreasury(treasury).epochInfo();
        return (
            _epoch, // current epoch
            _nextEpochPoint, // next epoch point
            _epoch_length, // epoch duration
            utilizationRatio(), // utilization ratio
            totalSupply()
            // IOracle(oracle).consult() // collateral price
        );
    }

    function utilizationRatio() public view returns (uint256) {
        return ITreasury(treasury).utilizationRatio(address(this));
    }

    // =========== Snapshot getters

    function latestSnapshotIndex() public view returns (uint256) {
        return foundryHistory.length.sub(1);
    }

    function getLatestSnapshot() internal view returns (FoundrySnapshot memory) {
        return foundryHistory[latestSnapshotIndex()];
    }

    function getLastSnapshotIndexOf(address blacksmith) public view returns (uint256) {
        return blacksmiths[blacksmith].lastSnapshotIndex;
    }

    function getLastSnapshotOf(address blacksmith) internal view returns (FoundrySnapshot memory) {
        return foundryHistory[getLastSnapshotIndexOf(blacksmith)];
    }

    function canWithdraw(address blacksmith) public view returns (bool) {
        return blacksmiths[blacksmith].epochTimerStart.add(withdrawLockupEpochs) <= ITreasury(treasury).epoch();
    }

    function epoch() external view returns (uint256) {
        return ITreasury(treasury).epoch();
    }

    function nextEpochPoint() external view returns (uint256) {
        return ITreasury(treasury).nextEpochTimestamp();
    }

    // =========== blacksmith getters

    function rewardPerShare() public view returns (uint256) {
        return getLatestSnapshot().rewardPerShare;
    }

    function earned(address blacksmith) public view returns (uint256) {
        uint256 latestRPS = getLatestSnapshot().rewardPerShare;
        uint256 storedRPS = getLastSnapshotOf(blacksmith).rewardPerShare;

        return balanceOf(blacksmith).mul(latestRPS.sub(storedRPS)).div(1e18).add(blacksmiths[blacksmith].rewardEarned);
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    function stake(uint256 amount) public override nonReentrant updateReward(msg.sender) {
        require(amount > 0, "Foundry: Cannot stake 0");
        blacksmiths[msg.sender].epochTimerStart = ITreasury(treasury).epoch(); // reset timer
        emit Staked(msg.sender, amount);
        super.stake(amount);
    }

    function withdraw(uint256 amount) public override nonReentrant blacksmithExists updateReward(msg.sender) {
        require(amount > 0, "Foundry: Cannot withdraw 0");
        require(canWithdraw(msg.sender), "Foundry: still in withdraw lockup");
        claimReward();
        emit Withdrawn(msg.sender, amount);
        super.withdraw(amount);
    }

    function exit() external {
        withdraw(balanceOf(msg.sender));
    }

    function claimReward() public updateReward(msg.sender) {
        uint256 reward = blacksmiths[msg.sender].rewardEarned;
        if (reward > 0) {
            blacksmiths[msg.sender].epochTimerStart = ITreasury(treasury).epoch(); // reset timer
            blacksmiths[msg.sender].rewardEarned = 0;
            IERC20(collateral).safeTransfer(msg.sender, reward);
            emit RewardPaid(msg.sender, reward);
        }
    }

    function allocateSeigniorage(uint256 amount) external nonReentrant onlyTreasury {
        require(amount > 0, "Foundry: Cannot allocate 0");
        require(totalSupply() > 0, "Foundry: Cannot allocate when totalSupply is 0");

        // Create & add new snapshot
        uint256 prevRPS = getLatestSnapshot().rewardPerShare;
        uint256 nextRPS = prevRPS.add(amount.mul(1e18).div(totalSupply()));

        FoundrySnapshot memory newSnapshot = FoundrySnapshot({time: block.number, rewardReceived: amount, rewardPerShare: nextRPS});
        foundryHistory.push(newSnapshot);

        // collateral().safeTransferFrom(msg.sender, address(this), amount);
        emit RewardAdded(msg.sender, amount);
    }

    function setTreasury(address _treasury) external onlyOperator {
        treasury = _treasury;
        emit TreasuryChanged(treasury);
    }
}

File 10 of 12 : Operator.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;

import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract Operator is Context, Ownable {
    address private _operator;

    event OperatorTransferred(address indexed previousOperator, address indexed newOperator);

    constructor() {
        _operator = _msgSender();
        emit OperatorTransferred(address(0), _operator);
    }

    function operator() public view returns (address) {
        return _operator;
    }

    modifier onlyOperator() {
        require(_operator == msg.sender, "operator: caller is not the operator");
        _;
    }

    function isOperator() public view returns (bool) {
        return _msgSender() == _operator;
    }

    function transferOperator(address newOperator_) public onlyOwner {
        _transferOperator(newOperator_);
    }

    function _transferOperator(address newOperator_) internal {
        require(newOperator_ != address(0), "operator: zero address given for new operator");
        emit OperatorTransferred(address(0), newOperator_);
        _operator = newOperator_;
    }
}

File 11 of 12 : IOracle.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;

interface IOracle {
    function consult() external view returns (uint256);
}

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

pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;

interface ITreasury {
    function collateralReserve() external view returns (address);

    function isPool(address _address) external view returns (bool);

    function isMintingPool(address _poolAddress, address _dToken) external view returns (bool);

    function epoch() external view returns (uint256);

    function nextEpochTimestamp() external view returns (uint256);

    function epochInfo()
        external
        view
        returns (
            uint256 _epoch,
            uint256 lastEpochTimestamp,
            uint256 epochDuration
        );

    function utilizationRatio(address foundry) external view returns (uint256);

    function globalCollateralValue(address _collateral) external view returns (uint256);

    function requestTransfer(
        address token,
        address receiver,
        uint256 amount
    ) external;

    event PoolAdded(address pool);
    event PoolRemoved(address pool);
    event EpochDurationChanged(uint256 epochDuration);
    event FoundryAdded(address foundry, address pool);
    event FoundryRemoved(address foundry, address pool);
    event UtilizationRatioChanged(address pool, uint256 ratio);
    event CollateralReserveChanged(address collateralReserve);
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"uint256","name":"at","type":"uint256"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOperator","type":"address"},{"indexed":true,"internalType":"address","name":"newOperator","type":"address"}],"name":"OperatorTransferred","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":"user","type":"address"},{"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":"newTreasury","type":"address"}],"name":"TreasuryChanged","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":[],"name":"PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"allocateSeigniorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"blacksmiths","outputs":[{"internalType":"uint256","name":"lastSnapshotIndex","type":"uint256"},{"internalType":"uint256","name":"rewardEarned","type":"uint256"},{"internalType":"uint256","name":"epochTimerStart","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"blacksmith","type":"address"}],"name":"canWithdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collateral","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"blacksmith","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"foundryHistory","outputs":[{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"rewardReceived","type":"uint256"},{"internalType":"uint256","name":"rewardPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"blacksmith","type":"address"}],"name":"getLastSnapshotIndexOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"info","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collateral","type":"address"},{"internalType":"address","name":"_share","type":"address"},{"internalType":"address","name":"_treasury","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestSnapshotIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextEpochPoint","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":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_withdrawLockupEpochs","type":"uint256"}],"name":"setLockUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"share","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":"newOperator_","type":"address"}],"name":"transferOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"utilizationRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawLockupEpochs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040526005805460ff60a01b1916905534801561001d57600080fd5b506001600355600061002d6100d4565b600480546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506100836100d4565b600580546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a36100d8565b3390565b611f74806100e76000396000f3fe608060405234801561001057600080fd5b50600436106101fa5760003560e01c8063714b46581161011a578063a8d5fd65116100ad578063c5967c261161007c578063c5967c26146103b5578063d8dfeb45146103bd578063e9fad8ee146103c5578063f0f44260146103cd578063f2fde38b146103e0576101fa565b8063a8d5fd651461038a578063aaf5eb6814610392578063b88a802f1461039a578063c0c53b8b146103a2576101fa565b80638da5cb5b116100e95780638da5cb5b14610354578063900cf0cf1461035c57806397ffe1d714610364578063a694fc3a14610377576101fa565b8063714b465814610313578063715018a6146103265780637e0a883c1461032e5780638ab775e214610341576101fa565b80632e1a7d4d11610192578063446a2ec811610161578063446a2ec8146102db578063570ca735146102e357806361d027b3146102f857806370a0823114610300576101fa565b80632e1a7d4d1461029f578063370158ea146102b25780633f9e3f04146102cb5780634456eda2146102d3576101fa565b806319262d30116101ce57806319262d301461024d5780631e85cd651461026057806329605e77146102685780632df6b92e1461027d576101fa565b80628cc262146101ff5780630b231cbe14610228578063158ef93e1461023057806318160ddd14610245575b600080fd5b61021261020d366004611b2a565b6103f3565b60405161021f9190611e14565b60405180910390f35b610212610476565b6102386104fc565b60405161021f9190611bf7565b61021261050c565b61023861025b366004611b2a565b610512565b6102126105bf565b61027b610276366004611b2a565b6105c5565b005b61029061028b366004611b2a565b610645565b60405161021f93929190611e1d565b61027b6102ad366004611b86565b610666565b6102ba6107fb565b60405161021f959493929190611e33565b6102126108ba565b6102386108cb565b6102126108f1565b6102eb610904565b60405161021f9190611be3565b6102eb610913565b61021261030e366004611b2a565b610922565b610212610321366004611b2a565b61093d565b61027b610958565b61029061033c366004611b86565b610a16565b61027b61034f366004611b86565b610a49565b6102eb610ab8565b610212610ac7565b61027b610372366004611b86565b610b0c565b61027b610385366004611b86565b610cfd565b6102eb610ebf565b610212610ece565b61027b610ed5565b61027b6103b0366004611b44565b61105a565b6102126111bc565b6102eb611201565b61027b611210565b61027b6103db366004611b2a565b61121e565b61027b6103ee366004611b2a565b6112b7565b6000806103fe6113cc565b604001519050600061040f84611424565b6040908101516001600160a01b03861660009081526008602052919091206001015490915061046c90610466670de0b6b3a7640000610460610451878761147f565b61045a8a610922565b906114e1565b90611541565b906115a8565b925050505b919050565b6006546040516311ba41a560e31b81526000916001600160a01b031690638dd20d28906104a7903090600401611be3565b60206040518083038186803b1580156104bf57600080fd5b505afa1580156104d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f79190611b9e565b905090565b600554600160a01b900460ff1681565b60015490565b6006546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf916004808301926020929190829003018186803b15801561055757600080fd5b505afa15801561056b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058f9190611b9e565b600a546001600160a01b0384166000908152600860205260409020600201546105b7916115a8565b111592915050565b600a5481565b6105cd611602565b6001600160a01b03166105de610ab8565b6001600160a01b031614610639576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61064281611606565b50565b60086020526000908152604090208054600182015460029092015490919083565b600260035414156106be576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260035560006106ce33610922565b116106f45760405162461bcd60e51b81526004016106eb90611cea565b60405180910390fd5b33801561075b576001600160a01b038116600090815260086020526040902061071c826103f3565b60018201556107296108ba565b8082556001600160a01b0383166000908152600860205260409020908155600180830154908201556002918201549101555b6000821161077b5760405162461bcd60e51b81526004016106eb90611d9c565b61078433610512565b6107a05760405162461bcd60e51b81526004016106eb90611dd3565b6107a8610ed5565b336001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5836040516107e19190611e14565b60405180910390a26107f2826116a3565b50506001600355565b600080600080600080600080600660009054906101000a90046001600160a01b03166001600160a01b0316631f1b8a8c6040518163ffffffff1660e01b815260040160606040518083038186803b15801561085557600080fd5b505afa158015610869573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088d9190611bb6565b92509250925082828261089e610476565b6108a661050c565b975097509750975097505050509091929394565b6009546000906104f790600161147f565b6005546000906001600160a01b03166108e2611602565b6001600160a01b031614905090565b60006108fb6113cc565b60400151905090565b6005546001600160a01b031690565b6006546001600160a01b031681565b6001600160a01b031660009081526002602052604090205490565b6001600160a01b031660009081526008602052604090205490565b610960611602565b6001600160a01b0316610971610ab8565b6001600160a01b0316146109cc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6004546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600480546001600160a01b0319169055565b60098181548110610a2657600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6005546001600160a01b03163314610a925760405162461bcd60e51b8152600401808060200182810382526024815260200180611ef16024913960400191505060405180910390fd5b6038811115610ab35760405162461bcd60e51b81526004016106eb90611d36565b600a55565b6004546001600160a01b031690565b6006546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf916004808301926020929190829003018186803b1580156104bf57600080fd5b60026003541415610b64576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026003556006546001600160a01b03163314610b935760405162461bcd60e51b81526004016106eb90611d79565b60008111610bb35760405162461bcd60e51b81526004016106eb90611c02565b6000610bbd61050c565b11610bda5760405162461bcd60e51b81526004016106eb90611c39565b6000610be46113cc565b6040015190506000610c13610c0c610bfa61050c565b61046086670de0b6b3a76400006114e1565b83906115a8565b60408051606081018252438152602081018681528183018481526009805460018101825560009190915283517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af60039092029182015591517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b0830155517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b19091015590519192509033907fac24935fd910bc682b5ccb1a07b718cadf8cf2f6d1404c4f3ddc3662dae40e2990610cea908790611e14565b60405180910390a2505060016003555050565b60026003541415610d55576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355338015610dc1576001600160a01b0381166000908152600860205260409020610d82826103f3565b6001820155610d8f6108ba565b8082556001600160a01b0383166000908152600860205260409020908155600180830154908201556002918201549101555b60008211610de15760405162461bcd60e51b81526004016106eb90611c87565b600660009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e2f57600080fd5b505afa158015610e43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e679190611b9e565b33600081815260086020526040908190206002019290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90610eae908590611e14565b60405180910390a26107f282611718565b6000546001600160a01b031681565b620f424081565b338015610f3c576001600160a01b0381166000908152600860205260409020610efd826103f3565b6001820155610f0a6108ba565b8082556001600160a01b0383166000908152600860205260409020908155600180830154908201556002918201549101555b33600090815260086020526040902060010154801561105657600660009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b158015610fa357600080fd5b505afa158015610fb7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdb9190611b9e565b3360008181526008602052604081206002810193909355600190920191909155600754611014916001600160a01b03909116908361176e565b336001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04868260405161104d9190611e14565b60405180910390a25b5050565b600554600160a01b900460ff16156110845760405162461bcd60e51b81526004016106eb90611cbe565b600780546001600160a01b038086166001600160a01b031992831617909255600080548584169083161781556006805493851693909216929092179055604080516060810182524380825260208201848152828401858152600980546001810182559652835160039096027f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af81019690965590517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b0860155517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b1909401939093556004600a556005805460ff60a01b1916600160a01b1790559051909133917f25ff68dd81b34665b5ba7e553ee5511bf6812e12adb4a7e2c0d9e26b3099ce79916111ae91611e14565b60405180910390a250505050565b6006546040805163b6e8e6d760e01b815290516000926001600160a01b03169163b6e8e6d7916004808301926020929190829003018186803b1580156104bf57600080fd5b6007546001600160a01b031681565b61121c6102ad33610922565b565b6005546001600160a01b031633146112675760405162461bcd60e51b8152600401808060200182810382526024815260200180611ef16024913960400191505060405180910390fd5b600680546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fc714d22a2f08b695f81e7c707058db484aa5b4d6b4c9fd64beb10fe85832f60890600090a250565b6112bf611602565b6001600160a01b03166112d0610ab8565b6001600160a01b03161461132b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166113705760405162461bcd60e51b8152600401808060200182810382526026815260200180611e576026913960400191505060405180910390fd5b6004546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600480546001600160a01b0319166001600160a01b0392909216919091179055565b6113d4611af2565b60096113de6108ba565b815481106113e857fe5b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b61142c611af2565b60096114378361093d565b8154811061144157fe5b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820154815250509050919050565b6000828211156114d6576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6000826114f0575060006114db565b828202828482816114fd57fe5b041461153a5760405162461bcd60e51b8152600401808060200182810382526021815260200180611ed06021913960400191505060405180910390fd5b9392505050565b6000808211611597576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816115a057fe5b049392505050565b60008282018381101561153a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b6001600160a01b03811661164b5760405162461bcd60e51b815260040180806020018281038252602d815260200180611ea3602d913960400191505060405180910390fd5b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b33600090815260026020526040902054818110156116d35760405162461bcd60e51b81526004016106eb90611d0b565b6001546116e0908361147f565b6001556116ed818361147f565b336000818152600260205260408120929092559054611056916001600160a01b03909116908461176e565b60015461172590826115a8565b6001553360009081526002602052604090205461174290826115a8565b336000818152600260205260408120929092559054610642916001600160a01b039091169030846117c5565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526117c0908490611825565b505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261181f908590611825565b50505050565b600061187a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118d69092919063ffffffff16565b8051909150156117c05780806020019051602081101561189957600080fd5b50516117c05760405162461bcd60e51b815260040180806020018281038252602a815260200180611f15602a913960400191505060405180910390fd5b60606118e584846000856118ed565b949350505050565b60608247101561192e5760405162461bcd60e51b8152600401808060200182810382526026815260200180611e7d6026913960400191505060405180910390fd5b61193785611a48565b611988576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106119c65780518252601f1990920191602091820191016119a7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611a28576040519150601f19603f3d011682016040523d82523d6000602084013e611a2d565b606091505b5091509150611a3d828286611a4e565b979650505050505050565b3b151590565b60608315611a5d57508161153a565b825115611a6d5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611ab7578181015183820152602001611a9f565b50505050905090810190601f168015611ae45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b60405180606001604052806000815260200160008152602001600081525090565b80356001600160a01b038116811461047157600080fd5b600060208284031215611b3b578081fd5b61153a82611b13565b600080600060608486031215611b58578182fd5b611b6184611b13565b9250611b6f60208501611b13565b9150611b7d60408501611b13565b90509250925092565b600060208284031215611b97578081fd5b5035919050565b600060208284031215611baf578081fd5b5051919050565b600080600060608486031215611bca578283fd5b8351925060208401519150604084015190509250925092565b6001600160a01b0391909116815260200190565b901515815260200190565b6020808252601a908201527f466f756e6472793a2043616e6e6f7420616c6c6f636174652030000000000000604082015260600190565b6020808252602e908201527f466f756e6472793a2043616e6e6f7420616c6c6f63617465207768656e20746f60408201526d074616c537570706c7920697320360941b606082015260800190565b60208082526017908201527f466f756e6472793a2043616e6e6f74207374616b652030000000000000000000604082015260600190565b602080825260129082015271185b1c9958591e525b9a5d1a585b1a5e995960721b604082015260600190565b602080825260079082015266085cdd185ad95960ca1b604082015260600190565b6020808252601190820152701dda5d1a191c985dc80f881cdd185ad959607a1b604082015260600190565b60208082526023908201527f5f77697468647261774c6f636b757045706f6368733a206f7574206f662072616040820152626e676560e81b606082015260800190565b60208082526009908201526821747265617375727960b81b604082015260600190565b6020808252601a908201527f466f756e6472793a2043616e6e6f742077697468647261772030000000000000604082015260600190565b60208082526021908201527f466f756e6472793a207374696c6c20696e207769746864726177206c6f636b756040820152600760fc1b606082015260800190565b90815260200190565b9283526020830191909152604082015260600190565b948552602085019390935260408401919091526060830152608082015260a0019056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c6f70657261746f723a207a65726f206164647265737320676976656e20666f72206e6577206f70657261746f72536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657261746f725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212208272ca505afbe950c749303feef08acd696d77b64bbf17c8655d43ce8e871ed364736f6c63430007060033

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