ETH Price: $3,482.64 (+3.59%)
Gas: 1 Gwei

Contract

0x2fA6c95B69c10f9F52b8990b6C03171F13C46225
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Exit202050232024-06-30 14:13:1115 hrs ago1719756791IN
0x2fA6c95B...F13C46225
0 ETH0.000410654.79548183
Get Reward202030142024-06-30 7:29:2322 hrs ago1719732563IN
0x2fA6c95B...F13C46225
0 ETH0.00013311.652483
Get Reward201918032024-06-28 17:53:352 days ago1719597215IN
0x2fA6c95B...F13C46225
0 ETH0.00029353.86255786
Exit201886632024-06-28 7:22:472 days ago1719559367IN
0x2fA6c95B...F13C46225
0 ETH0.000649224.75280548
Get Reward201876212024-06-28 3:52:593 days ago1719546779IN
0x2fA6c95B...F13C46225
0 ETH0.000344224.52998924
Get Reward201841982024-06-27 16:24:233 days ago1719505463IN
0x2fA6c95B...F13C46225
0 ETH0.0014743119.40200348
Exit201815502024-06-27 7:32:113 days ago1719473531IN
0x2fA6c95B...F13C46225
0 ETH0.000459653.83560705
Exit201796292024-06-27 1:06:234 days ago1719450383IN
0x2fA6c95B...F13C46225
0 ETH0.000301614.40099881
Exit201787542024-06-26 22:10:234 days ago1719439823IN
0x2fA6c95B...F13C46225
0 ETH0.000501995
Get Reward201746042024-06-26 8:15:354 days ago1719389735IN
0x2fA6c95B...F13C46225
0 ETH0.000184262.28757092
Exit201715202024-06-25 21:55:595 days ago1719352559IN
0x2fA6c95B...F13C46225
0 ETH0.000662875.53135043
Get Reward201694612024-06-25 15:01:595 days ago1719327719IN
0x2fA6c95B...F13C46225
0 ETH0.0013385116.61700354
Exit201661902024-06-25 4:03:596 days ago1719288239IN
0x2fA6c95B...F13C46225
0 ETH0.000475093.47803517
Withdraw201614322024-06-24 12:06:236 days ago1719230783IN
0x2fA6c95B...F13C46225
0 ETH0.000331133.86621797
Exit201613282024-06-24 11:45:356 days ago1719229535IN
0x2fA6c95B...F13C46225
0 ETH0.000320133.73835973
Get Reward201548982024-06-23 14:10:477 days ago1719151847IN
0x2fA6c95B...F13C46225
0 ETH0.000203362.52466108
Get Reward201479032024-06-22 14:40:358 days ago1719067235IN
0x2fA6c95B...F13C46225
0 ETH0.000217544.93142626
Get Reward201472782024-06-22 12:34:598 days ago1719059699IN
0x2fA6c95B...F13C46225
0 ETH0.000283053.04067775
Exit201417152024-06-21 17:53:359 days ago1718992415IN
0x2fA6c95B...F13C46225
0 ETH0.0016110611.79418481
Get Reward201408852024-06-21 15:06:479 days ago1718982407IN
0x2fA6c95B...F13C46225
0 ETH0.000574917.56589584
Get Reward201206902024-06-18 19:20:2312 days ago1718738423IN
0x2fA6c95B...F13C46225
0 ETH0.000699388.68257208
Exit201202672024-06-18 17:55:4712 days ago1718733347IN
0x2fA6c95B...F13C46225
0 ETH0.000813126.78511384
Exit201188512024-06-18 13:10:4712 days ago1718716247IN
0x2fA6c95B...F13C46225
0 ETH0.001089569.09189865
Get Reward200750652024-06-12 10:10:5918 days ago1718187059IN
0x2fA6c95B...F13C46225
0 ETH0.0032295340.093071
Exit200656232024-06-11 2:32:2320 days ago1718073143IN
0x2fA6c95B...F13C46225
0 ETH0.0025176718.70516093
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To Value
192456872024-02-17 6:05:47134 days ago1708149947  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FluidLendingStakingRewards

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 10000000 runs

