ETH Price: $3,545.46 (+2.48%)

Contract

0xaE55F163337A2A46733AA66dA9F35299f9A46e9e
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
Nominate New Own...45538002022-03-17 22:25:11824 days ago1647555911IN
Synthetix: Futures Market Settings
0 ETH0.000000030.001
Nominate New Own...45536222022-03-17 22:14:00824 days ago1647555240IN
Synthetix: Futures Market Settings
0 ETH0.000000030.001
Nominate New Own...45531672022-03-17 21:42:43824 days ago1647553363IN
Synthetix: Futures Market Settings
0 ETH0.000000040.001
0x6080604045525502022-03-17 21:03:24824 days ago1647551004IN
 Create: FuturesMarketSettings
0 ETH0.000001720.001

Latest 22 internal transactions

Advanced mode:
Parent Transaction Hash Block From To Value
1073178102023-07-24 21:33:17330 days ago1690234397
Synthetix: Futures Market Settings
0 ETH
1073178102023-07-24 21:33:17330 days ago1690234397
Synthetix: Futures Market Settings
0 ETH
1073178102023-07-24 21:33:17330 days ago1690234397
Synthetix: Futures Market Settings
0 ETH
1073178102023-07-24 21:33:17330 days ago1690234397
Synthetix: Futures Market Settings
0 ETH
1071883622023-07-21 21:38:21333 days ago1689975501
Synthetix: Futures Market Settings
0 ETH
1071883622023-07-21 21:38:21333 days ago1689975501
Synthetix: Futures Market Settings
0 ETH
1070592042023-07-18 21:53:05336 days ago1689717185
Synthetix: Futures Market Settings
0 ETH
1070592042023-07-18 21:53:05336 days ago1689717185
Synthetix: Futures Market Settings
0 ETH
1070592042023-07-18 21:53:05336 days ago1689717185
Synthetix: Futures Market Settings
0 ETH
1070592042023-07-18 21:53:05336 days ago1689717185
Synthetix: Futures Market Settings
0 ETH
1070592042023-07-18 21:53:05336 days ago1689717185
Synthetix: Futures Market Settings
0 ETH
1070592042023-07-18 21:53:05336 days ago1689717185
Synthetix: Futures Market Settings
0 ETH
1070019702023-07-17 14:05:17338 days ago1689602717
Synthetix: Futures Market Settings
0 ETH
1070019702023-07-17 14:05:17338 days ago1689602717
Synthetix: Futures Market Settings
0 ETH
1067973202023-07-12 20:23:37342 days ago1689193417
Synthetix: Futures Market Settings
0 ETH
1067973202023-07-12 20:23:37342 days ago1689193417
Synthetix: Futures Market Settings
0 ETH
1058849962023-06-21 17:32:49364 days ago1687368769
Synthetix: Futures Market Settings
0 ETH
1058849962023-06-21 17:32:49364 days ago1687368769
Synthetix: Futures Market Settings
0 ETH
1055617462023-06-14 5:57:49371 days ago1686722269
Synthetix: Futures Market Settings
0 ETH
1055617462023-06-14 5:57:49371 days ago1686722269
Synthetix: Futures Market Settings
0 ETH
1053436472023-06-09 4:47:51376 days ago1686286071
Synthetix: Futures Market Settings
0 ETH
1053436472023-06-09 4:47:51376 days ago1686286071
Synthetix: Futures Market Settings
0 ETH

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FuturesMarketSettings

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at optimistic.etherscan.io on 2022-03-17
*/

