Contract 0x94F40fD4018586AaFb8A6AD95441e0b58cc4c058

 
Txn Hash
Method
Block
From
To
Value
0x3d253a7d2f18560b73fd5b76fc82db3c7d1ff22ec0df301ffa1998f06f07efd30xac0eb47c109055732020-09-21 11:50:49694 days 19 hrs ago0x62f31e08e279f3091d9755a09914df97554eae0b IN  0x94f40fd4018586aafb8a6ad95441e0b58cc4c0580 Ether0.‍01062885295
0xb37a2312d2a972e7dc116d67139b3905448363372ebbb401a5926fb79433e9f8Transfer Ownersh...108127412020-09-07 5:58:34709 days 1 hr agoARCx: Deployer 1 IN  0x94f40fd4018586aafb8a6ad95441e0b58cc4c0580 Ether0.‍00334396107
0x93bd657169d285729c70e721ad547e84e82cf7fc2addae92741636895151b9190x60806040108127032020-09-07 5:49:50709 days 1 hr agoARCx: Deployer 1 IN  Create: StateV10 Ether0.‍58588775175
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StateV1

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-09-07
*/

/*

    /     |  __    / ____|
   /      | |__) | | |
  / /    |  _  /  | |
 / ____   | |    | |____
/_/    _ |_|  _  _____|

* ARC: v1/StateV1.sol
*
* Latest source (may be newer): https://github.com/arcxgame/contracts/blob/master/contracts/v1/StateV1.sol
*
* Contract Dependencies: 
*	- Context
*	- Ownable
* Libraries: 
*	- Address
*	- Decimal
*	- Math
*	- SafeERC20
*	- SafeMath
*	- TypesV1
*
* MIT License
* ===========
*
* Copyright (c) 2020 ARC
*
* 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 experimental ABIEncoderV2;

/* ===============================================
* Flattened with Solidifier by Coinage
* 
* https://solidifier.coina.ge
* ===============================================
*/


pragma solidity ^0.5.0;

/**
 * @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.
     *
     * _Available since v2.4.0._
     */
    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.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        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.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}


/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}


/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following 
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     *
     * _Available since v2.4.0._
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-call-value
        (bool success, ) = recipient.call.value(amount)("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }
}


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

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

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

    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

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

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "SafeERC20: low-level call failed");

        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}


/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}


/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _owner;
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}


// SPDX-License-Identifier: MIT


/**
 * @title Math
 *
 * Library for non-standard Math functions
 */
library Math {
    using SafeMath for uint256;

    // ============ Library Functions ============

    /*
     * Return target * (numerator / denominator).
     */
    function getPartial(
        uint256 target,
        uint256 numerator,
        uint256 denominator
    )
        internal
        pure
        returns (uint256)
    {
        return target.mul(numerator).div(denominator);
    }

    function to128(
        uint256 number
    )
        internal
        pure
        returns (uint128)
    {
        uint128 result = uint128(number);
        require(
            result == number,
            "Math: Unsafe cast to uint128"
        );
        return result;
    }

    function to96(
        uint256 number
    )
        internal
        pure
        returns (uint96)
    {
        uint96 result = uint96(number);
        require(
            result == number,
            "Math: Unsafe cast to uint96"
        );
        return result;
    }

    function to32(
        uint256 number
    )
        internal
        pure
        returns (uint32)
    {
        uint32 result = uint32(number);
        require(
            result == number,
            "Math: Unsafe cast to uint32"
        );
        return result;
    }

    function min(
        uint256 a,
        uint256 b
    )
        internal
        pure
        returns (uint256)
    {
        return a < b ? a : b;
    }

    function max(
        uint256 a,
        uint256 b
    )
        internal
        pure
        returns (uint256)
    {
        return a > b ? a : b;
    }
}

// SPDX-License-Identifier: MIT


/**
 * @title Decimal
 *
 * Library that defines a fixed-point number with 18 decimal places.
 */
library Decimal {
    using SafeMath for uint256;

    // ============ Constants ============

    uint256 constant BASE = 10**18;

    // ============ Structs ============

    struct D256 {
        uint256 value;
    }

    // ============ Functions ============

    function one()
        internal
        pure
        returns (D256 memory)
    {
        return D256({ value: BASE });
    }

    function onePlus(
        D256 memory d
    )
        internal
        pure
        returns (D256 memory)
    {
        return D256({ value: d.value.add(BASE) });
    }

    function mul(
        uint256 target,
        D256 memory d
    )
        internal
        pure
        returns (uint256)
    {
        return Math.getPartial(target, d.value, BASE);
    }

    function mul(
        D256 memory d1,
        D256 memory d2
    )
        internal
        pure
        returns (D256 memory)
    {
        return Decimal.D256({ value: Math.getPartial(d1.value, d2.value, BASE) });
    }

    function div(
        uint256 target,
        D256 memory d
    )
        internal
        pure
        returns (uint256)
    {
        return Math.getPartial(target, BASE, d.value);
    }

    function add(
        D256 memory d,
        uint256 amount
    )
        internal
        pure
        returns (D256 memory)
    {
        return D256({ value: d.value.add(amount) });
    }

    function sub(
        D256 memory d,
        uint256 amount
    )
        internal
        pure
        returns (D256 memory)
    {
        return D256({ value: d.value.sub(amount) });
    }

}

// SPDX-License-Identifier: MIT


interface IOracle {

    function fetchCurrentPrice()
        external
        view
        returns (Decimal.D256 memory);

}


// SPDX-License-Identifier: MIT


interface ISyntheticToken {

    function symbolKey()
        external
        view
        returns (bytes32);

    function mint(
        address to,
        uint256 value
    )
        external;

    function burn(
        address to,
        uint256 value
    )
        external;

    function transferCollateral(
        address token,
        address to,
        uint256 value
    )
        external
        returns (bool);


}


// SPDX-License-Identifier: MIT


interface IMintableToken {

    function mint(
        address to,
        uint256 value
    )
        external;

    function burn(
        address to,
        uint256 value
    )
        external;

}


// SPDX-License-Identifier: MIT


library TypesV1 {

    using Math for uint256;
    using SafeMath for uint256;

    // ============ Enums ============

    enum AssetType {
        Collateral,
        Synthetic
    }

    // ============ Structs ============

    struct MarketParams {
        Decimal.D256 collateralRatio;
        Decimal.D256 liquidationUserFee;
        Decimal.D256 liquidationArcFee;
    }

    struct Position {
        address owner;
        AssetType collateralAsset;
        AssetType borrowedAsset;
        Par collateralAmount;
        Par borrowedAmount;
    }

    struct RiskParams {
        uint256 collateralLimit;
        uint256 syntheticLimit;
        uint256 positionCollateralMinimum;
    }

    // ============ AssetAmount ============

    enum AssetDenomination {
        Wei, // the amount is denominated in wei
        Par  // the amount is denominated in par
    }

    enum AssetReference {
        Delta, // the amount is given as a delta from the current value
        Target // the amount is given as an exact number to end up at
    }

    struct AssetAmount {
        bool sign; // true if positive
        AssetDenomination denomination;
        AssetReference ref;
        uint256 value;
    }

    // ============ ArcAsset ============

    function oppositeAsset(
        AssetType assetType
    )
        internal
        pure
        returns (AssetType)
    {
        return assetType == AssetType.Collateral ? AssetType.Synthetic : AssetType.Collateral;
    }

    // ============ Par (Principal Amount) ============

    // Individual principal amount for an account
    struct Par {
        bool sign; // true if positive
        uint128 value;
    }

    function zeroPar()
        internal
        pure
        returns (Par memory)
    {
        return Par({
            sign: false,
            value: 0
        });
    }

    function positiveZeroPar()
        internal
        pure
        returns (Par memory)
    {
        return Par({
            sign: true,
            value: 0
        });
    }

    function sub(
        Par memory a,
        Par memory b
    )
        internal
        pure
        returns (Par memory)
    {
        return add(a, negative(b));
    }

    function add(
        Par memory a,
        Par memory b
    )
        internal
        pure
        returns (Par memory)
    {
        Par memory result;
        if (a.sign == b.sign) {
            result.sign = a.sign;
            result.value = SafeMath.add(a.value, b.value).to128();
        } else {
            if (a.value >= b.value) {
                result.sign = a.sign;
                result.value = SafeMath.sub(a.value, b.value).to128();
            } else {
                result.sign = b.sign;
                result.value = SafeMath.sub(b.value, a.value).to128();
            }
        }
        return result;
    }

    function equals(
        Par memory a,
        Par memory b
    )
        internal
        pure
        returns (bool)
    {
        if (a.value == b.value) {
            if (a.value == 0) {
                return true;
            }
            return a.sign == b.sign;
        }
        return false;
    }

    function negative(
        Par memory a
    )
        internal
        pure
        returns (Par memory)
    {
        return Par({
            sign: !a.sign,
            value: a.value
        });
    }

    function isNegative(
        Par memory a
    )
        internal
        pure
        returns (bool)
    {
        return !a.sign && a.value > 0;
    }

    function isPositive(
        Par memory a
    )
        internal
        pure
        returns (bool)
    {
        return a.sign && a.value > 0;
    }

    function isZero(
        Par memory a
    )
        internal
        pure
        returns (bool)
    {
        return a.value == 0;
    }

}


// SPDX-License-Identifier: MIT


/**
 * @title StateV1
 * @author Kerman Kohli
 * @notice This contract holds all the state regarding a sythetic asset protocol.
 *         The contract has an owner and core address which can call certain functions.
 */
