ETH Price: $3,387.29 (+1.26%)

Contract

0xdc96A5BB75b0C82bD7a2A36143ecB196cF5d1a6C
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unstake196443862024-04-13 4:51:11259 days ago1712983871IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0015438812.19460129
Unstake196430812024-04-13 0:25:59259 days ago1712967959IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0019127115.1093203
Unstake196429872024-04-13 0:06:59259 days ago1712966819IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0018869514.90579688
Unstake196429652024-04-13 0:02:35259 days ago1712966555IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0018184414.37278251
Unstake196399772024-04-12 13:58:47260 days ago1712930327IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0048857638.5945489
Unstake195986532024-04-06 19:04:47265 days ago1712430287IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0015873812.54648001
Emergency Withdr...195388262024-03-29 9:39:59274 days ago1711705199IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0013291223.17485809
Pause195384442024-03-29 8:22:23274 days ago1711700543IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0007847426.13014139
Stake195380692024-03-29 7:06:59274 days ago1711696019IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0034207921.22183979
Stake195377552024-03-29 6:03:47274 days ago1711692227IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0028956418.51529836
Stake195375042024-03-29 5:13:23274 days ago1711689203IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0032660320.26024815
Stake195374842024-03-29 5:09:23274 days ago1711688963IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0034365921.3199164
Stake195367552024-03-29 2:42:11274 days ago1711680131IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0038820924.08369731
Stake195357662024-03-28 23:22:35274 days ago1711668155IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0063007240.28805731
Stake195356862024-03-28 23:06:35274 days ago1711667195IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0044131528.21852066
Stake195356832024-03-28 23:05:59274 days ago1711667159IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0045004628.77682712
Stake195355962024-03-28 22:48:35274 days ago1711666115IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0044655227.70311659
Stake195353652024-03-28 22:02:11274 days ago1711663331IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.006101239.01225897
Stake195353482024-03-28 21:58:47274 days ago1711663127IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0046306729.60943199
Stake195349982024-03-28 20:48:23274 days ago1711658903IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0075524930.1487118
Stake195332782024-03-28 14:46:47275 days ago1711637207IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.008903356.92942992
Set Pause Claim195326732024-03-28 12:41:23275 days ago1711629683IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0009104438
Stake195325372024-03-28 12:13:35275 days ago1711628015IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.0052244633.40621776
Stake195324682024-03-28 11:59:35275 days ago1711627175IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.004121836.78374434
Stake195324452024-03-28 11:54:59275 days ago1711626899IN
0xdc96A5BB...6cF5d1a6C
0 ETH0.003485136.70270776
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xC57696Cf...DfAdeDa6A
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
StakingArchitex

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 800 runs

Other Settings:
london EvmVersion
File 1 of 6 : V2StakingArcx.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./Pausable.sol";