/*
   ____            __   __        __   _
  / __/__ __ ___  / /_ / /  ___  / /_ (_)__ __
 _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
     /___/

* Synthetix: FuturesMarketSettings.sol
*
* Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/FuturesMarketSettings.sol
* Docs: https://docs.synthetix.io/contracts/FuturesMarketSettings
*
* Contract Dependencies: 
*	- IAddressResolver
*	- IFuturesMarketSettings
*	- MixinFuturesMarketSettings
*	- MixinResolver
*	- Owned
* Libraries: (none)
*
* MIT License
* ===========
*
* Copyright (c) 2022 Synthetix
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/



pragma solidity ^0.5.16;

// https://docs.synthetix.io/contracts/source/contracts/owned
contract Owned {
    address public owner;
    address public nominatedOwner;

    constructor(address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);
    }

    function acceptOwnership() external {
        require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    modifier onlyOwner {
        _onlyOwner();
        _;
    }

    function _onlyOwner() private view {
        require(msg.sender == owner, "Only the contract owner may perform this action");
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}


// https://docs.synthetix.io/contracts/source/interfaces/iaddressresolver
interface IAddressResolver {
    function getAddress(bytes32 name) external view returns (address);

    function getSynth(bytes32 key) external view returns (address);

    function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address);
}


// https://docs.synthetix.io/contracts/source/interfaces/isynth
interface ISynth {
    // Views
    function currencyKey() external view returns (bytes32);

    function transferableSynths(address account) external view returns (uint);

    // Mutative functions
    function transferAndSettle(address to, uint value) external returns (bool);

    function transferFromAndSettle(
        address from,
        address to,
        uint value
    ) external returns (bool);

    // Restricted: used internally to Synthetix
    function burn(address account, uint amount) external;

    function issue(address account, uint amount) external;
}


// https://docs.synthetix.io/contracts/source/interfaces/iissuer
interface IIssuer {
    // Views
    function anySynthOrSNXRateIsInvalid() external view returns (bool anyRateInvalid);

    function availableCurrencyKeys() external view returns (bytes32[] memory);

    function availableSynthCount() external view returns (uint);

    function availableSynths(uint index) external view returns (ISynth);

    function canBurnSynths(address account) external view returns (bool);

    function collateral(address account) external view returns (uint);

    function collateralisationRatio(address issuer) external view returns (uint);

    function collateralisationRatioAndAnyRatesInvalid(address _issuer)
        external
        view
        returns (uint cratio, bool anyRateIsInvalid);

    function debtBalanceOf(address issuer, bytes32 currencyKey) external view returns (uint debtBalance);

    function issuanceRatio() external view returns (uint);

    function lastIssueEvent(address account) external view returns (uint);

    function maxIssuableSynths(address issuer) external view returns (uint maxIssuable);

    function minimumStakeTime() external view returns (uint);

    function remainingIssuableSynths(address issuer)
        external
        view
        returns (
            uint maxIssuable,
            uint alreadyIssued,
            uint totalSystemDebt
        );

    function synths(bytes32 currencyKey) external view returns (ISynth);

    function getSynths(bytes32[] calldata currencyKeys) external view returns (ISynth[] memory);

    function synthsByAddress(address synthAddress) external view returns (bytes32);

    function totalIssuedSynths(bytes32 currencyKey, bool excludeOtherCollateral) external view returns (uint);

    function transferableSynthetixAndAnyRateIsInvalid(address account, uint balance)
        external
        view
        returns (uint transferable, bool anyRateIsInvalid);

    // Restricted: used internally to Synthetix
    function issueSynths(address from, uint amount) external;

    function issueSynthsOnBehalf(
        address issueFor,
        address from,
        uint amount
    ) external;

    function issueMaxSynths(address from) external;

    function issueMaxSynthsOnBehalf(address issueFor, address from) external;

    function burnSynths(address from, uint amount) external;

    function burnSynthsOnBehalf(
        address burnForAddress,
        address from,
        uint amount
    ) external;

    function burnSynthsToTarget(address from) external;

    function burnSynthsToTargetOnBehalf(address burnForAddress, address from) external;

    function burnForRedemption(
        address deprecatedSynthProxy,
        address account,
        uint balance
    ) external;

    function liquidateDelinquentAccount(
        address account,
        uint susdAmount,
        address liquidator
    ) external returns (uint totalRedeemed, uint amountToLiquidate);

    function setCurrentPeriodId(uint128 periodId) external;
}


// Inheritance


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/addressresolver
contract AddressResolver is Owned, IAddressResolver {
    mapping(bytes32 => address) public repository;

    constructor(address _owner) public Owned(_owner) {}

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

    function importAddresses(bytes32[] calldata names, address[] calldata destinations) external onlyOwner {
        require(names.length == destinations.length, "Input lengths must match");

        for (uint i = 0; i < names.length; i++) {
            bytes32 name = names[i];
            address destination = destinations[i];
            repository[name] = destination;
            emit AddressImported(name, destination);
        }
    }

    /* ========= PUBLIC FUNCTIONS ========== */

    function rebuildCaches(MixinResolver[] calldata destinations) external {
        for (uint i = 0; i < destinations.length; i++) {
            destinations[i].rebuildCache();
        }
    }

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

    function areAddressesImported(bytes32[] calldata names, address[] calldata destinations) external view returns (bool) {
        for (uint i = 0; i < names.length; i++) {
            if (repository[names[i]] != destinations[i]) {
                return false;
            }
        }
        return true;
    }

    function getAddress(bytes32 name) external view returns (address) {
        return repository[name];
    }

    function requireAndGetAddress(bytes32 name, string calldata reason) external view returns (address) {
        address _foundAddress = repository[name];
        require(_foundAddress != address(0), reason);
        return _foundAddress;
    }

    function getSynth(bytes32 key) external view returns (address) {
        IIssuer issuer = IIssuer(repository["Issuer"]);
        require(address(issuer) != address(0), "Cannot find Issuer address");
        return address(issuer.synths(key));
    }

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

    event AddressImported(bytes32 name, address destination);
}


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/mixinresolver
contract MixinResolver {
    AddressResolver public resolver;

    mapping(bytes32 => address) private addressCache;

    constructor(address _resolver) internal {
        resolver = AddressResolver(_resolver);
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    function combineArrays(bytes32[] memory first, bytes32[] memory second)
        internal
        pure
        returns (bytes32[] memory combination)
    {
        combination = new bytes32[](first.length + second.length);

        for (uint i = 0; i < first.length; i++) {
            combination[i] = first[i];
        }

        for (uint j = 0; j < second.length; j++) {
            combination[first.length + j] = second[j];
        }
    }

    /* ========== PUBLIC FUNCTIONS ========== */

    // Note: this function is public not external in order for it to be overridden and invoked via super in subclasses
    function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {}

    function rebuildCache() public {
        bytes32[] memory requiredAddresses = resolverAddressesRequired();
        // The resolver must call this function whenver it updates its state
        for (uint i = 0; i < requiredAddresses.length; i++) {
            bytes32 name = requiredAddresses[i];
            // Note: can only be invoked once the resolver has all the targets needed added
            address destination =
                resolver.requireAndGetAddress(name, string(abi.encodePacked("Resolver missing target: ", name)));
            addressCache[name] = destination;
            emit CacheUpdated(name, destination);
        }
    }

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

    function isResolverCached() external view returns (bool) {
        bytes32[] memory requiredAddresses = resolverAddressesRequired();
        for (uint i = 0; i < requiredAddresses.length; i++) {
            bytes32 name = requiredAddresses[i];
            // false if our cache is invalid or if the resolver doesn't have the required address
            if (resolver.getAddress(name) != addressCache[name] || addressCache[name] == address(0)) {
                return false;
            }
        }

        return true;
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    function requireAndGetAddress(bytes32 name) internal view returns (address) {
        address _foundAddress = addressCache[name];
        require(_foundAddress != address(0), string(abi.encodePacked("Missing address: ", name)));
        return _foundAddress;
    }

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

    event CacheUpdated(bytes32 name, address destination);
}


// https://docs.synthetix.io/contracts/source/interfaces/iflexiblestorage
interface IFlexibleStorage {
    // Views
    function getUIntValue(bytes32 contractName, bytes32 record) external view returns (uint);

    function getUIntValues(bytes32 contractName, bytes32[] calldata records) external view returns (uint[] memory);

    function getIntValue(bytes32 contractName, bytes32 record) external view returns (int);

    function getIntValues(bytes32 contractName, bytes32[] calldata records) external view returns (int[] memory);

    function getAddressValue(bytes32 contractName, bytes32 record) external view returns (address);

    function getAddressValues(bytes32 contractName, bytes32[] calldata records) external view returns (address[] memory);

    function getBoolValue(bytes32 contractName, bytes32 record) external view returns (bool);

    function getBoolValues(bytes32 contractName, bytes32[] calldata records) external view returns (bool[] memory);

    function getBytes32Value(bytes32 contractName, bytes32 record) external view returns (bytes32);

    function getBytes32Values(bytes32 contractName, bytes32[] calldata records) external view returns (bytes32[] memory);

    // Mutative functions
    function deleteUIntValue(bytes32 contractName, bytes32 record) external;

    function deleteIntValue(bytes32 contractName, bytes32 record) external;

    function deleteAddressValue(bytes32 contractName, bytes32 record) external;

    function deleteBoolValue(bytes32 contractName, bytes32 record) external;

    function deleteBytes32Value(bytes32 contractName, bytes32 record) external;

    function setUIntValue(
        bytes32 contractName,
        bytes32 record,
        uint value
    ) external;

    function setUIntValues(
        bytes32 contractName,
        bytes32[] calldata records,
        uint[] calldata values
    ) external;

    function setIntValue(
        bytes32 contractName,
        bytes32 record,
        int value
    ) external;

    function setIntValues(
        bytes32 contractName,
        bytes32[] calldata records,
        int[] calldata values
    ) external;

    function setAddressValue(
        bytes32 contractName,
        bytes32 record,
        address value
    ) external;

    function setAddressValues(
        bytes32 contractName,
        bytes32[] calldata records,
        address[] calldata values
    ) external;

    function setBoolValue(
        bytes32 contractName,
        bytes32 record,
        bool value
    ) external;

    function setBoolValues(
        bytes32 contractName,
        bytes32[] calldata records,
        bool[] calldata values
    ) external;

    function setBytes32Value(
        bytes32 contractName,
        bytes32 record,
        bytes32 value
    ) external;

    function setBytes32Values(
        bytes32 contractName,
        bytes32[] calldata records,
        bytes32[] calldata values
    ) external;
}


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/MixinFuturesMarketSettings
contract MixinFuturesMarketSettings is MixinResolver {
    /* ========== CONSTANTS ========== */

    bytes32 internal constant SETTING_CONTRACT_NAME = "FuturesMarketSettings";

    /* ---------- Parameter Names ---------- */

    // Per-market settings
    bytes32 internal constant PARAMETER_TAKER_FEE = "takerFee";
    bytes32 internal constant PARAMETER_MAKER_FEE = "makerFee";
    bytes32 internal constant PARAMETER_TAKER_FEE_NEXT_PRICE = "takerFeeNextPrice";
    bytes32 internal constant PARAMETER_MAKER_FEE_NEXT_PRICE = "makerFeeNextPrice";
    bytes32 internal constant PARAMETER_NEXT_PRICE_CONFIRM_WINDOW = "nextPriceConfirmWindow";
    bytes32 internal constant PARAMETER_MAX_LEVERAGE = "maxLeverage";
    bytes32 internal constant PARAMETER_MAX_MARKET_VALUE = "maxMarketValueUSD";
    bytes32 internal constant PARAMETER_MAX_FUNDING_RATE = "maxFundingRate";
    bytes32 internal constant PARAMETER_MIN_SKEW_SCALE = "skewScaleUSD";

    // Global settings
    // minimum liquidation fee payable to liquidator
    bytes32 internal constant SETTING_MIN_KEEPER_FEE = "futuresMinKeeperFee";
    // liquidation fee basis points payed to liquidator
    bytes32 internal constant SETTING_LIQUIDATION_FEE_RATIO = "futuresLiquidationFeeRatio";
    // liquidation buffer to prevent negative margin upon liquidation
    bytes32 internal constant SETTING_LIQUIDATION_BUFFER_RATIO = "futuresLiquidationBufferRatio";
    bytes32 internal constant SETTING_MIN_INITIAL_MARGIN = "futuresMinInitialMargin";

    /* ---------- Address Resolver Configuration ---------- */

    bytes32 internal constant CONTRACT_FLEXIBLESTORAGE = "FlexibleStorage";

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

    constructor(address _resolver) internal MixinResolver(_resolver) {}

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

    function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {
        addresses = new bytes32[](1);
        addresses[0] = CONTRACT_FLEXIBLESTORAGE;
    }

    function _flexibleStorage() internal view returns (IFlexibleStorage) {
        return IFlexibleStorage(requireAndGetAddress(CONTRACT_FLEXIBLESTORAGE));
    }

    /* ---------- Internals ---------- */

    function _parameter(bytes32 _marketKey, bytes32 key) internal view returns (uint value) {
        return _flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, keccak256(abi.encodePacked(_marketKey, key)));
    }

    function _takerFee(bytes32 _marketKey) internal view returns (uint) {
        return _parameter(_marketKey, PARAMETER_TAKER_FEE);
    }

    function _makerFee(bytes32 _marketKey) internal view returns (uint) {
        return _parameter(_marketKey, PARAMETER_MAKER_FEE);
    }

    function _takerFeeNextPrice(bytes32 _marketKey) internal view returns (uint) {
        return _parameter(_marketKey, PARAMETER_TAKER_FEE_NEXT_PRICE);
    }

    function _makerFeeNextPrice(bytes32 _marketKey) internal view returns (uint) {
        return _parameter(_marketKey, PARAMETER_MAKER_FEE_NEXT_PRICE);
    }

    function _nextPriceConfirmWindow(bytes32 _marketKey) internal view returns (uint) {
        return _parameter(_marketKey, PARAMETER_NEXT_PRICE_CONFIRM_WINDOW);
    }

    function _maxLeverage(bytes32 _marketKey) internal view returns (uint) {
        return _parameter(_marketKey, PARAMETER_MAX_LEVERAGE);
    }

    function _maxMarketValueUSD(bytes32 _marketKey) internal view returns (uint) {
        return _parameter(_marketKey, PARAMETER_MAX_MARKET_VALUE);
    }

    function _skewScaleUSD(bytes32 _marketKey) internal view returns (uint) {
        return _parameter(_marketKey, PARAMETER_MIN_SKEW_SCALE);
    }

    function _maxFundingRate(bytes32 _marketKey) internal view returns (uint) {
        return _parameter(_marketKey, PARAMETER_MAX_FUNDING_RATE);
    }

    function _minKeeperFee() internal view returns (uint) {
        return _flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_MIN_KEEPER_FEE);
    }

    function _liquidationFeeRatio() internal view returns (uint) {
        return _flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATION_FEE_RATIO);
    }

    function _liquidationBufferRatio() internal view returns (uint) {
        return _flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATION_BUFFER_RATIO);
    }

    function _minInitialMargin() internal view returns (uint) {
        return _flexibleStorage().getUIntValue(SETTING_CONTRACT_NAME, SETTING_MIN_INITIAL_MARGIN);
    }
}


