ETH Price: $3,089.76 (-0.43%)
Gas: 2 Gwei

Contract

0xDF6b6aC29E31b39B44e75779E15A500C122DA30E
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Claim Rewards146797322022-04-29 14:29:05803 days ago1651242545IN
0xDF6b6aC2...C122DA30E
0 ETH0.009639969.56600352
Claim Rewards146797272022-04-29 14:27:39803 days ago1651242459IN
0xDF6b6aC2...C122DA30E
0 ETH0.0089462864.56054009
Withdraw146412292022-04-23 13:03:43809 days ago1650719023IN
0xDF6b6aC2...C122DA30E
0 ETH0.004633626.13943463
Withdraw146411952022-04-23 12:57:13809 days ago1650718633IN
0xDF6b6aC2...C122DA30E
0 ETH0.0051027728.7841735
Withdraw146357252022-04-22 16:23:33810 days ago1650644613IN
0xDF6b6aC2...C122DA30E
0 ETH0.0157836491.51157754
Withdraw146356882022-04-22 16:16:47810 days ago1650644207IN
0xDF6b6aC2...C122DA30E
0 ETH0.02216904125.05310926
Claim Rewards146344612022-04-22 11:41:51810 days ago1650627711IN
0xDF6b6aC2...C122DA30E
0 ETH0.0042769327.9819604
Claim Rewards146187632022-04-20 0:27:22813 days ago1650414442IN
0xDF6b6aC2...C122DA30E
0 ETH0.0064209837.78250376
Deposit145920172022-04-15 20:06:08817 days ago1650053168IN
0xDF6b6aC2...C122DA30E
0 ETH0.0095016648.64490163
Deposit145918942022-04-15 19:40:40817 days ago1650051640IN
0xDF6b6aC2...C122DA30E
0 ETH0.0137982670.64621176
Deposit145726792022-04-12 19:34:43820 days ago1649792083IN
0xDF6b6aC2...C122DA30E
0 ETH0.008958139.85793154
Start Staking145294502022-04-06 1:34:36827 days ago1649208876IN
0xDF6b6aC2...C122DA30E
0 ETH0.0066584772.60917115
0x61012060145133912022-04-03 13:27:18829 days ago1648992438IN
 Create: StakingPlatform
0 ETH0.046294438.67545282

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingPlatform

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2022-04-22
*/

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev 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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}






/// @author RetreebInc
/// @title Interface Staking Platform with fixed APY and lockup
interface IStakingPlatform {
    /**
     * @notice function that start the staking
     * @dev set `startPeriod` to the current current `block.timestamp`
     * set `lockupPeriod` which is `block.timestamp` + `lockupDuration`
     * and `endPeriod` which is `startPeriod` + `stakingDuration`
     */
    function startStaking() external;

    /**
     * @notice function that allows a user to deposit tokens
     * @dev user must first approve the amount to deposit before calling this function,
     * cannot exceed the `maxAmountStaked`
     * @param amount, the amount to be deposited
     * @dev `endPeriod` to equal 0 (Staking didn't started yet),
     * or `endPeriod` more than current `block.timestamp` (staking not finished yet)
     * @dev `totalStaked + amount` must be less than `stakingMax`
     * @dev that the amount deposited should greater than 0
     */
    function deposit(uint amount) external;

    /**
     * @notice function that allows a user to withdraw its initial deposit
     * @dev must be called only when `block.timestamp` >= `endPeriod`
     * @dev `block.timestamp` higher than `lockupPeriod` (lockupPeriod finished)
     * withdraw reset all states variable for the `msg.sender` to 0, and claim rewards
     * if rewards to claim
     */
    function withdrawAll() external;

    /**
     * @notice function that allows a user to withdraw its initial deposit
     * @param amount, amount to withdraw
     * @dev `block.timestamp` must be higher than `lockupPeriod` (lockupPeriod finished)
     * @dev `amount` must be higher than `0`
     * @dev `amount` must be lower or equal to the amount staked
     * withdraw reset all states variable for the `msg.sender` to 0, and claim rewards
     * if rewards to claim
     */
    function withdraw(uint amount) external;

    /**
     * @notice function that returns the amount of total Staked tokens
     * for a specific user
     * @param stakeHolder, address of the user to check
     * @return uint amount of the total deposited Tokens by the caller
     */
    function amountStaked(address stakeHolder) external view returns (uint);

    /**
     * @notice function that returns the amount of total Staked tokens
     * on the smart contract
     * @return uint amount of the total deposited Tokens
     */
    function totalDeposited() external view returns (uint);

    /**
     * @notice function that returns the amount of pending rewards
     * that can be claimed by the user
     * @param stakeHolder, address of the user to be checked
     * @return uint amount of claimable rewards
     */
    function rewardOf(address stakeHolder) external view returns (uint);

    /**
     * @notice function that claims pending rewards
     * @dev transfer the pending rewards to the `msg.sender`
     */
    function claimRewards() external;

    /**
     * @dev Emitted when `amount` tokens are deposited into
     * staking platform
     */
    event Deposit(address indexed owner, uint amount);

    /**
     * @dev Emitted when user withdraw deposited `amount`
     */
    event Withdraw(address indexed owner, uint amount);

    /**
     * @dev Emitted when `stakeHolder` claim rewards
     */
    event Claim(address indexed stakeHolder, uint amount);

    /**
     * @dev Emitted when staking has started
     */
    event StartStaking(uint startPeriod, uint lockupPeriod, uint endingPeriod);
}

// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)




// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)