contract StakingArchitex is Ownable, ReentrancyGuard, Pausable {
    struct RewardsAdjustement {
        uint256 timestamp;
        uint256 totalStaked;
        uint256 incentiveRate;
        uint256 rewardRate;
    }

    struct UserInfo {
        uint256 balanceStaked;
        uint256 unlockTime;
        uint256 lastClaimTimestamp;
        uint256 lastClaimAdjustmentIndex;
    }

    IERC20 public stakedERC20;
    IERC20 public incentiveERC20;
    IERC20 public rewardERC20;
    address public stakedAddr;
    address public incentiveAddr;
    address public rewardAddr;

    uint256 public totalStaked;
    uint256 public totalIncentiveRate;
    uint256 public totalRewardRate;

    mapping(address => UserInfo) public usersInfo;

    RewardsAdjustement[] private adjustements;
    uint256 private adjustementsLength;
    uint256 private adjustementDuration = 1;

    bool public allowUnstaking;
    bool public pauseClaim;

    event Staked(address indexed user, uint256 amount);
    event Unstaked(address indexed user, uint256 amount);
    event RewardPaid(address indexed user, uint256 incentive, uint256 reward);

    constructor(address _stakedAddr, address _incentiveAddr, address _rewardAddr) Ownable(msg.sender) {
        stakedAddr = _stakedAddr;
        incentiveAddr = _incentiveAddr;
        rewardAddr = _rewardAddr;
        
        stakedERC20 = IERC20(stakedAddr);
        incentiveERC20 = IERC20(incentiveAddr);
        rewardERC20 = IERC20(rewardAddr);

        adjustements.push(RewardsAdjustement(
            block.timestamp, totalStaked, totalIncentiveRate, totalRewardRate
        ));
        adjustementsLength += 1;
    }

    function pause(bool _value) external onlyOwner {
        if (_value) _pause();
        else _unpause();
    }

    function setPauseClaim(bool _value) external onlyOwner {
        pauseClaim = _value;
    }

    function setAllowUnstaking(bool _value) external onlyOwner {
        allowUnstaking = _value;
    }

    function setAdjustementDuration(uint256 _duration) external onlyOwner {
        adjustementDuration = _duration;
    }

    function emergencyWithdraw(bool _incentive, bool _reward) external onlyOwner {
        if (_incentive) incentiveERC20.transfer(msg.sender, incentiveERC20.balanceOf(address(this)));
        if (_reward) rewardERC20.transfer(msg.sender, rewardERC20.balanceOf(address(this)));
    }

    function adjustRewards(uint256 _incentiveRate, uint256 _rewardRate) external onlyOwner {
        totalIncentiveRate = _incentiveRate;
        totalRewardRate = _rewardRate;

        if (block.timestamp - 1 days >= adjustements[adjustementsLength - 1].timestamp) {
            adjustements.push(RewardsAdjustement(
                block.timestamp, totalStaked, totalIncentiveRate, totalRewardRate
            ));
            adjustementsLength += 1;
        } else {
            adjustements[adjustementsLength - 1].totalStaked = totalStaked;
            adjustements[adjustementsLength - 1].incentiveRate = totalIncentiveRate;
            adjustements[adjustementsLength - 1].rewardRate = totalRewardRate;
        }
    }

    function stake(uint256 _amount) external nonReentrant whenNotPaused {
        require(stakedERC20.balanceOf(msg.sender) >= _amount, "Insufficient balance");

        UserInfo memory userInfo = usersInfo[msg.sender];

        if (userInfo.balanceStaked > 0) {
            _claim(msg.sender);
        }

        stakedERC20.transferFrom(msg.sender, address(this), _amount);

        _manageAdjustment();

        userInfo.lastClaimTimestamp = block.timestamp;
        userInfo.lastClaimAdjustmentIndex = adjustementsLength > 0 ? adjustementsLength - 1 : 0;

        userInfo.balanceStaked += _amount;
        userInfo.unlockTime = block.timestamp + 14 days;
        usersInfo[msg.sender] = userInfo;

        totalStaked += _amount;
        adjustements[adjustementsLength - 1].totalStaked = totalStaked;

        emit Staked(msg.sender, _amount);
    }

    function unstake(uint256 _amount) external nonReentrant {
        UserInfo memory userInfo = usersInfo[msg.sender];

        require(userInfo.balanceStaked >= _amount, "Insufficient stake");
        require(allowUnstaking || block.timestamp >= userInfo.unlockTime, "Lock has not expired");

        _claim(msg.sender);

        _manageAdjustment();

        userInfo.lastClaimTimestamp = block.timestamp;
        userInfo.lastClaimAdjustmentIndex = adjustementsLength > 0 ? adjustementsLength - 1 : 0;
        userInfo.balanceStaked -= _amount;
        usersInfo[msg.sender] = userInfo;

        stakedERC20.transfer(msg.sender, _amount);

        totalStaked -= _amount;
        adjustements[adjustementsLength - 1].totalStaked = totalStaked;

        emit Unstaked(msg.sender, _amount);
    }

    function claim() public nonReentrant {
        UserInfo memory userInfo = usersInfo[msg.sender];

        require(userInfo.balanceStaked > 0, "No stake");
        require(!pauseClaim, "Claim paused");

        _claim(msg.sender);

        userInfo.lastClaimTimestamp = block.timestamp;
        userInfo.lastClaimAdjustmentIndex = adjustementsLength > 0 ? adjustementsLength - 1 : 0;

        usersInfo[msg.sender] = userInfo;
    }

    function earned(address _user) public view returns (uint256, uint256) {
        UserInfo memory userInfo = usersInfo[_user];

        if (userInfo.balanceStaked == 0) {
            return (0, 0);
        }

        RewardsAdjustement memory adjustement;
        uint256 incentives;
        uint256 rewards;

        uint256 time = userInfo.lastClaimTimestamp;
        uint256 elapsed;

        for (uint256 i = userInfo.lastClaimAdjustmentIndex; i < adjustementsLength; i++) {
            adjustement = adjustements[i];

            if (i + 1 < adjustementsLength) {
                elapsed = adjustements[i + 1].timestamp - time;
                time = adjustements[i + 1].timestamp;
            } else {
                elapsed = block.timestamp - time;
            }
            
            incentives += userInfo.balanceStaked * adjustement.incentiveRate * elapsed / adjustement.totalStaked;
            rewards += userInfo.balanceStaked * adjustement.rewardRate * elapsed / adjustement.totalStaked;
        }

        return (incentives, rewards);
    }

    function _claim(address _user) internal {
        if (pauseClaim) return;

        (uint256 incentivesClaimable, uint256 rewardsClaimable) = earned(_user);

        if (incentivesClaimable > 0) {
            incentiveERC20.transfer(_user, incentivesClaimable);
        }
        if (rewardsClaimable > 0) {
            rewardERC20.transfer(_user, rewardsClaimable);
        }

        emit RewardPaid(_user, incentivesClaimable, rewardsClaimable);
    }

    function _manageAdjustment() internal {
        if (block.timestamp - (adjustementDuration * 1 days) >= adjustements[adjustementsLength - 1].timestamp) {
            adjustements.push(RewardsAdjustement(
                block.timestamp, totalStaked, totalIncentiveRate, totalRewardRate
            ));
            adjustementsLength += 1;
        }
    }
}