contract StateV1 is Ownable {

    using Math for uint256;
    using SafeMath for uint256;
    using TypesV1 for TypesV1.Par;

    // ============ Variables ============

    address public core;

    TypesV1.MarketParams public market;
    TypesV1.RiskParams public risk;

    IOracle public oracle;
    address public collateralAsset;
    address public syntheticAsset;

    uint256 public positionCount;
    uint256 public totalSupplied;

    mapping (uint256 => TypesV1.Position) public positions;

    // ============ Events ============

    event MarketParamsUpdated(TypesV1.MarketParams updatedMarket);
    event RiskParamsUpdated(TypesV1.RiskParams updatedParams);
    event OracleUpdated(address updatedOracle);

    // ============ Constructor ============

    constructor(
        address _core,
        address _collateralAsset,
        address _syntheticAsset,
        address _oracle,
        TypesV1.MarketParams memory _marketParams,
        TypesV1.RiskParams memory _riskParams
    )
        public
    {
        core = _core;
        collateralAsset = _collateralAsset;
        syntheticAsset = _syntheticAsset;

        setOracle(_oracle);
        setMarketParams(_marketParams);
        setRiskParams(_riskParams);
    }

    // ============ Modifiers ============

    modifier onlyCore() {
        require(
            msg.sender == core,
            "StateV1: only core can call"
        );
        _;
    }

    // ============ Admin Setters ============

    /**
     * @dev Set the address of the oracle
     *
     * @param _oracle Address of the oracle to set
     */
    function setOracle(
        address _oracle
    )
        public
        onlyOwner
    {
        require(
            _oracle != address(0),
            "StateV1: cannot set 0 for oracle address"
        );

        oracle = IOracle(_oracle);
        emit OracleUpdated(_oracle);
    }

    /**
     * @dev Set the parameters of the market
     *
     * @param _marketParams Set the new market params
     */
    function setMarketParams(
        TypesV1.MarketParams memory _marketParams
    )
        public
        onlyOwner
    {
        market = _marketParams;
        emit MarketParamsUpdated(market);
    }

    /**
     * @dev Set the risk parameters of the market
     *
     * @param _riskParams Set the risk levels of the market
     */
    function setRiskParams(
        TypesV1.RiskParams memory _riskParams
    )
        public
        onlyOwner
    {
        risk = _riskParams;
        emit RiskParamsUpdated(risk);
    }

    // ============ Core Setters ============

    function updateTotalSupplied(
        uint256 amount
    )
        public
        onlyCore
    {
        totalSupplied = totalSupplied.add(amount);
    }

    function savePosition(
        TypesV1.Position memory position
    )
        public
        onlyCore
        returns (uint256)
    {
        uint256 idToAllocate = positionCount;
        positions[positionCount] = position;
        positionCount = positionCount.add(1);

        return idToAllocate;
    }

    function setAmount(
        uint256 id,
        TypesV1.AssetType asset,
        TypesV1.Par memory amount
    )
        public
        onlyCore
        returns (TypesV1.Position memory)
    {
        TypesV1.Position storage position = positions[id];

        if (position.collateralAsset == asset) {
            position.collateralAmount = amount;
        } else {
            position.borrowedAmount = amount;
        }

        return position;
    }

    function updatePositionAmount(
        uint256 id,
        TypesV1.AssetType asset,
        TypesV1.Par memory amount
    )
        public
        onlyCore
        returns (TypesV1.Position memory)
    {
        TypesV1.Position storage position = positions[id];

        if (position.collateralAsset == asset) {
            position.collateralAmount = position.collateralAmount.add(amount);
        } else {
            position.borrowedAmount = position.borrowedAmount.add(amount);
        }

        return position;
    }

    // ============ Public Getters ============

    function getAddress(
        TypesV1.AssetType asset
    )
        public
        view
        returns (address)
    {
        return asset == TypesV1.AssetType.Collateral ?
            address(collateralAsset) :
            address(syntheticAsset);
    }

    function getPosition(
        uint256 id
    )
        public
        view
        returns (TypesV1.Position memory)
    {
        return positions[id];
    }

    function getCurrentPrice()
        public
        view
        returns (Decimal.D256 memory)
    {
        return oracle.fetchCurrentPrice();
    }

    // ============ Calculation Getters ============

    function isCollateralized(
        TypesV1.Position memory position
    )
        public
        view
        returns (bool)
    {
        if (position.borrowedAmount.value == 0) {
            return true;
        }

        Decimal.D256 memory currentPrice = oracle.fetchCurrentPrice();

        (TypesV1.Par memory collateralDelta) = calculateCollateralDelta(
            position.borrowedAsset,
            position.collateralAmount,
            position.borrowedAmount,
            currentPrice
        );

        return collateralDelta.sign || collateralDelta.value == 0;
    }

    /**
     * @dev Given an asset, calculate the inverse amount of that asset
     *
     * @param asset The asset in question here
     * @param amount The amount of this asset
     * @param price What price do you want to calculate the inverse at
     */
    function calculateInverseAmount(
        TypesV1.AssetType asset,
        uint256 amount,
        Decimal.D256 memory price
    )
        public
        pure
        returns (uint256)
    {
        uint256 borrowRequired;

        if (asset == TypesV1.AssetType.Collateral) {
            borrowRequired = Decimal.mul(
                amount,
                price
            );
        } else if (asset == TypesV1.AssetType.Synthetic) {
            borrowRequired = Decimal.div(
                amount,
                price
            );
        }

        return borrowRequired;
    }

    /**
     * @dev Similar to calculateInverseAmount although the difference being
     *      that this factors in the collateral ratio.
     *
     * @param asset The asset in question here
     * @param amount The amount of this asset
     * @param price What price do you want to calculate the inverse at
     */
    function calculateInverseRequired(
        TypesV1.AssetType asset,
        uint256 amount,
        Decimal.D256 memory price
    )
        public
        view
        returns (TypesV1.Par memory)
    {

        uint256 inverseRequired = calculateInverseAmount(
            asset,
            amount,
            price
        );

        if (asset == TypesV1.AssetType.Collateral) {
            inverseRequired = Decimal.div(
                inverseRequired,
                market.collateralRatio
            );

        } else if (asset == TypesV1.AssetType.Synthetic) {
            inverseRequired = Decimal.mul(
                inverseRequired,
                market.collateralRatio
            );
        }

        return TypesV1.Par({
            sign: true,
            value: inverseRequired.to128()
        });
    }

    /**
     * @dev When executing a liqudation, the price of the asset has to be calculated
     *      at a discount in order for it to be profitable for the liquidator. This function
     *      will get the current oracle price for the asset and find the discounted price.
     *
     * @param asset The asset in question here
     */
    function calculateLiquidationPrice(
        TypesV1.AssetType asset
    )
        public
        view
        returns (Decimal.D256 memory)
    {
        Decimal.D256 memory result;
        Decimal.D256 memory currentPrice = oracle.fetchCurrentPrice();

        uint256 totalSpread = market.liquidationUserFee.value.add(
            market.liquidationArcFee.value
        );

        if (asset == TypesV1.AssetType.Collateral) {
            result = Decimal.sub(
                Decimal.one(),
                totalSpread
            );
        } else if (asset == TypesV1.AssetType.Synthetic) {
            result = Decimal.add(
                Decimal.one(),
                totalSpread
            );
        }

        result = Decimal.mul(
            currentPrice,
            result
        );

        return result;
    }

    /**
     * @dev Given an asset being borrowed, figure out how much collateral can this still borrow or
     *      is in the red by. This function is used to check if a position is undercolalteralised and
     *      also to calculate how much can a position be liquidated by.
     *
     * @param borrowedAsset The asset which is being borrowed
     * @param parSupply The amount being supplied
     * @param parBorrow The amount being borrowed
     * @param price The price to calculate this difference by
     */
    function calculateCollateralDelta(
        TypesV1.AssetType borrowedAsset,
        TypesV1.Par memory parSupply,
        TypesV1.Par memory parBorrow,
        Decimal.D256 memory price
    )
        public
        view
        returns (TypesV1.Par memory)
    {
        TypesV1.Par memory collateralDelta;
        TypesV1.Par memory collateralRequired;

        if (borrowedAsset == TypesV1.AssetType.Collateral) {
            collateralRequired = calculateInverseRequired(
                borrowedAsset,
                parBorrow.value,
                price
            );
        } else if (borrowedAsset == TypesV1.AssetType.Synthetic) {
            collateralRequired = calculateInverseRequired(
                borrowedAsset,
                parBorrow.value,
                price
            );
        }

        collateralDelta = parSupply.sub(collateralRequired);

        return collateralDelta;
    }

    /**
     * @dev Add the user liqudation fee with the arc liquidation fee
     */
    function totalLiquidationSpread()
        public
        view
        returns (Decimal.D256 memory)
    {
        return Decimal.D256({
            value: market.liquidationUserFee.value.add(
                market.liquidationArcFee.value
            )
        });
    }

    /**
     * @dev Calculate the liquidation ratio between the user and ARC.
     *
     * @return First parameter it the user ratio, second is ARC's ratio
     */
    function calculateLiquidationSplit()
        public
        view
        returns (
            Decimal.D256 memory,
            Decimal.D256 memory
        )
    {
        Decimal.D256 memory total = Decimal.D256({
            value: market.liquidationUserFee.value.add(
                market.liquidationArcFee.value
            )
        });

        Decimal.D256 memory userRatio = Decimal.D256({
            value: Decimal.div(
                market.liquidationUserFee.value,
                total
            )
        });

        return (
            userRatio,
            Decimal.sub(
                Decimal.one(),
                userRatio.value
            )
        );
    }

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_core","type":"address"},{"internalType":"address","name":"_collateralAsset","type":"address"},{"internalType":"address","name":"_syntheticAsset","type":"address"},{"internalType":"address","name":"_oracle","type":"address"},{"components":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"collateralRatio","type":"tuple"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"liquidationUserFee","type":"tuple"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"liquidationArcFee","type":"tuple"}],"internalType":"struct TypesV1.MarketParams","name":"_marketParams","type":"tuple"},{"components":[{"internalType":"uint256","name":"collateralLimit","type":"uint256"},{"internalType":"uint256","name":"syntheticLimit","type":"uint256"},{"internalType":"uint256","name":"positionCollateralMinimum","type":"uint256"}],"internalType":"struct TypesV1.RiskParams","name":"_riskParams","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"components":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"collateralRatio","type":"tuple"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"liquidationUserFee","type":"tuple"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"liquidationArcFee","type":"tuple"}],"indexed":false,"internalType":"struct TypesV1.MarketParams","name":"updatedMarket","type":"tuple"}],"name":"MarketParamsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"updatedOracle","type":"address"}],"name":"OracleUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint256","name":"collateralLimit","type":"uint256"},{"internalType":"uint256","name":"syntheticLimit","type":"uint256"},{"internalType":"uint256","name":"positionCollateralMinimum","type":"uint256"}],"indexed":false,"internalType":"struct TypesV1.RiskParams","name":"updatedParams","type":"tuple"}],"name":"RiskParamsUpdated","type":"event"},{"constant":true,"inputs":[{"internalType":"enum TypesV1.AssetType","name":"borrowedAsset","type":"uint8"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"parSupply","type":"tuple"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"parBorrow","type":"tuple"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"price","type":"tuple"}],"name":"calculateCollateralDelta","outputs":[{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"enum TypesV1.AssetType","name":"asset","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"price","type":"tuple"}],"name":"calculateInverseAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"enum TypesV1.AssetType","name":"asset","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"price","type":"tuple"}],"name":"calculateInverseRequired","outputs":[{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"enum TypesV1.AssetType","name":"asset","type":"uint8"}],"name":"calculateLiquidationPrice","outputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"calculateLiquidationSplit","outputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"","type":"tuple"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"collateralAsset","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"core","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"enum TypesV1.AssetType","name":"asset","type":"uint8"}],"name":"getAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentPrice","outputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPosition","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"enum TypesV1.AssetType","name":"collateralAsset","type":"uint8"},{"internalType":"enum TypesV1.AssetType","name":"borrowedAsset","type":"uint8"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"collateralAmount","type":"tuple"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"borrowedAmount","type":"tuple"}],"internalType":"struct TypesV1.Position","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"enum TypesV1.AssetType","name":"collateralAsset","type":"uint8"},{"internalType":"enum TypesV1.AssetType","name":"borrowedAsset","type":"uint8"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"collateralAmount","type":"tuple"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"borrowedAmount","type":"tuple"}],"internalType":"struct TypesV1.Position","name":"position","type":"tuple"}],"name":"isCollateralized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"market","outputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"collateralRatio","type":"tuple"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"liquidationUserFee","type":"tuple"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"liquidationArcFee","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"oracle","outputs":[{"internalType":"contract IOracle","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":[],"name":"positionCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"positions","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"enum TypesV1.AssetType","name":"collateralAsset","type":"uint8"},{"internalType":"enum TypesV1.AssetType","name":"borrowedAsset","type":"uint8"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"collateralAmount","type":"tuple"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"borrowedAmount","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"risk","outputs":[{"internalType":"uint256","name":"collateralLimit","type":"uint256"},{"internalType":"uint256","name":"syntheticLimit","type":"uint256"},{"internalType":"uint256","name":"positionCollateralMinimum","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"enum TypesV1.AssetType","name":"collateralAsset","type":"uint8"},{"internalType":"enum TypesV1.AssetType","name":"borrowedAsset","type":"uint8"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"collateralAmount","type":"tuple"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"borrowedAmount","type":"tuple"}],"internalType":"struct TypesV1.Position","name":"position","type":"tuple"}],"name":"savePosition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"enum TypesV1.AssetType","name":"asset","type":"uint8"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"amount","type":"tuple"}],"name":"setAmount","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"enum TypesV1.AssetType","name":"collateralAsset","type":"uint8"},{"internalType":"enum TypesV1.AssetType","name":"borrowedAsset","type":"uint8"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"collateralAmount","type":"tuple"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"borrowedAmount","type":"tuple"}],"internalType":"struct TypesV1.Position","name":"","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"collateralRatio","type":"tuple"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"liquidationUserFee","type":"tuple"},{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"liquidationArcFee","type":"tuple"}],"internalType":"struct TypesV1.MarketParams","name":"_marketParams","type":"tuple"}],"name":"setMarketParams","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_oracle","type":"address"}],"name":"setOracle","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"internalType":"uint256","name":"collateralLimit","type":"uint256"},{"internalType":"uint256","name":"syntheticLimit","type":"uint256"},{"internalType":"uint256","name":"positionCollateralMinimum","type":"uint256"}],"internalType":"struct TypesV1.RiskParams","name":"_riskParams","type":"tuple"}],"name":"setRiskParams","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"syntheticAsset","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalLiquidationSpread","outputs":[{"components":[{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Decimal.D256","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupplied","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"enum TypesV1.AssetType","name":"asset","type":"uint8"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"amount","type":"tuple"}],"name":"updatePositionAmount","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"enum TypesV1.AssetType","name":"collateralAsset","type":"uint8"},{"internalType":"enum TypesV1.AssetType","name":"borrowedAsset","type":"uint8"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"collateralAmount","type":"tuple"},{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint128","name":"value","type":"uint128"}],"internalType":"struct TypesV1.Par","name":"borrowedAmount","type":"tuple"}],"internalType":"struct TypesV1.Position","name":"","type":"tuple"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"updateTotalSupplied","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620041883803806200418883398181016040526200003791908101906200065d565b600062000049620001e960201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35085600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620001bb83620001f160201b60201c565b620001cc826200033360201b60201c565b620001dd816200040760201b60201c565b50505050505062000a26565b600033905090565b62000201620004ba60201b60201c565b62000243576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200023a90620008e4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620002b6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002ad90620008c2565b60405180910390fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f3df77beb5db05fcdd70a30fc8adf3f83f9501b68579455adbd100b818094039481604051620003289190620008a5565b60405180910390a150565b62000343620004ba60201b60201c565b62000385576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200037c90620008e4565b60405180910390fd5b8060026000820151816000016000820151816000015550506020820151816001016000820151816000015550506040820151816002016000820151816000015550509050507fc14c804d43cc3401a1b0996084b2b1734f67dfa817f4aebdf9a3a740a04957a46002604051620003fc919062000906565b60405180910390a150565b62000417620004ba60201b60201c565b62000459576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200045090620008e4565b60405180910390fd5b8060056000820151816000015560208201518160010155604082015181600201559050507feb39fae2a89abdd1fdb8bd59772febe81901e42fff7b160b7aa9aefd24f1836c6005604051620004af919062000923565b60405180910390a150565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662000504620001e960201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b6000815190506200053181620009f2565b92915050565b6000602082840312156200054a57600080fd5b62000556602062000940565b90506000620005688482850162000646565b60008301525092915050565b6000606082840312156200058757600080fd5b62000593606062000940565b90506000620005a58482850162000537565b6000830152506020620005bb8482850162000537565b6020830152506040620005d18482850162000537565b60408301525092915050565b600060608284031215620005f057600080fd5b620005fc606062000940565b905060006200060e8482850162000646565b6000830152506020620006248482850162000646565b60208301525060406200063a8482850162000646565b60408301525092915050565b600081519050620006578162000a0c565b92915050565b60008060008060008061014087890312156200067857600080fd5b60006200068889828a0162000520565b96505060206200069b89828a0162000520565b9550506040620006ae89828a0162000520565b9450506060620006c189828a0162000520565b9350506080620006d489828a0162000574565b92505060e0620006e789828a01620005dd565b9150509295509295509295565b620006ff8162000989565b82525050565b6000620007146028836200096e565b91507f537461746556313a2063616e6e6f7420736574203020666f72206f7261636c6560008301527f20616464726573730000000000000000000000000000000000000000000000006020830152604082019050919050565b60006200077c6020836200096e565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b602082016000808301549050620007c681620009c7565b620007d5600086018262000894565b5050505050565b606082016000808301620007f46000860182620007af565b5060018301620008086020860182620007af565b50600283016200081c6040860182620007af565b5050505050565b6060820160008083015490506200083a81620009c7565b62000849600086018262000894565b50600183015490506200085c81620009c7565b6200086b602086018262000894565b50600283015490506200087e81620009c7565b6200088d604086018262000894565b5050505050565b6200089f81620009bd565b82525050565b6000602082019050620008bc6000830184620006f4565b92915050565b60006020820190508181036000830152620008dd8162000705565b9050919050565b60006020820190508181036000830152620008ff816200076d565b9050919050565b60006060820190506200091d6000830184620007dc565b92915050565b60006060820190506200093a600083018462000823565b92915050565b6000604051905081810181811067ffffffffffffffff821117156200096457600080fd5b8060405250919050565b600082825260208201905092915050565b6000819050919050565b600062000996826200099d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000620009de620009d883620009e5565b6200097f565b9050919050565b60008160001c9050919050565b620009fd8162000989565b811462000a0957600080fd5b50565b62000a1781620009bd565b811462000a2357600080fd5b50565b6137528062000a366000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80638f32d59b11610104578063bcaa0c55116100a2578063eb02c30111610071578063eb02c3011461058c578063eb91d37e146105bc578063f2f4eb26146105da578063f2fde38b146105f8576101da565b8063bcaa0c55146104de578063e2e02e0c1461050e578063e7702d051461053e578063ea7c01471461055c576101da565b8063aabaecd6116100de578063aabaecd61461046a578063ac0eb47c14610488578063b1d0b9f9146104a4578063b3914cf6146104c0576101da565b80638f32d59b146103e857806396d7d7e11461040657806399fbab8814610436576101da565b8063630fd0ac1161017c5780637ccd2d921161014b5780637ccd2d92146103705780637dc0d1d01461038c57806380f55605146103aa5780638da5cb5b146103ca576101da565b8063630fd0ac146102fc578063715018a61461031a5780637adbf973146103245780637c7c200a14610340576101da565b806329571006116101b8578063295710061461026f578063400520491461028e578063426a0c88146102be5780634a7e4276146102de576101da565b80631896174e146101df5780631e31274a1461020f5780632863612b1461023f575b600080fd5b6101f960048036036101f49190810190612c85565b610614565b60405161020691906134d9565b60405180910390f35b61022960048036036102249190810190612c85565b610858565b60405161023691906132ba565b60405180910390f35b61025960048036036102549190810190612b58565b610981565b60405161026691906133f2565b60405180910390f35b610277610ae2565b60405161028592919061340d565b60405180910390f35b6102a860048036036102a39190810190612d00565b610b76565b6040516102b591906134a3565b60405180910390f35b6102c6610ee0565b6040516102d5939291906134f4565b60405180910390f35b6102e6610ef8565b6040516102f391906133f2565b60405180910390f35b610304610f35565b60405161031191906134d9565b60405180910390f35b610322610f3b565b005b61033e60048036036103399190810190612b2f565b611041565b005b61035a60048036036103559190810190612be4565b611173565b60405161036791906134d9565b60405180910390f35b61038a60048036036103859190810190612cae565b6111dd565b005b610394611283565b6040516103a191906132d5565b60405180910390f35b6103b26112a9565b6040516103c193929190613436565b60405180910390f35b6103d26112fd565b6040516103df919061324c565b60405180910390f35b6103f0611326565b6040516103fd91906132ba565b60405180910390f35b610420600480360361041b9190810190612be4565b611384565b60405161042d9190613488565b60405180910390f35b610450600480360361044b9190810190612cd7565b611465565b604051610461959493929190613267565b60405180910390f35b6104726115b3565b60405161047f919061324c565b60405180910390f35b6104a2600480360361049d9190810190612c5c565b6115d9565b005b6104be60048036036104b99190810190612cd7565b6116a0565b005b6104c861174e565b6040516104d5919061324c565b60405180910390f35b6104f860048036036104f39190810190612b58565b611774565b604051610505919061324c565b60405180910390f35b61052860048036036105239190810190612d00565b6117e6565b60405161053591906134a3565b60405180910390f35b610546611c5a565b60405161055391906134d9565b60405180910390f35b61057660048036036105719190810190612b81565b611c60565b6040516105839190613488565b60405180910390f35b6105a660048036036105a19190810190612cd7565b611d24565b6040516105b391906134a3565b60405180910390f35b6105c4611ef3565b6040516105d191906133f2565b60405180910390f35b6105e2611fa0565b6040516105ef919061324c565b60405180910390f35b610612600480360361060d9190810190612b2f565b611fc6565b005b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069d90613372565b60405180910390fd5b6000600b54905082600d6000600b54815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548160ff0219169083600181111561072e57fe5b021790555060408201518160000160156101000a81548160ff0219169083600181111561075757fe5b021790555060608201518160010160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550505060808201518160020160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555050509050506108496001600b5461201990919063ffffffff16565b600b8190555080915050919050565b6000808260800151602001516fffffffffffffffffffffffffffffffff161415610885576001905061097c565b61088d612753565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166396a0e5e36040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f557600080fd5b505afa158015610909573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061092d9190810190612c33565b9050610937612766565b61094f84604001518560600151866080015185611c60565b90508060000151806109775750600081602001516fffffffffffffffffffffffffffffffff16145b925050505b919050565b610989612753565b610991612753565b610999612753565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166396a0e5e36040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0157600080fd5b505afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610a399190810190612c33565b90506000610a5f600280016000015460026001016000015461201990919063ffffffff16565b905060006001811115610a6e57fe5b856001811115610a7a57fe5b1415610a9857610a91610a8b61206e565b82612092565b9250610acb565b600180811115610aa457fe5b856001811115610ab057fe5b1415610aca57610ac7610ac161206e565b826120c7565b92505b5b610ad582846120fc565b9250829350505050919050565b610aea612753565b610af2612753565b610afa612753565b6040518060200160405280610b27600280016000015460026001016000015461201990919063ffffffff16565b8152509050610b34612753565b6040518060200160405280610b5160026001016000015485612135565b815250905080610b6c610b6261206e565b8360000151612092565b9350935050509091565b610b7e612794565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0590613372565b60405180910390fd5b6000600d60008681526020019081526020016000209050836001811115610c3157fe5b8160000160149054906101000a900460ff166001811115610c4e57fe5b1415610cc057828160010160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550905050610d28565b828160020160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055509050505b806040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900460ff166001811115610da857fe5b6001811115610db357fe5b81526020016000820160159054906101000a900460ff166001811115610dd557fe5b6001811115610de057fe5b8152602001600182016040518060400160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16815250508152602001600282016040518060400160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681525050815250509150509392505050565b60058060000154908060010154908060020154905083565b610f00612753565b6040518060200160405280610f2d600280016000015460026001016000015461201990919063ffffffff16565b815250905090565b600c5481565b610f43611326565b610f82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f79906133d2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b611049611326565b611088576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107f906133d2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156110f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ef90613312565b60405180910390fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f3df77beb5db05fcdd70a30fc8adf3f83f9501b68579455adbd100b818094039481604051611168919061324c565b60405180910390a150565b6000806000600181111561118357fe5b85600181111561118f57fe5b14156111a65761119f8484612156565b90506111d2565b6001808111156111b257fe5b8560018111156111be57fe5b14156111d1576111ce8484612135565b90505b5b809150509392505050565b6111e5611326565b611224576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121b906133d2565b60405180910390fd5b8060056000820151816000015560208201518160010155604082015181600201559050507feb39fae2a89abdd1fdb8bd59772febe81901e42fff7b160b7aa9aefd24f1836c600560405161127891906134be565b60405180910390a150565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028060000160405180602001604052908160008201548152505090806001016040518060200160405290816000820154815250509080600201604051806020016040529081600082015481525050905083565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611368612177565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b61138c612766565b6000611399858585611173565b9050600060018111156113a857fe5b8560018111156113b457fe5b14156113e4576113dd816002600001604051806020016040529081600082015481525050612135565b9050611429565b6001808111156113f057fe5b8560018111156113fc57fe5b141561142857611425816002600001604051806020016040529081600082015481525050612156565b90505b5b60405180604001604052806001151581526020016114468361217f565b6fffffffffffffffffffffffffffffffff168152509150509392505050565b600d6020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060000160149054906101000a900460ff16908060000160159054906101000a900460ff1690806001016040518060400160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff168152505090806002016040518060400160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681525050905085565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6115e1611326565b611620576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611617906133d2565b60405180910390fd5b8060026000820151816000016000820151816000015550506020820151816001016000820151816000015550506040820151816002016000820151816000015550509050507fc14c804d43cc3401a1b0996084b2b1734f67dfa817f4aebdf9a3a740a04957a46002604051611695919061346d565b60405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611730576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172790613372565b60405180910390fd5b61174581600c5461201990919063ffffffff16565b600c8190555050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600181111561178257fe5b82600181111561178e57fe5b146117bb57600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166117df565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff165b9050919050565b6117ee612794565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461187e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187590613372565b60405180910390fd5b6000600d600086815260200190815260200160002090508360018111156118a157fe5b8160000160149054906101000a900460ff1660018111156118be57fe5b14156119b55761194a83826001016040518060400160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16815250506121e290919063ffffffff16565b8160010160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550905050611aa2565b611a3b83826002016040518060400160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16815250506121e290919063ffffffff16565b8160020160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055509050505b806040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900460ff166001811115611b2257fe5b6001811115611b2d57fe5b81526020016000820160159054906101000a900460ff166001811115611b4f57fe5b6001811115611b5a57fe5b8152602001600182016040518060400160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16815250508152602001600282016040518060400160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681525050815250509150509392505050565b600b5481565b611c68612766565b611c70612766565b611c78612766565b60006001811115611c8557fe5b876001811115611c9157fe5b1415611cbf57611cb88786602001516fffffffffffffffffffffffffffffffff1686611384565b9050611d02565b600180811115611ccb57fe5b876001811115611cd757fe5b1415611d0157611cfe8786602001516fffffffffffffffffffffffffffffffff1686611384565b90505b5b611d1581876123d290919063ffffffff16565b91508192505050949350505050565b611d2c612794565b600d60008381526020019081526020016000206040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900460ff166001811115611dbe57fe5b6001811115611dc957fe5b81526020016000820160159054906101000a900460ff166001811115611deb57fe5b6001811115611df657fe5b8152602001600182016040518060400160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16815250508152602001600282016040518060400160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681525050815250509050919050565b611efb612753565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166396a0e5e36040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6357600080fd5b505afa158015611f77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611f9b9190810190612c33565b905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611fce611326565b61200d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612004906133d2565b60405180910390fd5b612016816123f4565b50565b600080828401905083811015612064576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205b90613352565b60405180910390fd5b8091505092915050565b612076612753565b6040518060200160405280670de0b6b3a7640000815250905090565b61209a612753565b60405180602001604052806120bc84866000015161252290919063ffffffff16565b815250905092915050565b6120cf612753565b60405180602001604052806120f184866000015161201990919063ffffffff16565b815250905092915050565b612104612753565b604051806020016040528061212a85600001518560000151670de0b6b3a764000061256c565b815250905092915050565b600061214e83670de0b6b3a7640000846000015161256c565b905092915050565b600061216f838360000151670de0b6b3a764000061256c565b905092915050565b600033905090565b60008082905082816fffffffffffffffffffffffffffffffff16146121d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d090613392565b60405180910390fd5b80915050919050565b6121ea612766565b6121f2612766565b8260000151151584600001511515141561228c57836000015181600001901515908115158152505061225861225385602001516fffffffffffffffffffffffffffffffff1685602001516fffffffffffffffffffffffffffffffff16612019565b61217f565b81602001906fffffffffffffffffffffffffffffffff1690816fffffffffffffffffffffffffffffffff16815250506123c8565b82602001516fffffffffffffffffffffffffffffffff1684602001516fffffffffffffffffffffffffffffffff161061234557836000015181600001901515908115158152505061231161230c85602001516fffffffffffffffffffffffffffffffff1685602001516fffffffffffffffffffffffffffffffff16612522565b61217f565b81602001906fffffffffffffffffffffffffffffffff1690816fffffffffffffffffffffffffffffffff16815250506123c7565b826000015181600001901515908115158152505061239761239284602001516fffffffffffffffffffffffffffffffff1686602001516fffffffffffffffffffffffffffffffff16612522565b61217f565b81602001906fffffffffffffffffffffffffffffffff1690816fffffffffffffffffffffffffffffffff16815250505b5b8091505092915050565b6123da612766565b6123ec836123e78461259c565b6121e2565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612464576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245b90613332565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600061256483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506125dd565b905092915050565b600061259382612585858761263890919063ffffffff16565b6126a890919063ffffffff16565b90509392505050565b6125a4612766565b60405180604001604052808360000151151515815260200183602001516fffffffffffffffffffffffffffffffff168152509050919050565b6000838311158290612625576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161261c91906132f0565b60405180910390fd5b5060008385039050809150509392505050565b60008083141561264b57600090506126a2565b600082840290508284828161265c57fe5b041461269d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612694906133b2565b60405180910390fd5b809150505b92915050565b60006126ea83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506126f2565b905092915050565b60008083118290612739576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161273091906132f0565b60405180910390fd5b50600083858161274557fe5b049050809150509392505050565b6040518060200160405280600081525090565b604051806040016040528060001515815260200160006fffffffffffffffffffffffffffffffff1681525090565b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600060018111156127c957fe5b8152602001600060018111156127db57fe5b81526020016127e86127fb565b81526020016127f56127fb565b81525090565b604051806040016040528060001515815260200160006fffffffffffffffffffffffffffffffff1681525090565b600081359050612838816136a3565b92915050565b60008135905061284d816136ba565b92915050565b600081359050612862816136d1565b92915050565b60006020828403121561287a57600080fd5b612884602061352b565b9050600061289484828501612b05565b60008301525092915050565b6000602082840312156128b257600080fd5b6128bc602061352b565b905060006128cc84828501612b05565b60008301525092915050565b6000602082840312156128ea57600080fd5b6128f4602061352b565b9050600061290484828501612b1a565b60008301525092915050565b60006060828403121561292257600080fd5b61292c606061352b565b9050600061293c84828501612868565b600083015250602061295084828501612868565b602083015250604061296484828501612868565b60408301525092915050565b60006040828403121561298257600080fd5b61298c604061352b565b9050600061299c8482850161283e565b60008301525060206129b084828501612af0565b60208301525092915050565b6000604082840312156129ce57600080fd5b6129d8604061352b565b905060006129e88482850161283e565b60008301525060206129fc84828501612af0565b60208301525092915050565b600060e08284031215612a1a57600080fd5b612a2460a061352b565b90506000612a3484828501612829565b6000830152506020612a4884828501612853565b6020830152506040612a5c84828501612853565b6040830152506060612a7084828501612970565b60608301525060a0612a8484828501612970565b60808301525092915050565b600060608284031215612aa257600080fd5b612aac606061352b565b90506000612abc84828501612b05565b6000830152506020612ad084828501612b05565b6020830152506040612ae484828501612b05565b60408301525092915050565b600081359050612aff816136e1565b92915050565b600081359050612b14816136f8565b92915050565b600081519050612b29816136f8565b92915050565b600060208284031215612b4157600080fd5b6000612b4f84828501612829565b91505092915050565b600060208284031215612b6a57600080fd5b6000612b7884828501612853565b91505092915050565b60008060008060c08587031215612b9757600080fd5b6000612ba587828801612853565b9450506020612bb6878288016129bc565b9350506060612bc7878288016129bc565b92505060a0612bd8878288016128a0565b91505092959194509250565b600080600060608486031215612bf957600080fd5b6000612c0786828701612853565b9350506020612c1886828701612b05565b9250506040612c29868287016128a0565b9150509250925092565b600060208284031215612c4557600080fd5b6000612c53848285016128d8565b91505092915050565b600060608284031215612c6e57600080fd5b6000612c7c84828501612910565b91505092915050565b600060e08284031215612c9757600080fd5b6000612ca584828501612a08565b91505092915050565b600060608284031215612cc057600080fd5b6000612cce84828501612a90565b91505092915050565b600060208284031215612ce957600080fd5b6000612cf784828501612b05565b91505092915050565b600080600060808486031215612d1557600080fd5b6000612d2386828701612b05565b9350506020612d3486828701612853565b9250506040612d45868287016129bc565b9150509250925092565b612d588161357e565b82525050565b612d678161357e565b82525050565b612d7681613590565b82525050565b612d8581613590565b82525050565b612d94816135f5565b82525050565b612da381613619565b82525050565b612db281613619565b82525050565b6000612dc382613558565b612dcd8185613563565b9350612ddd81856020860161362b565b612de681613678565b840191505092915050565b6000612dfe602883613563565b91507f537461746556313a2063616e6e6f7420736574203020666f72206f7261636c6560008301527f20616464726573730000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612e64602683613563565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612eca601b83613563565b91507f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006000830152602082019050919050565b6000612f0a601b83613563565b91507f537461746556313a206f6e6c7920636f72652063616e2063616c6c00000000006000830152602082019050919050565b6000612f4a601c83613563565b91507f4d6174683a20556e73616665206361737420746f2075696e74313238000000006000830152602082019050919050565b6000612f8a602183613563565b91507f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008301527f77000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612ff0602083613563565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b602082016000820151613039600085018261322e565b50505050565b602082016000820151613055600085018261322e565b50505050565b6020820160008083015490506130708161365e565b61307d600086018261322e565b5050505050565b60608201600080830161309a600086018261305b565b50600183016130ac602086018261305b565b50600283016130be604086018261305b565b5050505050565b6040820160008201516130db6000850182612d6d565b5060208201516130ee602085018261321f565b50505050565b60408201600082015161310a6000850182612d6d565b50602082015161311d602085018261321f565b50505050565b6040820160008201516131396000850182612d6d565b50602082015161314c602085018261321f565b50505050565b60e0820160008201516131686000850182612d4f565b50602082015161317b6020850182612d9a565b50604082015161318e6040850182612d9a565b5060608201516131a160608501826130f4565b5060808201516131b460a08501826130f4565b50505050565b6060820160008083015490506131cf8161365e565b6131dc600086018261322e565b50600183015490506131ed8161365e565b6131fa602086018261322e565b506002830154905061320b8161365e565b613218604086018261322e565b5050505050565b613228816135af565b82525050565b613237816135eb565b82525050565b613246816135eb565b82525050565b60006020820190506132616000830184612d5e565b92915050565b600060e08201905061327c6000830188612d5e565b6132896020830187612da9565b6132966040830186612da9565b6132a36060830185613123565b6132b060a0830184613123565b9695505050505050565b60006020820190506132cf6000830184612d7c565b92915050565b60006020820190506132ea6000830184612d8b565b92915050565b6000602082019050818103600083015261330a8184612db8565b905092915050565b6000602082019050818103600083015261332b81612df1565b9050919050565b6000602082019050818103600083015261334b81612e57565b9050919050565b6000602082019050818103600083015261336b81612ebd565b9050919050565b6000602082019050818103600083015261338b81612efd565b9050919050565b600060208201905081810360008301526133ab81612f3d565b9050919050565b600060208201905081810360008301526133cb81612f7d565b9050919050565b600060208201905081810360008301526133eb81612fe3565b9050919050565b60006020820190506134076000830184613023565b92915050565b60006040820190506134226000830185613023565b61342f6020830184613023565b9392505050565b600060608201905061344b600083018661303f565b613458602083018561303f565b613465604083018461303f565b949350505050565b60006060820190506134826000830184613084565b92915050565b600060408201905061349d60008301846130c5565b92915050565b600060e0820190506134b86000830184613152565b92915050565b60006060820190506134d360008301846131ba565b92915050565b60006020820190506134ee600083018461323d565b92915050565b6000606082019050613509600083018661323d565b613516602083018561323d565b613523604083018461323d565b949350505050565b6000604051905081810181811067ffffffffffffffff8211171561354e57600080fd5b8060405250919050565b600081519050919050565b600082825260208201905092915050565b6000819050919050565b6000613589826135cb565b9050919050565b60008115159050919050565b60008190506135aa82613696565b919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061360082613607565b9050919050565b6000613612826135cb565b9050919050565b60006136248261359c565b9050919050565b60005b8381101561364957808201518184015260208101905061362e565b83811115613658576000848401525b50505050565b600061367161366c83613689565b613574565b9050919050565b6000601f19601f8301169050919050565b60008160001c9050919050565b600281106136a057fe5b50565b6136ac8161357e565b81146136b757600080fd5b50565b6136c381613590565b81146136ce57600080fd5b50565b600281106136de57600080fd5b50565b6136ea816135af565b81146136f557600080fd5b50565b613701816135eb565b811461370c57600080fd5b5056fea365627a7a7231582016d02db7db9c3bbc7204fadfbb7582a74dd5d382b5a72de0be7da9414ce594366c6578706572696d656e74616cf564736f6c634300051000400000000000000000000000005568df89af6bc835b876fdc3b2d44ef63530e419000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000000e2ec54fc0b509f445631bf4b91ab8168230c752000000000000000000000000effd9768a337950cdc883682dc08583d4a3fe59600000000000000000000000000000000000000000000000030927f74c9de0000000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000b1a2bc2ec50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a784379d99db420000000000000000000000000000000000000000000000000000000000000000000000

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

