ETH Price: $3,361.80 (-2.15%)

Contract

0xb89494aB70001A2F25372b5E962046908188feEa
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unstake196565642024-04-14 21:50:47226 days ago1713131447IN
Flashstake: FlashBack Staking
0 ETH0.0007030910.21372277
Unstake196565602024-04-14 21:49:59226 days ago1713131399IN
Flashstake: FlashBack Staking
0 ETH0.0009157611.09777206
Unstake194803162024-03-21 3:17:35251 days ago1710991055IN
Flashstake: FlashBack Staking
0 ETH0.0021893426.53493904
Unstake192558352024-02-18 16:20:47282 days ago1708273247IN
Flashstake: FlashBack Staking
0 ETH0.0026316731.89219166
Unstake189875202024-01-12 1:23:47320 days ago1705022627IN
Flashstake: FlashBack Staking
0 ETH0.001678820.34475532
Unstake189168862024-01-02 2:59:11330 days ago1704164351IN
Flashstake: FlashBack Staking
0 ETH0.0009664414.03937791
Unstake188725282023-12-26 21:25:35336 days ago1703625935IN
Flashstake: FlashBack Staking
0 ETH0.0017663821.40870469
Unstake188719352023-12-26 19:25:35336 days ago1703618735IN
Flashstake: FlashBack Staking
0 ETH0.0014779821.47353862
Unstake187792472023-12-13 19:12:23349 days ago1702494743IN
Flashstake: FlashBack Staking
0 ETH0.0050638361.36638049
Unstake187659702023-12-11 22:34:47351 days ago1702334087IN
Flashstake: FlashBack Staking
0 ETH0.0009748345.97430919
Unstake187180062023-12-05 5:17:23357 days ago1701753443IN
Flashstake: FlashBack Staking
0 ETH0.0029904243.44150932
Unstake186557562023-11-26 12:09:35366 days ago1701000575IN
Flashstake: FlashBack Staking
0 ETH0.0019676723.84831352
Unstake186167662023-11-21 1:08:35372 days ago1700528915IN
Flashstake: FlashBack Staking
0 ETH0.004274562.10420756
Unstake186106762023-11-20 4:40:11372 days ago1700455211IN
Flashstake: FlashBack Staking
0 ETH0.0046747467.91928165
Unstake185868332023-11-16 20:27:35376 days ago1700166455IN
Flashstake: FlashBack Staking
0 ETH0.0029307542.58090783
Unstake185868292023-11-16 20:26:47376 days ago1700166407IN
Flashstake: FlashBack Staking
0 ETH0.0026659338.73327588
Unstake185868232023-11-16 20:25:35376 days ago1700166335IN
Flashstake: FlashBack Staking
0 ETH0.0028588941.53679725
Unstake185559202023-11-12 12:46:23380 days ago1699793183IN
Flashstake: FlashBack Staking
0 ETH0.0022447132.60868344
Unstake185558982023-11-12 12:41:59380 days ago1699792919IN
Flashstake: FlashBack Staking
0 ETH0.0026294931.86571176
Unstake185173302023-11-07 3:14:35386 days ago1699326875IN
Flashstake: FlashBack Staking
0 ETH0.0016869524.50615886
Unstake185173272023-11-07 3:13:59386 days ago1699326839IN
Flashstake: FlashBack Staking
0 ETH0.0017557725.50595533
Unstake185173242023-11-07 3:13:23386 days ago1699326803IN
Flashstake: FlashBack Staking
0 ETH0.0017893125.99317768
Unstake185173172023-11-07 3:11:59386 days ago1699326719IN
Flashstake: FlashBack Staking
0 ETH0.0017494325.41377045
Unstake185047562023-11-05 8:55:59387 days ago1699174559IN
Flashstake: FlashBack Staking
0 ETH0.0014514317.5893615
Unstake184839532023-11-02 10:58:11390 days ago1698922691IN
Flashstake: FlashBack Staking
0 ETH0.0016416719.89480671
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FlashBack

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 6 : FlashBack.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

