ETH Price: $3,323.30 (-2.99%)

Contract

0x0822F3C03dcc24d200AFF33493Dc08d0e1f274A2
 

Multichain Info

1 address found via
Transaction Hash
Method
Block
From
To
Unstake OHM207952752024-09-21 0:07:2367 days ago1726877243IN
0x0822F3C0...0e1f274A2
0 ETH0.0013676912.39764362
Unstake OHM207201002024-09-10 12:05:1177 days ago1725969911IN
0x0822F3C0...0e1f274A2
0 ETH0.0018060416.37108344
Unstake OHM205763572024-08-21 10:19:4797 days ago1724235587IN
0x0822F3C0...0e1f274A2
0 ETH0.000122351.10920716
Unstake OHM205763572024-08-21 10:19:4797 days ago1724235587IN
0x0822F3C0...0e1f274A2
0 ETH0.000122351.10920716
Unstake OHM189972712024-01-13 10:07:35318 days ago1705140455IN
0x0822F3C0...0e1f274A2
0 ETH0.0010378716.60520063
Unstake OHM189972442024-01-13 10:02:11318 days ago1705140131IN
0x0822F3C0...0e1f274A2
0 ETH0.001080517.28730307
Unstake OHM189972342024-01-13 10:00:11318 days ago1705140011IN
0x0822F3C0...0e1f274A2
0 ETH0.0009883315.81267148
Unstake OHM186924282023-12-01 15:22:47361 days ago1701444167IN
0x0822F3C0...0e1f274A2
0 ETH0.0039609642.50193493
Unstake OHM186924242023-12-01 15:21:59361 days ago1701444119IN
0x0822F3C0...0e1f274A2
0 ETH0.0046044241.74642245
Unstake OHM186876352023-11-30 23:16:47362 days ago1701386207IN
0x0822F3C0...0e1f274A2
0 ETH0.0028285945.26406174
Unstake OHM180296232023-08-30 19:54:11454 days ago1693425251IN
0x0822F3C0...0e1f274A2
0 ETH0.0020288119.22699697
Unstake OHM157545082022-10-15 15:47:23773 days ago1665848843IN
0x0822F3C0...0e1f274A2
0 ETH0.0027576725
Unstake OHM149872202022-06-18 21:35:50892 days ago1655588150IN
0x0822F3C0...0e1f274A2
0 ETH0.00856328125.64984876
Unstake OHM149871992022-06-18 21:30:35892 days ago1655587835IN
0x0822F3C0...0e1f274A2
0 ETH0.01251031183.43575029
Unstake OHM149860472022-06-18 16:53:28892 days ago1655571208IN
0x0822F3C0...0e1f274A2
0 ETH0.0025183836.95894798
Unstake OHM149860232022-06-18 16:48:46892 days ago1655570926IN
0x0822F3C0...0e1f274A2
0 ETH0.0039361457.71467619
Unstake OHM149859812022-06-18 16:36:51892 days ago1655570211IN
0x0822F3C0...0e1f274A2
0 ETH0.0021272234.02089394
Unstake OHM143703752022-03-12 6:45:17990 days ago1647067517IN
0x0822F3C0...0e1f274A2
0 ETH0.0008182512
Unstake OHM142795732022-02-26 4:31:511004 days ago1645849911IN
0x0822F3C0...0e1f274A2
0 ETH0.0014319421
Unstake OHM140790792022-01-26 4:21:261035 days ago1643170886IN
0x0822F3C0...0e1f274A2
0 ETH0.01124159106.53620002
Unstake OHM139914692022-01-12 15:20:241049 days ago1642000824IN
0x0822F3C0...0e1f274A2
0 ETH0.01672089179.37213078
Unstake OHM139914462022-01-12 15:14:561049 days ago1642000496IN
0x0822F3C0...0e1f274A2
0 ETH0.0113944173.72174026
Unstake OHM139914262022-01-12 15:09:271049 days ago1642000167IN
0x0822F3C0...0e1f274A2
0 ETH0.00563771111.74634724
Unstake OHM139914182022-01-12 15:07:551049 days ago1642000075IN
0x0822F3C0...0e1f274A2
0 ETH0.00573476113.50566229
Unstake OHM139625862022-01-08 4:25:111053 days ago1641615911IN
0x0822F3C0...0e1f274A2
0 ETH0.0093411188.52539605
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OlympusStaking