/**
 * @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 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) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}


/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
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() {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}



// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)





// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)



/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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");

        (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");

        (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");

        (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");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}


/**
 * @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 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'
        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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}


/// @author RetreebInc
/// @title Staking Platform with fixed APY and lockup
contract StakingPlatform is IStakingPlatform, Ownable {
    using SafeERC20 for IERC20;

    IERC20 public immutable token;

    uint8 public immutable fixedAPY;

    uint public immutable stakingDuration;
    uint public immutable lockupDuration;
    uint public immutable stakingMax;

    uint public startPeriod;
    uint public lockupPeriod;
    uint public endPeriod;

    uint private _totalStaked;
    uint internal _precision = 1E6;

    mapping(address => uint) public staked;
    mapping(address => uint) private _rewardsToClaim;
    mapping(address => uint) public _userStartTime;

    /**
     * @notice constructor contains all the parameters of the staking platform
     * @dev all parameters are immutable
     */
    constructor(address _token, uint8 _fixedAPY, uint _durationInDays, uint _lockDurationInDays, uint _maxAmountStaked) {
        stakingDuration = _durationInDays * 1 days;
        lockupDuration = _lockDurationInDays * 1 days;
        token = IERC20(_token);
        fixedAPY = _fixedAPY;
        stakingMax = _maxAmountStaked;
    }

    /**
     * @notice function that start the staking
     * @dev set `startPeriod` to the current current `block.timestamp`
     * set `lockupPeriod` which is `block.timestamp` + `lockupDuration`
     * and `endPeriod` which is `startPeriod` + `stakingDuration`
     */
    function startStaking() external override onlyOwner {
        require(startPeriod == 0, "Staking has already started");
        startPeriod = block.timestamp;
        lockupPeriod = block.timestamp + lockupDuration;
        endPeriod = block.timestamp + stakingDuration;
        emit StartStaking(startPeriod, lockupDuration, endPeriod);
    }

    /**
     * @notice function that allows a user to deposit tokens
     * @dev user must first approve the amount to deposit before calling this function,
     * cannot exceed the `maxAmountStaked`
     * @param amount, the amount to be deposited
     * @dev `endPeriod` to equal 0 (Staking didn't started yet),
     * or `endPeriod` more than current `block.timestamp` (staking not finished yet)
     * @dev `totalStaked + amount` must be less than `stakingMax`
     * @dev that the amount deposited should greater than 0
     */
    function deposit(uint amount) external override {
        require(endPeriod == 0 || endPeriod > block.timestamp, "Staking period ended");
        require(_totalStaked + amount <= stakingMax, "Amount staked exceeds MaxStake");
        require(amount > 0, "Amount must be greater than 0");

        if (_userStartTime[_msgSender()] == 0) {
            _userStartTime[_msgSender()] = block.timestamp;
        }

        _updateRewards();

        staked[_msgSender()] += amount;
        _totalStaked += amount;
        token.safeTransferFrom(_msgSender(), address(this), amount);
        emit Deposit(_msgSender(), amount);
    }

    /**
     * @notice function that allows a user to withdraw its initial deposit
     * @param amount, amount to withdraw
     * @dev `block.timestamp` must be higher than `lockupPeriod` (lockupPeriod finished)
     * @dev `amount` must be higher than `0`
     * @dev `amount` must be lower or equal to the amount staked
     * withdraw reset all states variable for the `msg.sender` to 0, and claim rewards
     * if rewards to claim
     */
    function withdraw(uint amount) external override {
        require(block.timestamp >= lockupPeriod, "No withdraw until lockup ends");
        require(amount > 0, "Amount must be greater than 0");
        require(amount <= staked[_msgSender()], "Amount higher than stakedAmount");

        _updateRewards();

        if (_rewardsToClaim[_msgSender()] > 0) {
            _claimRewards();
        }
        _totalStaked -= amount;
        staked[_msgSender()] -= amount;
        token.safeTransfer(_msgSender(), amount);

        emit Withdraw(_msgSender(), amount);
    }

    /**
     * @notice function that allows a user to withdraw its initial deposit
     * @dev must be called only when `block.timestamp` >= `lockupPeriod`
     * @dev `block.timestamp` higher than `lockupPeriod` (lockupPeriod finished)
     * withdraw reset all states variable for the `msg.sender` to 0, and claim rewards
     * if rewards to claim
     */
    function withdrawAll() external override {
        require(block.timestamp >= lockupPeriod, "No withdraw until lockup ends");

        _updateRewards();
        if (_rewardsToClaim[_msgSender()] > 0) {
            _claimRewards();
        }

        _userStartTime[_msgSender()] = 0;
        _totalStaked -= staked[_msgSender()];
        uint stakedBalance = staked[_msgSender()];
        staked[_msgSender()] = 0;
        token.safeTransfer(_msgSender(), stakedBalance);

        emit Withdraw(_msgSender(), stakedBalance);
    }

    /**
     * @notice claim all remaining balance on the contract
     * Residual balance is all the remaining tokens that have not been distributed
     * (e.g, in case the number of stakeholders is not sufficient)
     * @dev Can only be called one year after the end of the staking period
     * Cannot claim initial stakeholders deposit
     */
    function withdrawResidualBalance() external onlyOwner {
        require(block.timestamp >= endPeriod + (365 * 1 days), "Withdraw 1year after endPeriod");

        uint balance = token.balanceOf(address(this));
        uint residualBalance = balance - (_totalStaked);
        require(residualBalance > 0, "No residual Balance to withdraw");
        token.safeTransfer(owner(), residualBalance);
    }

    /**
     * @notice function that returns the amount of total Staked tokens
     * for a specific user
     * @param stakeHolder, address of the user to check
     * @return uint amount of the total deposited Tokens by the caller
     */
    function amountStaked(address stakeHolder) external view override returns (uint){
        return staked[stakeHolder];
    }

    /**
     * @notice function that returns the amount of total Staked tokens
     * on the smart contract
     * @return uint amount of the total deposited Tokens
     */
    function totalDeposited() external view override returns (uint) {
        return _totalStaked;
    }

    /**
     * @notice function that returns the amount of pending rewards
     * that can be claimed by the user
     * @param stakeHolder, address of the user to be checked
     * @return uint amount of claimable rewards
     */
    function rewardOf(address stakeHolder) external view override returns (uint){
        return _calculateRewards(stakeHolder);
    }

    /**
     * @notice function that claims pending rewards
     * @dev transfer the pending rewards to the `msg.sender`
     */
    function claimRewards() external override {
        _claimRewards();
    }

    /**
     * @notice calculate rewards based on the `fixedAPY`, `_percentageTimeRemaining()`
     * @dev the higher is the precision and the more the time remaining will be precise
     * @param stakeHolder, address of the user to be checked
     * @return uint amount of claimable tokens of the specified address
     */
    function _calculateRewards(address stakeHolder) internal view returns (uint){
        if (startPeriod == 0 || staked[stakeHolder] == 0) {
            return 0;
        }

        return
            (((staked[stakeHolder] * fixedAPY) *
                _percentageTimeRemaining(stakeHolder)) / (_precision * 100)) +
            _rewardsToClaim[stakeHolder];
    }

    /**
     * @notice function that returns the remaining time in seconds of the staking period
     * @dev the higher is the precision and the more the time remaining will be precise
     * @param stakeHolder, address of the user to be checked
     * @return uint percentage of time remaining * precision
     */
    function _percentageTimeRemaining(address stakeHolder) internal view returns (uint){
        bool early = startPeriod > _userStartTime[stakeHolder];
        uint startTime;
        if (endPeriod > block.timestamp) {
            startTime = early ? startPeriod : _userStartTime[stakeHolder];
            uint timeRemaining = stakingDuration -
                (block.timestamp - startTime);
            return
                (_precision * (stakingDuration - timeRemaining)) /
                stakingDuration;
        }
        startTime = early
            ? 0
            : stakingDuration - (endPeriod - _userStartTime[stakeHolder]);
        return (_precision * (stakingDuration - startTime)) / stakingDuration;
    }

    /**
     * @notice internal function that claims pending rewards
     * @dev transfer the pending rewards to the user address
     */
    function _claimRewards() private {
        _updateRewards();

        uint rewardsToClaim = _rewardsToClaim[_msgSender()];
        require(rewardsToClaim > 0, "Nothing to claim");

        _rewardsToClaim[_msgSender()] = 0;
        token.safeTransfer(_msgSender(), rewardsToClaim);
        emit Claim(_msgSender(), rewardsToClaim);
    }

    /**
     * @notice function that update pending rewards
     * and shift them to rewardsToClaim
     * @dev update rewards claimable
     * and check the time spent since deposit for the `msg.sender`
     */
    function _updateRewards() private {
        _rewardsToClaim[_msgSender()] = _calculateRewards(_msgSender());
        _userStartTime[_msgSender()] = (block.timestamp >= endPeriod)
            ? endPeriod
            : block.timestamp;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint8","name":"_fixedAPY","type":"uint8"},{"internalType":"uint256","name":"_durationInDays","type":"uint256"},{"internalType":"uint256","name":"_lockDurationInDays","type":"uint256"},{"internalType":"uint256","name":"_maxAmountStaked","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"stakeHolder","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","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":false,"internalType":"uint256","name":"startPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockupPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endingPeriod","type":"uint256"}],"name":"StartStaking","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_userStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"stakeHolder","type":"address"}],"name":"amountStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fixedAPY","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockupDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockupPeriod","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":[{"internalType":"address","name":"stakeHolder","type":"address"}],"name":"rewardOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"staked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDeposited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawResidualBalance","outputs":[],"stateMutability":"nonpayable","type":"function"}]