interface IFuturesMarketSettings {
    struct Parameters {
        uint takerFee;
        uint makerFee;
        uint takerFeeNextPrice;
        uint makerFeeNextPrice;
        uint nextPriceConfirmWindow;
        uint maxLeverage;
        uint maxMarketValueUSD;
        uint maxFundingRate;
        uint skewScaleUSD;
    }

    function takerFee(bytes32 _baseAsset) external view returns (uint);

    function makerFee(bytes32 _baseAsset) external view returns (uint);

    function takerFeeNextPrice(bytes32 _baseAsset) external view returns (uint);

    function makerFeeNextPrice(bytes32 _baseAsset) external view returns (uint);

    function nextPriceConfirmWindow(bytes32 _baseAsset) external view returns (uint);

    function maxLeverage(bytes32 _baseAsset) external view returns (uint);

    function maxMarketValueUSD(bytes32 _baseAsset) external view returns (uint);

    function maxFundingRate(bytes32 _baseAsset) external view returns (uint);

    function skewScaleUSD(bytes32 _baseAsset) external view returns (uint);

    function parameters(bytes32 _baseAsset)
        external
        view
        returns (
            uint _takerFee,
            uint _makerFee,
            uint _takerFeeNextPrice,
            uint _makerFeeNextPrice,
            uint _nextPriceConfirmWindow,
            uint _maxLeverage,
            uint _maxMarketValueUSD,
            uint _maxFundingRate,
            uint _skewScaleUSD
        );

    function minKeeperFee() external view returns (uint);

    function liquidationFeeRatio() external view returns (uint);

    function liquidationBufferRatio() external view returns (uint);

    function minInitialMargin() external view returns (uint);
}


interface IFuturesMarketManager {
    function markets(uint index, uint pageSize) external view returns (address[] memory);

    function numMarkets() external view returns (uint);

    function allMarkets() external view returns (address[] memory);

    function marketForKey(bytes32 marketKey) external view returns (address);

    function marketsForKeys(bytes32[] calldata marketKeys) external view returns (address[] memory);

    function totalDebt() external view returns (uint debt, bool isInvalid);
}


interface IFuturesMarketBaseTypes {
    /* ========== TYPES ========== */

    enum Status {
        Ok,
        InvalidPrice,
        PriceOutOfBounds,
        CanLiquidate,
        CannotLiquidate,
        MaxMarketSizeExceeded,
        MaxLeverageExceeded,
        InsufficientMargin,
        NotPermitted,
        NilOrder,
        NoPositionOpen,
        PriceTooVolatile
    }

    // If margin/size are positive, the position is long; if negative then it is short.
    struct Position {
        uint64 id;
        uint64 lastFundingIndex;
        uint128 margin;
        uint128 lastPrice;
        int128 size;
    }

    // next-price order storage
    struct NextPriceOrder {
        int128 sizeDelta; // difference in position to pass to modifyPosition
        uint128 targetRoundId; // price oracle roundId using which price this order needs to exucted
        uint128 commitDeposit; // the commitDeposit paid upon submitting that needs to be refunded if order succeeds
        uint128 keeperDeposit; // the keeperDeposit paid upon submitting that needs to be paid / refunded on tx confirmation
        bytes32 trackingCode; // tracking code to emit on execution for volume source fee sharing
    }
}


interface IFuturesMarket {
    /* ========== FUNCTION INTERFACE ========== */

    /* ---------- Market Details ---------- */

    function marketKey() external view returns (bytes32 key);

    function baseAsset() external view returns (bytes32 key);

    function marketSize() external view returns (uint128 size);

    function marketSkew() external view returns (int128 skew);

    function fundingLastRecomputed() external view returns (uint32 timestamp);

    function fundingSequence(uint index) external view returns (int128 netFunding);

    function positions(address account)
        external
        view
        returns (
            uint64 id,
            uint64 fundingIndex,
            uint128 margin,
            uint128 lastPrice,
            int128 size
        );

    function assetPrice() external view returns (uint price, bool invalid);

    function marketSizes() external view returns (uint long, uint short);

    function marketDebt() external view returns (uint debt, bool isInvalid);

    function currentFundingRate() external view returns (int fundingRate);

    function unrecordedFunding() external view returns (int funding, bool invalid);

    function fundingSequenceLength() external view returns (uint length);

    /* ---------- Position Details ---------- */

    function notionalValue(address account) external view returns (int value, bool invalid);

    function profitLoss(address account) external view returns (int pnl, bool invalid);

    function accruedFunding(address account) external view returns (int funding, bool invalid);

    function remainingMargin(address account) external view returns (uint marginRemaining, bool invalid);

    function accessibleMargin(address account) external view returns (uint marginAccessible, bool invalid);

    function liquidationPrice(address account) external view returns (uint price, bool invalid);

    function liquidationFee(address account) external view returns (uint);

    function canLiquidate(address account) external view returns (bool);

    function orderFee(int sizeDelta) external view returns (uint fee, bool invalid);

    function postTradeDetails(int sizeDelta, address sender)
        external
        view
        returns (
            uint margin,
            int size,
            uint price,
            uint liqPrice,
            uint fee,
            IFuturesMarketBaseTypes.Status status
        );

    /* ---------- Market Operations ---------- */

    function recomputeFunding() external returns (uint lastIndex);

    function transferMargin(int marginDelta) external;

    function withdrawAllMargin() external;

    function modifyPosition(int sizeDelta) external;

    function modifyPositionWithTracking(int sizeDelta, bytes32 trackingCode) external;

    function submitNextPriceOrder(int sizeDelta) external;

    function submitNextPriceOrderWithTracking(int sizeDelta, bytes32 trackingCode) external;

    function cancelNextPriceOrder(address account) external;

    function executeNextPriceOrder(address account) external;

    function closePosition() external;

    function closePositionWithTracking(bytes32 trackingCode) external;

    function liquidatePosition(address account) external;
}