File 2 of 6 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with 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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 3 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

File 4 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import {Context} from "./Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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);
    }
}

File 5 of 6 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.0;

import {Context} from "./Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    bool private _paused;

    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 6 of 6 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/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;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    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() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 800
  },
  "evmVersion": "london",
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_stakedAddr","type":"address"},{"internalType":"address","name":"_incentiveAddr","type":"address"},{"internalType":"address","name":"_rewardAddr","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"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":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"incentive","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[{"internalType":"uint256","name":"_incentiveRate","type":"uint256"},{"internalType":"uint256","name":"_rewardRate","type":"uint256"}],"name":"adjustRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allowUnstaking","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_incentive","type":"bool"},{"internalType":"bool","name":"_reward","type":"bool"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"incentiveAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"incentiveERC20","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_value","type":"bool"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseClaim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardERC20","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"setAdjustementDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_value","type":"bool"}],"name":"setAllowUnstaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_value","type":"bool"}],"name":"setPauseClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakedAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakedERC20","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalIncentiveRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","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":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"usersInfo","outputs":[{"internalType":"uint256","name":"balanceStaked","type":"uint256"},{"internalType":"uint256","name":"unlockTime","type":"uint256"},{"internalType":"uint256","name":"lastClaimTimestamp","type":"uint256"},{"internalType":"uint256","name":"lastClaimAdjustmentIndex","type":"uint256"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101ad5760003560e01c8063836e8a26116100ee578063a96609db11610097578063d3f1080811610071578063d3f10808146103ae578063d48236b1146103c1578063e75e64fc146103d4578063f2fde38b146103dd57600080fd5b8063a96609db14610370578063b3b1520614610388578063d10b5a5b1461039b57600080fd5b80638ff095f9116100c85780638ff095f914610338578063a694fc3a1461034a578063a837edd81461035d57600080fd5b8063836e8a2614610307578063880de0d21461031a5780638da5cb5b1461032757600080fd5b80634e71d92d1161015b5780635d0eaaaf116101355780635d0eaaaf1461028e5780637015e95e146102e3578063715018a6146102f6578063817b1cd2146102fe57600080fd5b80634e71d92d14610244578063556349001461024c5780635c975abb1461027757600080fd5b80630a51414c1161018c5780630a51414c1461020b5780630ee8d4d51461021e5780632e17de781461023157600080fd5b80628cc262146101b257806302329a29146101df57806303238db2146101f4575b600080fd5b6101c56101c03660046115d2565b6103f0565b604080519283526020830191909152015b60405180910390f35b6101f26101ed366004611610565b610612565b005b6101fd600a5481565b6040519081526020016101d6565b6101f261021936600461162d565b610633565b6101f261022c366004611610565b61084a565b6101f261023f366004611666565b610865565b6101f2610b01565b60035461025f906001600160a01b031681565b6040516001600160a01b0390911681526020016101d6565b60025460ff165b60405190151581526020016101d6565b6102c361029c3660046115d2565b600b6020526000908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016101d6565b60075461025f906001600160a01b031681565b6101f2610c5b565b6101fd60085481565b60065461025f906001600160a01b031681565b600f5461027e9060ff1681565b6000546001600160a01b031661025f565b600f5461027e90610100900460ff1681565b6101f2610358366004611666565b610c6d565b6101f261036b36600461167f565b610f21565b60025461025f9061010090046001600160a01b031681565b6101f2610396366004611666565b61111d565b60045461025f906001600160a01b031681565b60055461025f906001600160a01b031681565b6101f26103cf366004611610565b61112a565b6101fd60095481565b6101f26103eb3660046115d2565b61114c565b6001600160a01b0381166000908152600b60209081526040808320815160808101835281548082526001830154948201949094526002820154928101929092526003015460608201528291820361044d5750600093849350915050565b6104786040518060800160405280600081526020016000815260200160008152602001600081525090565b60408201516060830151600091829182905b600d5481101561060257600c81815481106104a7576104a76116a1565b90600052602060002090600402016040518060800160405290816000820154815260200160018201548152602001600282015481526020016003820154815250509550600d548160016104fa91906116cd565b10156105725782600c61050e8360016116cd565b8154811061051e5761051e6116a1565b90600052602060002090600402016000015461053a91906116e6565b9150600c6105498260016116cd565b81548110610559576105596116a1565b906000526020600020906004020160000154925061057f565b61057c83426116e6565b91505b6020860151604087015188518491610596916116f9565b6105a091906116f9565b6105aa9190611710565b6105b490866116cd565b9450856020015182876060015189600001516105d091906116f9565b6105da91906116f9565b6105e49190611710565b6105ee90856116cd565b9350806105fa81611732565b91505061048a565b5092989197509095505050505050565b61061a611187565b801561062b576106286111b4565b50565b61062861120e565b61063b611187565b8115610740576003546040516370a0823160e01b81523060048201526001600160a01b039091169063a9059cbb90339083906370a0823190602401602060405180830381865afa158015610693573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b7919061174b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561071a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073e9190611764565b505b801561084657600480546040516370a0823160e01b815230928101929092526001600160a01b03169063a9059cbb90339083906370a0823190602401602060405180830381865afa158015610799573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bd919061174b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610820573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108449190611764565b505b5050565b610852611187565b600f805460ff1916911515919091179055565b61086d611247565b336000908152600b6020908152604091829020825160808101845281548082526001830154938201939093526002820154938101939093526003015460608301528211156109025760405162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e74207374616b65000000000000000000000000000060448201526064015b60405180910390fd5b600f5460ff1680610917575080602001514210155b6109635760405162461bcd60e51b815260206004820152601460248201527f4c6f636b20686173206e6f74206578706972656400000000000000000000000060448201526064016108f9565b61096c33611271565b6109746113de565b426040820152600d54610988576000610997565b6001600d5461099791906116e6565b60608201528051829082906109ad9083906116e6565b905250336000818152600b60209081526040918290208451815590840151600182015583820151600280830191909155606085015160039092019190915554905163a9059cbb60e01b815260048101929092526024820184905261010090046001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610a3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a629190611764565b508160086000828254610a7591906116e6565b9091555050600854600d54600c90610a8f906001906116e6565b81548110610a9f57610a9f6116a1565b906000526020600020906004020160010181905550336001600160a01b03167f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f7583604051610aef91815260200190565b60405180910390a25061062860018055565b610b09611247565b336000908152600b602090815260409182902082516080810184528154808252600183015493820193909352600282015493810193909352600301546060830152610b965760405162461bcd60e51b815260206004820152600860248201527f4e6f207374616b6500000000000000000000000000000000000000000000000060448201526064016108f9565b600f54610100900460ff1615610bee5760405162461bcd60e51b815260206004820152600c60248201527f436c61696d20706175736564000000000000000000000000000000000000000060448201526064016108f9565b610bf733611271565b426040820152600d54610c0b576000610c1a565b6001600d54610c1a91906116e6565b60608201908152336000908152600b602090815260409182902084518155908401516001820155920151600283015551600390910155610c5960018055565b565b610c63611187565b610c596000611523565b610c75611247565b610c7d61158b565b6002546040516370a0823160e01b8152336004820152829161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610cca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cee919061174b565b1015610d3c5760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e636500000000000000000000000060448201526064016108f9565b336000908152600b60209081526040918290208251608081018452815480825260018301549382019390935260028201549381019390935260030154606083015215610d8b57610d8b33611271565b6002546040516323b872dd60e01b8152336004820152306024820152604481018490526101009091046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610de6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0a9190611764565b50610e136113de565b426040820152600d54610e27576000610e36565b6001600d54610e3691906116e6565b6060820152805182908290610e4c9083906116cd565b905250610e5c42621275006116cd565b6020808301918252336000908152600b909152604080822084518155925160018401558301516002830155606083015160039092019190915560088054849290610ea79084906116cd565b9091555050600854600d54600c90610ec1906001906116e6565b81548110610ed157610ed16116a1565b906000526020600020906004020160010181905550336001600160a01b03167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d83604051610aef91815260200190565b610f29611187565b6009829055600a819055600d54600c90610f45906001906116e6565b81548110610f5557610f556116a1565b6000918252602090912060049091020154610f7362015180426116e6565b1061106e576040805160808101825242815260085460208201908152600954928201928352600a5460608301908152600c805460018082018355600092835294517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c760049092029182015592517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c884015593517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c9830155517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8ca90910155600d8054919290916110639084906116cd565b909155506108469050565b600854600c6001600d5461108291906116e6565b81548110611092576110926116a1565b906000526020600020906004020160010181905550600954600c6001600d546110bb91906116e6565b815481106110cb576110cb6116a1565b906000526020600020906004020160020181905550600a54600c6001600d546110f491906116e6565b81548110611104576111046116a1565b9060005260206000209060040201600301819055505050565b611125611187565b600e55565b611132611187565b600f80549115156101000261ff0019909216919091179055565b611154611187565b6001600160a01b03811661117e57604051631e4fbdf760e01b8152600060048201526024016108f9565b61062881611523565b6000546001600160a01b03163314610c595760405163118cdaa760e01b81523360048201526024016108f9565b6111bc61158b565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111f13390565b6040516001600160a01b03909116815260200160405180910390a1565b6112166115af565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336111f1565b60026001540361126a57604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b600f54610100900460ff16156112845750565b600080611290836103f0565b909250905081156113145760035460405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af11580156112ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113129190611764565b505b8015611395576004805460405163a9059cbb60e01b81526001600160a01b03868116938201939093526024810184905291169063a9059cbb906044016020604051808303816000875af115801561136f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113939190611764565b505b60408051838152602081018390526001600160a01b038516917fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f51910160405180910390a2505050565b600c6001600d546113ef91906116e6565b815481106113ff576113ff6116a1565b906000526020600020906004020160000154600e546201518061142291906116f9565b61142c90426116e6565b10610c59576040805160808101825242815260085460208201908152600954928201928352600a5460608301908152600c805460018082018355600092835294517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c760049092029182015592517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c884015593517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c9830155517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8ca90910155600d80549192909161151c9084906116cd565b9091555050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60025460ff1615610c595760405163d93c066560e01b815260040160405180910390fd5b60025460ff16610c5957604051638dfc202b60e01b815260040160405180910390fd5b6000602082840312156115e457600080fd5b81356001600160a01b03811681146115fb57600080fd5b9392505050565b801515811461062857600080fd5b60006020828403121561162257600080fd5b81356115fb81611602565b6000806040838503121561164057600080fd5b823561164b81611602565b9150602083013561165b81611602565b809150509250929050565b60006020828403121561167857600080fd5b5035919050565b6000806040838503121561169257600080fd5b50508035926020909101359150565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156116e0576116e06116b7565b92915050565b818103818111156116e0576116e06116b7565b80820281158282048414176116e0576116e06116b7565b60008261172d57634e487b7160e01b600052601260045260246000fd5b500490565b600060018201611744576117446116b7565b5060010190565b60006020828403121561175d57600080fd5b5051919050565b60006020828403121561177657600080fd5b81516115fb8161160256fea264697066735822122056f7d0a4c0c0de81dd432ee9e0ac26ed6c469d2b39a95c44e64faa7423956f9964736f6c63430008110033

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.