contract FlashBack is Ownable {
    using SafeERC20 for IERC20;

    address public immutable stakingTokenAddress;
    address public immutable rewardTokenAddress;
    uint256 public immutable minimumStakeDuration;
    uint256 public immutable maximumStakeDuration;

    uint256 public totalReservedRewards;
    uint256 public totalLockedAmount;
    address public forfeitRewardAddress = 0x8603FfE7B00CCd759f28aBfE448454A24cFba581;

    uint256 public maxAPR = 1;

    struct StakeStruct {
        address stakerAddress;
        uint256 stakedAmount;
        uint256 reservedReward;
        uint256 stakeStartTs;
        uint256 stakeDuration;
        bool active;
    }
    mapping(uint256 => StakeStruct) public stakes;
    uint256 public stakeCount = 0;

    event Staked(uint256 stakeId, uint256 _amount, uint256 _duration);
    event Unstaked(uint256 stakeId, uint256 _reward, uint256 _rewardForfeited);
    event ForfeitRewardAddressChange(address _forfeitRewardAddress);
    event MaxAPRChange(uint256 _newMaxAPR);

    constructor(
        address _stakingTokenAddress,
        address _rewardTokenAddress,
        uint256 _minimumStakeDuration,
        uint256 _maximumStakeDuration
    ) public {
        stakingTokenAddress = _stakingTokenAddress;
        rewardTokenAddress = _rewardTokenAddress;
        minimumStakeDuration = _minimumStakeDuration;
        maximumStakeDuration = _maximumStakeDuration;
    }

    function stake(
        uint256 _amount,
        uint256 _duration,
        uint256 _minimumReward
    ) external returns (uint256) {
        require(msg.sender != 0x5089722613C2cCEe071C39C59e9889641f435F15, "BLACKLISTED ADDRESS");
        require(msg.sender != 0x8603FfE7B00CCd759f28aBfE448454A24cFba581, "BLACKLISTED ADDRESS");

        uint256 reward = calculateReward(_amount, _duration);
        require(reward >= _minimumReward, "MINIMUM REWARD NOT MET");

        // Transfer tokens from user into contract
        IERC20(stakingTokenAddress).safeTransferFrom(msg.sender, address(this), _amount);

        // Reserve the reward amount
        totalReservedRewards = totalReservedRewards + reward;
        totalLockedAmount = totalLockedAmount + _amount;

        // Store stake info
        stakeCount = stakeCount + 1;
        stakes[stakeCount] = StakeStruct(msg.sender, _amount, reward, block.timestamp, _duration, true);

        emit Staked(stakeCount, _amount, _duration);

        return stakeCount;
    }

    function unstake(uint256 _stakeId) external {
        StakeStruct memory p = stakes[_stakeId];

        // Determine if the stake exists
        require(p.active == true, "INVALID STAKE");
        require(p.stakerAddress == msg.sender, "NOT OWNER OF STAKE");
        require(block.timestamp > (p.stakeStartTs + minimumStakeDuration), "DURATION < MINIMUM");

        // Determine whether stake ended or user is unstaking early
        bool unstakedEarly = (p.stakeStartTs + p.stakeDuration) > block.timestamp;

        totalReservedRewards = totalReservedRewards - p.reservedReward;
        totalLockedAmount = totalLockedAmount - p.stakedAmount;

        // Transfer back originally staked tokens and reward (if duration ended)
        if (unstakedEarly) {
            IERC20(stakingTokenAddress).safeTransfer(msg.sender, p.stakedAmount);
            IERC20(rewardTokenAddress).safeTransfer(forfeitRewardAddress, p.reservedReward);

            emit Unstaked(_stakeId, 0, p.reservedReward);
        } else {
            IERC20(stakingTokenAddress).safeTransfer(msg.sender, p.stakedAmount);
            IERC20(rewardTokenAddress).safeTransfer(msg.sender, p.reservedReward);

            emit Unstaked(_stakeId, p.reservedReward, 0);
        }

        delete stakes[_stakeId];
    }

    function calculateReward(uint256 _amount, uint256 _duration) public view returns (uint256) {
        require(_amount > 0, "INSUFFICIENT INPUT");
        require(_duration >= minimumStakeDuration, "DURATION < MINIMUM");
        require(_duration <= maximumStakeDuration, "DURATION > MAXIMUM");

        uint256 reward = ((_duration**2) * (maxAPR * _amount)) / ((10000 * 994519296000000));

        uint256 rewardsAvailable = getAvailableRewards();
        if (reward > rewardsAvailable) {
            reward = rewardsAvailable;
        }
        require(reward > 0, "INSUFFICIENT OUTPUT");

        return reward;
    }

    function setForfeitRewardAddress(address _forfeitRewardAddress) external onlyOwner {
        forfeitRewardAddress = _forfeitRewardAddress;
        emit ForfeitRewardAddressChange(_forfeitRewardAddress);
    }

    function setMaxAPR(uint256 _newMaxAPR) external onlyOwner {
        maxAPR = _newMaxAPR;
        emit MaxAPRChange(_newMaxAPR);
    }

    function getAvailableRewards() public view returns (uint256) {
        // In the event the staking token and reward token are the same
        if (stakingTokenAddress == rewardTokenAddress) {
            return IERC20(stakingTokenAddress).balanceOf(address(this)) - totalReservedRewards - totalLockedAmount;
        } else {
            // In the event they are different
            return IERC20(rewardTokenAddress).balanceOf(address(this)) - totalReservedRewards;
        }
    }
}