Compiler Version
v0.7.5+commit.eb77ed08

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU AGPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-03-22
*/

/**
 *Submitted for verification at Etherscan.io on 2021-03-20
*/

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

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

        return c;
    }

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

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

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

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

        return c;
    }

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

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

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

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

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrrt(uint256 a) internal pure returns (uint c) {
        if (a > 3) {
            c = a;
            uint b = add( div( a, 2), 1 );
            while (b < c) {
                c = b;
                b = div( add( div( a, b ), b), 2 );
            }
        } else if (a != 0) {
            c = 1;
        }
    }

    /*
     * Expects percentage to be trailed by 00,
    */
    function percentageAmount( uint256 total_, uint8 percentage_ ) internal pure returns ( uint256 percentAmount_ ) {
        return div( mul( total_, percentage_ ), 1000 );
    }

    /*
     * Expects percentage to be trailed by 00,
    */
    function substractPercentage( uint256 total_, uint8 percentageToSub_ ) internal pure returns ( uint256 result_ ) {
        return sub( total_, div( mul( total_, percentageToSub_ ), 1000 ) );
    }

    function percentageOfTotal( uint256 part_, uint256 total_ ) internal pure returns ( uint256 percent_ ) {
        return div( mul(part_, 100) , total_ );
    }

    /**
     * Taken from Hypersonic https://github.com/M2629/HyperSonic/blob/main/Math.sol
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }

    function quadraticPricing( uint256 payment_, uint256 multiplier_ ) internal pure returns (uint256) {
        return sqrrt( mul( multiplier_, payment_ ) );
    }

  function bondingCurve( uint256 supply_, uint256 multiplier_ ) internal pure returns (uint256) {
      return mul( multiplier_, supply_ );
  }
}

interface IOwnable {

  function owner() external view returns (address);

  function renounceOwnership() external;
  
  function transferOwnership( address newOwner_ ) external;
}

contract Ownable is IOwnable {
    
  address internal _owner;

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

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

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

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require( _owner == msg.sender, "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 override 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 override onlyOwner() {
    require( newOwner_ != address(0), "Ownable: new owner is the zero address");
    emit OwnershipTransferred( _owner, newOwner_ );
    _owner = newOwner_;
  }
}

interface IStaking {

    function initialize(
        address olyTokenAddress_,
        address sOLY_,
        address dai_
    ) external;

    //function stakeOLY(uint amountToStake_) external {
    function stakeOLYWithPermit (
        uint256 amountToStake_,
        uint256 deadline_,
        uint8 v_,
        bytes32 r_,
        bytes32 s_
    ) external;

    //function unstakeOLY( uint amountToWithdraw_) external {
    function unstakeOLYWithPermit (
        uint256 amountToWithdraw_,
        uint256 deadline_,
        uint8 v_,
        bytes32 r_,
        bytes32 s_
    ) external;

    function stakeOLY( uint amountToStake_ ) external returns ( bool );

    function unstakeOLY( uint amountToWithdraw_ ) external returns ( bool );

    function distributeOLYProfits() external;
}

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);
}

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 in 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");
    //     return _functionCallWithValue(target, data, value, errorMessage);
    // }
    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);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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);
            }
        }
    }

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

    function addressToString(address _address) internal pure returns(string memory) {
        bytes32 _bytes = bytes32(uint256(_address));
        bytes memory HEX = "0123456789abcdef";
        bytes memory _addr = new bytes(42);

        _addr[0] = '0';
        _addr[1] = 'x';

        for(uint256 i = 0; i < 20; i++) {
            _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)];
            _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)];
        }

        return string(_addr);

    }
}

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");
        }
    }
}
interface ITreasury {

  function getBondingCalculator() external returns ( address );
  function payDebt( address depositor_ ) external returns ( bool );
  function getTimelockEndBlock() external returns ( uint );
  function getManagedToken() external returns ( address );
  function getDebtAmountDue() external returns ( uint );
  function incurDebt( address principleToken_, uint principieTokenAmountDeposited_ ) external returns ( bool );
}

interface IOHMandsOHM {
    function rebase(uint256 ohmProfit)
        external
        returns (uint256);

    function circulatingSupply() external view returns (uint256);

    function balanceOf(address who) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 amount,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

contract OlympusStaking is Ownable {

  using SafeMath for uint256;
  using SafeERC20 for IERC20;

  uint256 public epochLengthInBlocks;

  address public ohm;
  address public sOHM;
  uint256 public ohmToDistributeNextEpoch;

  uint256 nextEpochBlock;

  bool isInitialized;

  modifier notInitialized() {
    require( !isInitialized );
    _;
  }

  function initialize(
        address ohmTokenAddress_,
        address sOHM_,
        uint8 epochLengthInBlocks_
    ) external onlyOwner() notInitialized() {
        ohm = ohmTokenAddress_;
        sOHM = sOHM_;
        epochLengthInBlocks = epochLengthInBlocks_;
        isInitialized = true;
    }

  function setEpochLengthintBlock( uint256 newEpochLengthInBlocks_ ) external onlyOwner() {
    epochLengthInBlocks = newEpochLengthInBlocks_;
  }

  function _distributeOHMProfits() internal {
    if( nextEpochBlock <= block.number ) {
      IOHMandsOHM(sOHM).rebase(ohmToDistributeNextEpoch);
      uint256 _ohmBalance = IOHMandsOHM(ohm).balanceOf(address(this));
      uint256 _sohmSupply = IOHMandsOHM(sOHM).circulatingSupply();
      ohmToDistributeNextEpoch = _ohmBalance.sub(_sohmSupply);
      nextEpochBlock = nextEpochBlock.add( epochLengthInBlocks );
    }
  }

  function _stakeOHM( uint256 amountToStake_ ) internal {
    _distributeOHMProfits();
        
    IERC20(ohm).safeTransferFrom(
        msg.sender,
        address(this),
        amountToStake_
      );

    IERC20(sOHM).safeTransfer(msg.sender, amountToStake_);
  }

  function stakeOHMWithPermit (
        uint256 amountToStake_,
        uint256 deadline_,
        uint8 v_,
        bytes32 r_,
        bytes32 s_
    ) external {

        IOHMandsOHM(ohm).permit(
            msg.sender,
            address(this),
            amountToStake_,
            deadline_,
            v_,
            r_,
            s_
        );

        _stakeOHM( amountToStake_ );
    }

    function stakeOHM( uint amountToStake_ ) external returns ( bool ) {

      _stakeOHM( amountToStake_ );

      return true;

    }

    function _unstakeOHM( uint256 amountToUnstake_ ) internal {

      _distributeOHMProfits();

      IERC20(sOHM).safeTransferFrom(
            msg.sender,
            address(this),
            amountToUnstake_
        );

      IERC20(ohm).safeTransfer(msg.sender, amountToUnstake_);
    }

    function unstakeOHMWithPermit (
        uint256 amountToWithdraw_,
        uint256 deadline_,
        uint8 v_,
        bytes32 r_,
        bytes32 s_
    ) external {
        
        IOHMandsOHM(sOHM).permit(
            msg.sender,
            address(this),
            amountToWithdraw_,
            deadline_,
            v_,
            r_,
            s_
        );

        _unstakeOHM( amountToWithdraw_ );

    }

    function unstakeOHM( uint amountToWithdraw_ ) external returns ( bool ) {

        _unstakeOHM( amountToWithdraw_ );

        return true;
    }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"epochLengthInBlocks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ohmTokenAddress_","type":"address"},{"internalType":"address","name":"sOHM_","type":"address"},{"internalType":"uint8","name":"epochLengthInBlocks_","type":"uint8"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ohm","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ohmToDistributeNextEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"sOHM","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newEpochLengthInBlocks_","type":"uint256"}],"name":"setEpochLengthintBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountToStake_","type":"uint256"}],"name":"stakeOHM","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountToStake_","type":"uint256"},{"internalType":"uint256","name":"deadline_","type":"uint256"},{"internalType":"uint8","name":"v_","type":"uint8"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"s_","type":"bytes32"}],"name":"stakeOHMWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner_","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountToWithdraw_","type":"uint256"}],"name":"unstakeOHM","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountToWithdraw_","type":"uint256"},{"internalType":"uint256","name":"deadline_","type":"uint256"},{"internalType":"uint8","name":"v_","type":"uint8"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"s_","type":"bytes32"}],"name":"unstakeOHMWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50600080546001600160a01b03191633178082556040516001600160a01b039190911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3610d50806100696000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063715018a61161008c578063ce378fdd11610066578063ce378fdd146101ec578063f2fde38b14610209578063fdc54c441461022f578063fec20f9e14610237576100cf565b8063715018a6146101a257806389232a00146101aa5780638da5cb5b146101e4576100cf565b806302b1d239146100d457806315079925146100f85780631d47ae22146101005780633528a01e1461011a57806350ce410914610139578063628699be1461016a575b600080fd5b6100dc61026f565b604080516001600160a01b039092168252519081900360200190f35b6100dc61027e565b61010861028d565b60408051918252519081900360200190f35b6101376004803603602081101561013057600080fd5b5035610293565b005b6101566004803603602081101561014f57600080fd5b50356102e5565b604080519115158252519081900360200190f35b610137600480360360a081101561018057600080fd5b5080359060208101359060ff60408201351690606081013590608001356102f8565b610137610397565b610137600480360360608110156101c057600080fd5b5080356001600160a01b03908116916020810135909116906040013560ff1661042e565b6100dc6104d2565b6101566004803603602081101561020257600080fd5b50356104e1565b6101376004803603602081101561021f57600080fd5b50356001600160a01b03166104ec565b6101086105d9565b610137600480360360a081101561024d57600080fd5b5080359060208101359060ff60408201351690606081013590608001356105df565b6002546001600160a01b031681565b6003546001600160a01b031681565b60045481565b6000546001600160a01b031633146102e0576040805162461bcd60e51b81526020600482018190526024820152600080516020610cd1833981519152604482015290519081900360640190fd5b600155565b60006102f082610673565b506001919050565b6003546040805163d505accf60e01b8152336004820152306024820152604481018890526064810187905260ff8616608482015260a4810185905260c4810184905290516001600160a01b039092169163d505accf9160e48082019260009290919082900301818387803b15801561036f57600080fd5b505af1158015610383573d6000803e3d6000fd5b50505050610390856106ad565b5050505050565b6000546001600160a01b031633146103e4576040805162461bcd60e51b81526020600482018190526024820152600080516020610cd1833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461047b576040805162461bcd60e51b81526020600482018190526024820152600080516020610cd1833981519152604482015290519081900360640190fd5b60065460ff161561048b57600080fd5b600280546001600160a01b039485166001600160a01b031991821617909155600380549390941692169190911790915560ff1660019081556006805460ff19169091179055565b6000546001600160a01b031690565b60006102f0826106ad565b6000546001600160a01b03163314610539576040805162461bcd60e51b81526020600482018190526024820152600080516020610cd1833981519152604482015290519081900360640190fd5b6001600160a01b03811661057e5760405162461bcd60e51b8152600401808060200182810382526026815260200180610cab6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60015481565b6002546040805163d505accf60e01b8152336004820152306024820152604481018890526064810187905260ff8616608482015260a4810185905260c4810184905290516001600160a01b039092169163d505accf9160e48082019260009290919082900301818387803b15801561065657600080fd5b505af115801561066a573d6000803e3d6000fd5b50505050610390855b61067b6106e4565b600254610693906001600160a01b031633308461087e565b6003546106aa906001600160a01b031633836108de565b50565b6106b56106e4565b6003546106cd906001600160a01b031633308461087e565b6002546106aa906001600160a01b031633836108de565b436005541161087c57600354600480546040805163bc4f2d6d60e01b815292830191909152516001600160a01b039092169163bc4f2d6d916024808201926020929091908290030181600087803b15801561073e57600080fd5b505af1158015610752573d6000803e3d6000fd5b505050506040513d602081101561076857600080fd5b5050600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156107b557600080fd5b505afa1580156107c9573d6000803e3d6000fd5b505050506040513d60208110156107df57600080fd5b505160035460408051639358928b60e01b815290519293506000926001600160a01b0390921691639358928b91600480820192602092909190829003018186803b15801561082c57600080fd5b505afa158015610840573d6000803e3d6000fd5b505050506040513d602081101561085657600080fd5b505190506108648282610935565b6004556001546005546108769161097e565b60055550505b565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526108d89085906109d8565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109309084906109d8565b505050565b600061097783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610a89565b9392505050565b600082820183811015610977576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6060610a2d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610b209092919063ffffffff16565b80519091501561093057808060200190516020811015610a4c57600080fd5b50516109305760405162461bcd60e51b815260040180806020018281038252602a815260200180610cf1602a913960400191505060405180910390fd5b60008184841115610b185760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610add578181015183820152602001610ac5565b50505050905090810190601f168015610b0a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6060610b2f8484600085610b37565b949350505050565b6060610b4285610ca4565b610b93576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310610bd25780518252601f199092019160209182019101610bb3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610c34576040519150601f19603f3d011682016040523d82523d6000602084013e610c39565b606091505b50915091508115610c4d579150610b2f9050565b805115610c5d5780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610add578181015183820152602001610ac5565b3b15159056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212209d5580fa30b946464581df01756874ec0e91e2ffc5b8fecee3e498fca8770c3764736f6c63430007050033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063715018a61161008c578063ce378fdd11610066578063ce378fdd146101ec578063f2fde38b14610209578063fdc54c441461022f578063fec20f9e14610237576100cf565b8063715018a6146101a257806389232a00146101aa5780638da5cb5b146101e4576100cf565b806302b1d239146100d457806315079925146100f85780631d47ae22146101005780633528a01e1461011a57806350ce410914610139578063628699be1461016a575b600080fd5b6100dc61026f565b604080516001600160a01b039092168252519081900360200190f35b6100dc61027e565b61010861028d565b60408051918252519081900360200190f35b6101376004803603602081101561013057600080fd5b5035610293565b005b6101566004803603602081101561014f57600080fd5b50356102e5565b604080519115158252519081900360200190f35b610137600480360360a081101561018057600080fd5b5080359060208101359060ff60408201351690606081013590608001356102f8565b610137610397565b610137600480360360608110156101c057600080fd5b5080356001600160a01b03908116916020810135909116906040013560ff1661042e565b6100dc6104d2565b6101566004803603602081101561020257600080fd5b50356104e1565b6101376004803603602081101561021f57600080fd5b50356001600160a01b03166104ec565b6101086105d9565b610137600480360360a081101561024d57600080fd5b5080359060208101359060ff60408201351690606081013590608001356105df565b6002546001600160a01b031681565b6003546001600160a01b031681565b60045481565b6000546001600160a01b031633146102e0576040805162461bcd60e51b81526020600482018190526024820152600080516020610cd1833981519152604482015290519081900360640190fd5b600155565b60006102f082610673565b506001919050565b6003546040805163d505accf60e01b8152336004820152306024820152604481018890526064810187905260ff8616608482015260a4810185905260c4810184905290516001600160a01b039092169163d505accf9160e48082019260009290919082900301818387803b15801561036f57600080fd5b505af1158015610383573d6000803e3d6000fd5b50505050610390856106ad565b5050505050565b6000546001600160a01b031633146103e4576040805162461bcd60e51b81526020600482018190526024820152600080516020610cd1833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461047b576040805162461bcd60e51b81526020600482018190526024820152600080516020610cd1833981519152604482015290519081900360640190fd5b60065460ff161561048b57600080fd5b600280546001600160a01b039485166001600160a01b031991821617909155600380549390941692169190911790915560ff1660019081556006805460ff19169091179055565b6000546001600160a01b031690565b60006102f0826106ad565b6000546001600160a01b03163314610539576040805162461bcd60e51b81526020600482018190526024820152600080516020610cd1833981519152604482015290519081900360640190fd5b6001600160a01b03811661057e5760405162461bcd60e51b8152600401808060200182810382526026815260200180610cab6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60015481565b6002546040805163d505accf60e01b8152336004820152306024820152604481018890526064810187905260ff8616608482015260a4810185905260c4810184905290516001600160a01b039092169163d505accf9160e48082019260009290919082900301818387803b15801561065657600080fd5b505af115801561066a573d6000803e3d6000fd5b50505050610390855b61067b6106e4565b600254610693906001600160a01b031633308461087e565b6003546106aa906001600160a01b031633836108de565b50565b6106b56106e4565b6003546106cd906001600160a01b031633308461087e565b6002546106aa906001600160a01b031633836108de565b436005541161087c57600354600480546040805163bc4f2d6d60e01b815292830191909152516001600160a01b039092169163bc4f2d6d916024808201926020929091908290030181600087803b15801561073e57600080fd5b505af1158015610752573d6000803e3d6000fd5b505050506040513d602081101561076857600080fd5b5050600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156107b557600080fd5b505afa1580156107c9573d6000803e3d6000fd5b505050506040513d60208110156107df57600080fd5b505160035460408051639358928b60e01b815290519293506000926001600160a01b0390921691639358928b91600480820192602092909190829003018186803b15801561082c57600080fd5b505afa158015610840573d6000803e3d6000fd5b505050506040513d602081101561085657600080fd5b505190506108648282610935565b6004556001546005546108769161097e565b60055550505b565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526108d89085906109d8565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109309084906109d8565b505050565b600061097783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610a89565b9392505050565b600082820183811015610977576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6060610a2d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610b209092919063ffffffff16565b80519091501561093057808060200190516020811015610a4c57600080fd5b50516109305760405162461bcd60e51b815260040180806020018281038252602a815260200180610cf1602a913960400191505060405180910390fd5b60008184841115610b185760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610add578181015183820152602001610ac5565b50505050905090810190601f168015610b0a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6060610b2f8484600085610b37565b949350505050565b6060610b4285610ca4565b610b93576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310610bd25780518252601f199092019160209182019101610bb3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610c34576040519150601f19603f3d011682016040523d82523d6000602084013e610c39565b606091505b50915091508115610c4d579150610b2f9050565b805115610c5d5780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610add578181015183820152602001610ac5565b3b15159056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212209d5580fa30b946464581df01756874ec0e91e2ffc5b8fecee3e498fca8770c3764736f6c63430007050033

Deployed Bytecode Sourcemap

25613:3039:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25760:18;;;:::i;:::-;;;;-1:-1:-1;;;;;25760:18:0;;;;;;;;;;;;;;25783:19;;;:::i;25807:39::-;;;:::i;:::-;;;;;;;;;;;;;;;;26300:146;;;;;;;;;;;;;;;;-1:-1:-1;26300:146:0;;:::i;:::-;;27596:137;;;;;;;;;;;;;;;;-1:-1:-1;27596:137:0;;:::i;:::-;;;;;;;;;;;;;;;;;;28049:443;;;;;;;;;;;;;;;;-1:-1:-1;28049:443:0;;;;;;;;;;;;;;;;;;;;;;;;:::i;7936:151::-;;;:::i;25985:309::-;;;;;;;;;;;;;;;;-1:-1:-1;25985:309:0;;-1:-1:-1;;;;;25985:309:0;;;;;;;;;;;;;;;;;;:::i;7325:82::-;;;:::i;28500:149::-;;;;;;;;;;;;;;;;-1:-1:-1;28500:149:0;;:::i;8232:250::-;;;;;;;;;;;;;;;;-1:-1:-1;8232:250:0;-1:-1:-1;;;;;8232:250:0;;:::i;25719:34::-;;;:::i;27169:419::-;;;;;;;;;;;;;;;;-1:-1:-1;27169:419:0;;;;;;;;;;;;;;;;;;;;;;;;:::i;25760:18::-;;;-1:-1:-1;;;;;25760:18:0;;:::o;25783:19::-;;;-1:-1:-1;;;;;25783:19:0;;:::o;25807:39::-;;;;:::o;26300:146::-;7529:6;;-1:-1:-1;;;;;7529:6:0;7539:10;7529:20;7520:67;;;;;-1:-1:-1;;;7520:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7520:67:0;;;;;;;;;;;;;;;26395:19:::1;:45:::0;26300:146::o;27596:137::-;27656:4;27674:27;27685:14;27674:9;:27::i;:::-;-1:-1:-1;27719:4:0;27596:137;;;:::o;28049:443::-;28254:4;;28242:195;;;-1:-1:-1;;;28242:195:0;;28281:10;28242:195;;;;28314:4;28242:195;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;28254:4:0;;;;28242:24;;:195;;;;;28254:4;;28242:195;;;;;;;;28254:4;;28242:195;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28450:32;28463:17;28450:11;:32::i;:::-;28049:443;;;;;:::o;7936:151::-;7529:6;;-1:-1:-1;;;;;7529:6:0;7539:10;7529:20;7520:67;;;;;-1:-1:-1;;;7520:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7520:67:0;;;;;;;;;;;;;;;8051:1:::1;8035:6:::0;;8013:42:::1;::::0;-1:-1:-1;;;;;8035:6:0;;::::1;::::0;8013:42:::1;::::0;8051:1;;8013:42:::1;8079:1;8062:19:::0;;-1:-1:-1;;;;;;8062:19:0::1;::::0;;7936:151::o;25985:309::-;7529:6;;-1:-1:-1;;;;;7529:6:0;7539:10;7529:20;7520:67;;;;;-1:-1:-1;;;7520:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7520:67:0;;;;;;;;;;;;;;;25950:13:::1;::::0;::::1;;25949:14;25940:25;;;::::0;::::1;;26157:3:::2;:22:::0;;-1:-1:-1;;;;;26157:22:0;;::::2;-1:-1:-1::0;;;;;;26157:22:0;;::::2;;::::0;;;26190:4:::2;:12:::0;;;;;::::2;::::0;::::2;::::0;;;::::2;::::0;;;26213:42:::2;;26157:22:::0;26213:42;;;26266:13:::2;:20:::0;;-1:-1:-1;;26266:20:0::2;::::0;;::::2;::::0;;25985:309::o;7325:82::-;7372:7;7395:6;-1:-1:-1;;;;;7395:6:0;7325:82;:::o;28500:149::-;28565:4;28585:32;28598:17;28585:11;:32::i;8232:250::-;7529:6;;-1:-1:-1;;;;;7529:6:0;7539:10;7529:20;7520:67;;;;;-1:-1:-1;;;7520:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7520:67:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;8332:23:0;::::1;8323:75;;;;-1:-1:-1::0;;;8323:75:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8432:6;::::0;;8410:41:::1;::::0;-1:-1:-1;;;;;8410:41:0;;::::1;::::0;8432:6;::::1;::::0;8410:41:::1;::::0;::::1;8458:6;:18:::0;;-1:-1:-1;;;;;;8458:18:0::1;-1:-1:-1::0;;;;;8458:18:0;;;::::1;::::0;;;::::1;::::0;;8232:250::o;25719:34::-;;;;:::o;27169:419::-;27361:3;;27349:191;;;-1:-1:-1;;;27349:191:0;;27387:10;27349:191;;;;27420:4;27349:191;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;27361:3:0;;;;27349:23;;:191;;;;;27361:3;;27349:191;;;;;;;;27361:3;;27349:191;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27553:27;27564:14;26887:276;26948:23;:21;:23::i;:::-;26995:3;;26988:107;;-1:-1:-1;;;;;26995:3:0;27027:10;27056:4;27072:14;26988:28;:107::i;:::-;27111:4;;27104:53;;-1:-1:-1;;;;;27111:4:0;27130:10;27142:14;27104:25;:53::i;:::-;26887:276;:::o;27741:300::-;27810:23;:21;:23::i;:::-;27851:4;;27844:124;;-1:-1:-1;;;;;27851:4:0;27888:10;27921:4;27941:16;27844:29;:124::i;:::-;27986:3;;27979:54;;-1:-1:-1;;;;;27986:3:0;28004:10;28016:16;27979:24;:54::i;26452:429::-;26523:12;26505:14;;:30;26501:375;;26559:4;;26572:24;;;26547:50;;;-1:-1:-1;;;26547:50:0;;;;;;;;;;-1:-1:-1;;;;;26559:4:0;;;;26547:24;;:50;;;;;;;;;;;;;;;26559:4;;26547:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;26640:3:0;;26628:41;;;-1:-1:-1;;;26628:41:0;;26663:4;26628:41;;;;;;26606:19;;-1:-1:-1;;;;;26640:3:0;;26628:26;;:41;;;;;26547:50;;26628:41;;;;;;;26640:3;26628:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26628:41:0;26712:4;;26700:37;;;-1:-1:-1;;;26700:37:0;;;;26628:41;;-1:-1:-1;26678:19:0;;-1:-1:-1;;;;;26712:4:0;;;;26700:35;;:37;;;;;26628:41;;26700:37;;;;;;;;26712:4;26700:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26700:37:0;;-1:-1:-1;26773:28:0;:11;26700:37;26773:15;:28::i;:::-;26746:24;:55;26847:19;;26827:14;;:41;;:18;:41::i;:::-;26810:14;:58;-1:-1:-1;;26501:375:0;26452:429::o;21814:205::-;21942:68;;;-1:-1:-1;;;;;21942:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21942:68:0;-1:-1:-1;;;21942:68:0;;;21915:96;;21935:5;;21915:19;:96::i;:::-;21814:205;;;;:::o;21629:177::-;21739:58;;;-1:-1:-1;;;;;21739:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21739:58:0;-1:-1:-1;;;21739:58:0;;;21712:86;;21732:5;;21712:19;:86::i;:::-;21629:177;;;:::o;857:136::-;915:7;942:43;946:1;949;942:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;935:50;857:136;-1:-1:-1;;;857:136:0:o;393:181::-;451:7;483:5;;;507:6;;;;499:46;;;;;-1:-1:-1;;;499:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;23934:761;24358:23;24384:69;24412:4;24384:69;;;;;;;;;;;;;;;;;24392:5;-1:-1:-1;;;;;24384:27:0;;;:69;;;;;:::i;:::-;24468:17;;24358:95;;-1:-1:-1;24468:21:0;24464:224;;24610:10;24599:30;;;;;;;;;;;;;;;-1:-1:-1;24599:30:0;24591:85;;;;-1:-1:-1;;;24591:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1296:192;1382:7;1418:12;1410:6;;;;1402:29;;;;-1:-1:-1;;;1402:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1454:5:0;;;1296:192::o;15366:196::-;15469:12;15501:53;15524:6;15532:4;15538:1;15541:12;15501:22;:53::i;:::-;15494:60;15366:196;-1:-1:-1;;;;15366:196:0:o;17291:979::-;17421:12;17454:18;17465:6;17454:10;:18::i;:::-;17446:60;;;;;-1:-1:-1;;;17446:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;17580:12;17594:23;17621:6;-1:-1:-1;;;;;17621:11:0;17641:8;17652:4;17621:36;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;17621:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17579:78;;;;17672:7;17668:595;;;17703:10;-1:-1:-1;17696:17:0;;-1:-1:-1;17696:17:0;17668:595;17817:17;;:21;17813:439;;18080:10;18074:17;18141:15;18128:10;18124:2;18120:19;18113:44;18028:148;18216:20;;-1:-1:-1;;;18216:20:0;;;;;;;;;;;;;;;;;18223:12;;18216:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12448:422;12815:20;12854:8;;;12448:422::o

Swarm Source

ipfs://9d5580fa30b946464581df01756874ec0e91e2ffc5b8fecee3e498fca8770c37

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.