ETH Price: $2,928.14 (-0.97%)

Contract

0x66A0BF4b9e741076587acFff7e9EB3888266870F

Overview

ETH Balance

Taiko Alethia LogoTaiko Alethia LogoTaiko Alethia Logo0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Set Gov6549202024-12-09 5:30:35412 days ago1733722235IN
0x66A0BF4b...88266870F
0 ETH0.000032871.2
Set Secondary Pr...6544802024-12-09 3:32:35412 days ago1733715155IN
0x66A0BF4b...88266870F
0 ETH0.00005561.2
Set Token Config6471212024-12-07 10:12:11413 days ago1733566331IN
0x66A0BF4b...88266870F
0 ETH0.000109531.2
Set Token Config6471202024-12-07 10:11:35413 days ago1733566295IN
0x66A0BF4b...88266870F
0 ETH0.000109531.2
Set Token Config6471172024-12-07 10:10:59413 days ago1733566259IN
0x66A0BF4b...88266870F
0 ETH0.000085631.2
Set Token Config6471152024-12-07 10:10:23413 days ago1733566223IN
0x66A0BF4b...88266870F
0 ETH0.000085631.2
Set Spread Basis...6471122024-12-07 10:09:23413 days ago1733566163IN
0x66A0BF4b...88266870F
0 ETH0.000032011.2
Set Max Strict P...6471092024-12-07 10:08:23413 days ago1733566103IN
0x66A0BF4b...88266870F
0 ETH0.000054921.2

View more zero value Internal Transactions in Advanced View mode

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

Contract Source Code Verified (Exact Match)

Contract Name:
VaultPriceFeed

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "../libraries/math/SafeMath.sol";

import "./interfaces/IFeeSharing.sol";
import "./interfaces/IVaultPriceFeed.sol";
import "../oracle/interfaces/IPriceFeed.sol";
import "../oracle/interfaces/ISecondaryPriceFeed.sol";
import "../oracle/interfaces/IChainlinkFlags.sol";