0000000000000000000000005568df89af6bc835b876fdc3b2d44ef63530e419000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000000e2ec54fc0b509f445631bf4b91ab8168230c752000000000000000000000000effd9768a337950cdc883682dc08583d4a3fe59600000000000000000000000000000000000000000000000030927f74c9de0000000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000b1a2bc2ec50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a784379d99db420000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _core (address): 0x5568df89af6bc835b876fdc3b2d44ef63530e419
Arg [1] : _collateralAsset (address): 0x514910771af9ca656af840dff83e8264ecf986ca
Arg [2] : _syntheticAsset (address): 0x0e2ec54fc0b509f445631bf4b91ab8168230c752
Arg [3] : _oracle (address): 0xeffd9768a337950cdc883682dc08583d4a3fe596
Arg [4] : _marketParams (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [5] : _riskParams (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000005568df89af6bc835b876fdc3b2d44ef63530e419
Arg [1] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [2] : 0000000000000000000000000e2ec54fc0b509f445631bf4b91ab8168230c752
Arg [3] : 000000000000000000000000effd9768a337950cdc883682dc08583d4a3fe596
Arg [4] : 00000000000000000000000000000000000000000000000030927f74c9de0000
Arg [5] : 000000000000000000000000000000000000000000000000016345785d8a0000
Arg [6] : 00000000000000000000000000000000000000000000000000b1a2bc2ec50000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [8] : 00000000000000000000000000000000000000000001a784379d99db42000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000000


Deployed ByteCode Sourcemap

29127:11603:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;29127:11603:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32002:318;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;34074:604;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;37112:862;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;40009:716;;;:::i;:::-;;;;;;;;;;;;;;;;;32328:472;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;29379:30;;;:::i;:::-;;;;;;;;;;;;;;;;;;39551:280;;;:::i;:::-;;;;;;;;;;;;;;;;29556:28;;;:::i;:::-;;;;;;;;;;;;;;;;19547:140;;;:::i;:::-;;30796:298;;;;;;;;;;;;;;;;:::i;:::-;;34951:612;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;31583:194;;;;;;;;;;;;;;;;:::i;:::-;;29418:21;;;:::i;:::-;;;;;;;;;;;;;;;;29338:34;;;:::i;:::-;;;;;;;;;;;;;;;;;;18736:79;;;:::i;:::-;;;;;;;;;;;;;;;;19102:94;;;:::i;:::-;;;;;;;;;;;;;;;;35897:861;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;29593:54;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;29446:30;;;:::i;:::-;;;;;;;;;;;;;;;;31229:208;;;;;;;;;;;;;;;;:::i;:::-;;31834:160;;;;;;;;;;;;;;;;:::i;:::-;;29483:29;;;:::i;:::-;;;;;;;;;;;;;;;;33410:265;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;32808:543;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;29521:28;;;:::i;:::-;;;;;;;;;;;;;;;;38512:943;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;33683:166;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;33857:153;;;:::i;:::-;;;;;;;;;;;;;;;;29310:19;;;:::i;:::-;;;;;;;;;;;;;;;;19842:109;;;;;;;;;;;;;;;;:::i;:::-;;32002:318;32126:7;30538:4;;;;;;;;;;;30524:18;;:10;:18;;;30502:95;;;;;;;;;;;;;;;;;;;;;;32151:20;32174:13;;32151:36;;32225:8;32198:9;:24;32208:13;;32198:24;;;;;;;;;;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32260:20;32278:1;32260:13;;:17;;:20;;;;:::i;:::-;32244:13;:36;;;;32300:12;32293:19;;;32002:318;;;:::o;34074:604::-;34198:4;34257:1;34224:8;:23;;;:29;;;:34;;;34220:78;;;34282:4;34275:11;;;;34220:78;34310:32;;:::i;:::-;34345:6;;;;;;;;;;;:24;;;:26;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;34345:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;34345:26:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;34345:26:0;;;;;;;;;34310:61;;34385:34;;:::i;:::-;34423:177;34462:8;:22;;;34499:8;:25;;;34539:8;:23;;;34577:12;34423:24;:177::i;:::-;34384:216;;34620:15;:20;;;:50;;;;34669:1;34644:15;:21;;;:26;;;34620:50;34613:57;;;;34074:604;;;;:::o;37112:862::-;37236:19;;:::i;:::-;37273:26;;:::i;:::-;37310:32;;:::i;:::-;37345:6;;;;;;;;;;;:24;;;:26;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;37345:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;37345:26:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;37345:26:0;;;;;;;;;37310:61;;37384:19;37406:91;37456:6;:24;;:30;;;37406:6;:25;;:31;;;:35;;:91;;;;:::i;:::-;37384:113;;37523:28;37514:37;;;;;;;;:5;:37;;;;;;;;;37510:339;;;37577:88;37607:13;:11;:13::i;:::-;37639:11;37577;:88::i;:::-;37568:97;;37510:339;;;37696:27;37687:36;;;;;;;;:5;:36;;;;;;;;;37683:166;;;37749:88;37779:13;:11;:13::i;:::-;37811:11;37749;:88::i;:::-;37740:97;;37683:166;37510:339;37870:70;37896:12;37923:6;37870:11;:70::i;:::-;37861:79;;37960:6;37953:13;;;;;37112:862;;;:::o;40009:716::-;40108:19;;:::i;:::-;40142;;:::i;:::-;40189:25;;:::i;:::-;40217:146;;;;;;;;40252:99;40306:6;:24;;:30;;;40252:6;:25;;:31;;;:35;;:99;;;;:::i;:::-;40217:146;;;40189:174;;40376:29;;:::i;:::-;40408:147;;;;;;;;40443:100;40473:6;:25;;:31;;;40523:5;40443:11;:100::i;:::-;40408:147;;;40376:179;;40590:9;40614:92;40644:13;:11;:13::i;:::-;40676:9;:15;;;40614:11;:92::i;:::-;40568:149;;;;;;40009:716;;:::o;32328:472::-;32497:23;;:::i;:::-;30538:4;;;;;;;;;;;30524:18;;:10;:18;;;30502:95;;;;;;;;;;;;;;;;;;;;;;32538:33;32574:9;:13;32584:2;32574:13;;;;;;;;;;;32538:49;;32632:5;32604:33;;;;;;;;:8;:24;;;;;;;;;;;;:33;;;;;;;;;32600:165;;;32682:6;32654:8;:25;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32600:165;;;32747:6;32721:8;:23;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32600:165;32784:8;32777:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32328:472;;;;;:::o;29379:30::-;;;;;;;;;;;;;;;;;;;:::o;39551:280::-;39633:19;;:::i;:::-;39677:146;;;;;;;;39712:99;39766:6;:24;;:30;;;39712:6;:25;;:31;;;:35;;:99;;;;:::i;:::-;39677:146;;;39670:153;;39551:280;:::o;29556:28::-;;;;:::o;19547:140::-;18948:9;:7;:9::i;:::-;18940:54;;;;;;;;;;;;;;;;;;;;;;19646:1;19609:40;;19630:6;;;;;;;;;;;19609:40;;;;;;;;;;;;19677:1;19660:6;;:19;;;;;;;;;;;;;;;;;;19547:140::o;30796:298::-;18948:9;:7;:9::i;:::-;18940:54;;;;;;;;;;;;;;;;;;;;;;30940:1;30921:21;;:7;:21;;;;30899:111;;;;;;;;;;;;;;;;;;;;;;31040:7;31023:6;;:25;;;;;;;;;;;;;;;;;;31064:22;31078:7;31064:22;;;;;;;;;;;;;;;30796:298;:::o;34951:612::-;35133:7;35158:22;35206:28;35197:37;;;;;;;;:5;:37;;;;;;;;;35193:329;;;35268:75;35298:6;35323:5;35268:11;:75::i;:::-;35251:92;;35193:329;;;35374:27;35365:36;;;;;;;;:5;:36;;;;;;;;;35361:161;;;35435:75;35465:6;35490:5;35435:11;:75::i;:::-;35418:92;;35361:161;35193:329;35541:14;35534:21;;;34951:612;;;;;:::o;31583:194::-;18948:9;:7;:9::i;:::-;18940:54;;;;;;;;;;;;;;;;;;;;;;31719:11;31712:4;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;31746:23;31764:4;31746:23;;;;;;;;;;;;;;;31583:194;:::o;29418:21::-;;;;;;;;;;;;;:::o;29338:34::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;18736:79::-;18774:7;18801:6;;;;;;;;;;;18794:13;;18736:79;:::o;19102:94::-;19142:4;19182:6;;;;;;;;;;;19166:22;;:12;:10;:12::i;:::-;:22;;;19159:29;;19102:94;:::o;35897:861::-;36081:18;;:::i;:::-;36119:23;36145:94;36182:5;36202:6;36223:5;36145:22;:94::i;:::-;36119:120;;36265:28;36256:37;;;;;;;;:5;:37;;;;;;;;;36252:385;;;36328:101;36358:15;36392:6;:22;;36328:101;;;;;;;;;;;;;;;;;:11;:101::i;:::-;36310:119;;36252:385;;;36462:27;36453:36;;;;;;;;:5;:36;;;;;;;;;36449:188;;;36524:101;36554:15;36588:6;:22;;36524:101;;;;;;;;;;;;;;;;;:11;:101::i;:::-;36506:119;;36449:188;36252:385;36656:94;;;;;;;;36689:4;36656:94;;;;;;36715:23;:15;:21;:23::i;:::-;36656:94;;;;;36649:101;;;35897:861;;;;;:::o;29593:54::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;29446:30::-;;;;;;;;;;;;;:::o;31229:208::-;18948:9;:7;:9::i;:::-;18940:54;;;;;;;;;;;;;;;;;;;;;;31373:13;31364:6;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31402:27;31422:6;31402:27;;;;;;;;;;;;;;;31229:208;:::o;31834:160::-;30538:4;;;;;;;;;;;30524:18;;:10;:18;;;30502:95;;;;;;;;;;;;;;;;;;;;;;31961:25;31979:6;31961:13;;:17;;:25;;;;:::i;:::-;31945:13;:41;;;;31834:160;:::o;29483:29::-;;;;;;;;;;;;;:::o;33410:265::-;33519:7;33560:28;33551:37;;;;;;;;:5;:37;;;;;;;;;:116;;33652:14;;;;;;;;;;;33551:116;;;33612:15;;;;;;;;;;;33551:116;33544:123;;33410:265;;;:::o;32808:543::-;32988:23;;:::i;:::-;30538:4;;;;;;;;;;;30524:18;;:10;:18;;;30502:95;;;;;;;;;;;;;;;;;;;;;;33029:33;33065:9;:13;33075:2;33065:13;;;;;;;;;;;33029:49;;33123:5;33095:33;;;;;;;;:8;:24;;;;;;;;;;;;:33;;;;;;;;;33091:225;;;33173:37;33203:6;33173:8;:25;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:37;;;;:::i;:::-;33145:8;:25;;:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33091:225;;;33269:35;33297:6;33269:8;:23;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:35;;;;:::i;:::-;33243:8;:23;;:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33091:225;33335:8;33328:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32808:543;;;;;:::o;29521:28::-;;;;:::o;38512:943::-;38757:18;;:::i;:::-;38793:34;;:::i;:::-;38838:37;;:::i;:::-;38909:28;38892:45;;;;;;;;:13;:45;;;;;;;;;38888:461;;;38975:129;39018:13;39050:9;:15;;;38975:129;;39084:5;38975:24;:129::i;:::-;38954:150;;38888:461;;;39143:27;39126:44;;;;;;;;:13;:44;;;;;;;;;39122:227;;;39208:129;39251:13;39283:9;:15;;;39208:129;;39317:5;39208:24;:129::i;:::-;39187:150;;39122:227;38888:461;39379:33;39393:18;39379:9;:13;;:33;;;;:::i;:::-;39361:51;;39432:15;39425:22;;;;38512:943;;;;;;:::o;33683:166::-;33780:23;;:::i;:::-;33828:9;:13;33838:2;33828:13;;;;;;;;;;;33821:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33683:166;;;:::o;33857:153::-;33932:19;;:::i;:::-;33976:6;;;;;;;;;;;:24;;;:26;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;33976:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33976:26:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;33976:26:0;;;;;;;;;33969:33;;33857:153;:::o;29310:19::-;;;;;;;;;;;;;:::o;19842:109::-;18948:9;:7;:9::i;:::-;18940:54;;;;;;;;;;;;;;;;;;;;;;19915:28;19934:8;19915:18;:28::i;:::-;19842:109;:::o;2629:181::-;2687:7;2707:9;2723:1;2719;:5;2707:17;;2748:1;2743;:6;;2735:46;;;;;;;;;;;;;;;;;;;;;;2801:1;2794:8;;;2629:181;;;;:::o;22482:130::-;22547:11;;:::i;:::-;22583:21;;;;;;;;22325:6;22583:21;;;22576:28;;22482:130;:::o;23659:199::-;23778:11;;:::i;:::-;23814:36;;;;;;;;23828:19;23840:6;23828:1;:7;;;:11;;:19;;;;:::i;:::-;23814:36;;;23807:43;;23659:199;;;;:::o;23452:::-;23571:11;;:::i;:::-;23607:36;;;;;;;;23621:19;23633:6;23621:1;:7;;;:11;;:19;;;;:::i;:::-;23607:36;;;23600:43;;23452:199;;;;:::o;23009:230::-;23129:11;;:::i;:::-;23165:66;;;;;;;;23187:41;23203:2;:8;;;23213:2;:8;;;22325:6;23187:15;:41::i;:::-;23165:66;;;23158:73;;23009:230;;;;:::o;23247:197::-;23366:7;23398:38;23414:6;22325;23428:1;:7;;;23398:15;:38::i;:::-;23391:45;;23247:197;;;;:::o;22804:::-;22923:7;22955:38;22971:6;22979:1;:7;;;22325:6;22955:15;:38::i;:::-;22948:45;;22804:197;;;;:::o;17525:98::-;17570:15;17605:10;17598:17;;17525:98;:::o;20829:291::-;20926:7;20951:14;20976:6;20951:32;;21026:6;21016;:16;;;20994:94;;;;;;;;;;;;;;;;;;;;;;21106:6;21099:13;;;20829:291;;;:::o;27158:656::-;27274:10;;:::i;:::-;27302:17;;:::i;:::-;27344:1;:6;;;27334:16;;:1;:6;;;:16;;;27330:453;;;27381:1;:6;;;27367;:11;;:20;;;;;;;;;;;27417:38;:30;27430:1;:7;;;27417:30;;27439:1;:7;;;27417:30;;:12;:30::i;:::-;:36;:38::i;:::-;27402:6;:12;;:53;;;;;;;;;;;27330:453;;;27503:1;:7;;;27492:18;;:1;:7;;;:18;;;27488:284;;27545:1;:6;;;27531;:11;;:20;;;;;;;;;;;27585:38;:30;27598:1;:7;;;27585:30;;27607:1;:7;;;27585:30;;:12;:30::i;:::-;:36;:38::i;:::-;27570:6;:12;;:53;;;;;;;;;;;27488:284;;;27678:1;:6;;;27664;:11;;:20;;;;;;;;;;;27718:38;:30;27731:1;:7;;;27718:30;;27740:1;:7;;;27718:30;;:12;:30::i;:::-;:36;:38::i;:::-;27703:6;:12;;:53;;;;;;;;;;;27488:284;27330:453;27800:6;27793:13;;;27158:656;;;;:::o;26972:178::-;27088:10;;:::i;:::-;27123:19;27127:1;27130:11;27139:1;27130:8;:11::i;:::-;27123:3;:19::i;:::-;27116:26;;26972:178;;;;:::o;20057:229::-;20151:1;20131:22;;:8;:22;;;;20123:73;;;;;;;;;;;;;;;;;;;;;;20241:8;20212:38;;20233:6;;;;;;;;;;;20212:38;;;;;;;;;;;;20270:8;20261:6;;:17;;;;;;;;;;;;;;;;;;20057:229;:::o;3085:136::-;3143:7;3170:43;3174:1;3177;3170:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;3163:50;;3085:136;;;;:::o;20583:238::-;20743:7;20775:38;20801:11;20775:21;20786:9;20775:6;:10;;:21;;;;:::i;:::-;:25;;:38;;;;:::i;:::-;20768:45;;20583:238;;;;;:::o;28153:214::-;28251:10;;:::i;:::-;28286:73;;;;;;;;28312:1;:6;;;28311:7;28286:73;;;;;;28340:1;:7;;;28286:73;;;;;28279:80;;28153:214;;;:::o;3558:192::-;3644:7;3677:1;3672;:6;;3680:12;3664:29;;;;;;;;;;;;;;;;;;;;;;;;;3704:9;3720:1;3716;:5;3704:17;;3741:1;3734:8;;;3558:192;;;;;:::o;4001:471::-;4059:7;4309:1;4304;:6;4300:47;;;4334:1;4327:8;;;;4300:47;4359:9;4375:1;4371;:5;4359:17;;4404:1;4399;4395;:5;;;;;;:10;4387:56;;;;;;;;;;;;;;;;;;;;;;4463:1;4456:8;;;4001:471;;;;;:::o;4940:132::-;4998:7;5025:39;5029:1;5032;5025:39;;;;;;;;;;;;;;;;;:3;:39::i;:::-;5018:46;;4940:132;;;;:::o;5602:345::-;5688:7;5787:1;5783;:5;5790:12;5775:28;;;;;;;;;;;;;;;;;;;;;;;;;5814:9;5830:1;5826;:5;;;;;;5814:17;;5938:1;5931:8;;;5602:345;;;;;:::o;29127:11603::-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;:::o;5:130:-1:-;;85:6;72:20;63:29;;97:33;124:5;97:33;;;57:78;;;;;142:124;;219:6;206:20;197:29;;231:30;255:5;231:30;;;191:75;;;;;273:158;;367:6;354:20;345:29;;379:47;420:5;379:47;;;339:92;;;;;464:316;;570:4;558:9;553:3;549:19;545:30;542:2;;;588:1;585;578:12;542:2;606:20;621:4;606:20;;;597:29;;677:1;709:49;754:3;745:6;734:9;730:22;709:49;;;702:4;695:5;691:16;684:75;636:134;536:244;;;;;813:320;;923:4;911:9;906:3;902:19;898:30;895:2;;;941:1;938;931:12;895:2;959:20;974:4;959:20;;;950:29;;1030:1;1062:49;1107:3;1098:6;1087:9;1083:22;1062:49;;;1055:4;1048:5;1044:16;1037:75;989:134;889:244;;;;;1166:342;;1287:4;1275:9;1270:3;1266:19;1262:30;1259:2;;;1305:1;1302;1295:12;1259:2;1323:20;1338:4;1323:20;;;1314:29;;1394:1;1426:60;1482:3;1473:6;1462:9;1458:22;1426:60;;;1419:4;1412:5;1408:16;1401:86;1353:145;1253:255;;;;;1549:705;;1668:4;1656:9;1651:3;1647:19;1643:30;1640:2;;;1686:1;1683;1676:12;1640:2;1704:20;1719:4;1704:20;;;1695:29;;1785:1;1817:66;1879:3;1870:6;1859:9;1855:22;1817:66;;;1810:4;1803:5;1799:16;1792:92;1734:161;1959:2;1992:66;2054:3;2045:6;2034:9;2030:22;1992:66;;;1985:4;1978:5;1974:16;1967:92;1905:165;2133:2;2166:66;2228:3;2219:6;2208:9;2204:22;2166:66;;;2159:4;2152:5;2148:16;2141:92;2080:164;1634:620;;;;;2286:457;;2392:4;2380:9;2375:3;2371:19;2367:30;2364:2;;;2410:1;2407;2400:12;2364:2;2428:20;2443:4;2428:20;;;2419:29;;2498:1;2530:46;2572:3;2563:6;2552:9;2548:22;2530:46;;;2523:4;2516:5;2512:16;2505:72;2458:130;2639:2;2672:49;2717:3;2708:6;2697:9;2693:22;2672:49;;;2665:4;2658:5;2654:16;2647:75;2598:135;2358:385;;;;;2775:461;;2885:4;2873:9;2868:3;2864:19;2860:30;2857:2;;;2903:1;2900;2893:12;2857:2;2921:20;2936:4;2921:20;;;2912:29;;2991:1;3023:46;3065:3;3056:6;3045:9;3041:22;3023:46;;;3016:4;3009:5;3005:16;2998:72;2951:130;3132:2;3165:49;3210:3;3201:6;3190:9;3186:22;3165:49;;;3158:4;3151:5;3147:16;3140:75;3091:135;2851:385;;;;;3273:1006;;3388:4;3376:9;3371:3;3367:19;3363:30;3360:2;;;3406:1;3403;3396:12;3360:2;3424:20;3439:4;3424:20;;;3415:29;;3495:1;3527:49;3572:3;3563:6;3552:9;3548:22;3527:49;;;3520:4;3513:5;3509:16;3502:75;3454:134;3649:2;3682:63;3741:3;3732:6;3721:9;3717:22;3682:63;;;3675:4;3668:5;3664:16;3657:89;3598:159;3816:2;3849:63;3908:3;3899:6;3888:9;3884:22;3849:63;;;3842:4;3835:5;3831:16;3824:89;3767:157;3986:2;4019:66;4081:3;4072:6;4061:9;4057:22;4019:66;;;4012:4;4005:5;4001:16;3994:92;3934:163;4157:3;4191:66;4253:3;4244:6;4233:9;4229:22;4191:66;;;4184:4;4177:5;4173:16;4166:92;4107:162;3354:925;;;;;4318:656;;4435:4;4423:9;4418:3;4414:19;4410:30;4407:2;;;4453:1;4450;4443:12;4407:2;4471:20;4486:4;4471:20;;;4462:29;;4552:1;4584:49;4629:3;4620:6;4609:9;4605:22;4584:49;;;4577:4;4570:5;4566:16;4559:75;4501:144;4705:2;4738:49;4783:3;4774:6;4763:9;4759:22;4738:49;;;4731:4;4724:5;4720:16;4713:75;4655:144;4870:2;4903:49;4948:3;4939:6;4928:9;4924:22;4903:49;;;4896:4;4889:5;4885:16;4878:75;4809:155;4401:573;;;;;4981:130;;5061:6;5048:20;5039:29;;5073:33;5100:5;5073:33;;;5033:78;;;;;5118:130;;5198:6;5185:20;5176:29;;5210:33;5237:5;5210:33;;;5170:78;;;;;5255:134;;5339:6;5333:13;5324:22;;5351:33;5378:5;5351:33;;;5318:71;;;;;5396:241;;5500:2;5488:9;5479:7;5475:23;5471:32;5468:2;;;5516:1;5513;5506:12;5468:2;5551:1;5568:53;5613:7;5604:6;5593:9;5589:22;5568:53;;;5558:63;;5530:97;5462:175;;;;;5644:269;;5762:2;5750:9;5741:7;5737:23;5733:32;5730:2;;;5778:1;5775;5768:12;5730:2;5813:1;5830:67;5889:7;5880:6;5869:9;5865:22;5830:67;;;5820:77;;5792:111;5724:189;;;;;5920:772;;;;;6152:3;6140:9;6131:7;6127:23;6123:33;6120:2;;;6169:1;6166;6159:12;6120:2;6204:1;6221:67;6280:7;6271:6;6260:9;6256:22;6221:67;;;6211:77;;6183:111;6325:2;6343:74;6409:7;6400:6;6389:9;6385:22;6343:74;;;6333:84;;6304:119;6454:2;6472:74;6538:7;6529:6;6518:9;6514:22;6472:74;;;6462:84;;6433:119;6583:3;6602:74;6668:7;6659:6;6648:9;6644:22;6602:74;;;6592:84;;6562:120;6114:578;;;;;;;;6699:561;;;;6872:2;6860:9;6851:7;6847:23;6843:32;6840:2;;;6888:1;6885;6878:12;6840:2;6923:1;6940:67;6999:7;6990:6;6979:9;6975:22;6940:67;;;6930:77;;6902:111;7044:2;7062:53;7107:7;7098:6;7087:9;7083:22;7062:53;;;7052:63;;7023:98;7152:2;7170:74;7236:7;7227:6;7216:9;7212:22;7170:74;;;7160:84;;7131:119;6834:426;;;;;;7267:305;;7403:2;7391:9;7382:7;7378:23;7374:32;7371:2;;;7419:1;7416;7409:12;7371:2;7454:1;7471:85;7548:7;7539:6;7528:9;7524:22;7471:85;;;7461:95;;7433:129;7365:207;;;;;7579:301;;7713:2;7701:9;7692:7;7688:23;7684:32;7681:2;;;7729:1;7726;7719:12;7681:2;7764:1;7781:83;7856:7;7847:6;7836:9;7832:22;7781:83;;;7771:93;;7743:127;7675:205;;;;;7887:294;;8017:3;8005:9;7996:7;7992:23;7988:33;7985:2;;;8034:1;8031;8024:12;7985:2;8069:1;8086:79;8157:7;8148:6;8137:9;8133:22;8086:79;;;8076:89;;8048:123;7979:202;;;;;8188:297;;8320:2;8308:9;8299:7;8295:23;8291:32;8288:2;;;8336:1;8333;8326:12;8288:2;8371:1;8388:81;8461:7;8452:6;8441:9;8437:22;8388:81;;;8378:91;;8350:125;8282:203;;;;;8492:241;;8596:2;8584:9;8575:7;8571:23;8567:32;8564:2;;;8612:1;8609;8602:12;8564:2;8647:1;8664:53;8709:7;8700:6;8689:9;8685:22;8664:53;;;8654:63;;8626:97;8558:175;;;;;8740:562;;;;8913:3;8901:9;8892:7;8888:23;8884:33;8881:2;;;8930:1;8927;8920:12;8881:2;8965:1;8982:53;9027:7;9018:6;9007:9;9003:22;8982:53;;;8972:63;;8944:97;9072:2;9090:67;9149:7;9140:6;9129:9;9125:22;9090:67;;;9080:77;;9051:112;9194:2;9212:74;9278:7;9269:6;9258:9;9254:22;9212:74;;;9202:84;;9173:119;8875:427;;;;;;9309:103;9382:24;9400:5;9382:24;;;9377:3;9370:37;9364:48;;;9419:113;9502:24;9520:5;9502:24;;;9497:3;9490:37;9484:48;;;9539:94;9606:21;9621:5;9606:21;;;9601:3;9594:34;9588:45;;;9640:104;9717:21;9732:5;9717:21;;;9712:3;9705:34;9699:45;;;9751:156;9849:52;9895:5;9849:52;;;9844:3;9837:65;9831:76;;;9914:140;9999:49;10042:5;9999:49;;;9994:3;9987:62;9981:73;;;10061:150;10156:49;10199:5;10156:49;;;10151:3;10144:62;10138:73;;;10218:347;;10330:39;10363:5;10330:39;;;10381:71;10445:6;10440:3;10381:71;;;10374:78;;10457:52;10502:6;10497:3;10490:4;10483:5;10479:16;10457:52;;;10530:29;10552:6;10530:29;;;10525:3;10521:39;10514:46;;10310:255;;;;;;10573:377;;10733:67;10797:2;10792:3;10733:67;;;10726:74;;10833:34;10829:1;10824:3;10820:11;10813:55;10902:10;10897:2;10892:3;10888:12;10881:32;10941:2;10936:3;10932:12;10925:19;;10719:231;;;;10959:375;;11119:67;11183:2;11178:3;11119:67;;;11112:74;;11219:34;11215:1;11210:3;11206:11;11199:55;11288:8;11283:2;11278:3;11274:12;11267:30;11325:2;11320:3;11316:12;11309:19;;11105:229;;;;11343:327;;11503:67;11567:2;11562:3;11503:67;;;11496:74;;11603:29;11599:1;11594:3;11590:11;11583:50;11661:2;11656:3;11652:12;11645:19;;11489:181;;;;11679:327;;11839:67;11903:2;11898:3;11839:67;;;11832:74;;11939:29;11935:1;11930:3;11926:11;11919:50;11997:2;11992:3;11988:12;11981:19;;11825:181;;;;12015:328;;12175:67;12239:2;12234:3;12175:67;;;12168:74;;12275:30;12271:1;12266:3;12262:11;12255:51;12334:2;12329:3;12325:12;12318:19;;12161:182;;;;12352:370;;12512:67;12576:2;12571:3;12512:67;;;12505:74;;12612:34;12608:1;12603:3;12599:11;12592:55;12681:3;12676:2;12671:3;12667:12;12660:25;12713:2;12708:3;12704:12;12697:19;;12498:224;;;;12731:332;;12891:67;12955:2;12950:3;12891:67;;;12884:74;;12991:34;12987:1;12982:3;12978:11;12971:55;13054:2;13049:3;13045:12;13038:19;;12877:186;;;;13120:315;13255:4;13250:3;13246:14;13339:4;13332:5;13328:16;13322:23;13351:63;13408:4;13403:3;13399:14;13385:12;13351:63;;;13275:145;13228:207;;;;13491:311;13622:4;13617:3;13613:14;13706:4;13699:5;13695:16;13689:23;13718:63;13775:4;13770:3;13766:14;13752:12;13718:63;;;13642:145;13595:207;;;;13858:388;13980:4;13975:3;13971:14;14007:1;14069:4;14062:5;14058:16;14052:23;14039:36;;14101:55;14146:9;14101:55;;;14162:63;14219:4;14214:3;14210:14;14196:12;14162:63;;;14018:213;13953:293;;;;;14318:789;14468:4;14463:3;14459:14;14495:1;14574:4;14567:5;14563:16;14585:102;14681:4;14676:3;14672:14;14658:12;14585:102;;;14506:187;14774:4;14767:5;14763:16;14785:102;14881:4;14876:3;14872:14;14858:12;14785:102;;;14703:190;14973:4;14966:5;14962:16;14984:102;15080:4;15075:3;15071:14;15057:12;14984:102;;;14903:189;14441:666;;;;;15161:463;15296:4;15291:3;15287:14;15379:4;15372:5;15368:16;15362:23;15391:57;15442:4;15437:3;15433:14;15419:12;15391:57;;;15316:138;15528:4;15521:5;15517:16;15511:23;15540:63;15597:4;15592:3;15588:14;15574:12;15540:63;;;15464:145;15269:355;;;;15678:449;15799:4;15794:3;15790:14;15882:4;15875:5;15871:16;15865:23;15894:57;15945:4;15940:3;15936:14;15922:12;15894:57;;;15819:138;16031:4;16024:5;16020:16;16014:23;16043:63;16100:4;16095:3;16091:14;16077:12;16043:63;;;15967:145;15772:355;;;;16181:459;16312:4;16307:3;16303:14;16395:4;16388:5;16384:16;16378:23;16407:57;16458:4;16453:3;16449:14;16435:12;16407:57;;;16332:138;16544:4;16537:5;16533:16;16527:23;16556:63;16613:4;16608:3;16604:14;16590:12;16556:63;;;16480:145;16285:355;;;;16704:1083;16849:4;16844:3;16840:14;16933:4;16926:5;16922:16;16916:23;16945:63;17002:4;16997:3;16993:14;16979:12;16945:63;;;16869:145;17098:4;17091:5;17087:16;17081:23;17110:75;17179:4;17174:3;17170:14;17156:12;17110:75;;;17024:167;17273:4;17266:5;17262:16;17256:23;17285:75;17354:4;17349:3;17345:14;17331:12;17285:75;;;17201:165;17451:4;17444:5;17440:16;17434:23;17463:101;17558:4;17553:3;17549:14;17535:12;17463:101;;;17376:194;17653:4;17646:5;17642:16;17636:23;17665:101;17760:4;17755:3;17751:14;17737:12;17665:101;;;17580:192;16822:965;;;;17855:897;18001:4;17996:3;17992:14;18028:1;18100:4;18093:5;18089:16;18083:23;18070:36;;18132:55;18177:9;18132:55;;;18193:63;18250:4;18245:3;18241:14;18227:12;18193:63;;;18039:223;18332:4;18325:5;18321:16;18315:23;18302:36;;18364:55;18409:9;18364:55;;;18425:63;18482:4;18477:3;18473:14;18459:12;18425:63;;;18272:222;18575:4;18568:5;18564:16;18558:23;18545:36;;18607:55;18652:9;18607:55;;;18668:63;18725:4;18720:3;18716:14;18702:12;18668:63;;;18504:233;17974:778;;;;;18759:103;18832:24;18850:5;18832:24;;;18827:3;18820:37;18814:48;;;18869:103;18942:24;18960:5;18942:24;;;18937:3;18930:37;18924:48;;;18979:113;19062:24;19080:5;19062:24;;;19057:3;19050:37;19044:48;;;19099:213;;19217:2;19206:9;19202:18;19194:26;;19231:71;19299:1;19288:9;19284:17;19275:6;19231:71;;;19188:124;;;;;19319:859;;19649:3;19638:9;19634:19;19626:27;;19664:71;19732:1;19721:9;19717:17;19708:6;19664:71;;;19746:84;19826:2;19815:9;19811:18;19802:6;19746:84;;;19841;19921:2;19910:9;19906:18;19897:6;19841:84;;;19936:110;20042:2;20031:9;20027:18;20018:6;19936:110;;;20057:111;20163:3;20152:9;20148:19;20139:6;20057:111;;;19620:558;;;;;;;;;20185:201;;20297:2;20286:9;20282:18;20274:26;;20311:65;20373:1;20362:9;20358:17;20349:6;20311:65;;;20268:118;;;;;20393:243;;20526:2;20515:9;20511:18;20503:26;;20540:86;20623:1;20612:9;20608:17;20599:6;20540:86;;;20497:139;;;;;20643:301;;20781:2;20770:9;20766:18;20758:26;;20831:9;20825:4;20821:20;20817:1;20806:9;20802:17;20795:47;20856:78;20929:4;20920:6;20856:78;;;20848:86;;20752:192;;;;;20951:407;;21142:2;21131:9;21127:18;21119:26;;21192:9;21186:4;21182:20;21178:1;21167:9;21163:17;21156:47;21217:131;21343:4;21217:131;;;21209:139;;21113:245;;;;21365:407;;21556:2;21545:9;21541:18;21533:26;;21606:9;21600:4;21596:20;21592:1;21581:9;21577:17;21570:47;21631:131;21757:4;21631:131;;;21623:139;;21527:245;;;;21779:407;;21970:2;21959:9;21955:18;21947:26;;22020:9;22014:4;22010:20;22006:1;21995:9;21991:17;21984:47;22045:131;22171:4;22045:131;;;22037:139;;21941:245;;;;22193:407;;22384:2;22373:9;22369:18;22361:26;;22434:9;22428:4;22424:20;22420:1;22409:9;22405:17;22398:47;22459:131;22585:4;22459:131;;;22451:139;;22355:245;;;;22607:407;;22798:2;22787:9;22783:18;22775:26;;22848:9;22842:4;22838:20;22834:1;22823:9;22819:17;22812:47;22873:131;22999:4;22873:131;;;22865:139;;22769:245;;;;23021:407;;23212:2;23201:9;23197:18;23189:26;;23262:9;23256:4;23252:20;23248:1;23237:9;23233:17;23226:47;23287:131;23413:4;23287:131;;;23279:139;;23183:245;;;;23435:407;;23626:2;23615:9;23611:18;23603:26;;23676:9;23670:4;23666:20;23662:1;23651:9;23647:17;23640:47;23701:131;23827:4;23701:131;;;23693:139;;23597:245;;;;23849:297;;24009:2;23998:9;23994:18;23986:26;;24023:113;24133:1;24122:9;24118:17;24109:6;24023:113;;;23980:166;;;;;24153:492;;24383:2;24372:9;24368:18;24360:26;;24397:113;24507:1;24496:9;24492:17;24483:6;24397:113;;;24521:114;24631:2;24620:9;24616:18;24607:6;24521:114;;;24354:291;;;;;;24652:663;;24940:2;24929:9;24925:18;24917:26;;24954:109;25060:1;25049:9;25045:17;25036:6;24954:109;;;25074:110;25180:2;25169:9;25165:18;25156:6;25074:110;;;25195;25301:2;25290:9;25286:18;25277:6;25195:110;;;24911:404;;;;;;;25322:327;;25497:2;25486:9;25482:18;25474:26;;25511:128;25636:1;25625:9;25621:17;25612:6;25511:128;;;25468:181;;;;;25656:297;;25816:2;25805:9;25801:18;25793:26;;25830:113;25940:1;25929:9;25925:17;25916:6;25830:113;;;25787:166;;;;;25960:318;;26130:3;26119:9;26115:19;26107:27;;26145:123;26265:1;26254:9;26250:17;26241:6;26145:123;;;26101:177;;;;;26285:319;;26456:2;26445:9;26441:18;26433:26;;26470:124;26591:1;26580:9;26576:17;26567:6;26470:124;;;26427:177;;;;;26611:213;;26729:2;26718:9;26714:18;26706:26;;26743:71;26811:1;26800:9;26796:17;26787:6;26743:71;;;26700:124;;;;;26831:435;;27005:2;26994:9;26990:18;26982:26;;27019:71;27087:1;27076:9;27072:17;27063:6;27019:71;;;27101:72;27169:2;27158:9;27154:18;27145:6;27101:72;;;27184;27252:2;27241:9;27237:18;27228:6;27184:72;;;26976:290;;;;;;;27273:256;;27335:2;27329:9;27319:19;;27373:4;27365:6;27361:17;27472:6;27460:10;27457:22;27436:18;27424:10;27421:34;27418:62;27415:2;;;27493:1;27490;27483:12;27415:2;27513:10;27509:2;27502:22;27313:216;;;;;27536:122;;27630:5;27624:12;27614:22;;27595:63;;;;27666:163;;27781:6;27776:3;27769:19;27818:4;27813:3;27809:14;27794:29;;27762:67;;;;;27837:85;;27912:5;27901:16;;27895:27;;;;27929:91;;27991:24;28009:5;27991:24;;;27980:35;;27974:46;;;;28027:85;;28100:5;28093:13;28086:21;28075:32;;28069:43;;;;28119:134;;28195:5;28184:16;;28201:47;28242:5;28201:47;;;28178:75;;;;28260:113;;28333:34;28326:5;28322:46;28311:57;;28305:68;;;;28380:121;;28453:42;28446:5;28442:54;28431:65;;28425:76;;;;28508:72;;28570:5;28559:16;;28553:27;;;;28587:151;;28681:52;28727:5;28681:52;;;28668:65;;28662:76;;;;28745:123;;28839:24;28857:5;28839:24;;;28826:37;;28820:48;;;;28875:134;;28966:38;28998:5;28966:38;;;28953:51;;28947:62;;;;29017:268;29082:1;29089:101;29103:6;29100:1;29097:13;29089:101;;;29179:1;29174:3;29170:11;29164:18;29160:1;29155:3;29151:11;29144:39;29125:2;29122:1;29118:10;29113:15;;29089:101;;;29205:6;29202:1;29199:13;29196:2;;;29270:1;29261:6;29256:3;29252:16;29245:27;29196:2;29066:219;;;;;29293:161;;29383:66;29414:34;29437:10;29414:34;;;29383:66;;;29374:75;;29368:86;;;;29461:97;;29549:2;29545:7;29540:2;29533:5;29529:14;29525:28;29515:38;;29509:49;;;;29566:102;;29652:5;29649:1;29645:13;29623:35;;29617:51;;;;29676:105;29759:1;29752:5;29749:12;29739:2;;29765:9;29739:2;29733:48;;29788:117;29857:24;29875:5;29857:24;;;29850:5;29847:35;29837:2;;29896:1;29893;29886:12;29837:2;29831:74;;29912:111;29978:21;29993:5;29978:21;;;29971:5;29968:32;29958:2;;30014:1;30011;30004:12;29958:2;29952:71;;30030:108;30113:1;30106:5;30103:12;30093:2;;30129:1;30126;30119:12;30093:2;30087:51;;30145:117;30214:24;30232:5;30214:24;;;30207:5;30204:35;30194:2;;30253:1;30250;30243:12;30194:2;30188:74;;30269:117;30338:24;30356:5;30338:24;;;30331:5;30328:35;30318:2;;30377:1;30374;30367:12;30318:2;30312:74;

Swarm Source

bzzr://16d02db7db9c3bbc7204fadfbb7582a74dd5d382b5a72de0be7da9414ce59436
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

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.