ETH Price: $1,975.16 (-1.86%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Stake245636422026-03-01 15:59:239 hrs ago1772380763IN
0x362A80d4...FC2ae81CE
0 ETH0.000201032.04701966
Stake245627842026-03-01 13:06:4712 hrs ago1772370407IN
0x362A80d4...FC2ae81CE
0 ETH0.00000460.04690327
Stake245619702026-03-01 10:23:2314 hrs ago1772360603IN
0x362A80d4...FC2ae81CE
0 ETH0.000199542.03184717
Stake245619222026-03-01 10:13:3515 hrs ago1772360015IN
0x362A80d4...FC2ae81CE
0 ETH0.000199342.03004581
Stake245610732026-03-01 7:23:1117 hrs ago1772349791IN
0x362A80d4...FC2ae81CE
0 ETH0.000003370.03433175
Stake245610522026-03-01 7:18:5918 hrs ago1772349539IN
0x362A80d4...FC2ae81CE
0 ETH0.000003240.0330475
Stake245610462026-03-01 7:17:4718 hrs ago1772349467IN
0x362A80d4...FC2ae81CE
0 ETH0.000003230.03297988
Stake245513742026-02-27 22:52:352 days ago1772232755IN
0x362A80d4...FC2ae81CE
0 ETH0.000211622.15516251
Stake245473452026-02-27 9:23:352 days ago1772184215IN
0x362A80d4...FC2ae81CE
0 ETH0.000015010.16072994
Stake245470752026-02-27 8:29:232 days ago1772180963IN
0x362A80d4...FC2ae81CE
0 ETH0.000199582.03230153
Stake245257792026-02-24 9:11:355 days ago1771924295IN
0x362A80d4...FC2ae81CE
0 ETH0.000103991.05877623
Unstake245257452026-02-24 9:04:475 days ago1771923887IN
0x362A80d4...FC2ae81CE
0 ETH0.000073181.05157363
Unstake245257422026-02-24 9:04:115 days ago1771923851IN
0x362A80d4...FC2ae81CE
0 ETH0.000073211.05213301
Stake245193512026-02-23 11:40:356 days ago1771846835IN
0x362A80d4...FC2ae81CE
0 ETH0.000005520.05628809
Unstake244913712026-02-19 14:04:2310 days ago1771509863IN
0x362A80d4...FC2ae81CE
0 ETH0.000155162.22977134
Unstake244896422026-02-19 8:17:2310 days ago1771489043IN
0x362A80d4...FC2ae81CE
0 ETH0.000142592.04880014
Unstake244896372026-02-19 8:16:2310 days ago1771488983IN
0x362A80d4...FC2ae81CE
0 ETH0.000142212.04373672
Stake244816872026-02-18 5:40:3511 days ago1771393235IN
0x362A80d4...FC2ae81CE
0 ETH0.000199282.02922799
Unstake244811352026-02-18 3:49:3511 days ago1771386575IN
0x362A80d4...FC2ae81CE
0 ETH0.000176332.0341063
Stake244811002026-02-18 3:42:3511 days ago1771386155IN
0x362A80d4...FC2ae81CE
0 ETH0.00019962.03245542
Stake244810202026-02-18 3:26:2311 days ago1771385183IN
0x362A80d4...FC2ae81CE
0 ETH0.000199712.03358788
Unstake244775882026-02-17 15:56:3512 days ago1771343795IN
0x362A80d4...FC2ae81CE
0 ETH0.000150582.16362715
Stake244760322026-02-17 10:43:5912 days ago1771325039IN
0x362A80d4...FC2ae81CE
0 ETH0.000200312.03975526
Stake244685492026-02-16 9:41:1113 days ago1771234871IN
0x362A80d4...FC2ae81CE
0 ETH0.000200712.04375739
Stake244634362026-02-15 16:35:3514 days ago1771173335IN
0x362A80d4...FC2ae81CE
0 ETH0.000102181.04041186
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakeVR

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity =0.8.4;

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

contract StakeVR is ReentrancyGuard {
    using SafeERC20 for IERC20;

    uint32 constant HUNDRED_PERCENT = 1e3;

    struct Stake {
        bool unstaked;
        uint128 amount;
        uint48 lockTimestamp;
        uint16 lockDays;
    }

    IERC20 public stakingToken;
    mapping(address => Stake[]) public stakers;
    uint192 public totalShares;
    uint16 public minLockDays;
    uint16 public maxLockDays;
    uint16 public shareBonusPerYear;
    uint16 public shareBonusPer1MTokens;

    event EStake(
        address staker,
        uint128 amount,
        uint192 shares,
        uint48 lockTimestamp,
        uint16 lockDays,
        uint192 totalShares
    );

    event EUnstake(
        address staker,
        uint stakeIndex,
        uint192 totalShares
    );

    constructor(
        IERC20 _stakingToken,
        uint16 _minLockDays,
        uint16 _maxLockDays,
        uint16 _shareBonusPerYear,
        uint16 _shareBonusPer1MTokens
    ) {
        require(address(_stakingToken) != address(0));
        require(_minLockDays <= _maxLockDays, "StakeVR: minLockDays > maxLockDays");
        stakingToken = _stakingToken;
        minLockDays = _minLockDays;
        maxLockDays = _maxLockDays;
        shareBonusPerYear = _shareBonusPerYear;
        shareBonusPer1MTokens = _shareBonusPer1MTokens;
    }

    function stake(uint128 amount, uint16 lockDays) external nonReentrant {
        require(lockDays >= minLockDays && lockDays <= maxLockDays, "StakeVR: invalid lockDays");
        (uint192 shares,) = calculateShares(amount, lockDays);
        totalShares += shares;

        stakers[msg.sender].push(Stake(
            false,
            amount,
            uint48(block.timestamp),
            lockDays
        ));
        stakingToken.safeTransferFrom(msg.sender, address(this), amount);
        emit EStake(msg.sender, amount, shares, uint48(block.timestamp), lockDays, totalShares);
    }

    function unstake(uint stakeIndex) external nonReentrant {
        require(stakeIndex < stakers[msg.sender].length, "StakeVR: invalid index");
        Stake storage stakeRef = stakers[msg.sender][stakeIndex];
        require(!stakeRef.unstaked, "StakeVR: unstaked already");
        require(stakeRef.lockTimestamp + uint48(stakeRef.lockDays) * 86400 <= block.timestamp, "StakeVR: unstaking too early");

        (uint192 shares,) = calculateShares(stakeRef.amount, stakeRef.lockDays);
        totalShares -= shares;
        stakeRef.unstaked = true;
        stakingToken.safeTransfer(msg.sender, stakeRef.amount);
        emit EUnstake(msg.sender, stakeIndex, totalShares);
    }

    function calculateShares(
        uint amount, 
        uint lockDays
    ) public view returns (
        uint192 shares,
        uint longTermBonus
    ) {
        longTermBonus = amount * lockDays * shareBonusPerYear / 365 / HUNDRED_PERCENT;
        uint stakingMoreBonus = amount * amount * shareBonusPer1MTokens / 1e24 / HUNDRED_PERCENT;
        shares = uint192(amount + longTermBonus + stakingMoreBonus);
    }

    function getStakerInfo(
        address stakerAddress
    ) public view returns (
        uint256 totalStakeAmount,
        uint256 totalStakerShares
    ) {
        for (uint i = 0; i < stakers[stakerAddress].length; i++) {
            Stake storage stakeRef = stakers[stakerAddress][i];
            if (stakeRef.unstaked) continue;

            totalStakeAmount += stakeRef.amount;
            (uint192 shares,) = calculateShares(stakeRef.amount, stakeRef.lockDays);
            totalStakerShares += shares;
        }
    }

    function stakerStakeCount(address stakerAddress) public view returns (uint) {
        return stakers[stakerAddress].length;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 4 of 5 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        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");

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

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IERC20","name":"_stakingToken","type":"address"},{"internalType":"uint16","name":"_minLockDays","type":"uint16"},{"internalType":"uint16","name":"_maxLockDays","type":"uint16"},{"internalType":"uint16","name":"_shareBonusPerYear","type":"uint16"},{"internalType":"uint16","name":"_shareBonusPer1MTokens","type":"uint16"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint128","name":"amount","type":"uint128"},{"indexed":false,"internalType":"uint192","name":"shares","type":"uint192"},{"indexed":false,"internalType":"uint48","name":"lockTimestamp","type":"uint48"},{"indexed":false,"internalType":"uint16","name":"lockDays","type":"uint16"},{"indexed":false,"internalType":"uint192","name":"totalShares","type":"uint192"}],"name":"EStake","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"stakeIndex","type":"uint256"},{"indexed":false,"internalType":"uint192","name":"totalShares","type":"uint192"}],"name":"EUnstake","type":"event"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"lockDays","type":"uint256"}],"name":"calculateShares","outputs":[{"internalType":"uint192","name":"shares","type":"uint192"},{"internalType":"uint256","name":"longTermBonus","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"stakerAddress","type":"address"}],"name":"getStakerInfo","outputs":[{"internalType":"uint256","name":"totalStakeAmount","type":"uint256"},{"internalType":"uint256","name":"totalStakerShares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLockDays","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minLockDays","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"shareBonusPer1MTokens","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"shareBonusPerYear","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint16","name":"lockDays","type":"uint16"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stakerAddress","type":"address"}],"name":"stakerStakeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakers","outputs":[{"internalType":"bool","name":"unstaked","type":"bool"},{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint48","name":"lockTimestamp","type":"uint48"},{"internalType":"uint16","name":"lockDays","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint192","name":"","type":"uint192"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"stakeIndex","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200118f3803806200118f833981016040819052620000349162000159565b60016000556001600160a01b0385166200004d57600080fd5b8261ffff168461ffff161115620000b55760405162461bcd60e51b815260206004820152602260248201527f5374616b6556523a206d696e4c6f636b44617973203e206d61784c6f636b4461604482015261797360f01b606482015260840160405180910390fd5b600180546001600160a01b0319166001600160a01b0396909616959095179094556003805463ffffffff60c01b1916600160c01b61ffff9586160261ffff60d01b191617600160d01b93851693909302929092176001600160e01b0316600160e01b918416919091026001600160f01b031617600160f01b9290931691909102919091179055620001d4565b805161ffff811681146200015457600080fd5b919050565b600080600080600060a0868803121562000171578081fd5b85516001600160a01b038116811462000188578182fd5b9450620001986020870162000141565b9350620001a86040870162000141565b9250620001b86060870162000141565b9150620001c86080870162000141565b90509295509295909350565b610fab80620001e46000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063733bdef011610071578063733bdef01461019d578063b3c740e8146101c5578063b55fb44c146101f7578063c8b6cbf71461020a578063eb6c6fa914610258578063eceae7c31461026d57600080fd5b8063263c7249146100b95780632e17de78146100e65780633a98ef39146100fb57806352741cef146101265780635e7cda651461013b57806372f702f314610172575b600080fd5b6003546100ce90600160e01b900461ffff1681565b60405161ffff90911681526020015b60405180910390f35b6100f96100f4366004610d97565b610282565b005b60035461010e906001600160c01b031681565b6040516001600160c01b0390911681526020016100dd565b6003546100ce90600160f01b900461ffff1681565b610164610149366004610ceb565b6001600160a01b031660009081526002602052604090205490565b6040519081526020016100dd565b600154610185906001600160a01b031681565b6040516001600160a01b0390911681526020016100dd565b6101b06101ab366004610ceb565b610543565b604080519283526020830191909152016100dd565b6101d86101d3366004610daf565b610637565b604080516001600160c01b0390931683526020830191909152016100dd565b6100f9610205366004610d4e565b6106e7565b61021d610218366004610d05565b610981565b6040805194151585526001600160801b03909316602085015265ffffffffffff9091169183019190915261ffff1660608201526080016100dd565b6003546100ce90600160d01b900461ffff1681565b6003546100ce90600160c01b900461ffff1681565b600260005414156102da5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026000818155338152602091909152604090205481106103365760405162461bcd60e51b81526020600482015260166024820152750a6e8c2d6caaca47440d2dcecc2d8d2c840d2dcc8caf60531b60448201526064016102d1565b33600090815260026020526040812080548390811061036557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001805490915060ff16156103c55760405162461bcd60e51b815260206004820152601960248201527f5374616b6556523a20756e7374616b656420616c72656164790000000000000060448201526064016102d1565b805442906103e190600160b81b900461ffff1662015180610ec2565b82546103fc9190600160881b900465ffffffffffff16610e62565b65ffffffffffff1611156104525760405162461bcd60e51b815260206004820152601c60248201527f5374616b6556523a20756e7374616b696e6720746f6f206561726c790000000060448201526064016102d1565b805460009061047a9061010081046001600160801b031690600160b81b900461ffff16610637565b5060038054919250829160009061049b9084906001600160c01b0316610ef0565b82546001600160c01b0391821661010093840a9081029202191617909155835460ff1916600190811780865590546104eb93506001600160a01b03169133916001600160801b03919004166109dd565b60035460408051338152602081018690526001600160c01b03909216908201527fff46d10830539f082efd0aa8d2c40122e3b064a2e3f6b98ba814e0605759b943906060015b60405180910390a15050600160005550565b60008060005b6001600160a01b038416600090815260026020526040902054811015610631576001600160a01b03841660009081526002602052604081208054839081106105a157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001805490915060ff16156105bf575061061f565b80546105d99061010090046001600160801b031685610e4a565b81549094506000906106049061010081046001600160801b031690600160b81b900461ffff16610637565b50905061061a6001600160c01b03821685610e4a565b935050505b8061062981610f44565b915050610549565b50915091565b60035460009081906103e89061016d90600160e01b900461ffff1661065c8688610ea3565b6106669190610ea3565b6106709190610e83565b61067a9190610e83565b6003549091506000906103e89069d3c21bcecceda100000090600160f01b900461ffff166106a88880610ea3565b6106b29190610ea3565b6106bc9190610e83565b6106c69190610e83565b9050806106d38387610e4a565b6106dd9190610e4a565b9250509250929050565b6002600054141561073a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102d1565b600260005560035461ffff600160c01b909104811690821610801590610771575060035461ffff600160d01b909104811690821611155b6107bd5760405162461bcd60e51b815260206004820152601960248201527f5374616b6556523a20696e76616c6964206c6f636b446179730000000000000060448201526064016102d1565b60006107d6836001600160801b03168361ffff16610637565b506003805491925082916000906107f79084906001600160c01b0316610e1f565b82546001600160c01b0391821661010093840a908102920219161790915533600081815260026020908152604080832081516080810183528481526001600160801b03808c1682860181815265ffffffffffff42811696850196875261ffff808f1660608701908152875460018181018a55988c5299909a209551959098018054925197519951909816600160b81b0261ffff60b81b1999909116600160881b029890981667ffffffffffffffff60881b199690931690990270ffffffffffffffffffffffffffffffff00199315159390931670ffffffffffffffffffffffffffffffffff19909916989098179190911792909216919091179290921790555461090d93506001600160a01b0316913090610a45565b600354604080513381526001600160801b03861660208201526001600160c01b038085169282019290925265ffffffffffff4216606082015261ffff85166080820152911660a08201527fa015aacd6499c35a0278d3ccf3954429037ec031f01760ca7ffaa98aa758a7789060c001610531565b6002602052816000526040600020818154811061099d57600080fd5b60009182526020909120015460ff8116925061010081046001600160801b03169150600160881b810465ffffffffffff1690600160b81b900461ffff1684565b6040516001600160a01b038316602482015260448101829052610a4090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610a83565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610a7d9085906323b872dd60e01b90608401610a09565b50505050565b6000610ad8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610b559092919063ffffffff16565b805190915015610a405780806020019051810190610af69190610d2e565b610a405760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102d1565b6060610b648484600085610b6e565b90505b9392505050565b606082471015610bcf5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102d1565b843b610c1d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102d1565b600080866001600160a01b03168587604051610c399190610dd0565b60006040518083038185875af1925050503d8060008114610c76576040519150601f19603f3d011682016040523d82523d6000602084013e610c7b565b606091505b5091509150610c8b828286610c96565b979650505050505050565b60608315610ca5575081610b67565b825115610cb55782518084602001fd5b8160405162461bcd60e51b81526004016102d19190610dec565b80356001600160a01b0381168114610ce657600080fd5b919050565b600060208284031215610cfc578081fd5b610b6782610ccf565b60008060408385031215610d17578081fd5b610d2083610ccf565b946020939093013593505050565b600060208284031215610d3f578081fd5b81518015158114610b67578182fd5b60008060408385031215610d60578182fd5b82356001600160801b0381168114610d76578283fd5b9150602083013561ffff81168114610d8c578182fd5b809150509250929050565b600060208284031215610da8578081fd5b5035919050565b60008060408385031215610dc1578182fd5b50508035926020909101359150565b60008251610de2818460208701610f18565b9190910192915050565b6020815260008251806020840152610e0b816040850160208701610f18565b601f01601f19169190910160400192915050565b60006001600160c01b03828116848216808303821115610e4157610e41610f5f565b01949350505050565b60008219821115610e5d57610e5d610f5f565b500190565b600065ffffffffffff808316818516808303821115610e4157610e41610f5f565b600082610e9e57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610ebd57610ebd610f5f565b500290565b600065ffffffffffff80831681851681830481118215151615610ee757610ee7610f5f565b02949350505050565b60006001600160c01b0383811690831681811015610f1057610f10610f5f565b039392505050565b60005b83811015610f33578181015183820152602001610f1b565b83811115610a7d5750506000910152565b6000600019821415610f5857610f58610f5f565b5060010190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220df55a394598bb930b3cb34700c852c0c235449427db713123d6019ac2134e3bf64736f6c634300080400330000000000000000000000007d5121505149065b562c789a0145ed750e6e8cdd000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000e420000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000003c

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063733bdef011610071578063733bdef01461019d578063b3c740e8146101c5578063b55fb44c146101f7578063c8b6cbf71461020a578063eb6c6fa914610258578063eceae7c31461026d57600080fd5b8063263c7249146100b95780632e17de78146100e65780633a98ef39146100fb57806352741cef146101265780635e7cda651461013b57806372f702f314610172575b600080fd5b6003546100ce90600160e01b900461ffff1681565b60405161ffff90911681526020015b60405180910390f35b6100f96100f4366004610d97565b610282565b005b60035461010e906001600160c01b031681565b6040516001600160c01b0390911681526020016100dd565b6003546100ce90600160f01b900461ffff1681565b610164610149366004610ceb565b6001600160a01b031660009081526002602052604090205490565b6040519081526020016100dd565b600154610185906001600160a01b031681565b6040516001600160a01b0390911681526020016100dd565b6101b06101ab366004610ceb565b610543565b604080519283526020830191909152016100dd565b6101d86101d3366004610daf565b610637565b604080516001600160c01b0390931683526020830191909152016100dd565b6100f9610205366004610d4e565b6106e7565b61021d610218366004610d05565b610981565b6040805194151585526001600160801b03909316602085015265ffffffffffff9091169183019190915261ffff1660608201526080016100dd565b6003546100ce90600160d01b900461ffff1681565b6003546100ce90600160c01b900461ffff1681565b600260005414156102da5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026000818155338152602091909152604090205481106103365760405162461bcd60e51b81526020600482015260166024820152750a6e8c2d6caaca47440d2dcecc2d8d2c840d2dcc8caf60531b60448201526064016102d1565b33600090815260026020526040812080548390811061036557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001805490915060ff16156103c55760405162461bcd60e51b815260206004820152601960248201527f5374616b6556523a20756e7374616b656420616c72656164790000000000000060448201526064016102d1565b805442906103e190600160b81b900461ffff1662015180610ec2565b82546103fc9190600160881b900465ffffffffffff16610e62565b65ffffffffffff1611156104525760405162461bcd60e51b815260206004820152601c60248201527f5374616b6556523a20756e7374616b696e6720746f6f206561726c790000000060448201526064016102d1565b805460009061047a9061010081046001600160801b031690600160b81b900461ffff16610637565b5060038054919250829160009061049b9084906001600160c01b0316610ef0565b82546001600160c01b0391821661010093840a9081029202191617909155835460ff1916600190811780865590546104eb93506001600160a01b03169133916001600160801b03919004166109dd565b60035460408051338152602081018690526001600160c01b03909216908201527fff46d10830539f082efd0aa8d2c40122e3b064a2e3f6b98ba814e0605759b943906060015b60405180910390a15050600160005550565b60008060005b6001600160a01b038416600090815260026020526040902054811015610631576001600160a01b03841660009081526002602052604081208054839081106105a157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001805490915060ff16156105bf575061061f565b80546105d99061010090046001600160801b031685610e4a565b81549094506000906106049061010081046001600160801b031690600160b81b900461ffff16610637565b50905061061a6001600160c01b03821685610e4a565b935050505b8061062981610f44565b915050610549565b50915091565b60035460009081906103e89061016d90600160e01b900461ffff1661065c8688610ea3565b6106669190610ea3565b6106709190610e83565b61067a9190610e83565b6003549091506000906103e89069d3c21bcecceda100000090600160f01b900461ffff166106a88880610ea3565b6106b29190610ea3565b6106bc9190610e83565b6106c69190610e83565b9050806106d38387610e4a565b6106dd9190610e4a565b9250509250929050565b6002600054141561073a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102d1565b600260005560035461ffff600160c01b909104811690821610801590610771575060035461ffff600160d01b909104811690821611155b6107bd5760405162461bcd60e51b815260206004820152601960248201527f5374616b6556523a20696e76616c6964206c6f636b446179730000000000000060448201526064016102d1565b60006107d6836001600160801b03168361ffff16610637565b506003805491925082916000906107f79084906001600160c01b0316610e1f565b82546001600160c01b0391821661010093840a908102920219161790915533600081815260026020908152604080832081516080810183528481526001600160801b03808c1682860181815265ffffffffffff42811696850196875261ffff808f1660608701908152875460018181018a55988c5299909a209551959098018054925197519951909816600160b81b0261ffff60b81b1999909116600160881b029890981667ffffffffffffffff60881b199690931690990270ffffffffffffffffffffffffffffffff00199315159390931670ffffffffffffffffffffffffffffffffff19909916989098179190911792909216919091179290921790555461090d93506001600160a01b0316913090610a45565b600354604080513381526001600160801b03861660208201526001600160c01b038085169282019290925265ffffffffffff4216606082015261ffff85166080820152911660a08201527fa015aacd6499c35a0278d3ccf3954429037ec031f01760ca7ffaa98aa758a7789060c001610531565b6002602052816000526040600020818154811061099d57600080fd5b60009182526020909120015460ff8116925061010081046001600160801b03169150600160881b810465ffffffffffff1690600160b81b900461ffff1684565b6040516001600160a01b038316602482015260448101829052610a4090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610a83565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610a7d9085906323b872dd60e01b90608401610a09565b50505050565b6000610ad8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610b559092919063ffffffff16565b805190915015610a405780806020019051810190610af69190610d2e565b610a405760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102d1565b6060610b648484600085610b6e565b90505b9392505050565b606082471015610bcf5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102d1565b843b610c1d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102d1565b600080866001600160a01b03168587604051610c399190610dd0565b60006040518083038185875af1925050503d8060008114610c76576040519150601f19603f3d011682016040523d82523d6000602084013e610c7b565b606091505b5091509150610c8b828286610c96565b979650505050505050565b60608315610ca5575081610b67565b825115610cb55782518084602001fd5b8160405162461bcd60e51b81526004016102d19190610dec565b80356001600160a01b0381168114610ce657600080fd5b919050565b600060208284031215610cfc578081fd5b610b6782610ccf565b60008060408385031215610d17578081fd5b610d2083610ccf565b946020939093013593505050565b600060208284031215610d3f578081fd5b81518015158114610b67578182fd5b60008060408385031215610d60578182fd5b82356001600160801b0381168114610d76578283fd5b9150602083013561ffff81168114610d8c578182fd5b809150509250929050565b600060208284031215610da8578081fd5b5035919050565b60008060408385031215610dc1578182fd5b50508035926020909101359150565b60008251610de2818460208701610f18565b9190910192915050565b6020815260008251806020840152610e0b816040850160208701610f18565b601f01601f19169190910160400192915050565b60006001600160c01b03828116848216808303821115610e4157610e41610f5f565b01949350505050565b60008219821115610e5d57610e5d610f5f565b500190565b600065ffffffffffff808316818516808303821115610e4157610e41610f5f565b600082610e9e57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610ebd57610ebd610f5f565b500290565b600065ffffffffffff80831681851681830481118215151615610ee757610ee7610f5f565b02949350505050565b60006001600160c01b0383811690831681811015610f1057610f10610f5f565b039392505050565b60005b83811015610f33578181015183820152602001610f1b565b83811115610a7d5750506000910152565b6000600019821415610f5857610f58610f5f565b5060010190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220df55a394598bb930b3cb34700c852c0c235449427db713123d6019ac2134e3bf64736f6c63430008040033

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

0000000000000000000000007d5121505149065b562c789a0145ed750e6e8cdd000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000e420000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000003c

-----Decoded View---------------
Arg [0] : _stakingToken (address): 0x7d5121505149065b562C789A0145eD750e6E8cdD
Arg [1] : _minLockDays (uint16): 30
Arg [2] : _maxLockDays (uint16): 3650
Arg [3] : _shareBonusPerYear (uint16): 8000
Arg [4] : _shareBonusPer1MTokens (uint16): 60

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000007d5121505149065b562c789a0145ed750e6e8cdd
Arg [1] : 000000000000000000000000000000000000000000000000000000000000001e
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000e42
Arg [3] : 0000000000000000000000000000000000000000000000000000000000001f40
Arg [4] : 000000000000000000000000000000000000000000000000000000000000003c


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.