contract VaultPriceFeed is IVaultPriceFeed {
    using SafeMath for uint256;

    uint256 public constant PRICE_PRECISION = 10 ** 30;
    uint256 public constant ONE_USD = PRICE_PRECISION;
    uint256 public constant BASIS_POINTS_DIVISOR = 10000;
    uint256 public constant MAX_SPREAD_BASIS_POINTS = 50;
    uint256 public constant MAX_ADJUSTMENT_INTERVAL = 2 hours;
    uint256 public constant MAX_ADJUSTMENT_BASIS_POINTS = 20;

    // Identifier of the Sequencer offline flag on the Flags contract
    address constant private FLAG_ARBITRUM_SEQ_OFFLINE = address(bytes20(bytes32(uint256(keccak256("chainlink.flags.chain-seq-offline")) - 1)));

    address public gov;

    bool public isSecondaryPriceEnabled = true;
    uint256 public maxStrictPriceDeviation = 0;
    address public secondaryPriceFeed;


    mapping (address => address) public priceFeeds;
    mapping (address => uint256) public priceDecimals;
    mapping (address => uint256) public spreadBasisPoints;
    // Chainlink can return prices for stablecoins
    // that differs from 1 USD by a larger percentage than stableSwapFeeBasisPoints
    // we use strictStableTokens to cap the price to 1 USD
    // this allows us to configure stablecoins like DAI as being a stableToken
    // while not being a strictStableToken
    mapping (address => bool) public strictStableTokens;

    mapping (address => uint256) public override adjustmentBasisPoints;
    mapping (address => bool) public override isAdjustmentAdditive;
    mapping (address => uint256) public lastAdjustmentTimings;
    address public chainlinkFlags;

    modifier onlyGov() {
        require(msg.sender == gov, "VaultPriceFeed: forbidden");
        _;
    }

    constructor() public {
        gov = msg.sender;
    }

    function setGov(address _gov) external onlyGov {
        gov = _gov;
    }

    function setChainlinkFlags(address _chainlinkFlags) external onlyGov {
        chainlinkFlags = _chainlinkFlags;
    }

    function setAdjustment(address _token, bool _isAdditive, uint256 _adjustmentBps) external override onlyGov {
        require(
            lastAdjustmentTimings[_token].add(MAX_ADJUSTMENT_INTERVAL) < block.timestamp,
            "VaultPriceFeed: adjustment frequency exceeded"
        );
        require(_adjustmentBps <= MAX_ADJUSTMENT_BASIS_POINTS, "invalid _adjustmentBps");
        isAdjustmentAdditive[_token] = _isAdditive;
        adjustmentBasisPoints[_token] = _adjustmentBps;
        lastAdjustmentTimings[_token] = block.timestamp;
    }


    function setIsSecondaryPriceEnabled(bool _isEnabled) external override onlyGov {
        isSecondaryPriceEnabled = _isEnabled;
    }

    function setSecondaryPriceFeed(address _secondaryPriceFeed) external onlyGov {
        secondaryPriceFeed = _secondaryPriceFeed;
    }

    function setSpreadBasisPoints(address _token, uint256 _spreadBasisPoints) external override onlyGov {
        require(_spreadBasisPoints <= MAX_SPREAD_BASIS_POINTS, "VaultPriceFeed: invalid _spreadBasisPoints");
        spreadBasisPoints[_token] = _spreadBasisPoints;
    }

    function setMaxStrictPriceDeviation(uint256 _maxStrictPriceDeviation) external override onlyGov {
        maxStrictPriceDeviation = _maxStrictPriceDeviation;
    }

    function setTokenConfig(
        address _token,
        address _priceFeed,
        uint256 _priceDecimals,
        bool _isStrictStable
    ) external override onlyGov {
        priceFeeds[_token] = _priceFeed;
        priceDecimals[_token] = _priceDecimals;
        strictStableTokens[_token] = _isStrictStable;
    }

    function getPrice(address _token, bool _maximise) public override view returns (uint256) {
        uint256 price = getPriceV1(_token, _maximise);

        uint256 adjustmentBps = adjustmentBasisPoints[_token];
        if (adjustmentBps > 0) {
            bool isAdditive = isAdjustmentAdditive[_token];
            if (isAdditive) {
                price = price.mul(BASIS_POINTS_DIVISOR.add(adjustmentBps)).div(BASIS_POINTS_DIVISOR);
            } else {
                price = price.mul(BASIS_POINTS_DIVISOR.sub(adjustmentBps)).div(BASIS_POINTS_DIVISOR);
            }
        }

        return price;
    }

    function getPriceV1(address _token, bool _maximise) public view returns (uint256) {
        uint256 price = getPrimaryPrice(_token, _maximise);

        if (isSecondaryPriceEnabled) {
            price = getSecondaryPrice(_token, price, _maximise);
        }

        if (strictStableTokens[_token]) {
            uint256 delta = price > ONE_USD ? price.sub(ONE_USD) : ONE_USD.sub(price);
            if (delta <= maxStrictPriceDeviation) {
                return ONE_USD;
            }

            // if _maximise and price is e.g. 1.02, return 1.02
            if (_maximise && price > ONE_USD) {
                return price;
            }

            // if !_maximise and price is e.g. 0.98, return 0.98
            if (!_maximise && price < ONE_USD) {
                return price;
            }

            return ONE_USD;
        }

        uint256 _spreadBasisPoints = spreadBasisPoints[_token];

        if (_maximise) {
            return price.mul(BASIS_POINTS_DIVISOR.add(_spreadBasisPoints)).div(BASIS_POINTS_DIVISOR);
        }

        return price.mul(BASIS_POINTS_DIVISOR.sub(_spreadBasisPoints)).div(BASIS_POINTS_DIVISOR);
    }

    function getPrimaryPrice(address _token, bool _maximise) public override view returns (uint256) {
        address priceFeedAddress = priceFeeds[_token];
        require(priceFeedAddress != address(0), "VaultPriceFeed: invalid price feed");

        if (chainlinkFlags != address(0)) {
            bool isRaised = IChainlinkFlags(chainlinkFlags).getFlag(FLAG_ARBITRUM_SEQ_OFFLINE);
            if (isRaised) {
                    // If flag is raised we shouldn't perform any critical operations
                revert("Oracle feeds are not being updated");
            }
        }

        IPriceFeed priceFeed = IPriceFeed(priceFeedAddress);

        int256 price = priceFeed.latestAnswer(_maximise);
        

        require(price > 0, "VaultPriceFeed: could not fetch price");
        // normalise price precision
        uint256 _priceDecimals = priceDecimals[_token];
        return uint256(price).mul(PRICE_PRECISION).div(10 ** _priceDecimals);
    }
    function getSecondaryPrice(address _token, uint256 _referencePrice, bool _maximise) public view returns (uint256) {
        if (secondaryPriceFeed == address(0)) { return _referencePrice; }
        return ISecondaryPriceFeed(secondaryPriceFeed).getPrice(_token, _referencePrice, _maximise);
    }
}

// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IFeeSharing {
    function assign(uint256 _tokenId) external  returns (uint256);
}

// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IVaultPriceFeed {
    function adjustmentBasisPoints(address _token) external view returns (uint256);
    function isAdjustmentAdditive(address _token) external view returns (bool);
    function setAdjustment(address _token, bool _isAdditive, uint256 _adjustmentBps) external;
    function setIsSecondaryPriceEnabled(bool _isEnabled) external;
    function setSpreadBasisPoints(address _token, uint256 _spreadBasisPoints) external;
    function setMaxStrictPriceDeviation(uint256 _maxStrictPriceDeviation) external;
    function getPrice(address _token, bool _maximise) external view returns (uint256);
    function getPrimaryPrice(address _token, bool _maximise) external view returns (uint256);
    function setTokenConfig(
        address _token,
        address _priceFeed,
        uint256 _priceDecimals,
        bool _isStrictStable
    ) external;
}

// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 5 of 7 : IChainlinkFlags.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IChainlinkFlags {
  function getFlag(address) external view returns (bool);
}

// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IPriceFeed {
    function latestAnswer(bool _maximise) external view returns (int256);
    function latestRound() external view returns (uint80);
    function getRoundData(uint80 roundId) external view returns (uint80, int256, uint256, uint256, uint80);
    function latestRoundData(bool _maximise) external view returns (uint80, int256, uint256, uint256, uint80);
}

// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface ISecondaryPriceFeed {
    function getPrice(address _token, uint256 _referencePrice, bool _maximise) external view returns (uint256);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BASIS_POINTS_DIVISOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_ADJUSTMENT_BASIS_POINTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_ADJUSTMENT_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SPREAD_BASIS_POINTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ONE_USD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"adjustmentBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainlinkFlags","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_maximise","type":"bool"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_maximise","type":"bool"}],"name":"getPriceV1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_maximise","type":"bool"}],"name":"getPrimaryPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_referencePrice","type":"uint256"},{"internalType":"bool","name":"_maximise","type":"bool"}],"name":"getSecondaryPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gov","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAdjustmentAdditive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSecondaryPriceEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastAdjustmentTimings","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxStrictPriceDeviation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"priceDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"priceFeeds","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"secondaryPriceFeed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_isAdditive","type":"bool"},{"internalType":"uint256","name":"_adjustmentBps","type":"uint256"}],"name":"setAdjustment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_chainlinkFlags","type":"address"}],"name":"setChainlinkFlags","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gov","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isEnabled","type":"bool"}],"name":"setIsSecondaryPriceEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxStrictPriceDeviation","type":"uint256"}],"name":"setMaxStrictPriceDeviation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_secondaryPriceFeed","type":"address"}],"name":"setSecondaryPriceFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_spreadBasisPoints","type":"uint256"}],"name":"setSpreadBasisPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_priceFeed","type":"address"},{"internalType":"uint256","name":"_priceDecimals","type":"uint256"},{"internalType":"bool","name":"_isStrictStable","type":"bool"}],"name":"setTokenConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"spreadBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"strictStableTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60806040526000805460ff60a01b1916600160a01b17815560015534801561002657600080fd5b50600080546001600160a01b031916331790556112f9806100486000396000f3fe608060405234801561001057600080fd5b506004361061016a5760003560e01c80630957aed91461016f578063126082cf1461018957806312d43a51146101915780632fbfe3d3146101b5578063378e7bf7146101d45780633eba8d36146101dc5780633ebbc6011461021057806348cac2771461022c5780634a4b1f4f146102525780634b9ade471461025a57806356c8c2c11461029857806367781c0e146102c65780636ce8a44b146102ce578063717cfe7a146102f457806376d697601461031a5780637cdddae614610348578063826e055f146103765780638b86616c1461039c57806395082d25146102c65780639a0a6635146103a45780639b18dc47146103ca5780639b889380146103d25780639dcb511a146103fe578063a27ea38614610424578063b8f611051461044a578063cefe0f2114610470578063cfad57a214610496578063d694376c146104bc578063e4440e02146104f0578063eb1c92a9146104f8575b600080fd5b610177610517565b60408051918252519081900360200190f35b61017761051c565b610199610522565b604080516001600160a01b039092168252519081900360200190f35b6101d2600480360360208110156101cb57600080fd5b5035610531565b005b610177610583565b610177600480360360608110156101f257600080fd5b506001600160a01b0381351690602081013590604001351515610589565b610218610635565b604080519115158252519081900360200190f35b6101776004803603602081101561024257600080fd5b50356001600160a01b0316610645565b610177610657565b6101d26004803603608081101561027057600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135151561065c565b610177600480360360408110156102ae57600080fd5b506001600160a01b03813516906020013515156106fe565b610177610938565b610218600480360360208110156102e457600080fd5b50356001600160a01b0316610948565b6101776004803603602081101561030a57600080fd5b50356001600160a01b031661095d565b6101776004803603604081101561033057600080fd5b506001600160a01b038135169060200135151561096f565b6101776004803603604081101561035e57600080fd5b506001600160a01b0381351690602001351515610a01565b6101d26004803603602081101561038c57600080fd5b50356001600160a01b0316610b78565b610199610be7565b6101d2600480360360208110156103ba57600080fd5b50356001600160a01b0316610bf6565b610177610c65565b6101d2600480360360408110156103e857600080fd5b506001600160a01b038135169060200135610c6b565b6101996004803603602081101561041457600080fd5b50356001600160a01b0316610d14565b6101776004803603602081101561043a57600080fd5b50356001600160a01b0316610d2f565b6102186004803603602081101561046057600080fd5b50356001600160a01b0316610d41565b6101776004803603602081101561048657600080fd5b50356001600160a01b0316610d56565b6101d2600480360360208110156104ac57600080fd5b50356001600160a01b0316610d68565b6101d2600480360360608110156104d257600080fd5b506001600160a01b0381351690602081013515159060400135610dd7565b610199610f1a565b6101d26004803603602081101561050e57600080fd5b50351515610f29565b603281565b61271081565b6000546001600160a01b031681565b6000546001600160a01b0316331461057e576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b600155565b60015481565b6002546000906001600160a01b03166105a357508161062e565b60025460408051630ffd9c6d60e31b81526001600160a01b03878116600483015260248201879052851515604483015291519190921691637fece368916064808301926020929190829003018186803b1580156105ff57600080fd5b505afa158015610613573d6000803e3d6000fd5b505050506040513d602081101561062957600080fd5b505190505b9392505050565b600054600160a01b900460ff1681565b60076020526000908152604090205481565b601481565b6000546001600160a01b031633146106a9576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b6001600160a01b03938416600090815260036020908152604080832080546001600160a01b03191696909716959095179095556004855283812092909255600690935220805460ff1916911515919091179055565b6001600160a01b03808316600090815260036020526040812054909116806107575760405162461bcd60e51b81526004018080602001828103825260228152602001806112a26022913960400191505060405180910390fd5b600a546001600160a01b03161561083457600a5460408051631abf23ff60e11b81527309dc39cdcce8297c046d47bd9897efde887db67a600482015290516000926001600160a01b03169163357e47fe916024808301926020929190829003018186803b1580156107c757600080fd5b505afa1580156107db573d6000803e3d6000fd5b505050506040513d60208110156107f157600080fd5b5051905080156108325760405162461bcd60e51b81526004018080602001828103825260228152602001806112566022913960400191505060405180910390fd5b505b60008190506000816001600160a01b031663ff2ba615866040518263ffffffff1660e01b815260040180821515815260200191505060206040518083038186803b15801561088157600080fd5b505afa158015610895573d6000803e3d6000fd5b505050506040513d60208110156108ab57600080fd5b50519050600081136108ee5760405162461bcd60e51b81526004018080602001828103825260258152602001806111c36025913960400191505060405180910390fd5b6001600160a01b03861660009081526004602052604090205461092b600a82900a6109258468327cb2734119d3b7a9601e1b610f94565b90610fed565b9450505050505b92915050565b68327cb2734119d3b7a9601e1b81565b60086020526000908152604090205460ff1681565b60096020526000908152604090205481565b60008061097c8484610a01565b6001600160a01b03851660009081526007602052604090205490915080156109f9576001600160a01b03851660009081526008602052604090205460ff1680156109e1576109da6127106109256109d3828661102c565b8690610f94565b92506109f7565b6109f46127106109256109d38286611084565b92505b505b509392505050565b600080610a0e84846106fe565b600054909150600160a01b900460ff1615610a3157610a2e848285610589565b90505b6001600160a01b03841660009081526006602052604090205460ff1615610b1a57600068327cb2734119d3b7a9601e1b8211610a8257610a7d68327cb2734119d3b7a9601e1b83611084565b610a98565b610a988268327cb2734119d3b7a9601e1b611084565b90506001548111610ab95768327cb2734119d3b7a9601e1b92505050610932565b838015610ad1575068327cb2734119d3b7a9601e1b82115b15610ade57509050610932565b83158015610af7575068327cb2734119d3b7a9601e1b82105b15610b0457509050610932565b68327cb2734119d3b7a9601e1b92505050610932565b6001600160a01b0384166000908152600560205260409020548315610b5c57610b53612710610925610b4c828561102c565b8590610f94565b92505050610932565b610b6f612710610925610b4c8285611084565b95945050505050565b6000546001600160a01b03163314610bc5576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031681565b6000546001600160a01b03163314610c43576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b611c2081565b6000546001600160a01b03163314610cb8576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b6032811115610cf85760405162461bcd60e51b815260040180806020018281038252602a815260200180611278602a913960400191505060405180910390fd5b6001600160a01b03909116600090815260056020526040902055565b6003602052600090815260409020546001600160a01b031681565b60056020526000908152604090205481565b60066020526000908152604090205460ff1681565b60046020526000908152604090205481565b6000546001600160a01b03163314610db5576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610e24576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b6001600160a01b0383166000908152600960205260409020544290610e4b90611c2061102c565b10610e875760405162461bcd60e51b815260040180806020018281038252602d815260200180611209602d913960400191505060405180910390fd5b6014811115610ed6576040805162461bcd60e51b8152602060048201526016602482015275696e76616c6964205f61646a7573746d656e7442707360501b604482015290519081900360640190fd5b6001600160a01b03929092166000908152600860209081526040808320805460ff191694151594909417909355600781528282209390935560099092529020429055565b600a546001600160a01b031681565b6000546001600160a01b03163314610f76576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b60008054911515600160a01b0260ff60a01b19909216919091179055565b600082610fa357506000610932565b82820282848281610fb057fe5b041461062e5760405162461bcd60e51b81526004018080602001828103825260218152602001806111e86021913960400191505060405180910390fd5b600061062e83836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b8152506110c6565b60008282018381101561062e576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b600061062e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611168565b600081836111525760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111175781810151838201526020016110ff565b50505050905090810190601f1680156111445780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161115e57fe5b0495945050505050565b600081848411156111ba5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156111175781810151838201526020016110ff565b50505090039056fe5661756c745072696365466565643a20636f756c64206e6f74206665746368207072696365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775661756c745072696365466565643a2061646a7573746d656e74206672657175656e63792065786365656465645661756c745072696365466565643a20666f7262696464656e000000000000004f7261636c6520666565647320617265206e6f74206265696e6720757064617465645661756c745072696365466565643a20696e76616c6964205f7370726561644261736973506f696e74735661756c745072696365466565643a20696e76616c69642070726963652066656564a26469706673582212207101842aa6904112bc9765737f04fa5eabb2a9ec97e63fede47f4a3b15c305ab64736f6c634300060c0033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061016a5760003560e01c80630957aed91461016f578063126082cf1461018957806312d43a51146101915780632fbfe3d3146101b5578063378e7bf7146101d45780633eba8d36146101dc5780633ebbc6011461021057806348cac2771461022c5780634a4b1f4f146102525780634b9ade471461025a57806356c8c2c11461029857806367781c0e146102c65780636ce8a44b146102ce578063717cfe7a146102f457806376d697601461031a5780637cdddae614610348578063826e055f146103765780638b86616c1461039c57806395082d25146102c65780639a0a6635146103a45780639b18dc47146103ca5780639b889380146103d25780639dcb511a146103fe578063a27ea38614610424578063b8f611051461044a578063cefe0f2114610470578063cfad57a214610496578063d694376c146104bc578063e4440e02146104f0578063eb1c92a9146104f8575b600080fd5b610177610517565b60408051918252519081900360200190f35b61017761051c565b610199610522565b604080516001600160a01b039092168252519081900360200190f35b6101d2600480360360208110156101cb57600080fd5b5035610531565b005b610177610583565b610177600480360360608110156101f257600080fd5b506001600160a01b0381351690602081013590604001351515610589565b610218610635565b604080519115158252519081900360200190f35b6101776004803603602081101561024257600080fd5b50356001600160a01b0316610645565b610177610657565b6101d26004803603608081101561027057600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135151561065c565b610177600480360360408110156102ae57600080fd5b506001600160a01b03813516906020013515156106fe565b610177610938565b610218600480360360208110156102e457600080fd5b50356001600160a01b0316610948565b6101776004803603602081101561030a57600080fd5b50356001600160a01b031661095d565b6101776004803603604081101561033057600080fd5b506001600160a01b038135169060200135151561096f565b6101776004803603604081101561035e57600080fd5b506001600160a01b0381351690602001351515610a01565b6101d26004803603602081101561038c57600080fd5b50356001600160a01b0316610b78565b610199610be7565b6101d2600480360360208110156103ba57600080fd5b50356001600160a01b0316610bf6565b610177610c65565b6101d2600480360360408110156103e857600080fd5b506001600160a01b038135169060200135610c6b565b6101996004803603602081101561041457600080fd5b50356001600160a01b0316610d14565b6101776004803603602081101561043a57600080fd5b50356001600160a01b0316610d2f565b6102186004803603602081101561046057600080fd5b50356001600160a01b0316610d41565b6101776004803603602081101561048657600080fd5b50356001600160a01b0316610d56565b6101d2600480360360208110156104ac57600080fd5b50356001600160a01b0316610d68565b6101d2600480360360608110156104d257600080fd5b506001600160a01b0381351690602081013515159060400135610dd7565b610199610f1a565b6101d26004803603602081101561050e57600080fd5b50351515610f29565b603281565b61271081565b6000546001600160a01b031681565b6000546001600160a01b0316331461057e576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b600155565b60015481565b6002546000906001600160a01b03166105a357508161062e565b60025460408051630ffd9c6d60e31b81526001600160a01b03878116600483015260248201879052851515604483015291519190921691637fece368916064808301926020929190829003018186803b1580156105ff57600080fd5b505afa158015610613573d6000803e3d6000fd5b505050506040513d602081101561062957600080fd5b505190505b9392505050565b600054600160a01b900460ff1681565b60076020526000908152604090205481565b601481565b6000546001600160a01b031633146106a9576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b6001600160a01b03938416600090815260036020908152604080832080546001600160a01b03191696909716959095179095556004855283812092909255600690935220805460ff1916911515919091179055565b6001600160a01b03808316600090815260036020526040812054909116806107575760405162461bcd60e51b81526004018080602001828103825260228152602001806112a26022913960400191505060405180910390fd5b600a546001600160a01b03161561083457600a5460408051631abf23ff60e11b81527309dc39cdcce8297c046d47bd9897efde887db67a600482015290516000926001600160a01b03169163357e47fe916024808301926020929190829003018186803b1580156107c757600080fd5b505afa1580156107db573d6000803e3d6000fd5b505050506040513d60208110156107f157600080fd5b5051905080156108325760405162461bcd60e51b81526004018080602001828103825260228152602001806112566022913960400191505060405180910390fd5b505b60008190506000816001600160a01b031663ff2ba615866040518263ffffffff1660e01b815260040180821515815260200191505060206040518083038186803b15801561088157600080fd5b505afa158015610895573d6000803e3d6000fd5b505050506040513d60208110156108ab57600080fd5b50519050600081136108ee5760405162461bcd60e51b81526004018080602001828103825260258152602001806111c36025913960400191505060405180910390fd5b6001600160a01b03861660009081526004602052604090205461092b600a82900a6109258468327cb2734119d3b7a9601e1b610f94565b90610fed565b9450505050505b92915050565b68327cb2734119d3b7a9601e1b81565b60086020526000908152604090205460ff1681565b60096020526000908152604090205481565b60008061097c8484610a01565b6001600160a01b03851660009081526007602052604090205490915080156109f9576001600160a01b03851660009081526008602052604090205460ff1680156109e1576109da6127106109256109d3828661102c565b8690610f94565b92506109f7565b6109f46127106109256109d38286611084565b92505b505b509392505050565b600080610a0e84846106fe565b600054909150600160a01b900460ff1615610a3157610a2e848285610589565b90505b6001600160a01b03841660009081526006602052604090205460ff1615610b1a57600068327cb2734119d3b7a9601e1b8211610a8257610a7d68327cb2734119d3b7a9601e1b83611084565b610a98565b610a988268327cb2734119d3b7a9601e1b611084565b90506001548111610ab95768327cb2734119d3b7a9601e1b92505050610932565b838015610ad1575068327cb2734119d3b7a9601e1b82115b15610ade57509050610932565b83158015610af7575068327cb2734119d3b7a9601e1b82105b15610b0457509050610932565b68327cb2734119d3b7a9601e1b92505050610932565b6001600160a01b0384166000908152600560205260409020548315610b5c57610b53612710610925610b4c828561102c565b8590610f94565b92505050610932565b610b6f612710610925610b4c8285611084565b95945050505050565b6000546001600160a01b03163314610bc5576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031681565b6000546001600160a01b03163314610c43576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b611c2081565b6000546001600160a01b03163314610cb8576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b6032811115610cf85760405162461bcd60e51b815260040180806020018281038252602a815260200180611278602a913960400191505060405180910390fd5b6001600160a01b03909116600090815260056020526040902055565b6003602052600090815260409020546001600160a01b031681565b60056020526000908152604090205481565b60066020526000908152604090205460ff1681565b60046020526000908152604090205481565b6000546001600160a01b03163314610db5576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610e24576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b6001600160a01b0383166000908152600960205260409020544290610e4b90611c2061102c565b10610e875760405162461bcd60e51b815260040180806020018281038252602d815260200180611209602d913960400191505060405180910390fd5b6014811115610ed6576040805162461bcd60e51b8152602060048201526016602482015275696e76616c6964205f61646a7573746d656e7442707360501b604482015290519081900360640190fd5b6001600160a01b03929092166000908152600860209081526040808320805460ff191694151594909417909355600781528282209390935560099092529020429055565b600a546001600160a01b031681565b6000546001600160a01b03163314610f76576040805162461bcd60e51b81526020600482015260196024820152600080516020611236833981519152604482015290519081900360640190fd5b60008054911515600160a01b0260ff60a01b19909216919091179055565b600082610fa357506000610932565b82820282848281610fb057fe5b041461062e5760405162461bcd60e51b81526004018080602001828103825260218152602001806111e86021913960400191505060405180910390fd5b600061062e83836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b8152506110c6565b60008282018381101561062e576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b600061062e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611168565b600081836111525760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111175781810151838201526020016110ff565b50505050905090810190601f1680156111445780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161115e57fe5b0495945050505050565b600081848411156111ba5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156111175781810151838201526020016110ff565b50505090039056fe5661756c745072696365466565643a20636f756c64206e6f74206665746368207072696365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775661756c745072696365466565643a2061646a7573746d656e74206672657175656e63792065786365656465645661756c745072696365466565643a20666f7262696464656e000000000000004f7261636c6520666565647320617265206e6f74206265696e6720757064617465645661756c745072696365466565643a20696e76616c6964205f7370726561644261736973506f696e74735661756c745072696365466565643a20696e76616c69642070726963652066656564a26469706673582212207101842aa6904112bc9765737f04fa5eabb2a9ec97e63fede47f4a3b15c305ab64736f6c634300060c0033

Block Transaction Gas Used Reward
view all blocks sequenced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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