610120604052620f42406005553480156200001957600080fd5b50604051620015d9380380620015d98339810160408190526200003c91620000db565b62000047336200008b565b62000056836201518062000143565b60c05262000068826201518062000143565b60e0526001600160a01b03909416608052505060ff1660a0526101005262000171565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600080600060a08688031215620000f457600080fd5b85516001600160a01b03811681146200010c57600080fd5b602087015190955060ff811681146200012457600080fd5b6040870151606088015160809098015196999198509695945092505050565b60008160001904831182151516156200016c57634e487b7160e01b600052601160045260246000fd5b500290565b60805160a05160c05160e051610100516113cf6200020a600039600081816102e5015261076401526000818161014c015281816105aa015261060d015260008181610231015281816105d701528181610e0901528181610e3101528181610eab0152610edb0152600081816101df0152610b870152600081816103270152818161047c015281816108710152610a1a01526113cf6000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c8063853828b6116100b8578063ef40a6701161007c578063ef40a670146102b7578063f0316bc8146102e0578063f2fde38b14610307578063fb468ac31461031a578063fc0c546a14610322578063ff50abdc1461034957600080fd5b8063853828b6146102535780638da5cb5b1461025b57806398807d841461027b578063b6b55f251461029b578063ee947a7c146102ae57600080fd5b8063372500ab1161010a578063372500ab146101d257806348c9eaaf146101da5780635faa65ff14610213578063715018a61461021c57806371b0cbfa146102245780638005a7de1461022c57600080fd5b80631ada70a8146101475780631d62ebd914610181578063238a6d9e146101945780632e1a7d4d146101b457806330bfb9bb146101c9575b600080fd5b61016e7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61016e61018f366004611178565b610351565b61016e6101a2366004611178565b60086020526000908152604090205481565b6101c76101c23660046111a1565b610362565b005b61016e60015481565b6101c76104dc565b6102017f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610178565b61016e60035481565b6101c76104e6565b6101c761051f565b61016e7f000000000000000000000000000000000000000000000000000000000000000081565b6101c7610666565b610263610700565b6040516001600160a01b039091168152602001610178565b61016e610289366004611178565b60066020526000908152604090205481565b6101c76102a93660046111a1565b61070f565b61016e60025481565b61016e6102c5366004611178565b6001600160a01b031660009081526006602052604090205490565b61016e7f000000000000000000000000000000000000000000000000000000000000000081565b6101c7610315366004611178565b6108d3565b6101c7610973565b6102637f000000000000000000000000000000000000000000000000000000000000000081565b60045461016e565b600061035c82610b00565b92915050565b60025442101561038d5760405162461bcd60e51b8152600401610384906111ba565b60405180910390fd5b600081116103ad5760405162461bcd60e51b8152600401610384906111f1565b3360009081526006602052604090205481111561040c5760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e7420686967686572207468616e207374616b6564416d6f756e74006044820152606401610384565b610414610bcb565b336000908152600760205260409020541561043157610431610c0a565b8060046000828254610443919061123e565b9091555050336000908152600660205260408120805483929061046790849061123e565b909155506104a39050335b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169083610cad565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a250565b6104e4610c0a565b565b336104ef610700565b6001600160a01b0316146105155760405162461bcd60e51b815260040161038490611255565b6104e46000610d15565b33610528610700565b6001600160a01b03161461054e5760405162461bcd60e51b815260040161038490611255565b6001541561059e5760405162461bcd60e51b815260206004820152601b60248201527f5374616b696e672068617320616c7265616479207374617274656400000000006044820152606401610384565b4260018190556105cf907f00000000000000000000000000000000000000000000000000000000000000009061128a565b6002556105fc7f00000000000000000000000000000000000000000000000000000000000000004261128a565b6003819055600154604080519182527f000000000000000000000000000000000000000000000000000000000000000060208301528101919091527f0cdba3fb0a2020e0c9dc500b2679007a9c91cfcf35acab0eb46766c1200b42cd9060600160405180910390a1565b6002544210156106885760405162461bcd60e51b8152600401610384906111ba565b610690610bcb565b33600090815260076020526040902054156106ad576106ad610c0a565b336000908152600860209081526040808320839055600690915281205460048054919290916106dd90849061123e565b90915550503360008181526006602052604081208054919055906104a390610472565b6000546001600160a01b031690565b600354158061071f575042600354115b6107625760405162461bcd60e51b815260206004820152601460248201527314dd185ada5b99c81c195c9a5bd908195b99195960621b6044820152606401610384565b7f000000000000000000000000000000000000000000000000000000000000000081600454610791919061128a565b11156107df5760405162461bcd60e51b815260206004820152601e60248201527f416d6f756e74207374616b65642065786365656473204d61785374616b6500006044820152606401610384565b600081116107ff5760405162461bcd60e51b8152600401610384906111f1565b33600090815260086020526040902054610826573360009081526008602052604090204290555b61082e610bcb565b336000908152600660205260408120805483929061084d90849061128a565b925050819055508060046000828254610866919061128a565b909155506108a190507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316333084610d65565b60405181815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c906020016104d1565b336108dc610700565b6001600160a01b0316146109025760405162461bcd60e51b815260040161038490611255565b6001600160a01b0381166109675760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610384565b61097081610d15565b50565b3361097c610700565b6001600160a01b0316146109a25760405162461bcd60e51b815260040161038490611255565b6003546109b3906301e1338061128a565b421015610a025760405162461bcd60e51b815260206004820152601e60248201527f576974686472617720317965617220616674657220656e64506572696f6400006044820152606401610384565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610a69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8d91906112a2565b9050600060045482610a9f919061123e565b905060008111610af15760405162461bcd60e51b815260206004820152601f60248201527f4e6f20726573696475616c2042616c616e636520746f207769746864726177006044820152606401610384565b610afc610472610700565b5050565b600060015460001480610b2957506001600160a01b038216600090815260066020526040902054155b15610b3657506000919050565b6001600160a01b038216600090815260076020526040902054600554610b5d9060646112bb565b610b6684610da3565b6001600160a01b038516600090815260066020526040902054610bad9060ff7f000000000000000000000000000000000000000000000000000000000000000016906112bb565b610bb791906112bb565b610bc191906112da565b61035c919061128a565b610bd433610b00565b33600090815260076020526040902055600354421015610bf45742610bf8565b6003545b33600090815260086020526040902055565b610c12610bcb565b3360009081526007602052604090205480610c625760405162461bcd60e51b815260206004820152601060248201526f4e6f7468696e6720746f20636c61696d60801b6044820152606401610384565b33600081815260076020526040812055610c7b90610472565b60405181815233907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4906020016104d1565b6040516001600160a01b038316602482015260448101829052610d1090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610f23565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052610d9d9085906323b872dd60e01b90608401610cd9565b50505050565b6001600160a01b0381166000908152600860205260408120546001546003549110908290421015610e7a5781610df1576001600160a01b038416600090815260086020526040902054610df5565b6001545b90506000610e03824261123e565b610e2d907f000000000000000000000000000000000000000000000000000000000000000061123e565b90507f0000000000000000000000000000000000000000000000000000000000000000610e5a828261123e565b600554610e6791906112bb565b610e7191906112da565b95945050505050565b81610ed4576001600160a01b038416600090815260086020526040902054600354610ea5919061123e565b610ecf907f000000000000000000000000000000000000000000000000000000000000000061123e565b610ed7565b60005b90507f0000000000000000000000000000000000000000000000000000000000000000610f04828261123e565b600554610f1191906112bb565b610f1b91906112da565b949350505050565b6000610f78826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610ff59092919063ffffffff16565b805190915015610d105780806020019051810190610f9691906112fc565b610d105760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610384565b6060611004848460008561100e565b90505b9392505050565b60608247101561106f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610384565b6001600160a01b0385163b6110c65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610384565b600080866001600160a01b031685876040516110e2919061134a565b60006040518083038185875af1925050503d806000811461111f576040519150601f19603f3d011682016040523d82523d6000602084013e611124565b606091505b509150915061113482828661113f565b979650505050505050565b6060831561114e575081611007565b82511561115e5782518084602001fd5b8160405162461bcd60e51b81526004016103849190611366565b60006020828403121561118a57600080fd5b81356001600160a01b038116811461100757600080fd5b6000602082840312156111b357600080fd5b5035919050565b6020808252601d908201527f4e6f20776974686472617720756e74696c206c6f636b757020656e6473000000604082015260600190565b6020808252601d908201527f416d6f756e74206d7573742062652067726561746572207468616e2030000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008282101561125057611250611228565b500390565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561129d5761129d611228565b500190565b6000602082840312156112b457600080fd5b5051919050565b60008160001904831182151516156112d5576112d5611228565b500290565b6000826112f757634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561130e57600080fd5b8151801515811461100757600080fd5b60005b83811015611339578181015183820152602001611321565b83811115610d9d5750506000910152565b6000825161135c81846020870161131e565b9190910192915050565b602081526000825180602084015261138581604085016020870161131e565b601f01601f1916919091016040019291505056fea2646970667358221220d57f95d8262172c8fa0d2276f7f4700a4090182333b570bc3400d63830fb677064736f6c634300080a0033000000000000000000000000688ec465111ed639267cb17c47e790c9cc7279c10000000000000000000000000000000000000000000000000000000000000078000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000033b2e3c9fd0803ce8000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101425760003560e01c8063853828b6116100b8578063ef40a6701161007c578063ef40a670146102b7578063f0316bc8146102e0578063f2fde38b14610307578063fb468ac31461031a578063fc0c546a14610322578063ff50abdc1461034957600080fd5b8063853828b6146102535780638da5cb5b1461025b57806398807d841461027b578063b6b55f251461029b578063ee947a7c146102ae57600080fd5b8063372500ab1161010a578063372500ab146101d257806348c9eaaf146101da5780635faa65ff14610213578063715018a61461021c57806371b0cbfa146102245780638005a7de1461022c57600080fd5b80631ada70a8146101475780631d62ebd914610181578063238a6d9e146101945780632e1a7d4d146101b457806330bfb9bb146101c9575b600080fd5b61016e7f0000000000000000000000000000000000000000000000000000000000093a8081565b6040519081526020015b60405180910390f35b61016e61018f366004611178565b610351565b61016e6101a2366004611178565b60086020526000908152604090205481565b6101c76101c23660046111a1565b610362565b005b61016e60015481565b6101c76104dc565b6102017f000000000000000000000000000000000000000000000000000000000000007881565b60405160ff9091168152602001610178565b61016e60035481565b6101c76104e6565b6101c761051f565b61016e7f000000000000000000000000000000000000000000000000000000000076a70081565b6101c7610666565b610263610700565b6040516001600160a01b039091168152602001610178565b61016e610289366004611178565b60066020526000908152604090205481565b6101c76102a93660046111a1565b61070f565b61016e60025481565b61016e6102c5366004611178565b6001600160a01b031660009081526006602052604090205490565b61016e7f0000000000000000000000000000000000000000033b2e3c9fd0803ce800000081565b6101c7610315366004611178565b6108d3565b6101c7610973565b6102637f000000000000000000000000688ec465111ed639267cb17c47e790c9cc7279c181565b60045461016e565b600061035c82610b00565b92915050565b60025442101561038d5760405162461bcd60e51b8152600401610384906111ba565b60405180910390fd5b600081116103ad5760405162461bcd60e51b8152600401610384906111f1565b3360009081526006602052604090205481111561040c5760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e7420686967686572207468616e207374616b6564416d6f756e74006044820152606401610384565b610414610bcb565b336000908152600760205260409020541561043157610431610c0a565b8060046000828254610443919061123e565b9091555050336000908152600660205260408120805483929061046790849061123e565b909155506104a39050335b6001600160a01b037f000000000000000000000000688ec465111ed639267cb17c47e790c9cc7279c1169083610cad565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a250565b6104e4610c0a565b565b336104ef610700565b6001600160a01b0316146105155760405162461bcd60e51b815260040161038490611255565b6104e46000610d15565b33610528610700565b6001600160a01b03161461054e5760405162461bcd60e51b815260040161038490611255565b6001541561059e5760405162461bcd60e51b815260206004820152601b60248201527f5374616b696e672068617320616c7265616479207374617274656400000000006044820152606401610384565b4260018190556105cf907f0000000000000000000000000000000000000000000000000000000000093a809061128a565b6002556105fc7f000000000000000000000000000000000000000000000000000000000076a7004261128a565b6003819055600154604080519182527f0000000000000000000000000000000000000000000000000000000000093a8060208301528101919091527f0cdba3fb0a2020e0c9dc500b2679007a9c91cfcf35acab0eb46766c1200b42cd9060600160405180910390a1565b6002544210156106885760405162461bcd60e51b8152600401610384906111ba565b610690610bcb565b33600090815260076020526040902054156106ad576106ad610c0a565b336000908152600860209081526040808320839055600690915281205460048054919290916106dd90849061123e565b90915550503360008181526006602052604081208054919055906104a390610472565b6000546001600160a01b031690565b600354158061071f575042600354115b6107625760405162461bcd60e51b815260206004820152601460248201527314dd185ada5b99c81c195c9a5bd908195b99195960621b6044820152606401610384565b7f0000000000000000000000000000000000000000033b2e3c9fd0803ce800000081600454610791919061128a565b11156107df5760405162461bcd60e51b815260206004820152601e60248201527f416d6f756e74207374616b65642065786365656473204d61785374616b6500006044820152606401610384565b600081116107ff5760405162461bcd60e51b8152600401610384906111f1565b33600090815260086020526040902054610826573360009081526008602052604090204290555b61082e610bcb565b336000908152600660205260408120805483929061084d90849061128a565b925050819055508060046000828254610866919061128a565b909155506108a190507f000000000000000000000000688ec465111ed639267cb17c47e790c9cc7279c16001600160a01b0316333084610d65565b60405181815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c906020016104d1565b336108dc610700565b6001600160a01b0316146109025760405162461bcd60e51b815260040161038490611255565b6001600160a01b0381166109675760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610384565b61097081610d15565b50565b3361097c610700565b6001600160a01b0316146109a25760405162461bcd60e51b815260040161038490611255565b6003546109b3906301e1338061128a565b421015610a025760405162461bcd60e51b815260206004820152601e60248201527f576974686472617720317965617220616674657220656e64506572696f6400006044820152606401610384565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000688ec465111ed639267cb17c47e790c9cc7279c16001600160a01b0316906370a0823190602401602060405180830381865afa158015610a69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8d91906112a2565b9050600060045482610a9f919061123e565b905060008111610af15760405162461bcd60e51b815260206004820152601f60248201527f4e6f20726573696475616c2042616c616e636520746f207769746864726177006044820152606401610384565b610afc610472610700565b5050565b600060015460001480610b2957506001600160a01b038216600090815260066020526040902054155b15610b3657506000919050565b6001600160a01b038216600090815260076020526040902054600554610b5d9060646112bb565b610b6684610da3565b6001600160a01b038516600090815260066020526040902054610bad9060ff7f000000000000000000000000000000000000000000000000000000000000007816906112bb565b610bb791906112bb565b610bc191906112da565b61035c919061128a565b610bd433610b00565b33600090815260076020526040902055600354421015610bf45742610bf8565b6003545b33600090815260086020526040902055565b610c12610bcb565b3360009081526007602052604090205480610c625760405162461bcd60e51b815260206004820152601060248201526f4e6f7468696e6720746f20636c61696d60801b6044820152606401610384565b33600081815260076020526040812055610c7b90610472565b60405181815233907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4906020016104d1565b6040516001600160a01b038316602482015260448101829052610d1090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610f23565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052610d9d9085906323b872dd60e01b90608401610cd9565b50505050565b6001600160a01b0381166000908152600860205260408120546001546003549110908290421015610e7a5781610df1576001600160a01b038416600090815260086020526040902054610df5565b6001545b90506000610e03824261123e565b610e2d907f000000000000000000000000000000000000000000000000000000000076a70061123e565b90507f000000000000000000000000000000000000000000000000000000000076a700610e5a828261123e565b600554610e6791906112bb565b610e7191906112da565b95945050505050565b81610ed4576001600160a01b038416600090815260086020526040902054600354610ea5919061123e565b610ecf907f000000000000000000000000000000000000000000000000000000000076a70061123e565b610ed7565b60005b90507f000000000000000000000000000000000000000000000000000000000076a700610f04828261123e565b600554610f1191906112bb565b610f1b91906112da565b949350505050565b6000610f78826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610ff59092919063ffffffff16565b805190915015610d105780806020019051810190610f9691906112fc565b610d105760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610384565b6060611004848460008561100e565b90505b9392505050565b60608247101561106f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610384565b6001600160a01b0385163b6110c65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610384565b600080866001600160a01b031685876040516110e2919061134a565b60006040518083038185875af1925050503d806000811461111f576040519150601f19603f3d011682016040523d82523d6000602084013e611124565b606091505b509150915061113482828661113f565b979650505050505050565b6060831561114e575081611007565b82511561115e5782518084602001fd5b8160405162461bcd60e51b81526004016103849190611366565b60006020828403121561118a57600080fd5b81356001600160a01b038116811461100757600080fd5b6000602082840312156111b357600080fd5b5035919050565b6020808252601d908201527f4e6f20776974686472617720756e74696c206c6f636b757020656e6473000000604082015260600190565b6020808252601d908201527f416d6f756e74206d7573742062652067726561746572207468616e2030000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008282101561125057611250611228565b500390565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561129d5761129d611228565b500190565b6000602082840312156112b457600080fd5b5051919050565b60008160001904831182151516156112d5576112d5611228565b500290565b6000826112f757634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561130e57600080fd5b8151801515811461100757600080fd5b60005b83811015611339578181015183820152602001611321565b83811115610d9d5750506000910152565b6000825161135c81846020870161131e565b9190910192915050565b602081526000825180602084015261138581604085016020870161131e565b601f01601f1916919091016040019291505056fea2646970667358221220d57f95d8262172c8fa0d2276f7f4700a4090182333b570bc3400d63830fb677064736f6c634300080a0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000688ec465111ed639267cb17c47e790c9cc7279c10000000000000000000000000000000000000000000000000000000000000078000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000033b2e3c9fd0803ce8000000