// Inheritance


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/FuturesMarketSettings
contract FuturesMarketSettings is Owned, MixinFuturesMarketSettings, IFuturesMarketSettings {
    /* ========== CONSTANTS ========== */

    /* ---------- Address Resolver Configuration ---------- */

    bytes32 internal constant CONTRACT_FUTURES_MARKET_MANAGER = "FuturesMarketManager";

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

    constructor(address _owner, address _resolver) public Owned(_owner) MixinFuturesMarketSettings(_resolver) {}

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

    function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {
        bytes32[] memory existingAddresses = MixinFuturesMarketSettings.resolverAddressesRequired();
        bytes32[] memory newAddresses = new bytes32[](1);
        newAddresses[0] = CONTRACT_FUTURES_MARKET_MANAGER;
        addresses = combineArrays(existingAddresses, newAddresses);
    }

    function _futuresMarketManager() internal view returns (IFuturesMarketManager) {
        return IFuturesMarketManager(requireAndGetAddress(CONTRACT_FUTURES_MARKET_MANAGER));
    }

    /* ---------- Getters ---------- */

    /*
     * The fee charged when opening a position on the heavy side of a futures market.
     */
    function takerFee(bytes32 _marketKey) external view returns (uint) {
        return _takerFee(_marketKey);
    }

    /*
     * The fee charged when opening a position on the light side of a futures market.
     */
    function makerFee(bytes32 _marketKey) public view returns (uint) {
        return _makerFee(_marketKey);
    }

    /*
     * The fee charged when opening a position on the heavy side of a futures market using next price mechanism.
     */
    function takerFeeNextPrice(bytes32 _marketKey) external view returns (uint) {
        return _takerFeeNextPrice(_marketKey);
    }

    /*
     * The fee charged when opening a position on the light side of a futures market using next price mechanism.
     */
    function makerFeeNextPrice(bytes32 _marketKey) public view returns (uint) {
        return _makerFeeNextPrice(_marketKey);
    }

    /*
     * The number of price update rounds during which confirming next-price is allowed
     */
    function nextPriceConfirmWindow(bytes32 _marketKey) public view returns (uint) {
        return _nextPriceConfirmWindow(_marketKey);
    }

    /*
     * The maximum allowable leverage in a market.
     */
    function maxLeverage(bytes32 _marketKey) public view returns (uint) {
        return _maxLeverage(_marketKey);
    }

    /*
     * The maximum allowable notional value on each side of a market.
     */
    function maxMarketValueUSD(bytes32 _marketKey) public view returns (uint) {
        return _maxMarketValueUSD(_marketKey);
    }

    /*
     * The maximum theoretical funding rate per day charged by a market.
     */
    function maxFundingRate(bytes32 _marketKey) public view returns (uint) {
        return _maxFundingRate(_marketKey);
    }

    /*
     * The skew level at which the max funding rate will be charged.
     */
    function skewScaleUSD(bytes32 _marketKey) public view returns (uint) {
        return _skewScaleUSD(_marketKey);
    }

    function parameters(bytes32 _marketKey)
        external
        view
        returns (
            uint takerFee,
            uint makerFee,
            uint takerFeeNextPrice,
            uint makerFeeNextPrice,
            uint nextPriceConfirmWindow,
            uint maxLeverage,
            uint maxMarketValueUSD,
            uint maxFundingRate,
            uint skewScaleUSD
        )
    {
        takerFee = _takerFee(_marketKey);
        makerFee = _makerFee(_marketKey);
        takerFeeNextPrice = _takerFeeNextPrice(_marketKey);
        makerFeeNextPrice = _makerFeeNextPrice(_marketKey);
        nextPriceConfirmWindow = _nextPriceConfirmWindow(_marketKey);
        maxLeverage = _maxLeverage(_marketKey);
        maxMarketValueUSD = _maxMarketValueUSD(_marketKey);
        maxFundingRate = _maxFundingRate(_marketKey);
        skewScaleUSD = _skewScaleUSD(_marketKey);
    }

    /*
     * The minimum amount of sUSD paid to a liquidator when they successfully liquidate a position.
     * This quantity must be no greater than `minInitialMargin`.
     */
    function minKeeperFee() external view returns (uint) {
        return _minKeeperFee();
    }

    /*
     * Liquidation fee basis points paid to liquidator.
     * Use together with minKeeperFee() to calculate the actual fee paid.
     */
    function liquidationFeeRatio() external view returns (uint) {
        return _liquidationFeeRatio();
    }

    /*
     * Liquidation price buffer in basis points to prevent negative margin on liquidation.
     */
    function liquidationBufferRatio() external view returns (uint) {
        return _liquidationBufferRatio();
    }

    /*
     * The minimum margin required to open a position.
     * This quantity must be no less than `minKeeperFee`.
     */
    function minInitialMargin() external view returns (uint) {
        return _minInitialMargin();
    }

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

    /* ---------- Setters --------- */

    function _setParameter(
        bytes32 _marketKey,
        bytes32 key,
        uint value
    ) internal {
        _flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, keccak256(abi.encodePacked(_marketKey, key)), value);
        emit ParameterUpdated(_marketKey, key, value);
    }

    function setTakerFee(bytes32 _marketKey, uint _takerFee) public onlyOwner {
        require(_takerFee <= 1e18, "taker fee greater than 1");
        _setParameter(_marketKey, PARAMETER_TAKER_FEE, _takerFee);
    }

    function setMakerFee(bytes32 _marketKey, uint _makerFee) public onlyOwner {
        require(_makerFee <= 1e18, "maker fee greater than 1");
        _setParameter(_marketKey, PARAMETER_MAKER_FEE, _makerFee);
    }

    function setTakerFeeNextPrice(bytes32 _marketKey, uint _takerFeeNextPrice) public onlyOwner {
        require(_takerFeeNextPrice <= 1e18, "taker fee greater than 1");
        _setParameter(_marketKey, PARAMETER_TAKER_FEE_NEXT_PRICE, _takerFeeNextPrice);
    }

    function setMakerFeeNextPrice(bytes32 _marketKey, uint _makerFeeNextPrice) public onlyOwner {
        require(_makerFeeNextPrice <= 1e18, "maker fee greater than 1");
        _setParameter(_marketKey, PARAMETER_MAKER_FEE_NEXT_PRICE, _makerFeeNextPrice);
    }

    function setNextPriceConfirmWindow(bytes32 _marketKey, uint _nextPriceConfirmWindow) public onlyOwner {
        _setParameter(_marketKey, PARAMETER_NEXT_PRICE_CONFIRM_WINDOW, _nextPriceConfirmWindow);
    }

    function setMaxLeverage(bytes32 _marketKey, uint _maxLeverage) public onlyOwner {
        _setParameter(_marketKey, PARAMETER_MAX_LEVERAGE, _maxLeverage);
    }

    function setMaxMarketValueUSD(bytes32 _marketKey, uint _maxMarketValueUSD) public onlyOwner {
        _setParameter(_marketKey, PARAMETER_MAX_MARKET_VALUE, _maxMarketValueUSD);
    }

    // Before altering parameters relevant to funding rates, outstanding funding on the underlying market
    // must be recomputed, otherwise already-accrued but unrealised funding in the market can change.

    function _recomputeFunding(bytes32 _marketKey) internal {
        IFuturesMarket market = IFuturesMarket(_futuresMarketManager().marketForKey(_marketKey));
        if (market.marketSize() > 0) {
            // only recompute funding when market has positions, this check is important for initial setup
            market.recomputeFunding();
        }
    }

    function setMaxFundingRate(bytes32 _marketKey, uint _maxFundingRate) public onlyOwner {
        _recomputeFunding(_marketKey);
        _setParameter(_marketKey, PARAMETER_MAX_FUNDING_RATE, _maxFundingRate);
    }

    function setSkewScaleUSD(bytes32 _marketKey, uint _skewScaleUSD) public onlyOwner {
        require(_skewScaleUSD > 0, "cannot set skew scale 0");
        _recomputeFunding(_marketKey);
        _setParameter(_marketKey, PARAMETER_MIN_SKEW_SCALE, _skewScaleUSD);
    }

    function setParameters(
        bytes32 _marketKey,
        uint _takerFee,
        uint _makerFee,
        uint _takerFeeNextPrice,
        uint _makerFeeNextPrice,
        uint _nextPriceConfirmWindow,
        uint _maxLeverage,
        uint _maxMarketValueUSD,
        uint _maxFundingRate,
        uint _skewScaleUSD
    ) external onlyOwner {
        _recomputeFunding(_marketKey);
        setTakerFee(_marketKey, _takerFee);
        setMakerFee(_marketKey, _makerFee);
        setTakerFeeNextPrice(_marketKey, _takerFeeNextPrice);
        setMakerFeeNextPrice(_marketKey, _makerFeeNextPrice);
        setNextPriceConfirmWindow(_marketKey, _nextPriceConfirmWindow);
        setMaxLeverage(_marketKey, _maxLeverage);
        setMaxMarketValueUSD(_marketKey, _maxMarketValueUSD);
        setMaxFundingRate(_marketKey, _maxFundingRate);
        setSkewScaleUSD(_marketKey, _skewScaleUSD);
    }

    function setMinKeeperFee(uint _sUSD) external onlyOwner {
        require(_sUSD <= _minInitialMargin(), "min margin < liquidation fee");
        _flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, SETTING_MIN_KEEPER_FEE, _sUSD);
        emit MinKeeperFeeUpdated(_sUSD);
    }

    function setLiquidationFeeRatio(uint _ratio) external onlyOwner {
        _flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATION_FEE_RATIO, _ratio);
        emit LiquidationFeeRatioUpdated(_ratio);
    }

    function setLiquidationBufferRatio(uint _ratio) external onlyOwner {
        _flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, SETTING_LIQUIDATION_BUFFER_RATIO, _ratio);
        emit LiquidationBufferRatioUpdated(_ratio);
    }

    function setMinInitialMargin(uint _minMargin) external onlyOwner {
        require(_minKeeperFee() <= _minMargin, "min margin < liquidation fee");
        _flexibleStorage().setUIntValue(SETTING_CONTRACT_NAME, SETTING_MIN_INITIAL_MARGIN, _minMargin);
        emit MinInitialMarginUpdated(_minMargin);
    }

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

    event ParameterUpdated(bytes32 indexed marketKey, bytes32 indexed parameter, uint value);
    event MinKeeperFeeUpdated(uint sUSD);
    event LiquidationFeeRatioUpdated(uint bps);
    event LiquidationBufferRatioUpdated(uint bps);
    event MinInitialMarginUpdated(uint minMargin);
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_resolver","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"name","type":"bytes32"},{"indexed":false,"internalType":"address","name":"destination","type":"address"}],"name":"CacheUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bps","type":"uint256"}],"name":"LiquidationBufferRatioUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bps","type":"uint256"}],"name":"LiquidationFeeRatioUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minMargin","type":"uint256"}],"name":"MinInitialMarginUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"sUSD","type":"uint256"}],"name":"MinKeeperFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"marketKey","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"parameter","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"ParameterUpdated","type":"event"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isResolverCached","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"liquidationBufferRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"liquidationFeeRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"}],"name":"makerFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"}],"name":"makerFeeNextPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"}],"name":"maxFundingRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"}],"name":"maxLeverage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"}],"name":"maxMarketValueUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minInitialMargin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minKeeperFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"}],"name":"nextPriceConfirmWindow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"}],"name":"parameters","outputs":[{"internalType":"uint256","name":"takerFee","type":"uint256"},{"internalType":"uint256","name":"makerFee","type":"uint256"},{"internalType":"uint256","name":"takerFeeNextPrice","type":"uint256"},{"internalType":"uint256","name":"makerFeeNextPrice","type":"uint256"},{"internalType":"uint256","name":"nextPriceConfirmWindow","type":"uint256"},{"internalType":"uint256","name":"maxLeverage","type":"uint256"},{"internalType":"uint256","name":"maxMarketValueUSD","type":"uint256"},{"internalType":"uint256","name":"maxFundingRate","type":"uint256"},{"internalType":"uint256","name":"skewScaleUSD","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebuildCache","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"resolver","outputs":[{"internalType":"contract AddressResolver","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"resolverAddressesRequired","outputs":[{"internalType":"bytes32[]","name":"addresses","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_ratio","type":"uint256"}],"name":"setLiquidationBufferRatio","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_ratio","type":"uint256"}],"name":"setLiquidationFeeRatio","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"},{"internalType":"uint256","name":"_makerFee","type":"uint256"}],"name":"setMakerFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"},{"internalType":"uint256","name":"_makerFeeNextPrice","type":"uint256"}],"name":"setMakerFeeNextPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"},{"internalType":"uint256","name":"_maxFundingRate","type":"uint256"}],"name":"setMaxFundingRate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"},{"internalType":"uint256","name":"_maxLeverage","type":"uint256"}],"name":"setMaxLeverage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"},{"internalType":"uint256","name":"_maxMarketValueUSD","type":"uint256"}],"name":"setMaxMarketValueUSD","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_minMargin","type":"uint256"}],"name":"setMinInitialMargin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_sUSD","type":"uint256"}],"name":"setMinKeeperFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"},{"internalType":"uint256","name":"_nextPriceConfirmWindow","type":"uint256"}],"name":"setNextPriceConfirmWindow","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"},{"internalType":"uint256","name":"_takerFee","type":"uint256"},{"internalType":"uint256","name":"_makerFee","type":"uint256"},{"internalType":"uint256","name":"_takerFeeNextPrice","type":"uint256"},{"internalType":"uint256","name":"_makerFeeNextPrice","type":"uint256"},{"internalType":"uint256","name":"_nextPriceConfirmWindow","type":"uint256"},{"internalType":"uint256","name":"_maxLeverage","type":"uint256"},{"internalType":"uint256","name":"_maxMarketValueUSD","type":"uint256"},{"internalType":"uint256","name":"_maxFundingRate","type":"uint256"},{"internalType":"uint256","name":"_skewScaleUSD","type":"uint256"}],"name":"setParameters","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"},{"internalType":"uint256","name":"_skewScaleUSD","type":"uint256"}],"name":"setSkewScaleUSD","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"},{"internalType":"uint256","name":"_takerFee","type":"uint256"}],"name":"setTakerFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"},{"internalType":"uint256","name":"_takerFeeNextPrice","type":"uint256"}],"name":"setTakerFeeNextPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"}],"name":"skewScaleUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"}],"name":"takerFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_marketKey","type":"bytes32"}],"name":"takerFeeNextPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50604051611e8b380380611e8b8339818101604052604081101561003357600080fd5b5080516020909101518080836001600160a01b03811661009a576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150600280546001600160a01b039092166001600160a01b0319909216919091179055505050611d65806101266000396000f3fe608060405234801561001057600080fd5b506004361061021c5760003560e01c806354e67b56116101255780638f20f2ea116100ad578063aacb3d4d1161007c578063aacb3d4d1461061f578063cdcec2d114610642578063cfe711031461065f578063d4d96e5e14610667578063fb54bfc8146106845761021c565b80638f20f2ea146105ba57806396129d2b146105c2578063a61fd348146105df578063a9ec1416146106025761021c565b806379ba5097116100f457806379ba509714610512578063899ffef41461051a5780638c3556e9146105725780638c6de0d71461058f5780638da5cb5b146105b25761021c565b806354e67b561461048f578063632f54f91461049757806369d41a6f146104b4578063741853601461050a5761021c565b806320edcdb8116101a8578063333ef25311610177578063333ef25314610407578063381bc187146104245780633da61cf81461044757806343b3c0041461046457806353a47bb7146104875761021c565b806320edcdb81461038e5780632af64bd3146103ab5780632b260b70146103c75780633296af23146103ea5761021c565b80630c54a383116101ef5780630c54a383146102fd57806313995502146103205780631627540c146103285780631773b5e71461034e5780631f2b05951461036b5761021c565b8063025068041461022157806304f3bcec146102855780630730bf53146102a95780630b1ccf80146102d8575b600080fd5b61023e6004803603602081101561023757600080fd5b50356106a1565b60408051998a5260208a0198909852888801969096526060880194909452608087019290925260a086015260c085015260e084015261010083015251908190036101200190f35b61028d61071f565b604080516001600160a01b039092168252519081900360200190f35b6102c6600480360360208110156102bf57600080fd5b503561072e565b60408051918252519081900360200190f35b6102fb600480360360408110156102ee57600080fd5b508035906020013561073f565b005b6102fb6004803603604081101561031357600080fd5b50803590602001356107b9565b6102c6610838565b6102fb6004803603602081101561033e57600080fd5b50356001600160a01b0316610848565b6102c66004803603602081101561036457600080fd5b50356108a4565b6102fb6004803603604081101561038157600080fd5b50803590602001356108af565b6102fb600480360360208110156103a457600080fd5b503561092f565b6103b3610a67565b604080519115158252519081900360200190f35b6102fb600480360360408110156103dd57600080fd5b5080359060200135610b71565b6102fb6004803603602081101561040057600080fd5b5035610bf0565b6102fb6004803603602081101561041d57600080fd5b5035610cd2565b6102fb6004803603604081101561043a57600080fd5b5080359060200135610e06565b6102c66004803603602081101561045d57600080fd5b5035610e7c565b6102fb6004803603604081101561047a57600080fd5b5080359060200135610e87565b61028d610eb3565b6102c6610ec2565b6102c6600480360360208110156104ad57600080fd5b5035610ecc565b6102fb60048036036101408110156104cb57600080fd5b5080359060208101359060408101359060608101359060808101359060a08101359060c08101359060e081013590610100810135906101200135610ed7565b6102fb610f4e565b6102fb611112565b6105226111ce565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561055e578181015183820152602001610546565b505050509050019250505060405180910390f35b6102c66004803603602081101561058857600080fd5b5035611241565b6102fb600480360360408110156105a557600080fd5b508035906020013561124c565b61028d611273565b6102c6611282565b6102c6600480360360208110156105d857600080fd5b503561128c565b6102fb600480360360408110156105f557600080fd5b5080359060200135611297565b6102fb6004803603602081101561061857600080fd5b50356112b8565b6102fb6004803603604081101561063557600080fd5b508035906020013561139a565b6102c66004803603602081101561065857600080fd5b50356113c7565b6102c66113d2565b6102c66004803603602081101561067d57600080fd5b50356113dc565b6102c66004803603602081101561069a57600080fd5b50356113e7565b60008060008060008060008060006106b88a6113f2565b98506106c38a611409565b97506106ce8a611420565b96506106d98a611440565b95506106e48a611460565b94506106ef8a611485565b93506106fa8a61149f565b92506107058a6114bf565b91506107108a6114dc565b90509193959799909294969850565b6002546001600160a01b031681565b600061073982611485565b92915050565b6107476114f7565b670de0b6b3a764000081111561079f576040805162461bcd60e51b81526020600482015260186024820152776d616b6572206665652067726561746572207468616e203160401b604482015290519081900360640190fd5b6107b582676d616b657246656560c01b83611542565b5050565b6107c16114f7565b670de0b6b3a7640000811115610819576040805162461bcd60e51b815260206004820152601860248201527774616b6572206665652067726561746572207468616e203160401b604482015290519081900360640190fd5b6107b5827074616b65724665654e657874507269636560781b83611542565b6000610842611628565b90505b90565b6108506114f7565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b600061073982611420565b6108b76114f7565b6000811161090c576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f742073657420736b6577207363616c652030000000000000000000604482015290519081900360640190fd5b610915826116d2565b6107b5826b1cdad95dd4d8d85b195554d160a21b83611542565b6109376114f7565b80610940611628565b1115610993576040805162461bcd60e51b815260206004820152601c60248201527f6d696e206d617267696e203c206c69717569646174696f6e2066656500000000604482015290519081900360640190fd5b61099b611840565b6001600160a01b0316631d5b277f600080516020611ce283398151915276333aba3ab932b9a6b4b724b734ba34b0b626b0b933b4b760491b846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015610a1857600080fd5b505af1158015610a2c573d6000803e3d6000fd5b50506040805184815290517ff5958b2492f4eeb807d26adb1e05d927402a2b27ec6b67e98a76def8bf9fbb999350908190036020019150a150565b60006060610a736111ce565b905060005b8151811015610b68576000828281518110610a8f57fe5b6020908102919091018101516000818152600383526040908190205460025482516321f8a72160e01b81526004810185905292519395506001600160a01b03918216949116926321f8a721926024808201939291829003018186803b158015610af757600080fd5b505afa158015610b0b573d6000803e3d6000fd5b505050506040513d6020811015610b2157600080fd5b50516001600160a01b0316141580610b4e57506000818152600360205260409020546001600160a01b0316155b15610b5f5760009350505050610845565b50600101610a78565b50600191505090565b610b796114f7565b670de0b6b3a7640000811115610bd1576040805162461bcd60e51b81526020600482015260186024820152776d616b6572206665652067726561746572207468616e203160401b604482015290519081900360640190fd5b6107b582706d616b65724665654e657874507269636560781b83611542565b610bf86114f7565b610c00611840565b6001600160a01b0316631d5b277f600080516020611ce28339815191527f667574757265734c69717569646174696f6e427566666572526174696f000000846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015610c8357600080fd5b505af1158015610c97573d6000803e3d6000fd5b50506040805184815290517f733333f0452c918352a0a3b74e6e95d7682ef3001a6b070df09cc6e6c27a63769350908190036020019150a150565b610cda6114f7565b610ce261185d565b811115610d36576040805162461bcd60e51b815260206004820152601c60248201527f6d696e206d617267696e203c206c69717569646174696f6e2066656500000000604482015290519081900360640190fd5b610d3e611840565b6001600160a01b0316631d5b277f600080516020611ce283398151915272667574757265734d696e4b656570657246656560681b846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015610db757600080fd5b505af1158015610dcb573d6000803e3d6000fd5b50506040805184815290517f19aa707c9ee917e97ea0ac9146e39c123d4bd88e1f2cd719d32a8a54fe4099029350908190036020019150a150565b610e0e6114f7565b670de0b6b3a7640000811115610e66576040805162461bcd60e51b815260206004820152601860248201527774616b6572206665652067726561746572207468616e203160401b604482015290519081900360640190fd5b6107b5826774616b657246656560c01b83611542565b600061073982611409565b610e8f6114f7565b6107b582756e6578745072696365436f6e6669726d57696e646f7760501b83611542565b6001546001600160a01b031681565b60006108426118da565b6000610739826114dc565b610edf6114f7565b610ee88a6116d2565b610ef28a8a610e06565b610efc8a8961073f565b610f068a886107b9565b610f108a87610b71565b610f1a8a86610e87565b610f248a85611297565b610f2e8a8461124c565b610f388a8361139a565b610f428a826108af565b50505050505050505050565b6060610f586111ce565b905060005b81518110156107b5576000828281518110610f7457fe5b602090810291909101810151600254604080517f5265736f6c766572206d697373696e67207461726765743a2000000000000000818601526039808201859052825180830390910181526059820180845263dacb2d0160e01b9052605d8201858152607d83019384528151609d84015281519597506000966001600160a01b039095169563dacb2d01958995939492939260bd0191908501908083838c5b8381101561102a578181015183820152602001611012565b50505050905090810190601f1680156110575780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561107557600080fd5b505afa158015611089573d6000803e3d6000fd5b505050506040513d602081101561109f57600080fd5b505160008381526003602090815260409182902080546001600160a01b0319166001600160a01b03851690811790915582518681529182015281519293507f88a93678a3692f6789d9546fc621bf7234b101ddb7d4fe479455112831b8aa68929081900390910190a15050600101610f5d565b6001546001600160a01b0316331461115b5760405162461bcd60e51b8152600401808060200182810382526035815260200180611cad6035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6060806111d961195d565b604080516001808252818301909252919250606091906020808301908038833901905050905073233aba3ab932b9a6b0b935b2ba26b0b730b3b2b960611b8160008151811061122457fe5b60200260200101818152505061123a82826119ae565b9250505090565b6000610739826113f2565b6112546114f7565b6107b582701b585e13585c9ad95d15985b1d595554d1607a1b83611542565b6000546001600160a01b031681565b600061084261185d565b600061073982611460565b61129f6114f7565b6107b5826a6d61784c6576657261676560a81b83611542565b6112c06114f7565b6112c8611840565b6001600160a01b0316631d5b277f600080516020611ce28339815191527f667574757265734c69717569646174696f6e466565526174696f000000000000846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b15801561134b57600080fd5b505af115801561135f573d6000803e3d6000fd5b50506040805184815290517fc20b071f9997836faebec2ea68df94cb8cd01c8721f2c0b973443d8316eaa0709350908190036020019150a150565b6113a26114f7565b6113ab826116d2565b6107b5826d6d617846756e64696e675261746560901b83611542565b600061073982611440565b6000610842611a6a565b60006107398261149f565b6000610739826114bf565b6000610739826774616b657246656560c01b611aed565b600061073982676d616b657246656560c01b611aed565b6000610739827074616b65724665654e657874507269636560781b611aed565b600061073982706d616b65724665654e657874507269636560781b611aed565b600061073982756e6578745072696365436f6e6669726d57696e646f7760501b611aed565b6000610739826a6d61784c6576657261676560a81b611aed565b600061073982701b585e13585c9ad95d15985b1d595554d1607a1b611aed565b6000610739826d6d617846756e64696e675261746560901b611aed565b6000610739826b1cdad95dd4d8d85b195554d160a21b611aed565b6000546001600160a01b031633146115405760405162461bcd60e51b815260040180806020018281038252602f815260200180611d02602f913960400191505060405180910390fd5b565b61154a611840565b6040805160208082018790528183018690528251808303840181526060830180855281519190920120631d5b277f60e01b909152600080516020611ce28339815191526064830152608482015260a4810184905290516001600160a01b039290921691631d5b277f9160c48082019260009290919082900301818387803b1580156115d457600080fd5b505af11580156115e8573d6000803e3d6000fd5b50506040805184815290518593508692507fb1e024a1aed9a1f08ef2258cedd5c544e48dcb5befc1ec2aa0ff9ea60997d14f9181900360200190a3505050565b6000611632611840565b6001600160a01b03166323257c2b600080516020611ce283398151915272667574757265734d696e4b656570657246656560681b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156116a157600080fd5b505afa1580156116b5573d6000803e3d6000fd5b505050506040513d60208110156116cb57600080fd5b5051905090565b60006116dc611bb1565b6001600160a01b031663e63bfadb836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d602081101561174957600080fd5b50516040805163eb56105d60e01b815290519192506000916001600160a01b0384169163eb56105d916004808301926020929190829003018186803b15801561179157600080fd5b505afa1580156117a5573d6000803e3d6000fd5b505050506040513d60208110156117bb57600080fd5b50516fffffffffffffffffffffffffffffffff1611156107b557806001600160a01b0316634eb985cc6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561181057600080fd5b505af1158015611824573d6000803e3d6000fd5b505050506040513d602081101561183a57600080fd5b50505050565b60006108426e466c657869626c6553746f7261676560881b611bcf565b6000611867611840565b6001600160a01b03166323257c2b600080516020611ce283398151915276333aba3ab932b9a6b4b724b734ba34b0b626b0b933b4b760491b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156116a157600080fd5b60006118e4611840565b6001600160a01b03166323257c2b600080516020611ce28339815191527f667574757265734c69717569646174696f6e427566666572526174696f0000006040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156116a157600080fd5b604080516001808252818301909252606091602080830190803883390190505090506e466c657869626c6553746f7261676560881b8160008151811061199f57fe5b60200260200101818152505090565b606081518351016040519080825280602002602001820160405280156119de578160200160208202803883390190505b50905060005b8351811015611a20578381815181106119f957fe5b6020026020010151828281518110611a0d57fe5b60209081029190910101526001016119e4565b5060005b8251811015611a6357828181518110611a3957fe5b6020026020010151828286510181518110611a5057fe5b6020908102919091010152600101611a24565b5092915050565b6000611a74611840565b6001600160a01b03166323257c2b600080516020611ce28339815191527f667574757265734c69717569646174696f6e466565526174696f0000000000006040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156116a157600080fd5b6000611af7611840565b6001600160a01b03166323257c2b600080516020611ce283398151915285856040516020018083815260200182815260200192505050604051602081830303815290604052805190602001206040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015611b7e57600080fd5b505afa158015611b92573d6000803e3d6000fd5b505050506040513d6020811015611ba857600080fd5b50519392505050565b600061084273233aba3ab932b9a6b0b935b2ba26b0b730b3b2b960611b5b600081815260036020908152604080832054815170026b4b9b9b4b7339030b2323932b9b99d1607d1b9381019390935260318084018690528251808503909101815260519093019091526001600160a01b03169081611a635760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611c71578181015183820152602001611c59565b50505050905090810190601f168015611c9e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e657273686970467574757265734d61726b657453657474696e677300000000000000000000004f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6ea265627a7a7231582099e4d405bb2d933d3ecaaef4362b16433cdecb613a10c2fd5f655307d01ae6ac64736f6c63430005100032000000000000000000000000de910777c787903f78c89e7a0bf7f4c435cbb1fe0000000000000000000000001cb059b7e74fd21665968c908806143e744d5f30

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061021c5760003560e01c806354e67b56116101255780638f20f2ea116100ad578063aacb3d4d1161007c578063aacb3d4d1461061f578063cdcec2d114610642578063cfe711031461065f578063d4d96e5e14610667578063fb54bfc8146106845761021c565b80638f20f2ea146105ba57806396129d2b146105c2578063a61fd348146105df578063a9ec1416146106025761021c565b806379ba5097116100f457806379ba509714610512578063899ffef41461051a5780638c3556e9146105725780638c6de0d71461058f5780638da5cb5b146105b25761021c565b806354e67b561461048f578063632f54f91461049757806369d41a6f146104b4578063741853601461050a5761021c565b806320edcdb8116101a8578063333ef25311610177578063333ef25314610407578063381bc187146104245780633da61cf81461044757806343b3c0041461046457806353a47bb7146104875761021c565b806320edcdb81461038e5780632af64bd3146103ab5780632b260b70146103c75780633296af23146103ea5761021c565b80630c54a383116101ef5780630c54a383146102fd57806313995502146103205780631627540c146103285780631773b5e71461034e5780631f2b05951461036b5761021c565b8063025068041461022157806304f3bcec146102855780630730bf53146102a95780630b1ccf80146102d8575b600080fd5b61023e6004803603602081101561023757600080fd5b50356106a1565b60408051998a5260208a0198909852888801969096526060880194909452608087019290925260a086015260c085015260e084015261010083015251908190036101200190f35b61028d61071f565b604080516001600160a01b039092168252519081900360200190f35b6102c6600480360360208110156102bf57600080fd5b503561072e565b60408051918252519081900360200190f35b6102fb600480360360408110156102ee57600080fd5b508035906020013561073f565b005b6102fb6004803603604081101561031357600080fd5b50803590602001356107b9565b6102c6610838565b6102fb6004803603602081101561033e57600080fd5b50356001600160a01b0316610848565b6102c66004803603602081101561036457600080fd5b50356108a4565b6102fb6004803603604081101561038157600080fd5b50803590602001356108af565b6102fb600480360360208110156103a457600080fd5b503561092f565b6103b3610a67565b604080519115158252519081900360200190f35b6102fb600480360360408110156103dd57600080fd5b5080359060200135610b71565b6102fb6004803603602081101561040057600080fd5b5035610bf0565b6102fb6004803603602081101561041d57600080fd5b5035610cd2565b6102fb6004803603604081101561043a57600080fd5b5080359060200135610e06565b6102c66004803603602081101561045d57600080fd5b5035610e7c565b6102fb6004803603604081101561047a57600080fd5b5080359060200135610e87565b61028d610eb3565b6102c6610ec2565b6102c6600480360360208110156104ad57600080fd5b5035610ecc565b6102fb60048036036101408110156104cb57600080fd5b5080359060208101359060408101359060608101359060808101359060a08101359060c08101359060e081013590610100810135906101200135610ed7565b6102fb610f4e565b6102fb611112565b6105226111ce565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561055e578181015183820152602001610546565b505050509050019250505060405180910390f35b6102c66004803603602081101561058857600080fd5b5035611241565b6102fb600480360360408110156105a557600080fd5b508035906020013561124c565b61028d611273565b6102c6611282565b6102c6600480360360208110156105d857600080fd5b503561128c565b6102fb600480360360408110156105f557600080fd5b5080359060200135611297565b6102fb6004803603602081101561061857600080fd5b50356112b8565b6102fb6004803603604081101561063557600080fd5b508035906020013561139a565b6102c66004803603602081101561065857600080fd5b50356113c7565b6102c66113d2565b6102c66004803603602081101561067d57600080fd5b50356113dc565b6102c66004803603602081101561069a57600080fd5b50356113e7565b60008060008060008060008060006106b88a6113f2565b98506106c38a611409565b97506106ce8a611420565b96506106d98a611440565b95506106e48a611460565b94506106ef8a611485565b93506106fa8a61149f565b92506107058a6114bf565b91506107108a6114dc565b90509193959799909294969850565b6002546001600160a01b031681565b600061073982611485565b92915050565b6107476114f7565b670de0b6b3a764000081111561079f576040805162461bcd60e51b81526020600482015260186024820152776d616b6572206665652067726561746572207468616e203160401b604482015290519081900360640190fd5b6107b582676d616b657246656560c01b83611542565b5050565b6107c16114f7565b670de0b6b3a7640000811115610819576040805162461bcd60e51b815260206004820152601860248201527774616b6572206665652067726561746572207468616e203160401b604482015290519081900360640190fd5b6107b5827074616b65724665654e657874507269636560781b83611542565b6000610842611628565b90505b90565b6108506114f7565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b600061073982611420565b6108b76114f7565b6000811161090c576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f742073657420736b6577207363616c652030000000000000000000604482015290519081900360640190fd5b610915826116d2565b6107b5826b1cdad95dd4d8d85b195554d160a21b83611542565b6109376114f7565b80610940611628565b1115610993576040805162461bcd60e51b815260206004820152601c60248201527f6d696e206d617267696e203c206c69717569646174696f6e2066656500000000604482015290519081900360640190fd5b61099b611840565b6001600160a01b0316631d5b277f600080516020611ce283398151915276333aba3ab932b9a6b4b724b734ba34b0b626b0b933b4b760491b846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015610a1857600080fd5b505af1158015610a2c573d6000803e3d6000fd5b50506040805184815290517ff5958b2492f4eeb807d26adb1e05d927402a2b27ec6b67e98a76def8bf9fbb999350908190036020019150a150565b60006060610a736111ce565b905060005b8151811015610b68576000828281518110610a8f57fe5b6020908102919091018101516000818152600383526040908190205460025482516321f8a72160e01b81526004810185905292519395506001600160a01b03918216949116926321f8a721926024808201939291829003018186803b158015610af757600080fd5b505afa158015610b0b573d6000803e3d6000fd5b505050506040513d6020811015610b2157600080fd5b50516001600160a01b0316141580610b4e57506000818152600360205260409020546001600160a01b0316155b15610b5f5760009350505050610845565b50600101610a78565b50600191505090565b610b796114f7565b670de0b6b3a7640000811115610bd1576040805162461bcd60e51b81526020600482015260186024820152776d616b6572206665652067726561746572207468616e203160401b604482015290519081900360640190fd5b6107b582706d616b65724665654e657874507269636560781b83611542565b610bf86114f7565b610c00611840565b6001600160a01b0316631d5b277f600080516020611ce28339815191527f667574757265734c69717569646174696f6e427566666572526174696f000000846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015610c8357600080fd5b505af1158015610c97573d6000803e3d6000fd5b50506040805184815290517f733333f0452c918352a0a3b74e6e95d7682ef3001a6b070df09cc6e6c27a63769350908190036020019150a150565b610cda6114f7565b610ce261185d565b811115610d36576040805162461bcd60e51b815260206004820152601c60248201527f6d696e206d617267696e203c206c69717569646174696f6e2066656500000000604482015290519081900360640190fd5b610d3e611840565b6001600160a01b0316631d5b277f600080516020611ce283398151915272667574757265734d696e4b656570657246656560681b846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015610db757600080fd5b505af1158015610dcb573d6000803e3d6000fd5b50506040805184815290517f19aa707c9ee917e97ea0ac9146e39c123d4bd88e1f2cd719d32a8a54fe4099029350908190036020019150a150565b610e0e6114f7565b670de0b6b3a7640000811115610e66576040805162461bcd60e51b815260206004820152601860248201527774616b6572206665652067726561746572207468616e203160401b604482015290519081900360640190fd5b6107b5826774616b657246656560c01b83611542565b600061073982611409565b610e8f6114f7565b6107b582756e6578745072696365436f6e6669726d57696e646f7760501b83611542565b6001546001600160a01b031681565b60006108426118da565b6000610739826114dc565b610edf6114f7565b610ee88a6116d2565b610ef28a8a610e06565b610efc8a8961073f565b610f068a886107b9565b610f108a87610b71565b610f1a8a86610e87565b610f248a85611297565b610f2e8a8461124c565b610f388a8361139a565b610f428a826108af565b50505050505050505050565b6060610f586111ce565b905060005b81518110156107b5576000828281518110610f7457fe5b602090810291909101810151600254604080517f5265736f6c766572206d697373696e67207461726765743a2000000000000000818601526039808201859052825180830390910181526059820180845263dacb2d0160e01b9052605d8201858152607d83019384528151609d84015281519597506000966001600160a01b039095169563dacb2d01958995939492939260bd0191908501908083838c5b8381101561102a578181015183820152602001611012565b50505050905090810190601f1680156110575780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561107557600080fd5b505afa158015611089573d6000803e3d6000fd5b505050506040513d602081101561109f57600080fd5b505160008381526003602090815260409182902080546001600160a01b0319166001600160a01b03851690811790915582518681529182015281519293507f88a93678a3692f6789d9546fc621bf7234b101ddb7d4fe479455112831b8aa68929081900390910190a15050600101610f5d565b6001546001600160a01b0316331461115b5760405162461bcd60e51b8152600401808060200182810382526035815260200180611cad6035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6060806111d961195d565b604080516001808252818301909252919250606091906020808301908038833901905050905073233aba3ab932b9a6b0b935b2ba26b0b730b3b2b960611b8160008151811061122457fe5b60200260200101818152505061123a82826119ae565b9250505090565b6000610739826113f2565b6112546114f7565b6107b582701b585e13585c9ad95d15985b1d595554d1607a1b83611542565b6000546001600160a01b031681565b600061084261185d565b600061073982611460565b61129f6114f7565b6107b5826a6d61784c6576657261676560a81b83611542565b6112c06114f7565b6112c8611840565b6001600160a01b0316631d5b277f600080516020611ce28339815191527f667574757265734c69717569646174696f6e466565526174696f000000000000846040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b15801561134b57600080fd5b505af115801561135f573d6000803e3d6000fd5b50506040805184815290517fc20b071f9997836faebec2ea68df94cb8cd01c8721f2c0b973443d8316eaa0709350908190036020019150a150565b6113a26114f7565b6113ab826116d2565b6107b5826d6d617846756e64696e675261746560901b83611542565b600061073982611440565b6000610842611a6a565b60006107398261149f565b6000610739826114bf565b6000610739826774616b657246656560c01b611aed565b600061073982676d616b657246656560c01b611aed565b6000610739827074616b65724665654e657874507269636560781b611aed565b600061073982706d616b65724665654e657874507269636560781b611aed565b600061073982756e6578745072696365436f6e6669726d57696e646f7760501b611aed565b6000610739826a6d61784c6576657261676560a81b611aed565b600061073982701b585e13585c9ad95d15985b1d595554d1607a1b611aed565b6000610739826d6d617846756e64696e675261746560901b611aed565b6000610739826b1cdad95dd4d8d85b195554d160a21b611aed565b6000546001600160a01b031633146115405760405162461bcd60e51b815260040180806020018281038252602f815260200180611d02602f913960400191505060405180910390fd5b565b61154a611840565b6040805160208082018790528183018690528251808303840181526060830180855281519190920120631d5b277f60e01b909152600080516020611ce28339815191526064830152608482015260a4810184905290516001600160a01b039290921691631d5b277f9160c48082019260009290919082900301818387803b1580156115d457600080fd5b505af11580156115e8573d6000803e3d6000fd5b50506040805184815290518593508692507fb1e024a1aed9a1f08ef2258cedd5c544e48dcb5befc1ec2aa0ff9ea60997d14f9181900360200190a3505050565b6000611632611840565b6001600160a01b03166323257c2b600080516020611ce283398151915272667574757265734d696e4b656570657246656560681b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156116a157600080fd5b505afa1580156116b5573d6000803e3d6000fd5b505050506040513d60208110156116cb57600080fd5b5051905090565b60006116dc611bb1565b6001600160a01b031663e63bfadb836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561171f57600080fd5b505afa158015611733573d6000803e3d6000fd5b505050506040513d602081101561174957600080fd5b50516040805163eb56105d60e01b815290519192506000916001600160a01b0384169163eb56105d916004808301926020929190829003018186803b15801561179157600080fd5b505afa1580156117a5573d6000803e3d6000fd5b505050506040513d60208110156117bb57600080fd5b50516fffffffffffffffffffffffffffffffff1611156107b557806001600160a01b0316634eb985cc6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561181057600080fd5b505af1158015611824573d6000803e3d6000fd5b505050506040513d602081101561183a57600080fd5b50505050565b60006108426e466c657869626c6553746f7261676560881b611bcf565b6000611867611840565b6001600160a01b03166323257c2b600080516020611ce283398151915276333aba3ab932b9a6b4b724b734ba34b0b626b0b933b4b760491b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156116a157600080fd5b60006118e4611840565b6001600160a01b03166323257c2b600080516020611ce28339815191527f667574757265734c69717569646174696f6e427566666572526174696f0000006040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156116a157600080fd5b604080516001808252818301909252606091602080830190803883390190505090506e466c657869626c6553746f7261676560881b8160008151811061199f57fe5b60200260200101818152505090565b606081518351016040519080825280602002602001820160405280156119de578160200160208202803883390190505b50905060005b8351811015611a20578381815181106119f957fe5b6020026020010151828281518110611a0d57fe5b60209081029190910101526001016119e4565b5060005b8251811015611a6357828181518110611a3957fe5b6020026020010151828286510181518110611a5057fe5b6020908102919091010152600101611a24565b5092915050565b6000611a74611840565b6001600160a01b03166323257c2b600080516020611ce28339815191527f667574757265734c69717569646174696f6e466565526174696f0000000000006040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156116a157600080fd5b6000611af7611840565b6001600160a01b03166323257c2b600080516020611ce283398151915285856040516020018083815260200182815260200192505050604051602081830303815290604052805190602001206040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015611b7e57600080fd5b505afa158015611b92573d6000803e3d6000fd5b505050506040513d6020811015611ba857600080fd5b50519392505050565b600061084273233aba3ab932b9a6b0b935b2ba26b0b730b3b2b960611b5b600081815260036020908152604080832054815170026b4b9b9b4b7339030b2323932b9b99d1607d1b9381019390935260318084018690528251808503909101815260519093019091526001600160a01b03169081611a635760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611c71578181015183820152602001611c59565b50505050905090810190601f168015611c9e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e657273686970467574757265734d61726b657453657474696e677300000000000000000000004f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6ea265627a7a7231582099e4d405bb2d933d3ecaaef4362b16433cdecb613a10c2fd5f655307d01ae6ac64736f6c63430005100032

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

000000000000000000000000de910777c787903f78c89e7a0bf7f4c435cbb1fe0000000000000000000000001cb059b7e74fd21665968c908806143e744d5f30

-----Decoded View---------------
Arg [0] : _owner (address): 0xDe910777C787903F78C89e7a0bf7F4C435cBB1Fe
Arg [1] : _resolver (address): 0x1Cb059b7e74fD21665968C908806143E744D5F30

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000de910777c787903f78c89e7a0bf7f4c435cbb1fe
Arg [1] : 0000000000000000000000001cb059b7e74fd21665968c908806143e744d5f30


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

Validator Index Block Amount
View All Withdrawals

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

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