Other Settings:
paris EvmVersion
File 1 of 7 : main.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { IERC20Permit } from "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol";
import { Owned } from "solmate/src/auth/Owned.sol";

// Adapted from https://github.com/Uniswap/liquidity-staker/blob/master/contracts/StakingRewards.sol
contract FluidLendingStakingRewards is Owned, ReentrancyGuard {
    using SafeERC20 for IERC20;

    IERC20 public immutable rewardsToken; // should be INST
    IERC20 public immutable stakingToken; // should be fToken
    uint256 public immutable rewardsDuration; // e.g. 60 days

    /* ========== STATE VARIABLES ========== */

    // Owned and ReentranyGuard storage variables before

    uint256 public periodFinish;
    uint256 public rewardRate;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;

    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public rewards;

    uint256 private _totalSupply;
    mapping(address => uint256) private _balances;

    /* ========== CONSTRUCTOR ========== */

    constructor(address _owner, IERC20 _rewardsToken, IERC20 _stakingToken, uint256 _rewardsDuration) Owned(_owner) {
        require(address(_rewardsToken) != address(0), "Invalid params");
        require(address(_stakingToken) != address(0), "Invalid params");
        require(_owner != address(0), "Invalid params"); // Owned does not have a zero check for owner_
        require(_rewardsDuration > 0, "Invalid params");

        rewardsToken = _rewardsToken;
        stakingToken = _stakingToken;
        rewardsDuration = _rewardsDuration;
    }

    /* ========== VIEWS ========== */

    function totalSupply() external view returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(address account) external view returns (uint256) {
        return _balances[account];
    }

    function lastTimeRewardApplicable() public view returns (uint256) {
        return block.timestamp < periodFinish ? block.timestamp : periodFinish;
    }

    function rewardPerToken() public view returns (uint256) {
        if (_totalSupply == 0) {
            return rewardPerTokenStored;
        }
        return
            rewardPerTokenStored + (((lastTimeRewardApplicable() - lastUpdateTime) * rewardRate * 1e18) / _totalSupply);
    }

    function earned(address account) public view returns (uint256) {
        return (_balances[account] * (rewardPerToken() - userRewardPerTokenPaid[account])) / 1e18 + rewards[account];
    }

    function getRewardForDuration() external view returns (uint256) {
        return rewardRate * rewardsDuration;
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    function stakeWithPermit(
        uint256 amount,
        uint deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external nonReentrant updateReward(msg.sender) {
        require(amount > 0, "Cannot stake 0");

        // permit
        IERC20Permit(address(stakingToken)).permit(msg.sender, address(this), amount, deadline, v, r, s);

        stakingToken.safeTransferFrom(msg.sender, address(this), amount);

        _totalSupply = _totalSupply + amount;
        _balances[msg.sender] = _balances[msg.sender] + amount;

        emit Staked(msg.sender, amount);
    }

    function stake(uint256 amount) external nonReentrant updateReward(msg.sender) {
        require(amount > 0, "Cannot stake 0");

        stakingToken.safeTransferFrom(msg.sender, address(this), amount);

        _totalSupply = _totalSupply + amount;
        _balances[msg.sender] = _balances[msg.sender] + amount;

        emit Staked(msg.sender, amount);
    }

    function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
        require(amount > 0, "Cannot withdraw 0");

        _totalSupply = _totalSupply - amount;
        _balances[msg.sender] = _balances[msg.sender] - amount;

        stakingToken.safeTransfer(msg.sender, amount);

        emit Withdrawn(msg.sender, amount);
    }

    function getReward() public nonReentrant updateReward(msg.sender) {
        uint256 reward = rewards[msg.sender];
        if (reward > 0) {
            rewards[msg.sender] = 0;
            rewardsToken.safeTransfer(msg.sender, reward);
            emit RewardPaid(msg.sender, reward);
        }
    }

    function exit() external {
        withdraw(_balances[msg.sender]);
        getReward();
    }

    /* ========== RESTRICTED FUNCTIONS ========== */

    function notifyRewardAmount(uint256 reward) external onlyOwner updateReward(address(0)) {
        if (block.timestamp >= periodFinish) {
            rewardRate = reward / rewardsDuration;
        } else {
            uint256 remaining = periodFinish - block.timestamp;
            uint256 leftover = remaining * rewardRate;
            rewardRate = (reward + leftover) / rewardsDuration;
        }

        // Ensure the provided reward amount is not more than the balance in the contract.
        // This keeps the reward rate in the right range, preventing overflows due to
        // very high values of rewardRate in the earned and rewardsPerToken functions;
        // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow.
        uint balance = rewardsToken.balanceOf(address(this));
        require(rewardRate <= balance / rewardsDuration, "Provided reward too high");

        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp + rewardsDuration;
        emit RewardAdded(reward);
    }

    /* ========== MODIFIERS ========== */

    modifier updateReward(address account) {
        rewardPerTokenStored = rewardPerToken();
        lastUpdateTime = lastTimeRewardApplicable();
        if (account != address(0)) {
            rewards[account] = earned(account);
            userRewardPerTokenPaid[account] = rewardPerTokenStored;
        }
        _;
    }

    /* ========== EVENTS ========== */

    event RewardAdded(uint256 reward);
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event RewardPaid(address indexed user, uint256 reward);
}

File 2 of 7 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

File 3 of 7 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 4 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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);
}