-----Decoded View---------------
Arg [0] : _token (address): 0x688eC465111ed639267cB17C47E790c9cc7279c1
Arg [1] : _fixedAPY (uint8): 120
Arg [2] : _durationInDays (uint256): 90
Arg [3] : _lockDurationInDays (uint256): 7
Arg [4] : _maxAmountStaked (uint256): 1000000000000000000000000000

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000688ec465111ed639267cb17c47e790c9cc7279c1
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000078
Arg [2] : 000000000000000000000000000000000000000000000000000000000000005a
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [4] : 0000000000000000000000000000000000000000033b2e3c9fd0803ce8000000


Deployed Bytecode Sourcemap

22108:9661:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22326:36;;;;;;;;160:25:1;;;148:2;133:18;22326:36:0;;;;;;;;28680:132;;;;;;:::i;:::-;;:::i;22672:46::-;;;;;;:::i;:::-;;;;;;;;;;;;;;25493:584;;;;;;:::i;:::-;;:::i;:::-;;22410:23;;;;;;28953:76;;;:::i;22242:31::-;;;;;;;;844:4:1;832:17;;;814:36;;802:2;787:18;22242:31:0;672:184:1;22471:21:0;;;;;;8880:103;;;:::i;23490:349::-;;;:::i;22282:37::-;;;;;26451:545;;;:::i;8229:87::-;;;:::i;:::-;;;-1:-1:-1;;;;;1025:32:1;;;1007:51;;995:2;980:18;8229:87:0;861:203:1;22572:38:0;;;;;;:::i;:::-;;;;;;;;;;;;;;24390:641;;;;;;:::i;:::-;;:::i;22440:24::-;;;;;;28022:125;;;;;;:::i;:::-;-1:-1:-1;;;;;28120:19:0;28097:4;28120:19;;;:6;:19;;;;;;;28022:125;22369:32;;;;;9138:201;;;;;;:::i;:::-;;:::i;27361:406::-;;;:::i;22204:29::-;;;;;28333:102;28415:12;;28333:102;;28680:132;28751:4;28774:30;28792:11;28774:17;:30::i;:::-;28767:37;28680:132;-1:-1:-1;;28680:132:0:o;25493:584::-;25580:12;;25561:15;:31;;25553:73;;;;-1:-1:-1;;;25553:73:0;;;;;;;:::i;:::-;;;;;;;;;25654:1;25645:6;:10;25637:52;;;;-1:-1:-1;;;25637:52:0;;;;;;;:::i;:::-;7174:10;25718:20;;;;:6;:20;;;;;;25708:30;;;25700:74;;;;-1:-1:-1;;;25700:74:0;;2208:2:1;25700:74:0;;;2190:21:1;2247:2;2227:18;;;2220:30;2286:33;2266:18;;;2259:61;2337:18;;25700:74:0;2006:355:1;25700:74:0;25787:16;:14;:16::i;:::-;7174:10;25852:1;25820:29;;;:15;:29;;;;;;:33;25816:81;;25870:15;:13;:15::i;:::-;25923:6;25907:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;7174:10:0;25940:20;;;;:6;:20;;;;;:30;;25964:6;;25940:20;:30;;25964:6;;25940:30;:::i;:::-;;;;-1:-1:-1;25981:40:0;;-1:-1:-1;7174:10:0;26000:12;-1:-1:-1;;;;;25981:5:0;:18;;26014:6;25981:18;:40::i;:::-;26039:30;;160:25:1;;;7174:10:0;;26039:30;;148:2:1;133:18;26039:30:0;;;;;;;;25493:584;:::o;28953:76::-;29006:15;:13;:15::i;:::-;28953:76::o;8880:103::-;7174:10;8449:7;:5;:7::i;:::-;-1:-1:-1;;;;;8449:23:0;;8441:68;;;;-1:-1:-1;;;8441:68:0;;;;;;;:::i;:::-;8945:30:::1;8972:1;8945:18;:30::i;23490:349::-:0;7174:10;8449:7;:5;:7::i;:::-;-1:-1:-1;;;;;8449:23:0;;8441:68;;;;-1:-1:-1;;;8441:68:0;;;;;;;:::i;:::-;23561:11:::1;::::0;:16;23553:56:::1;;;::::0;-1:-1:-1;;;23553:56:0;;3191:2:1;23553:56:0::1;::::0;::::1;3173:21:1::0;3230:2;3210:18;;;3203:30;3269:29;3249:18;;;3242:57;3316:18;;23553:56:0::1;2989:351:1::0;23553:56:0::1;23634:15;23620:11;:29:::0;;;23675:32:::1;::::0;23693:14:::1;::::0;23675:32:::1;:::i;:::-;23660:12;:47:::0;23730:33:::1;23748:15;23730;:33;:::i;:::-;23718:9;:45:::0;;;23792:11:::1;::::0;23779:52:::1;::::0;;3680:25:1;;;23805:14:0::1;3736:2:1::0;3721:18;;3714:34;3764:18;;3757:34;;;;23779:52:0::1;::::0;3668:2:1;3653:18;23779:52:0::1;;;;;;;23490:349::o:0;26451:545::-;26530:12;;26511:15;:31;;26503:73;;;;-1:-1:-1;;;26503:73:0;;;;;;;:::i;:::-;26589:16;:14;:16::i;:::-;7174:10;26652:1;26620:29;;;:15;:29;;;;;;:33;26616:81;;26670:15;:13;:15::i;:::-;7174:10;26740:1;26709:28;;;:14;:28;;;;;;;;:32;;;26768:6;:20;;;;;;26752:12;:36;;26768:20;;26752:12;;:36;;26768:20;;26752:36;:::i;:::-;;;;-1:-1:-1;;7174:10:0;26799:18;26820:20;;;:6;:20;;;;;;;26851:24;;;26820:20;26886:47;;26905:12;7094:98;8229:87;8275:7;8302:6;-1:-1:-1;;;;;8302:6:0;;8229:87::o;24390:641::-;24457:9;;:14;;:45;;;24487:15;24475:9;;:27;24457:45;24449:78;;;;-1:-1:-1;;;24449:78:0;;4004:2:1;24449:78:0;;;3986:21:1;4043:2;4023:18;;;4016:30;-1:-1:-1;;;4062:18:1;;;4055:50;4122:18;;24449:78:0;3802:344:1;24449:78:0;24571:10;24561:6;24546:12;;:21;;;;:::i;:::-;:35;;24538:78;;;;-1:-1:-1;;;24538:78:0;;4353:2:1;24538:78:0;;;4335:21:1;4392:2;4372:18;;;4365:30;4431:32;4411:18;;;4404:60;4481:18;;24538:78:0;4151:354:1;24538:78:0;24644:1;24635:6;:10;24627:52;;;;-1:-1:-1;;;24627:52:0;;;;;;;:::i;:::-;7174:10;24696:28;;;;:14;:28;;;;;;24692:112;;7174:10;24746:28;;;;:14;:28;;;;;24777:15;24746:46;;24692:112;24816:16;:14;:16::i;:::-;7174:10;24845:20;;;;:6;:20;;;;;:30;;24869:6;;24845:20;:30;;24869:6;;24845:30;:::i;:::-;;;;;;;;24902:6;24886:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;24919:59:0;;-1:-1:-1;24919:5:0;-1:-1:-1;;;;;24919:22:0;7174:10;24964:4;24971:6;24919:22;:59::i;:::-;24994:29;;160:25:1;;;7174:10:0;;24994:29;;148:2:1;133:18;24994:29:0;14:177:1;9138:201:0;7174:10;8449:7;:5;:7::i;:::-;-1:-1:-1;;;;;8449:23:0;;8441:68;;;;-1:-1:-1;;;8441:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;9227:22:0;::::1;9219:73;;;::::0;-1:-1:-1;;;9219:73:0;;4712:2:1;9219:73:0::1;::::0;::::1;4694:21:1::0;4751:2;4731:18;;;4724:30;4790:34;4770:18;;;4763:62;-1:-1:-1;;;4841:18:1;;;4834:36;4887:19;;9219:73:0::1;4510:402:1::0;9219:73:0::1;9303:28;9322:8;9303:18;:28::i;:::-;9138:201:::0;:::o;27361:406::-;7174:10;8449:7;:5;:7::i;:::-;-1:-1:-1;;;;;8449:23:0;;8441:68;;;;-1:-1:-1;;;8441:68:0;;;;;;;:::i;:::-;27453:9:::1;::::0;:26:::1;::::0;27466:12:::1;27453:26;:::i;:::-;27434:15;:45;;27426:88;;;::::0;-1:-1:-1;;;27426:88:0;;5119:2:1;27426:88:0::1;::::0;::::1;5101:21:1::0;5158:2;5138:18;;;5131:30;5197:32;5177:18;;;5170:60;5247:18;;27426:88:0::1;4917:354:1::0;27426:88:0::1;27542:30;::::0;-1:-1:-1;;;27542:30:0;;27566:4:::1;27542:30;::::0;::::1;1007:51:1::0;27527:12:0::1;::::0;27542:5:::1;-1:-1:-1::0;;;;;27542:15:0::1;::::0;::::1;::::0;980:18:1;;27542:30:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;27527:45;;27583:20;27617:12;;27606:7;:24;;;;:::i;:::-;27583:47;;27667:1;27649:15;:19;27641:63;;;::::0;-1:-1:-1;;;27641:63:0;;5667:2:1;27641:63:0::1;::::0;::::1;5649:21:1::0;5706:2;5686:18;;;5679:30;5745:33;5725:18;;;5718:61;5796:18;;27641:63:0::1;5465:355:1::0;27641:63:0::1;27715:44;27734:7;:5;:7::i;27715:44::-;27415:352;;27361:406::o:0;29367:370::-;29438:4;29458:11;;29473:1;29458:16;:44;;;-1:-1:-1;;;;;;29478:19:0;;;;;;:6;:19;;;;;;:24;29458:44;29454:85;;;-1:-1:-1;29526:1:0;;29367:370;-1:-1:-1;29367:370:0:o;29454:85::-;-1:-1:-1;;;;;29701:28:0;;;;;;:15;:28;;;;;;29667:10;;:16;;29680:3;29667:16;:::i;:::-;29625:37;29650:11;29625:24;:37::i;:::-;-1:-1:-1;;;;;29574:19:0;;;;;;:6;:19;;;;;;:30;;;29596:8;29574:30;;;:::i;:::-;29573:89;;;;:::i;:::-;29572:112;;;;:::i;:::-;29571:158;;;;:::i;31522:244::-;31599:31;7174:10;31599:17;:31::i;:::-;7174:10;31567:29;;;;:15;:29;;;;;:63;31692:9;;31673:15;:28;;31672:86;;31743:15;31672:86;;;31718:9;;31672:86;7174:10;31641:28;;;;:14;:28;;;;;:117;31522:244::o;30950:346::-;30994:16;:14;:16::i;:::-;7174:10;31023:19;31045:29;;;:15;:29;;;;;;31093:18;31085:47;;;;-1:-1:-1;;;31085:47:0;;6422:2:1;31085:47:0;;;6404:21:1;6461:2;6441:18;;;6434:30;-1:-1:-1;;;6480:18:1;;;6473:46;6536:18;;31085:47:0;6220:340:1;31085:47:0;7174:10;31177:1;31145:29;;;:15;:29;;;;;:33;31189:48;;31208:12;7094:98;31189:48;31253:35;;160:25:1;;;7174:10:0;;31253:35;;148:2:1;133:18;31253:35:0;14:177:1;18731:211:0;18875:58;;-1:-1:-1;;;;;6757:32:1;;18875:58:0;;;6739:51:1;6806:18;;;6799:34;;;18848:86:0;;18868:5;;-1:-1:-1;;;18898:23:0;6712:18:1;;18875:58:0;;;;-1:-1:-1;;18875:58:0;;;;;;;;;;;;;;-1:-1:-1;;;;;18875:58:0;-1:-1:-1;;;;;;18875:58:0;;;;;;;;;;18848:19;:86::i;:::-;18731:211;;;:::o;9499:191::-;9573:16;9592:6;;-1:-1:-1;;;;;9609:17:0;;;-1:-1:-1;;;;;;9609:17:0;;;;;;9642:40;;9592:6;;;;;;;9642:40;;9573:16;9642:40;9562:128;9499:191;:::o;18950:248::-;19121:68;;-1:-1:-1;;;;;7102:15:1;;;19121:68:0;;;7084:34:1;7154:15;;7134:18;;;7127:43;7186:18;;;7179:34;;;19094:96:0;;19114:5;;-1:-1:-1;;;19144:27:0;7019:18:1;;19121:68:0;6844:375:1;19094:96:0;18950:248;;;;:::o;30066:734::-;-1:-1:-1;;;;;30187:27:0;;30144:4;30187:27;;;:14;:27;;;;;;30173:11;;30254:9;;30173:41;-1:-1:-1;30173:41:0;30144:4;;30266:15;-1:-1:-1;30250:343:0;;;30310:5;:49;;-1:-1:-1;;;;;30332:27:0;;;;;;:14;:27;;;;;;30310:49;;;30318:11;;30310:49;30298:61;-1:-1:-1;30374:18:0;30431:27;30298:61;30431:15;:27;:::i;:::-;30395:64;;:15;:64;:::i;:::-;30374:85;-1:-1:-1;30566:15:0;30513:31;30374:85;30566:15;30513:31;:::i;:::-;30499:10;;:46;;;;:::i;:::-;30498:83;;;;:::i;:::-;30474:107;30066:734;-1:-1:-1;;;;;30066:734:0:o;30250:343::-;30615:5;:97;;-1:-1:-1;;;;;30684:27:0;;;;;;:14;:27;;;;;;30672:9;;:39;;30684:27;30672:39;:::i;:::-;30653:59;;:15;:59;:::i;:::-;30615:97;;;30636:1;30615:97;30603:109;-1:-1:-1;30777:15:0;30745:27;30603:109;30777:15;30745:27;:::i;:::-;30731:10;;:42;;;;:::i;:::-;30730:62;;;;:::i;:::-;30723:69;30066:734;-1:-1:-1;;;;30066:734:0:o;21304:716::-;21728:23;21754:69;21782:4;21754:69;;;;;;;;;;;;;;;;;21762:5;-1:-1:-1;;;;;21754:27:0;;;:69;;;;;:::i;:::-;21838:17;;21728:95;;-1:-1:-1;21838:21:0;21834:179;;21935:10;21924:30;;;;;;;;;;;;:::i;:::-;21916:85;;;;-1:-1:-1;;;21916:85:0;;7708:2:1;21916:85:0;;;7690:21:1;7747:2;7727:18;;;7720:30;7786:34;7766:18;;;7759:62;-1:-1:-1;;;7837:18:1;;;7830:40;7887:19;;21916:85:0;7506:406:1;13678:229:0;13815:12;13847:52;13869:6;13877:4;13883:1;13886:12;13847:21;:52::i;:::-;13840:59;;13678:229;;;;;;:::o;14798:510::-;14968:12;15026:5;15001:21;:30;;14993:81;;;;-1:-1:-1;;;14993:81:0;;8119:2:1;14993:81:0;;;8101:21:1;8158:2;8138:18;;;8131:30;8197:34;8177:18;;;8170:62;-1:-1:-1;;;8248:18:1;;;8241:36;8294:19;;14993:81:0;7917:402:1;14993:81:0;-1:-1:-1;;;;;11228:19:0;;;15085:60;;;;-1:-1:-1;;;15085:60:0;;8526:2:1;15085:60:0;;;8508:21:1;8565:2;8545:18;;;8538:30;8604:31;8584:18;;;8577:59;8653:18;;15085:60:0;8324:353:1;15085:60:0;15159:12;15173:23;15200:6;-1:-1:-1;;;;;15200:11:0;15219:5;15226:4;15200:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15158:73;;;;15249:51;15266:7;15275:10;15287:12;15249:16;:51::i;:::-;15242:58;14798:510;-1:-1:-1;;;;;;;14798:510:0:o;17484:712::-;17634:12;17663:7;17659:530;;;-1:-1:-1;17694:10:0;17687:17;;17659:530;17808:17;;:21;17804:374;;18006:10;18000:17;18067:15;18054:10;18050:2;18046:19;18039:44;17804:374;18149:12;18142:20;;-1:-1:-1;;;18142:20:0;;;;;;;;:::i;196:286:1:-;255:6;308:2;296:9;287:7;283:23;279:32;276:52;;;324:1;321;314:12;276:52;350:23;;-1:-1:-1;;;;;402:31:1;;392:42;;382:70;;448:1;445;438:12;487:180;546:6;599:2;587:9;578:7;574:23;570:32;567:52;;;615:1;612;605:12;567:52;-1:-1:-1;638:23:1;;487:180;-1:-1:-1;487:180:1:o;1290:353::-;1492:2;1474:21;;;1531:2;1511:18;;;1504:30;1570:31;1565:2;1550:18;;1543:59;1634:2;1619:18;;1290:353::o;1648:::-;1850:2;1832:21;;;1889:2;1869:18;;;1862:30;1928:31;1923:2;1908:18;;1901:59;1992:2;1977:18;;1648:353::o;2366:127::-;2427:10;2422:3;2418:20;2415:1;2408:31;2458:4;2455:1;2448:15;2482:4;2479:1;2472:15;2498:125;2538:4;2566:1;2563;2560:8;2557:34;;;2571:18;;:::i;:::-;-1:-1:-1;2608:9:1;;2498:125::o;2628:356::-;2830:2;2812:21;;;2849:18;;;2842:30;2908:34;2903:2;2888:18;;2881:62;2975:2;2960:18;;2628:356::o;3345:128::-;3385:3;3416:1;3412:6;3409:1;3406:13;3403:39;;;3422:18;;:::i;:::-;-1:-1:-1;3458:9:1;;3345:128::o;5276:184::-;5346:6;5399:2;5387:9;5378:7;5374:23;5370:32;5367:52;;;5415:1;5412;5405:12;5367:52;-1:-1:-1;5438:16:1;;5276:184;-1:-1:-1;5276:184:1:o;5825:168::-;5865:7;5931:1;5927;5923:6;5919:14;5916:1;5913:21;5908:1;5901:9;5894:17;5890:45;5887:71;;;5938:18;;:::i;:::-;-1:-1:-1;5978:9:1;;5825:168::o;5998:217::-;6038:1;6064;6054:132;;6108:10;6103:3;6099:20;6096:1;6089:31;6143:4;6140:1;6133:15;6171:4;6168:1;6161:15;6054:132;-1:-1:-1;6200:9:1;;5998:217::o;7224:277::-;7291:6;7344:2;7332:9;7323:7;7319:23;7315:32;7312:52;;;7360:1;7357;7350:12;7312:52;7392:9;7386:16;7445:5;7438:13;7431:21;7424:5;7421:32;7411:60;;7467:1;7464;7457:12;8682:258;8754:1;8764:113;8778:6;8775:1;8772:13;8764:113;;;8854:11;;;8848:18;8835:11;;;8828:39;8800:2;8793:10;8764:113;;;8895:6;8892:1;8889:13;8886:48;;;-1:-1:-1;;8930:1:1;8912:16;;8905:27;8682:258::o;8945:274::-;9074:3;9112:6;9106:13;9128:53;9174:6;9169:3;9162:4;9154:6;9150:17;9128:53;:::i;:::-;9197:16;;;;;8945:274;-1:-1:-1;;8945:274:1:o;9224:383::-;9373:2;9362:9;9355:21;9336:4;9405:6;9399:13;9448:6;9443:2;9432:9;9428:18;9421:34;9464:66;9523:6;9518:2;9507:9;9503:18;9498:2;9490:6;9486:15;9464:66;:::i;:::-;9591:2;9570:15;-1:-1:-1;;9566:29:1;9551:45;;;;9598:2;9547:54;;9224:383;-1:-1:-1;;9224:383:1:o

Swarm Source

ipfs://d57f95d8262172c8fa0d2276f7f4700a4090182333b570bc3400d63830fb6770

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.