File 2 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/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.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

File 3 of 6 : 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 4 of 6 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 5 of 6 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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;
    }
}

File 6 of 6 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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 functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_stakingTokenAddress","type":"address"},{"internalType":"address","name":"_rewardTokenAddress","type":"address"},{"internalType":"uint256","name":"_minimumStakeDuration","type":"uint256"},{"internalType":"uint256","name":"_maximumStakeDuration","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_forfeitRewardAddress","type":"address"}],"name":"ForfeitRewardAddressChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_newMaxAPR","type":"uint256"}],"name":"MaxAPRChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"stakeId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"stakeId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_rewardForfeited","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"calculateReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forfeitRewardAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAPR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maximumStakeDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumStakeDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_forfeitRewardAddress","type":"address"}],"name":"setForfeitRewardAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMaxAPR","type":"uint256"}],"name":"setMaxAPR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"uint256","name":"_minimumReward","type":"uint256"}],"name":"stake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakes","outputs":[{"internalType":"address","name":"stakerAddress","type":"address"},{"internalType":"uint256","name":"stakedAmount","type":"uint256"},{"internalType":"uint256","name":"reservedReward","type":"uint256"},{"internalType":"uint256","name":"stakeStartTs","type":"uint256"},{"internalType":"uint256","name":"stakeDuration","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalLockedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReservedRewards","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":"_stakeId","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"}]