File 5 of 7 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.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));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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");
        }
    }
}

File 6 of 7 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 7 of 7 : Owned.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Simple single owner authorization mixin.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol)
abstract contract Owned {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

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

    /*//////////////////////////////////////////////////////////////
                            OWNERSHIP STORAGE
    //////////////////////////////////////////////////////////////*/

    address public owner;

    modifier onlyOwner() virtual {
        require(msg.sender == owner, "UNAUTHORIZED");

        _;
    }

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(address _owner) {
        owner = _owner;

        emit OwnershipTransferred(address(0), _owner);
    }

    /*//////////////////////////////////////////////////////////////
                             OWNERSHIP LOGIC
    //////////////////////////////////////////////////////////////*/

    function transferOwnership(address newOwner) public virtual onlyOwner {
        owner = newOwner;

        emit OwnershipTransferred(msg.sender, newOwner);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"contract IERC20","name":"_rewardsToken","type":"address"},{"internalType":"contract IERC20","name":"_stakingToken","type":"address"},{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"stakeWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","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":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040523480156200001157600080fd5b50604051620019f3380380620019f38339810160408190526200003491620001d9565b600080546001600160a01b0319166001600160a01b03861690811782556040518692907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180556001600160a01b038316620000ce5760405162461bcd60e51b815260206004820152600e60248201526d496e76616c696420706172616d7360901b60448201526064015b60405180910390fd5b6001600160a01b038216620001175760405162461bcd60e51b815260206004820152600e60248201526d496e76616c696420706172616d7360901b6044820152606401620000c5565b6001600160a01b038416620001605760405162461bcd60e51b815260206004820152600e60248201526d496e76616c696420706172616d7360901b6044820152606401620000c5565b60008111620001a35760405162461bcd60e51b815260206004820152600e60248201526d496e76616c696420706172616d7360901b6044820152606401620000c5565b6001600160a01b03928316608052911660a05260c0525062000233565b6001600160a01b0381168114620001d657600080fd5b50565b60008060008060808587031215620001f057600080fd5b8451620001fd81620001c0565b60208601519094506200021081620001c0565b60408601519093506200022381620001c0565b6060959095015193969295505050565b60805160a05160c051611743620002b060003960008181610201015281816104370152818161071d015281816107700152818161086101526108fd0152600081816102790152818161059901528181610b9d01528181610df90152610e8401526000818161033a015281816107da0152610a0601526117436000f3fe608060405234801561001057600080fd5b506004361061018c5760003560e01c806380faa57d116100e3578063d1af0c7d1161008c578063ebe2b12b11610066578063ebe2b12b1461036d578063ecd9ba8214610376578063f2fde38b1461038957600080fd5b8063d1af0c7d14610335578063df136d651461035c578063e9fad8ee1461036557600080fd5b8063a694fc3a116100bd578063a694fc3a14610311578063c8f33c9114610324578063cd3daf9d1461032d57600080fd5b806380faa57d146102c95780638b876347146102d15780638da5cb5b146102f157600080fd5b8063386a95251161014557806370a082311161011f57806370a082311461023e57806372f702f3146102745780637b0a47ee146102c057600080fd5b8063386a9525146101fc5780633c6b16ab146102235780633d18b9121461023657600080fd5b806318160ddd1161017657806318160ddd146101d75780631c1f78eb146101df5780632e1a7d4d146101e757600080fd5b80628cc262146101915780630700037d146101b7575b600080fd5b6101a461019f3660046114f5565b61039c565b6040519081526020015b60405180910390f35b6101a46101c53660046114f5565b60076020526000908152604090205481565b6008546101a4565b6101a4610433565b6101fa6101f5366004611532565b610468565b005b6101a47f000000000000000000000000000000000000000000000000000000000000000081565b6101fa610231366004611532565b610618565b6101fa61095d565b6101a461024c3660046114f5565b73ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604090205490565b61029b7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ae565b6101a460035481565b6101a4610a85565b6101a46102df3660046114f5565b60066020526000908152604090205481565b60005461029b9073ffffffffffffffffffffffffffffffffffffffff1681565b6101fa61031f366004611532565b610a9c565b6101a460045481565b6101a4610c37565b61029b7f000000000000000000000000000000000000000000000000000000000000000081565b6101a460055481565b6101fa610c98565b6101a460025481565b6101fa61038436600461154b565b610cb9565b6101fa6103973660046114f5565b610f39565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600760209081526040808320546006909252822054670de0b6b3a7640000906103df610c37565b6103e991906115c9565b73ffffffffffffffffffffffffffffffffffffffff851660009081526009602052604090205461041991906115dc565b61042391906115f3565b61042d919061162e565b92915050565b60007f000000000000000000000000000000000000000000000000000000000000000060035461046391906115dc565b905090565b61047061102a565b33610479610c37565b600555610484610a85565b60045573ffffffffffffffffffffffffffffffffffffffff8116156104e5576104ac8161039c565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760209081526040808320939093556005546006909152919020555b60008211610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f74207769746864726177203000000000000000000000000000000060448201526064015b60405180910390fd5b8160085461056291906115c9565b600855336000908152600960205260409020546105809083906115c9565b336000818152600960205260409020919091556105d5907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16908461109d565b60405182815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a25061061560018055565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610699576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a45440000000000000000000000000000000000000000604482015260640161054b565b60006106a3610c37565b6005556106ae610a85565b60045573ffffffffffffffffffffffffffffffffffffffff81161561070f576106d68161039c565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760209081526040808320939093556005546006909152919020555b600254421061074a576107427f0000000000000000000000000000000000000000000000000000000000000000836115f3565b6003556107a9565b60004260025461075a91906115c9565b905060006003548261076c91906115dc565b90507f0000000000000000000000000000000000000000000000000000000000000000610799828661162e565b6107a391906115f3565b60035550505b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a9190611641565b90506108867f0000000000000000000000000000000000000000000000000000000000000000826115f3565b60035411156108f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f50726f76696465642072657761726420746f6f20686967680000000000000000604482015260640161054b565b426004819055610922907f00000000000000000000000000000000000000000000000000000000000000009061162e565b6002556040518381527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a1505050565b61096561102a565b3361096e610c37565b600555610979610a85565b60045573ffffffffffffffffffffffffffffffffffffffff8116156109da576109a18161039c565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760209081526040808320939093556005546006909152919020555b336000908152600760205260409020548015610a785733600081815260076020526040812055610a42907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16908361109d565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a25b5050610a8360018055565b565b60006002544210610a97575060025490565b504290565b610aa461102a565b33610aad610c37565b600555610ab8610a85565b60045573ffffffffffffffffffffffffffffffffffffffff811615610b1957610ae08161039c565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760209081526040808320939093556005546006909152919020555b60008211610b83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015260640161054b565b610bc573ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333085611176565b81600854610bd3919061162e565b60085533600090815260096020526040902054610bf190839061162e565b33600081815260096020526040908190209290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906106039085815260200190565b6000600854600003610c4a575060055490565b600854600354600454610c5b610a85565b610c6591906115c9565b610c6f91906115dc565b610c8190670de0b6b3a76400006115dc565b610c8b91906115f3565b600554610463919061162e565b33600090815260096020526040902054610cb190610468565b610a8361095d565b610cc161102a565b33610cca610c37565b600555610cd5610a85565b60045573ffffffffffffffffffffffffffffffffffffffff811615610d3657610cfd8161039c565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760209081526040808320939093556005546006909152919020555b60008611610da0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015260640161054b565b6040517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790526064810186905260ff8516608482015260a4810184905260c481018390527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063d505accf9060e401600060405180830381600087803b158015610e5257600080fd5b505af1158015610e66573d6000803e3d6000fd5b50610eae92505073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169050333089611176565b85600854610ebc919061162e565b60085533600090815260096020526040902054610eda90879061162e565b33600081815260096020526040908190209290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90610f209089815260200190565b60405180910390a250610f3260018055565b5050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610fba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a45440000000000000000000000000000000000000000604482015260640161054b565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b600260015403611096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161054b565b6002600155565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526111719084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111da565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526111d49085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016110ef565b50505050565b600061123c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166112e69092919063ffffffff16565b805190915015611171578080602001905181019061125a919061165a565b611171576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161054b565b60606112f584846000856112fd565b949350505050565b60608247101561138f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161054b565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516113b891906116a0565b60006040518083038185875af1925050503d80600081146113f5576040519150601f19603f3d011682016040523d82523d6000602084013e6113fa565b606091505b509150915061140b87838387611416565b979650505050505050565b606083156114ac5782516000036114a55773ffffffffffffffffffffffffffffffffffffffff85163b6114a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161054b565b50816112f5565b6112f583838151156114c15781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b91906116bc565b60006020828403121561150757600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461152b57600080fd5b9392505050565b60006020828403121561154457600080fd5b5035919050565b600080600080600060a0868803121561156357600080fd5b8535945060208601359350604086013560ff8116811461158257600080fd5b94979396509394606081013594506080013592915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561042d5761042d61159a565b808202811582820484141761042d5761042d61159a565b600082611629577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8082018082111561042d5761042d61159a565b60006020828403121561165357600080fd5b5051919050565b60006020828403121561166c57600080fd5b8151801515811461152b57600080fd5b60005b8381101561169757818101518382015260200161167f565b50506000910152565b600082516116b281846020870161167c565b9190910192915050565b60208152600082518060208401526116db81604085016020870161167c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220eaa132d7cbc2d6f41d7681b7b33a495ee7b17feb7eedc4fae8091b2602a52d5064736f6c634300081500330000000000000000000000004f6f977acdd1177dcd81ab83074855ecb9c2d49e0000000000000000000000006f40d4a6237c257fff2db00fa0510deeecd303eb0000000000000000000000009fb7b4477576fe5b32be4c1843afb1e55f251b33000000000000000000000000000000000000000000000000000000000076a700

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061018c5760003560e01c806380faa57d116100e3578063d1af0c7d1161008c578063ebe2b12b11610066578063ebe2b12b1461036d578063ecd9ba8214610376578063f2fde38b1461038957600080fd5b8063d1af0c7d14610335578063df136d651461035c578063e9fad8ee1461036557600080fd5b8063a694fc3a116100bd578063a694fc3a14610311578063c8f33c9114610324578063cd3daf9d1461032d57600080fd5b806380faa57d146102c95780638b876347146102d15780638da5cb5b146102f157600080fd5b8063386a95251161014557806370a082311161011f57806370a082311461023e57806372f702f3146102745780637b0a47ee146102c057600080fd5b8063386a9525146101fc5780633c6b16ab146102235780633d18b9121461023657600080fd5b806318160ddd1161017657806318160ddd146101d75780631c1f78eb146101df5780632e1a7d4d146101e757600080fd5b80628cc262146101915780630700037d146101b7575b600080fd5b6101a461019f3660046114f5565b61039c565b6040519081526020015b60405180910390f35b6101a46101c53660046114f5565b60076020526000908152604090205481565b6008546101a4565b6101a4610433565b6101fa6101f5366004611532565b610468565b005b6101a47f000000000000000000000000000000000000000000000000000000000076a70081565b6101fa610231366004611532565b610618565b6101fa61095d565b6101a461024c3660046114f5565b73ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604090205490565b61029b7f0000000000000000000000009fb7b4477576fe5b32be4c1843afb1e55f251b3381565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ae565b6101a460035481565b6101a4610a85565b6101a46102df3660046114f5565b60066020526000908152604090205481565b60005461029b9073ffffffffffffffffffffffffffffffffffffffff1681565b6101fa61031f366004611532565b610a9c565b6101a460045481565b6101a4610c37565b61029b7f0000000000000000000000006f40d4a6237c257fff2db00fa0510deeecd303eb81565b6101a460055481565b6101fa610c98565b6101a460025481565b6101fa61038436600461154b565b610cb9565b6101fa6103973660046114f5565b610f39565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600760209081526040808320546006909252822054670de0b6b3a7640000906103df610c37565b6103e991906115c9565b73ffffffffffffffffffffffffffffffffffffffff851660009081526009602052604090205461041991906115dc565b61042391906115f3565b61042d919061162e565b92915050565b60007f000000000000000000000000000000000000000000000000000000000076a70060035461046391906115dc565b905090565b61047061102a565b33610479610c37565b600555610484610a85565b60045573ffffffffffffffffffffffffffffffffffffffff8116156104e5576104ac8161039c565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760209081526040808320939093556005546006909152919020555b60008211610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f43616e6e6f74207769746864726177203000000000000000000000000000000060448201526064015b60405180910390fd5b8160085461056291906115c9565b600855336000908152600960205260409020546105809083906115c9565b336000818152600960205260409020919091556105d5907f0000000000000000000000009fb7b4477576fe5b32be4c1843afb1e55f251b3373ffffffffffffffffffffffffffffffffffffffff16908461109d565b60405182815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a25061061560018055565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610699576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a45440000000000000000000000000000000000000000604482015260640161054b565b60006106a3610c37565b6005556106ae610a85565b60045573ffffffffffffffffffffffffffffffffffffffff81161561070f576106d68161039c565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760209081526040808320939093556005546006909152919020555b600254421061074a576107427f000000000000000000000000000000000000000000000000000000000076a700836115f3565b6003556107a9565b60004260025461075a91906115c9565b905060006003548261076c91906115dc565b90507f000000000000000000000000000000000000000000000000000000000076a700610799828661162e565b6107a391906115f3565b60035550505b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f0000000000000000000000006f40d4a6237c257fff2db00fa0510deeecd303eb73ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a9190611641565b90506108867f000000000000000000000000000000000000000000000000000000000076a700826115f3565b60035411156108f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f50726f76696465642072657761726420746f6f20686967680000000000000000604482015260640161054b565b426004819055610922907f000000000000000000000000000000000000000000000000000000000076a7009061162e565b6002556040518381527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a1505050565b61096561102a565b3361096e610c37565b600555610979610a85565b60045573ffffffffffffffffffffffffffffffffffffffff8116156109da576109a18161039c565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760209081526040808320939093556005546006909152919020555b336000908152600760205260409020548015610a785733600081815260076020526040812055610a42907f0000000000000000000000006f40d4a6237c257fff2db00fa0510deeecd303eb73ffffffffffffffffffffffffffffffffffffffff16908361109d565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a25b5050610a8360018055565b565b60006002544210610a97575060025490565b504290565b610aa461102a565b33610aad610c37565b600555610ab8610a85565b60045573ffffffffffffffffffffffffffffffffffffffff811615610b1957610ae08161039c565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760209081526040808320939093556005546006909152919020555b60008211610b83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015260640161054b565b610bc573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000009fb7b4477576fe5b32be4c1843afb1e55f251b3316333085611176565b81600854610bd3919061162e565b60085533600090815260096020526040902054610bf190839061162e565b33600081815260096020526040908190209290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906106039085815260200190565b6000600854600003610c4a575060055490565b600854600354600454610c5b610a85565b610c6591906115c9565b610c6f91906115dc565b610c8190670de0b6b3a76400006115dc565b610c8b91906115f3565b600554610463919061162e565b33600090815260096020526040902054610cb190610468565b610a8361095d565b610cc161102a565b33610cca610c37565b600555610cd5610a85565b60045573ffffffffffffffffffffffffffffffffffffffff811615610d3657610cfd8161039c565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600760209081526040808320939093556005546006909152919020555b60008611610da0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015260640161054b565b6040517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790526064810186905260ff8516608482015260a4810184905260c481018390527f0000000000000000000000009fb7b4477576fe5b32be4c1843afb1e55f251b3373ffffffffffffffffffffffffffffffffffffffff169063d505accf9060e401600060405180830381600087803b158015610e5257600080fd5b505af1158015610e66573d6000803e3d6000fd5b50610eae92505073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000009fb7b4477576fe5b32be4c1843afb1e55f251b33169050333089611176565b85600854610ebc919061162e565b60085533600090815260096020526040902054610eda90879061162e565b33600081815260096020526040908190209290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90610f209089815260200190565b60405180910390a250610f3260018055565b5050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610fba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a45440000000000000000000000000000000000000000604482015260640161054b565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b600260015403611096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161054b565b6002600155565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526111719084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111da565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526111d49085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016110ef565b50505050565b600061123c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166112e69092919063ffffffff16565b805190915015611171578080602001905181019061125a919061165a565b611171576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161054b565b60606112f584846000856112fd565b949350505050565b60608247101561138f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161054b565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516113b891906116a0565b60006040518083038185875af1925050503d80600081146113f5576040519150601f19603f3d011682016040523d82523d6000602084013e6113fa565b606091505b509150915061140b87838387611416565b979650505050505050565b606083156114ac5782516000036114a55773ffffffffffffffffffffffffffffffffffffffff85163b6114a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161054b565b50816112f5565b6112f583838151156114c15781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b91906116bc565b60006020828403121561150757600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461152b57600080fd5b9392505050565b60006020828403121561154457600080fd5b5035919050565b600080600080600060a0868803121561156357600080fd5b8535945060208601359350604086013560ff8116811461158257600080fd5b94979396509394606081013594506080013592915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561042d5761042d61159a565b808202811582820484141761042d5761042d61159a565b600082611629577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8082018082111561042d5761042d61159a565b60006020828403121561165357600080fd5b5051919050565b60006020828403121561166c57600080fd5b8151801515811461152b57600080fd5b60005b8381101561169757818101518382015260200161167f565b50506000910152565b600082516116b281846020870161167c565b9190910192915050565b60208152600082518060208401526116db81604085016020870161167c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220eaa132d7cbc2d6f41d7681b7b33a495ee7b17feb7eedc4fae8091b2602a52d5064736f6c63430008150033

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

0000000000000000000000004f6f977acdd1177dcd81ab83074855ecb9c2d49e0000000000000000000000006f40d4a6237c257fff2db00fa0510deeecd303eb0000000000000000000000009fb7b4477576fe5b32be4c1843afb1e55f251b33000000000000000000000000000000000000000000000000000000000076a700

-----Decoded View---------------
Arg [0] : _owner (address): 0x4F6F977aCDD1177DCD81aB83074855EcB9C2D49e
Arg [1] : _rewardsToken (address): 0x6f40d4A6237C257fff2dB00FA0510DeEECd303eb
Arg [2] : _stakingToken (address): 0x9Fb7b4477576Fe5B32be4C1843aFB1e55F251B33
Arg [3] : _rewardsDuration (uint256): 7776000

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000004f6f977acdd1177dcd81ab83074855ecb9c2d49e
Arg [1] : 0000000000000000000000006f40d4a6237c257fff2db00fa0510deeecd303eb
Arg [2] : 0000000000000000000000009fb7b4477576fe5b32be4c1843afb1e55f251b33
Arg [3] : 000000000000000000000000000000000000000000000000000000000076a700


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  ]
[ 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.