**Maintenance in progress, block data might not be up to date**

Contract 0x6FA75f78a7aEF9D9ED7183ad4Ae7f4Ec8B7cd430

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x6886870f395f8fd315f2020f411bf70dc91ad289a2ec18d2471af7cc778d0777Exit78144872021-05-28 22:46:31146 days 5 hrs ago0xd54956c98f99c97c6142d1dd6864a2d4b71a42b6 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000739265
0x26e97b76fb3993be0bd257f50def39fbaafeb4a9cea25ec9b6d02a6feb5dff4eClaim Reward75546812021-05-19 21:08:57155 days 6 hrs ago0x416679287b3f618a2d9e4f88a089430c91b0d11c IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000200555
0xff5394c494aebb9975ddfe13c1f20ec1b010a925d2fc9a5bfa6ff514a57d787fWithdraw75546782021-05-19 21:08:48155 days 6 hrs ago0x416679287b3f618a2d9e4f88a089430c91b0d11c IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.0007358
0x5a218c97cf196d7fa1e8c6fa1363182d11aa738c0d5b7db7b73769337debd5d6Claim Reward75489132021-05-19 16:20:17155 days 11 hrs ago0xc572779d7839b998df24fc316c89bed3d450ed13 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000200555
0x2a363f26cf182be16656e87366f6cf75c4314f687c33a8b91d9117f29db5b60eExit75489062021-05-19 16:19:56155 days 11 hrs ago0xc572779d7839b998df24fc316c89bed3d450ed13 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000739265
0x17fd5c31d1495e74e1fb15e50426ba9f36526bac7795c678d8262fe3133c06d2Exit75311052021-05-19 1:09:01156 days 2 hrs ago0x3baa8ff328d7032181698a28f05274f0130b5634 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000685265
0x7f7c9e9fe4344e26b5097be30d6d54a9d30b0d763b241479f409f5385a349d63Claim Reward75179692021-05-18 14:09:44156 days 13 hrs ago0x3ebb65018739609b28d8bfaa61fa4ebd5902ab87 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000200555
0x74f676f06b438ea84f0aacca2cc5169420fed180a932085d5b155529aab375a6Exit75179632021-05-18 14:09:26156 days 13 hrs ago0x3ebb65018739609b28d8bfaa61fa4ebd5902ab87 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000664265
0xb6d0571e1aa8dcde1971e4caab3304c8edf4c32d68b59f089e06f6f5cda22f34Withdraw75084242021-05-18 6:00:10156 days 21 hrs ago0x3d9f8f6d893940f1cffbce740aae78d3abd75053 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.0007358
0xdb75bad2ffefdc317a65264be1b90419ea90ed3cc68a948c854fdbcf49164e2dExit75069212021-05-18 4:36:07156 days 23 hrs ago0xf6222a8aa9e7c5089a118798dd39aff7defc3bb4 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000739265
0x52fa086449c2461b69dd84b9d7d536dbfdd4cbc683d395b70f7abf7fd804fc3eExit75012842021-05-17 23:50:33157 days 4 hrs ago0xa018c9de8356cca5b571125b66ea97b2175f557d IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000739265
0x86a7d7aa402e209e0ffccaa1db4732568f78312b78a3399dd37249551d3371c6Exit75005752021-05-17 23:15:06157 days 4 hrs ago0x10c9124939a543e5c2c3f1fdbb9b17c0848ee279 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000589265
0x4f58fe2c8b1abd402e983b88dfbe1015c1891d5215610d70cc5caf21e057b908Exit74994192021-05-17 22:17:18157 days 5 hrs ago0x0355c4e76e93d1d77751150df31bdf3a27a7e014 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000739265
0xfc1383b49b58f86d80777b50127e2a695d3c4418217a812ff68314d0811614b8Exit74983492021-05-17 21:23:48157 days 6 hrs ago0xd376f87249f959555efd518129e29d4d792d4847 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000610265
0xc7636dbc083a28a66105a19610088d3aef612b72a766ff364ac7ac2957884732Exit74945992021-05-17 18:14:11157 days 9 hrs ago0x17847ffc84b1da225f9761018c5060e054ded3e9 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000739265
0xd64668c8de836fd38194593b7cec587dbe907dbc3852b87d6ac11c65e76d5161Exit74945642021-05-17 18:12:21157 days 9 hrs ago0xfa862433e1fcc7b70aa10d5a1fca6de956be0109 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000739265
0xb7c36b1e12e3d646730b4060b685df513b68a11dce166b95db71d4f8458052b2Exit74935612021-05-17 17:21:49157 days 10 hrs ago0xc30bd79d8a637d301d676480902bddbfe08582f3 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000589265
0x7135004f38133656e94504606e9336c435b3e0c063fe9e457f68b656183b7dabExit74906812021-05-17 14:57:04157 days 13 hrs ago0x21902b5c99447e12b842f2833e923e3318db1bcd IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000610265
0xa5777302dc9d3f56f704129277db5bf3e8dba8d5214a47a7c4d4d32947a17220Exit74887492021-05-17 13:20:25157 days 14 hrs ago0xecced53f70afa9a884670e72168699f55c06e0c1 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.00117853
0x2631715258a6547fb006e0baec2d8d0b65bfcd6df8bf13ae551f5d79cc8c9310Withdraw74885892021-05-17 13:12:25157 days 14 hrs ago0x8c1271bd580c224b378c0df97ee8cc07070f28bc IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.0006608
0xd5f7bdf2dd5a8d01e090dc7999ef49014f88b6490e89e964741172b4f11a4aa8Exit74881142021-05-17 12:48:40157 days 15 hrs ago0x77c7c26851b09dcd9d09ea79396e10794ef5bb6c IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000822318
0xf692844565495cfa4eab60b2a9da43063e007bc93f91c6b86eeb88c7bc268d75Exit74861202021-05-17 11:04:28157 days 16 hrs ago0x0e7686a71f9c8d4de9f92ecfe2e5ca8e3d4dfc27 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000664265
0x5cda7546635bb979f96edad55282df4135264dac08fa9b08ca7198b4e7b2f21dExit74810852021-05-17 6:49:31157 days 21 hrs ago0xdcb16fad0f04c7182df851078b7672497f5eb017 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000739265
0xa73c8a83f4b9b1ccc291ee058cbd1b15b784169250a5fecc44c75ec180264a4eExit74785252021-05-17 4:39:58157 days 23 hrs ago0xb6ddfa8193472e07306dda0e7d9dd54fc6e677a3 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000498005
0x07105b1871d1b534886b4a67902711e6139da1e234a7a2c735c5a5b2c62338b6Claim Reward74785222021-05-17 4:39:49157 days 23 hrs ago0xb6ddfa8193472e07306dda0e7d9dd54fc6e677a3 IN  0x6fa75f78a7aef9d9ed7183ad4ae7f4ec8b7cd4300 BNB0.000442065
[ 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.