610100604052600380546001600160a01b031916738603ffe7b00ccd759f28abfe448454a24cfba581179055600160045560006006553480156200004257600080fd5b50604051620017cd380380620017cd833981016040819052620000659162000101565b620000703362000094565b6001600160a01b039384166080529190921660a05260c09190915260e05262000149565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000fc57600080fd5b919050565b600080600080608085870312156200011857600080fd5b6200012385620000e4565b93506200013360208601620000e4565b6040860151606090960151949790965092505050565b60805160a05160c05160e0516115f6620001d760003960008181610348015261043a015260008181610256015281816103ca0152610660015260008181610177015281816107770152818161083701528181610de20152610f080152600081816101de01528181610739015281816107fc01528181610a8801528181610e0c0152610e5501526115f66000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c8063969247b2116100cd578063e010f10211610081578063f2fde38b11610066578063f2fde38b14610330578063f76f9c2714610343578063fc9c99ac1461036a57600080fd5b8063e010f1021461030a578063e6c128f01461031d57600080fd5b8063a8bd7300116100b2578063a8bd730014610251578063c4a9e11614610278578063d5a44f861461028157600080fd5b8063969247b214610235578063a638f2e21461023e57600080fd5b80635298b869116101245780635f7f2a4c116101095780635f7f2a4c14610209578063715018a61461021c5780638da5cb5b1461022457600080fd5b80635298b869146101d957806353704f9a1461020057600080fd5b806305a9f27414610156578063125f9e331461017257806313ed0846146101b15780632e17de78146101c4575b600080fd5b61015f60025481565b6040519081526020015b60405180910390f35b6101997f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610169565b61015f6101bf36600461132a565b610372565b6101d76101d236600461134c565b610554565b005b6101997f000000000000000000000000000000000000000000000000000000000000000081565b61015f60045481565b600354610199906001600160a01b031681565b6101d76108ed565b6000546001600160a01b0316610199565b61015f60015481565b61015f61024c366004611365565b610953565b61015f7f000000000000000000000000000000000000000000000000000000000000000081565b61015f60065481565b6102d161028f36600461134c565b60056020819052600091825260409091208054600182015460028301546003840154600485015494909501546001600160a01b03909316949193909260ff1686565b604080516001600160a01b03909716875260208701959095529385019290925260608401526080830152151560a082015260c001610169565b6101d761031836600461134c565b610bbe565b6101d761032b366004611391565b610c54565b6101d761033e366004611391565b610cfc565b61015f7f000000000000000000000000000000000000000000000000000000000000000081565b61015f610dde565b60008083116103c85760405162461bcd60e51b815260206004820152601260248201527f494e53554646494349454e5420494e505554000000000000000000000000000060448201526064015b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000008210156104385760405162461bcd60e51b815260206004820152601260248201527f4455524154494f4e203c204d494e494d554d000000000000000000000000000060448201526064016103bf565b7f00000000000000000000000000000000000000000000000000000000000000008211156104a85760405162461bcd60e51b815260206004820152601260248201527f4455524154494f4e203e204d4158494d554d000000000000000000000000000060448201526064016103bf565b6000678a046c4e23840000846004546104c191906113d0565b6104cc6002866114d3565b6104d691906113d0565b6104e091906114e2565b905060006104ec610dde565b9050808211156104fa578091505b6000821161054a5760405162461bcd60e51b815260206004820152601360248201527f494e53554646494349454e54204f55545055540000000000000000000000000060448201526064016103bf565b5090505b92915050565b600081815260056020818152604092839020835160c08101855281546001600160a01b031681526001808301549382019390935260028201549481019490945260038101546060850152600481015460808501529091015460ff16151560a08301819052146106055760405162461bcd60e51b815260206004820152600d60248201527f494e56414c4944205354414b450000000000000000000000000000000000000060448201526064016103bf565b80516001600160a01b0316331461065e5760405162461bcd60e51b815260206004820152601260248201527f4e4f54204f574e4552204f46205354414b45000000000000000000000000000060448201526064016103bf565b7f0000000000000000000000000000000000000000000000000000000000000000816060015161068e9190611504565b42116106dc5760405162461bcd60e51b815260206004820152601260248201527f4455524154494f4e203c204d494e494d554d000000000000000000000000000060448201526064016103bf565b600042826080015183606001516106f39190611504565b1190508160400151600154610708919061151c565b600155602082015160025461071d919061151c565b60025580156107e9576020820151610761906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016903390610f8a565b60035460408301516107a1916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811692911690610f8a565b604080830151815185815260006020820152918201527f6d53ab8a75d9106d01c9ba0ac2e389ffb405989741a1a51c3791492b219fc80d9060600160405180910390a16108a5565b6020820151610824906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016903390610f8a565b604082015161085f906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016903390610f8a565b6040828101518151858152602081019190915260008183015290517f6d53ab8a75d9106d01c9ba0ac2e389ffb405989741a1a51c3791492b219fc80d9181900360600190a15b50506000908152600560208190526040822080546001600160a01b0319168155600181018390556002810183905560038101839055600481019290925501805460ff19169055565b6000546001600160a01b031633146109475760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bf565b610951600061101f565b565b6000735089722613c2ccee071c39c59e9889641f435f153314156109b95760405162461bcd60e51b815260206004820152601360248201527f424c41434b4c495354454420414444524553530000000000000000000000000060448201526064016103bf565b738603ffe7b00ccd759f28abfe448454a24cfba581331415610a1d5760405162461bcd60e51b815260206004820152601360248201527f424c41434b4c495354454420414444524553530000000000000000000000000060448201526064016103bf565b6000610a298585610372565b905082811015610a7b5760405162461bcd60e51b815260206004820152601660248201527f4d494e494d554d20524557415244204e4f54204d45540000000000000000000060448201526064016103bf565b610ab06001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308861106f565b80600154610abe9190611504565b600155600254610acf908690611504565b600255600654610ae0906001611504565b60068181556040805160c08101825233815260208082018a8152828401878152426060808601918252608086018d8152600160a0880181815260009b8c5260058089529b8a9020985189546001600160a01b0319166001600160a01b03909116178955955190880155925160028701559051600386015590516004850155905192909501805460ff1916921515929092179091559154815190815291820188905281018690527fc8acfabcfb3af3df23b7b8a1aa1371d042bee71e137eeedc881ffa8f3c446261910160405180910390a150506006545b9392505050565b6000546001600160a01b03163314610c185760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bf565b60048190556040518181527f12a76215ee46707bdb7910faa9320745d69004b4423e54266253a92d4731e6b9906020015b60405180910390a150565b6000546001600160a01b03163314610cae5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bf565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f81fb2e0eb7409d060f9d659957bd41e38cf531bb4a18f23034b0f53c0901ec1f90602001610c49565b6000546001600160a01b03163314610d565760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bf565b6001600160a01b038116610dd25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103bf565b610ddb8161101f565b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161415610ef0576002546001546040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015610e9f57600080fd5b505afa158015610eb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed79190611533565b610ee1919061151c565b610eeb919061151c565b905090565b6001546040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015610f5257600080fd5b505afa158015610f66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee19190611533565b6040516001600160a01b03831660248201526044810182905261101a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526110ad565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526110a79085906323b872dd60e01b90608401610fb6565b50505050565b6000611102826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111929092919063ffffffff16565b80519091501561101a5780806020019051810190611120919061154c565b61101a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103bf565b60606111a184846000856111a9565b949350505050565b6060824710156112215760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103bf565b6001600160a01b0385163b6112785760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103bf565b600080866001600160a01b03168587604051611294919061159a565b60006040518083038185875af1925050503d80600081146112d1576040519150601f19603f3d011682016040523d82523d6000602084013e6112d6565b606091505b50915091506112e68282866112f1565b979650505050505050565b60608315611300575081610bb7565b8251156113105782518084602001fd5b8160405162461bcd60e51b81526004016103bf91906115b6565b6000806040838503121561133d57600080fd5b50508035926020909101359150565b60006020828403121561135e57600080fd5b5035919050565b60008060006060848603121561137a57600080fd5b505081359360208301359350604090920135919050565b6000602082840312156113a357600080fd5b81356001600160a01b0381168114610bb757600080fd5b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156113ea576113ea6113ba565b500290565b600181815b8085111561142a578160001904821115611410576114106113ba565b8085161561141d57918102915b93841c93908002906113f4565b509250929050565b6000826114415750600161054e565b8161144e5750600061054e565b8160018114611464576002811461146e5761148a565b600191505061054e565b60ff84111561147f5761147f6113ba565b50506001821b61054e565b5060208310610133831016604e8410600b84101617156114ad575081810a61054e565b6114b783836113ef565b80600019048211156114cb576114cb6113ba565b029392505050565b6000610bb760ff841683611432565b6000826114ff57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611517576115176113ba565b500190565b60008282101561152e5761152e6113ba565b500390565b60006020828403121561154557600080fd5b5051919050565b60006020828403121561155e57600080fd5b81518015158114610bb757600080fd5b60005b83811015611589578181015183820152602001611571565b838111156110a75750506000910152565b600082516115ac81846020870161156e565b9190910192915050565b60208152600082518060208401526115d581604085016020870161156e565b601f01601f1916919091016040019291505056fea164736f6c6343000809000a000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f8000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f800000000000000000000000000000000000000000000000000000000000d2f000000000000000000000000000000000000000000000000000000000001e13380

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101515760003560e01c8063969247b2116100cd578063e010f10211610081578063f2fde38b11610066578063f2fde38b14610330578063f76f9c2714610343578063fc9c99ac1461036a57600080fd5b8063e010f1021461030a578063e6c128f01461031d57600080fd5b8063a8bd7300116100b2578063a8bd730014610251578063c4a9e11614610278578063d5a44f861461028157600080fd5b8063969247b214610235578063a638f2e21461023e57600080fd5b80635298b869116101245780635f7f2a4c116101095780635f7f2a4c14610209578063715018a61461021c5780638da5cb5b1461022457600080fd5b80635298b869146101d957806353704f9a1461020057600080fd5b806305a9f27414610156578063125f9e331461017257806313ed0846146101b15780632e17de78146101c4575b600080fd5b61015f60025481565b6040519081526020015b60405180910390f35b6101997f000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f881565b6040516001600160a01b039091168152602001610169565b61015f6101bf36600461132a565b610372565b6101d76101d236600461134c565b610554565b005b6101997f000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f881565b61015f60045481565b600354610199906001600160a01b031681565b6101d76108ed565b6000546001600160a01b0316610199565b61015f60015481565b61015f61024c366004611365565b610953565b61015f7f00000000000000000000000000000000000000000000000000000000000d2f0081565b61015f60065481565b6102d161028f36600461134c565b60056020819052600091825260409091208054600182015460028301546003840154600485015494909501546001600160a01b03909316949193909260ff1686565b604080516001600160a01b03909716875260208701959095529385019290925260608401526080830152151560a082015260c001610169565b6101d761031836600461134c565b610bbe565b6101d761032b366004611391565b610c54565b6101d761033e366004611391565b610cfc565b61015f7f0000000000000000000000000000000000000000000000000000000001e1338081565b61015f610dde565b60008083116103c85760405162461bcd60e51b815260206004820152601260248201527f494e53554646494349454e5420494e505554000000000000000000000000000060448201526064015b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000d2f008210156104385760405162461bcd60e51b815260206004820152601260248201527f4455524154494f4e203c204d494e494d554d000000000000000000000000000060448201526064016103bf565b7f0000000000000000000000000000000000000000000000000000000001e133808211156104a85760405162461bcd60e51b815260206004820152601260248201527f4455524154494f4e203e204d4158494d554d000000000000000000000000000060448201526064016103bf565b6000678a046c4e23840000846004546104c191906113d0565b6104cc6002866114d3565b6104d691906113d0565b6104e091906114e2565b905060006104ec610dde565b9050808211156104fa578091505b6000821161054a5760405162461bcd60e51b815260206004820152601360248201527f494e53554646494349454e54204f55545055540000000000000000000000000060448201526064016103bf565b5090505b92915050565b600081815260056020818152604092839020835160c08101855281546001600160a01b031681526001808301549382019390935260028201549481019490945260038101546060850152600481015460808501529091015460ff16151560a08301819052146106055760405162461bcd60e51b815260206004820152600d60248201527f494e56414c4944205354414b450000000000000000000000000000000000000060448201526064016103bf565b80516001600160a01b0316331461065e5760405162461bcd60e51b815260206004820152601260248201527f4e4f54204f574e4552204f46205354414b45000000000000000000000000000060448201526064016103bf565b7f00000000000000000000000000000000000000000000000000000000000d2f00816060015161068e9190611504565b42116106dc5760405162461bcd60e51b815260206004820152601260248201527f4455524154494f4e203c204d494e494d554d000000000000000000000000000060448201526064016103bf565b600042826080015183606001516106f39190611504565b1190508160400151600154610708919061151c565b600155602082015160025461071d919061151c565b60025580156107e9576020820151610761906001600160a01b037f000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f816903390610f8a565b60035460408301516107a1916001600160a01b037f000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f8811692911690610f8a565b604080830151815185815260006020820152918201527f6d53ab8a75d9106d01c9ba0ac2e389ffb405989741a1a51c3791492b219fc80d9060600160405180910390a16108a5565b6020820151610824906001600160a01b037f000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f816903390610f8a565b604082015161085f906001600160a01b037f000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f816903390610f8a565b6040828101518151858152602081019190915260008183015290517f6d53ab8a75d9106d01c9ba0ac2e389ffb405989741a1a51c3791492b219fc80d9181900360600190a15b50506000908152600560208190526040822080546001600160a01b0319168155600181018390556002810183905560038101839055600481019290925501805460ff19169055565b6000546001600160a01b031633146109475760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bf565b610951600061101f565b565b6000735089722613c2ccee071c39c59e9889641f435f153314156109b95760405162461bcd60e51b815260206004820152601360248201527f424c41434b4c495354454420414444524553530000000000000000000000000060448201526064016103bf565b738603ffe7b00ccd759f28abfe448454a24cfba581331415610a1d5760405162461bcd60e51b815260206004820152601360248201527f424c41434b4c495354454420414444524553530000000000000000000000000060448201526064016103bf565b6000610a298585610372565b905082811015610a7b5760405162461bcd60e51b815260206004820152601660248201527f4d494e494d554d20524557415244204e4f54204d45540000000000000000000060448201526064016103bf565b610ab06001600160a01b037f000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f81633308861106f565b80600154610abe9190611504565b600155600254610acf908690611504565b600255600654610ae0906001611504565b60068181556040805160c08101825233815260208082018a8152828401878152426060808601918252608086018d8152600160a0880181815260009b8c5260058089529b8a9020985189546001600160a01b0319166001600160a01b03909116178955955190880155925160028701559051600386015590516004850155905192909501805460ff1916921515929092179091559154815190815291820188905281018690527fc8acfabcfb3af3df23b7b8a1aa1371d042bee71e137eeedc881ffa8f3c446261910160405180910390a150506006545b9392505050565b6000546001600160a01b03163314610c185760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bf565b60048190556040518181527f12a76215ee46707bdb7910faa9320745d69004b4423e54266253a92d4731e6b9906020015b60405180910390a150565b6000546001600160a01b03163314610cae5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bf565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f81fb2e0eb7409d060f9d659957bd41e38cf531bb4a18f23034b0f53c0901ec1f90602001610c49565b6000546001600160a01b03163314610d565760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103bf565b6001600160a01b038116610dd25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103bf565b610ddb8161101f565b50565b60007f000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f86001600160a01b03167f000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f86001600160a01b03161415610ef0576002546001546040516370a0823160e01b81523060048201527f000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f86001600160a01b0316906370a082319060240160206040518083038186803b158015610e9f57600080fd5b505afa158015610eb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed79190611533565b610ee1919061151c565b610eeb919061151c565b905090565b6001546040516370a0823160e01b81523060048201527f000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f86001600160a01b0316906370a082319060240160206040518083038186803b158015610f5257600080fd5b505afa158015610f66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee19190611533565b6040516001600160a01b03831660248201526044810182905261101a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526110ad565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526110a79085906323b872dd60e01b90608401610fb6565b50505050565b6000611102826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111929092919063ffffffff16565b80519091501561101a5780806020019051810190611120919061154c565b61101a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103bf565b60606111a184846000856111a9565b949350505050565b6060824710156112215760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103bf565b6001600160a01b0385163b6112785760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103bf565b600080866001600160a01b03168587604051611294919061159a565b60006040518083038185875af1925050503d80600081146112d1576040519150601f19603f3d011682016040523d82523d6000602084013e6112d6565b606091505b50915091506112e68282866112f1565b979650505050505050565b60608315611300575081610bb7565b8251156113105782518084602001fd5b8160405162461bcd60e51b81526004016103bf91906115b6565b6000806040838503121561133d57600080fd5b50508035926020909101359150565b60006020828403121561135e57600080fd5b5035919050565b60008060006060848603121561137a57600080fd5b505081359360208301359350604090920135919050565b6000602082840312156113a357600080fd5b81356001600160a01b0381168114610bb757600080fd5b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156113ea576113ea6113ba565b500290565b600181815b8085111561142a578160001904821115611410576114106113ba565b8085161561141d57918102915b93841c93908002906113f4565b509250929050565b6000826114415750600161054e565b8161144e5750600061054e565b8160018114611464576002811461146e5761148a565b600191505061054e565b60ff84111561147f5761147f6113ba565b50506001821b61054e565b5060208310610133831016604e8410600b84101617156114ad575081810a61054e565b6114b783836113ef565b80600019048211156114cb576114cb6113ba565b029392505050565b6000610bb760ff841683611432565b6000826114ff57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611517576115176113ba565b500190565b60008282101561152e5761152e6113ba565b500390565b60006020828403121561154557600080fd5b5051919050565b60006020828403121561155e57600080fd5b81518015158114610bb757600080fd5b60005b83811015611589578181015183820152602001611571565b838111156110a75750506000910152565b600082516115ac81846020870161156e565b9190910192915050565b60208152600082518060208401526115d581604085016020870161156e565b601f01601f1916919091016040019291505056fea164736f6c6343000809000a

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

000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f8000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f800000000000000000000000000000000000000000000000000000000000d2f000000000000000000000000000000000000000000000000000000000001e13380

-----Decoded View---------------
Arg [0] : _stakingTokenAddress (address): 0xB1f1F47061A7Be15C69f378CB3f69423bD58F2F8
Arg [1] : _rewardTokenAddress (address): 0xB1f1F47061A7Be15C69f378CB3f69423bD58F2F8
Arg [2] : _minimumStakeDuration (uint256): 864000
Arg [3] : _maximumStakeDuration (uint256): 31536000

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f8
Arg [1] : 000000000000000000000000b1f1f47061a7be15c69f378cb3f69423bd58f2f8
Arg [2] : 00000000000000000000000000000000000000000000000000000000000d2f00
Arg [3] : 0000000000000000000000000000000000000000000000000000000001e13380


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

OVERVIEW

This contract allows Flash holders to Stake their Flash for a set duration and earn up to 100% additional Flash at the end of their stake.

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.