ETH Price: $2,964.39 (+0.87%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Transaction Hash
Method
Block
From
To
Stake227811682025-06-25 11:30:5918 days ago1750851059IN
0x6701E792...14A4b4943
0 ETH0.000957493.28948052
Unstake224725812025-05-13 6:40:3561 days ago1747118435IN
0x6701E792...14A4b4943
0 ETH0.000289622.18537211
Unstake224484222025-05-09 21:01:3565 days ago1746824495IN
0x6701E792...14A4b4943
0 ETH0.000184521.59829419
Unstake223766442025-04-29 18:56:5975 days ago1745953019IN
0x6701E792...14A4b4943
0 ETH0.00011780.44628599
Unstake222687152025-04-14 17:27:4790 days ago1744651667IN
0x6701E792...14A4b4943
0 ETH0.000327752.2
Unstake222443002025-04-11 7:47:3593 days ago1744357655IN
0x6701E792...14A4b4943
0 ETH0.000163950.94431905
Unstake222129362025-04-06 22:45:5998 days ago1743979559IN
0x6701E792...14A4b4943
0 ETH0.000355993.3
Unstake222000662025-04-05 3:35:3599 days ago1743824135IN
0x6701E792...14A4b4943
0 ETH0.00012870.97113974
Unstake221823082025-04-02 16:05:47102 days ago1743609947IN
0x6701E792...14A4b4943
0 ETH0.000340322.05748289
Unstake221629872025-03-30 23:22:47104 days ago1743376967IN
0x6701E792...14A4b4943
0 ETH0.000238321.6
Unstake221079632025-03-23 7:00:59112 days ago1742713259IN
0x6701E792...14A4b4943
0 ETH0.000091170.41802247
Unstake220072872025-03-09 5:40:59126 days ago1741498859IN
0x6701E792...14A4b4943
0 ETH0.000138890.8
Unstake219821422025-03-05 17:21:35130 days ago1741195295IN
0x6701E792...14A4b4943
0 ETH0.000453813.0461993
Unstake219677552025-03-03 17:09:23132 days ago1741021763IN
0x6701E792...14A4b4943
0 ETH0.000184171.06078091
Unstake219391942025-02-27 17:33:59136 days ago1740677639IN
0x6701E792...14A4b4943
0 ETH0.000184521.2
Unstake219156362025-02-24 10:38:23139 days ago1740393503IN
0x6701E792...14A4b4943
0 ETH0.000156972
Unstake219155822025-02-24 10:27:35139 days ago1740392855IN
0x6701E792...14A4b4943
0 ETH0.000273512.2
Unstake218720692025-02-18 8:28:47145 days ago1739867327IN
0x6701E792...14A4b4943
0 ETH0.000171631.59072286
Unstake217945052025-02-07 12:03:23156 days ago1738929803IN
0x6701E792...14A4b4943
0 ETH0.000081540.97924987
Unstake217936062025-02-07 9:01:59156 days ago1738918919IN
0x6701E792...14A4b4943
0 ETH0.000276350.95753829
Unstake217361072025-01-30 8:17:35164 days ago1738225055IN
0x6701E792...14A4b4943
0 ETH0.000379081.76573599
Unstake217035282025-01-25 19:11:11169 days ago1737832271IN
0x6701E792...14A4b4943
0 ETH0.000892924.91068529
Unstake215916322025-01-10 4:16:23184 days ago1736482583IN
0x6701E792...14A4b4943
0 ETH0.000205143.1
Unstake215915452025-01-10 3:58:47184 days ago1736481527IN
0x6701E792...14A4b4943
0 ETH0.000321783.1
Unstake215396862025-01-02 22:10:35192 days ago1735855835IN
0x6701E792...14A4b4943
0 ETH0.000585027.45372611
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

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

Contract Source Code Verified (Exact Match)

Contract Name:
SpiralStaking

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 999999 runs

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

import { ISpiral } from "../interfaces/ISpiral.sol";
import { IERC20, SafeERC20, SafeERC20Burn } from "../libraries/SafeERC20Burn.sol";

contract SpiralStaking {
    using SafeERC20 for IERC20;
    using SafeERC20 for ISpiral;
    using SafeERC20Burn for IERC20;
    using SafeERC20Burn for ISpiral;
    mapping (address => uint256) public lastStake;
    struct Epoch {
        uint length;
        uint number;
        uint endBlock;
        uint apr;
    }
    modifier onlyGuard() {
        require(guard == msg.sender, "not a guard");
        _;
    }

    Epoch public epoch;
    uint256 public index = 10**18;
    uint256 constant initialIndex = 10**18;
    uint256 constant blocksPerYear = 2628000;
    //apr 50% - 5000
    uint256 constant aprBase = 10000;
    ISpiral public immutable Coil;
    ISpiral public immutable Spiral;
    address public guard;
    constructor(address coil, address spiral)  {
        Coil = ISpiral(coil);
        Spiral = ISpiral(spiral);
        epoch.number = 1;
        epoch.length = 2400;
        epoch.endBlock = block.number;
        guard = msg.sender;
    }


    function stake(uint256 amount_) external {
        rebase();
        Coil.safeTransferFrom(msg.sender, address(this), amount_);
        Spiral.mint( msg.sender, (amount_*initialIndex) / index );
        lastStake[msg.sender] = epoch.number;
    }

    function unstake(uint256 amount_) external {
        rebase();
        Spiral.safeBurnFrom(msg.sender, amount_);
        Coil.safeTransfer( msg.sender, (amount_ * index) / initialIndex );
    }

    function rebase() public {
        while( epoch.endBlock <= block.number ) { // #FX: SGN-01M
            index = index + ((epoch.apr*index*epoch.length) / blocksPerYear / aprBase);
            uint256 totalSpiral = Spiral.totalSupply();
            epoch.endBlock = epoch.endBlock + epoch.length;
            epoch.number++;
            if (totalSpiral > 0 && Coil.balanceOf(address(this)) > 0 && epoch.apr > 0){
                Coil.mint(address(this), (totalSpiral * index / initialIndex) - Coil.balanceOf(address(this)));
            }
        }
    }

    function changeLength(uint256 length) external onlyGuard {
        require(length < 50000, "Too long");
        epoch.length = length;
    }

    function changeAPR(uint256 apr) external onlyGuard {
        require(apr < 1000000, "Too Big");
        epoch.apr = apr;
    }

    function changeGuard(address newGuard) external onlyGuard {
        require(newGuard != address(0));
        guard = newGuard;
    }
}

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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");
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

interface ISpiral is IERC20 {
    function mint(address who, uint256 amount) external;
    function burn(uint256 amount) external;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import { IERC20, SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

library SafeERC20Burn {
    function safeBurn(IERC20 token, uint256 amount) internal {
        // bytes4(keccak256(bytes("burn(uint256)")));
        (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(0x42966c68, amount));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "safeBurn: burn failed");
    }

    function safeBurnFrom(
        IERC20 token,
        address from,
        uint256 amount
    ) internal {
        // bytes4(keccak256(bytes("burnFrom(address,uint256)")));
        (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(0x79cc6790, from, amount));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "safeBurnFrom: burn failed");
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"coil","type":"address"},{"internalType":"address","name":"spiral","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Coil","outputs":[{"internalType":"contract ISpiral","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Spiral","outputs":[{"internalType":"contract ISpiral","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"apr","type":"uint256"}],"name":"changeAPR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newGuard","type":"address"}],"name":"changeGuard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"changeLength","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"epoch","outputs":[{"internalType":"uint256","name":"length","type":"uint256"},{"internalType":"uint256","name":"number","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"},{"internalType":"uint256","name":"apr","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guard","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"index","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052670de0b6b3a764000060055534801561001c57600080fd5b5060405161138c38038061138c83398101604081905261003b91610090565b6001600160a01b039182166080521660a05260016002819055610960905543600355600680546001600160a01b031916331790556100c3565b80516001600160a01b038116811461008b57600080fd5b919050565b600080604083850312156100a357600080fd5b6100ac83610074565b91506100ba60208401610074565b90509250929050565b60805160a0516112736101196000396000818161012f015281816102690152818161052a015261067d0152600081816101c1015281816102cc0152818161050001528181610770015261083401526112736000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80637f65ec0b11610081578063a694fc3a1161005b578063a694fc3a14610219578063af14052c1461022c578063d11895c31461023457600080fd5b80637f65ec0b146101a957806380c90b31146101bc578063900cf0cf146101e357600080fd5b806332bd5703116100b257806332bd57031461012a578063619cc4ac146101765780637ceab3b11461018957600080fd5b80632986c0e5146100d95780632e17de78146100f5578063310d9bc01461010a575b600080fd5b6100e260055481565b6040519081526020015b60405180910390f35b610108610103366004611017565b610247565b005b6100e2610118366004611030565b60006020819052908152604090205481565b6101517f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100ec565b610108610184366004611017565b6102f6565b6006546101519073ffffffffffffffffffffffffffffffffffffffff1681565b6101086101b7366004611017565b6103ed565b6101517f000000000000000000000000000000000000000000000000000000000000000081565b6001546002546003546004546101f99392919084565b6040805194855260208501939093529183015260608201526080016100ec565b610108610227366004611017565b6104de565b61010861061f565b610108610242366004611030565b610974565b61024f61061f565b61029073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163383610a5c565b6102f333670de0b6b3a7640000600554846102ab9190611095565b6102b591906110d2565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169190610bcc565b50565b60065473ffffffffffffffffffffffffffffffffffffffff16331461037c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6e6f74206120677561726400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b620f424081106103e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f546f6f20426967000000000000000000000000000000000000000000000000006044820152606401610373565b600455565b60065473ffffffffffffffffffffffffffffffffffffffff16331461046e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6e6f7420612067756172640000000000000000000000000000000000000000006044820152606401610373565b61c35081106104d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f546f6f206c6f6e670000000000000000000000000000000000000000000000006044820152606401610373565b600155565b6104e661061f565b61052873ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084610ca5565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166340c10f1933600554670de0b6b3a76400008561057c9190611095565b61058691906110d2565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401600060405180830381600087803b1580156105f157600080fd5b505af1158015610605573d6000803e3d6000fd5b505060025433600090815260208190526040902055505050565b600354431061097257612710622819a06001600001546005546001600301546106489190611095565b6106529190611095565b61065c91906110d2565b61066691906110d2565b600554610673919061110d565b60058190555060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070a9190611126565b60015460035491925061071c9161110d565b6003556002805490600061072f8361113f565b91905055506000811180156107f257506040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156107cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f09190611126565b115b80156107ff575060045415155b1561096c576040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482018190527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16916340c10f19919083906370a0823190602401602060405180830381865afa158015610899573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bd9190611126565b670de0b6b3a7640000600554866108d49190611095565b6108de91906110d2565b6108e89190611177565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401600060405180830381600087803b15801561095357600080fd5b505af1158015610967573d6000803e3d6000fd5b505050505b5061061f565b565b60065473ffffffffffffffffffffffffffffffffffffffff1633146109f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6e6f7420612067756172640000000000000000000000000000000000000000006044820152606401610373565b73ffffffffffffffffffffffffffffffffffffffff8116610a1557600080fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f79cc6790000000000000000000000000000000000000000000000000000000001790529151600092839290871691610af391906111ae565b6000604051808303816000865af19150503d8060008114610b30576040519150601f19603f3d011682016040523d82523d6000602084013e610b35565b606091505b5091509150818015610b5f575080511580610b5f575080806020019051810190610b5f91906111ca565b610bc5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f736166654275726e46726f6d3a206275726e206661696c6564000000000000006044820152606401610373565b5050505050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610ca09084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610d09565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610d039085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610c1e565b50505050565b6000610d6b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610e159092919063ffffffff16565b805190915015610ca05780806020019051810190610d8991906111ca565b610ca0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610373565b6060610e248484600085610e2e565b90505b9392505050565b606082471015610ec0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610373565b73ffffffffffffffffffffffffffffffffffffffff85163b610f3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610373565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610f6791906111ae565b60006040518083038185875af1925050503d8060008114610fa4576040519150601f19603f3d011682016040523d82523d6000602084013e610fa9565b606091505b5091509150610fb9828286610fc4565b979650505050505050565b60608315610fd3575081610e27565b825115610fe35782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161037391906111ec565b60006020828403121561102957600080fd5b5035919050565b60006020828403121561104257600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610e2757600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156110cd576110cd611066565b500290565b600082611108577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8082018082111561112057611120611066565b92915050565b60006020828403121561113857600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361117057611170611066565b5060010190565b8181038181111561112057611120611066565b60005b838110156111a557818101518382015260200161118d565b50506000910152565b600082516111c081846020870161118a565b9190910192915050565b6000602082840312156111dc57600080fd5b81518015158114610e2757600080fd5b602081526000825180602084015261120b81604085016020870161118a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220db8f03467e1fd4cf05d12eb92c92137fe92189afe13f8e8a66508f021d5060f264736f6c63430008100033000000000000000000000000823e1b82ce1dc147bbdb25a203f046afab1ce91800000000000000000000000085b6acaba696b9e4247175274f8263f99b4b9180

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100d45760003560e01c80637f65ec0b11610081578063a694fc3a1161005b578063a694fc3a14610219578063af14052c1461022c578063d11895c31461023457600080fd5b80637f65ec0b146101a957806380c90b31146101bc578063900cf0cf146101e357600080fd5b806332bd5703116100b257806332bd57031461012a578063619cc4ac146101765780637ceab3b11461018957600080fd5b80632986c0e5146100d95780632e17de78146100f5578063310d9bc01461010a575b600080fd5b6100e260055481565b6040519081526020015b60405180910390f35b610108610103366004611017565b610247565b005b6100e2610118366004611030565b60006020819052908152604090205481565b6101517f00000000000000000000000085b6acaba696b9e4247175274f8263f99b4b918081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100ec565b610108610184366004611017565b6102f6565b6006546101519073ffffffffffffffffffffffffffffffffffffffff1681565b6101086101b7366004611017565b6103ed565b6101517f000000000000000000000000823e1b82ce1dc147bbdb25a203f046afab1ce91881565b6001546002546003546004546101f99392919084565b6040805194855260208501939093529183015260608201526080016100ec565b610108610227366004611017565b6104de565b61010861061f565b610108610242366004611030565b610974565b61024f61061f565b61029073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000085b6acaba696b9e4247175274f8263f99b4b9180163383610a5c565b6102f333670de0b6b3a7640000600554846102ab9190611095565b6102b591906110d2565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000823e1b82ce1dc147bbdb25a203f046afab1ce918169190610bcc565b50565b60065473ffffffffffffffffffffffffffffffffffffffff16331461037c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6e6f74206120677561726400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b620f424081106103e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f546f6f20426967000000000000000000000000000000000000000000000000006044820152606401610373565b600455565b60065473ffffffffffffffffffffffffffffffffffffffff16331461046e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6e6f7420612067756172640000000000000000000000000000000000000000006044820152606401610373565b61c35081106104d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f546f6f206c6f6e670000000000000000000000000000000000000000000000006044820152606401610373565b600155565b6104e661061f565b61052873ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000823e1b82ce1dc147bbdb25a203f046afab1ce91816333084610ca5565b7f00000000000000000000000085b6acaba696b9e4247175274f8263f99b4b918073ffffffffffffffffffffffffffffffffffffffff166340c10f1933600554670de0b6b3a76400008561057c9190611095565b61058691906110d2565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401600060405180830381600087803b1580156105f157600080fd5b505af1158015610605573d6000803e3d6000fd5b505060025433600090815260208190526040902055505050565b600354431061097257612710622819a06001600001546005546001600301546106489190611095565b6106529190611095565b61065c91906110d2565b61066691906110d2565b600554610673919061110d565b60058190555060007f00000000000000000000000085b6acaba696b9e4247175274f8263f99b4b918073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070a9190611126565b60015460035491925061071c9161110d565b6003556002805490600061072f8361113f565b91905055506000811180156107f257506040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000823e1b82ce1dc147bbdb25a203f046afab1ce91873ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156107cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f09190611126565b115b80156107ff575060045415155b1561096c576040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482018190527f000000000000000000000000823e1b82ce1dc147bbdb25a203f046afab1ce91873ffffffffffffffffffffffffffffffffffffffff16916340c10f19919083906370a0823190602401602060405180830381865afa158015610899573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bd9190611126565b670de0b6b3a7640000600554866108d49190611095565b6108de91906110d2565b6108e89190611177565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401600060405180830381600087803b15801561095357600080fd5b505af1158015610967573d6000803e3d6000fd5b505050505b5061061f565b565b60065473ffffffffffffffffffffffffffffffffffffffff1633146109f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6e6f7420612067756172640000000000000000000000000000000000000000006044820152606401610373565b73ffffffffffffffffffffffffffffffffffffffff8116610a1557600080fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f79cc6790000000000000000000000000000000000000000000000000000000001790529151600092839290871691610af391906111ae565b6000604051808303816000865af19150503d8060008114610b30576040519150601f19603f3d011682016040523d82523d6000602084013e610b35565b606091505b5091509150818015610b5f575080511580610b5f575080806020019051810190610b5f91906111ca565b610bc5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f736166654275726e46726f6d3a206275726e206661696c6564000000000000006044820152606401610373565b5050505050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610ca09084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610d09565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610d039085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401610c1e565b50505050565b6000610d6b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610e159092919063ffffffff16565b805190915015610ca05780806020019051810190610d8991906111ca565b610ca0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610373565b6060610e248484600085610e2e565b90505b9392505050565b606082471015610ec0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610373565b73ffffffffffffffffffffffffffffffffffffffff85163b610f3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610373565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610f6791906111ae565b60006040518083038185875af1925050503d8060008114610fa4576040519150601f19603f3d011682016040523d82523d6000602084013e610fa9565b606091505b5091509150610fb9828286610fc4565b979650505050505050565b60608315610fd3575081610e27565b825115610fe35782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161037391906111ec565b60006020828403121561102957600080fd5b5035919050565b60006020828403121561104257600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610e2757600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156110cd576110cd611066565b500290565b600082611108577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8082018082111561112057611120611066565b92915050565b60006020828403121561113857600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361117057611170611066565b5060010190565b8181038181111561112057611120611066565b60005b838110156111a557818101518382015260200161118d565b50506000910152565b600082516111c081846020870161118a565b9190910192915050565b6000602082840312156111dc57600080fd5b81518015158114610e2757600080fd5b602081526000825180602084015261120b81604085016020870161118a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220db8f03467e1fd4cf05d12eb92c92137fe92189afe13f8e8a66508f021d5060f264736f6c63430008100033

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

000000000000000000000000823e1b82ce1dc147bbdb25a203f046afab1ce91800000000000000000000000085b6acaba696b9e4247175274f8263f99b4b9180

-----Decoded View---------------
Arg [0] : coil (address): 0x823E1B82cE1Dc147Bbdb25a203f046aFab1CE918
Arg [1] : spiral (address): 0x85b6ACaBa696B9E4247175274F8263F99b4B9180

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000823e1b82ce1dc147bbdb25a203f046afab1ce918
Arg [1] : 00000000000000000000000085b6acaba696b9e4247175274f8263f99b4b9180


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.