Contract 0xDadd9bA311192d360Df13395E137f1E673C91deB

 
Ad
Crypto.com
Txn Hash Method
Block
From
To
Value
0x1dbaea0ef0e9048928606202dbe814bcc41ef3387e3deb6788b1580641f1ef45Repay Borrow115297632020-12-26 14:09:00271 days 22 hrs ago0x83193738e5432ae814a1d551d2da623ce9b500c6 IN  0xdadd9ba311192d360df13395e137f1e673c91deb0 Ether0.0118435590
0x1987d8f6744ee2e368ada30e9bc33cfb40b79817dca6f76aadbd78ad48a03186Redeem114736502020-12-17 23:25:06280 days 12 hrs ago0x9f7610115501abd147d1d82ce92cea2a716690ed IN  0xdadd9ba311192d360df13395e137f1e673c91deb0 Ether0.01075456866
0x4d1891fc3903d1b951c6d0de01f349766684e2805f9690f6048994aa39b1839dLend To Warp Vau...114714192020-12-17 15:12:33280 days 21 hrs ago0xa9405926aa26d16e5bfe3b24ca905d8b4d0a6cd4 IN  0xdadd9ba311192d360df13395e137f1e673c91deb0 Ether0.01607046140
0x8d43638f52e7ee3c63241c6d33d3f81909da75fac6fa2f99234705f79f6a1426Redeem114713562020-12-17 14:58:43280 days 21 hrs ago0xa9405926aa26d16e5bfe3b24ca905d8b4d0a6cd4 IN  0xdadd9ba311192d360df13395e137f1e673c91deb0 Ether0.028293732159
0x72b48623274a24eab061799508e4664df887808ec67817c5b5128cdc0720d4afLend To Warp Vau...114711132020-12-17 14:09:46280 days 22 hrs ago0xa9405926aa26d16e5bfe3b24ca905d8b4d0a6cd4 IN  0xdadd9ba311192d360df13395e137f1e673c91deb0 Ether0.019334469233121.000001459
0xd7b4b5ba51631d73d0ea93295c3fec37f3b0e0291a781bd45c4d5d1ee8b99f4dLend To Warp Vau...114665512020-12-16 21:16:02281 days 15 hrs ago0x0d013f70674bd0e9a34766d9b5af29f18af1d0a7 IN  0xdadd9ba311192d360df13395e137f1e673c91deb0 Ether0.00420766131
0x0c6f30eb570c7703d4c34d267298ebd8d996f215416c6a4d2dc40d11da03cbffLend To Warp Vau...114660162020-12-16 19:11:57281 days 17 hrs ago0xc96031bb16ac4b7fc3efda596d699e74eeffbd88 IN  0xdadd9ba311192d360df13395e137f1e673c91deb0 Ether0.00527516535
0x629e38c4e800d6ee230edeb09e3ad6e397d529ea424910878cf4b2e89c0a6ad6Lend To Warp Vau...114658242020-12-16 18:32:54281 days 17 hrs ago0x9f7610115501abd147d1d82ce92cea2a716690ed IN  0xdadd9ba311192d360df13395e137f1e673c91deb0 Ether0.0093318660
0x67ebdb68c2eeb0041cc933de0cb51583e2457a4c5b7183f372d6f99f0b8e0e0aRedeem114640392020-12-16 12:09:09282 days 8 mins ago0x538d278e05a35c96bcdca1039e92c65b994256a0 IN  0xdadd9ba311192d360df13395e137f1e673c91deb0 Ether0.0057592665
0x021193b20bfac75746b995b37de936f7eae9f4ccf6370ae87038955b0ed3e009Lend To Warp Vau...114640252020-12-16 12:06:20282 days 11 mins ago0x538d278e05a35c96bcdca1039e92c65b994256a0 IN  0xdadd9ba311192d360df13395e137f1e673c91deb0 Ether0.0108863370
[ Download CSV Export 
Latest 2 internal transactions
Parent Txn Hash Block From To Value
0x93d128880b984defef3a30ecefd173b5f4630a73f6da80cb906016724ff8d7b4114621932020-12-16 5:20:56282 days 6 hrs ago 0xdadd9ba311192d360df13395e137f1e673c91deb  Contract Creation0 Ether
0x93d128880b984defef3a30ecefd173b5f4630a73f6da80cb906016724ff8d7b4114621932020-12-16 5:20:56282 days 6 hrs ago 0x5cb611a4f27b4ba8ab8115375b8fb5d79e8afdce  Contract Creation0 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xae465FD39B519602eE28F062037F7B9c41FDc8cF

Contract Name:
WarpVaultSC

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-12-16
*/

// File: node_modules\@openzeppelin\contracts\GSN\Context.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with 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.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

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

// File: @openzeppelin\contracts\access\Ownable.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
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(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        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 virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: node_modules\@openzeppelin\contracts\token\ERC20\IERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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);
}

// File: node_modules\@openzeppelin\contracts\math\SafeMath.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.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.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

// File: node_modules\@openzeppelin\contracts\utils\Address.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

/**
 * @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) {
        // This method relies in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

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

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

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

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

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

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin\contracts\token\ERC20\ERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;





/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;
    using Address for address;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

// File: @openzeppelin\contracts\token\ERC20\SafeERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;




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

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // 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. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

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

// File: contracts\compound\CarefulMath.sol

pragma solidity ^0.6.0;

/**
  * @title Careful Math
  * @author Compound

/blob/master/contracts/math/SafeMath.sol
  */
contract CarefulMath {

    /**
     * @dev Possible error codes that we can return
     */
    enum MathError {
        NO_ERROR,
        DIVISION_BY_ZERO,
        INTEGER_OVERFLOW,
        INTEGER_UNDERFLOW
    }

    /**
    * @dev Multiplies two numbers, returns an error on overflow.
    */
    function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {
        if (a == 0) {
            return (MathError.NO_ERROR, 0);
        }

        uint c = a * b;

        if (c / a != b) {
            return (MathError.INTEGER_OVERFLOW, 0);
        } else {
            return (MathError.NO_ERROR, c);
        }
    }

    /**
    * @dev Integer division of two numbers, truncating the quotient.
    */
    function divUInt(uint a, uint b) internal pure returns (MathError, uint) {
        if (b == 0) {
            return (MathError.DIVISION_BY_ZERO, 0);
        }

        return (MathError.NO_ERROR, a / b);
    }

    /**
    * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).
    */
    function subUInt(uint a, uint b) internal pure returns (MathError, uint) {
        if (b <= a) {
            return (MathError.NO_ERROR, a - b);
        } else {
            return (MathError.INTEGER_UNDERFLOW, 0);
        }
    }

    /**
    * @dev Adds two numbers, returns an error on overflow.
    */
    function addUInt(uint a, uint b) internal pure returns (MathError, uint) {
        uint c = a + b;

        if (c >= a) {
            return (MathError.NO_ERROR, c);
        } else {
            return (MathError.INTEGER_OVERFLOW, 0);
        }
    }

    /**
    * @dev add a and b and then subtract c
    */
    function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {
        (MathError err0, uint sum) = addUInt(a, b);

        if (err0 != MathError.NO_ERROR) {
            return (err0, 0);
        }

        return subUInt(sum, c);
    }
}

// File: contracts\compound\Exponential.sol

pragma solidity ^0.6.0;


/**
 * @title Exponential module for storing fixed-precision decimals
 * @author Compound
 * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.
 *         Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:
 *         `Exp({mantissa: 5100000000000000000})`.
 */
contract Exponential is CarefulMath {
    uint constant expScale = 1e18;
    uint constant doubleScale = 1e36;
    uint constant halfExpScale = expScale/2;
    uint constant mantissaOne = expScale;

    struct Exp {
        uint mantissa;
    }

    struct Double {
        uint mantissa;
    }

    /**
     * @dev Creates an exponential from numerator and denominator values.
     *      Note: Returns an error if (`num` * 10e18) > MAX_INT,
     *            or if `denom` is zero.
     */
    function getExp(uint num, uint denom) pure internal returns (MathError, Exp memory) {
        (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);
        if (err0 != MathError.NO_ERROR) {
            return (err0, Exp({mantissa: 0}));
        }

        (MathError err1, uint rational) = divUInt(scaledNumerator, denom);
        if (err1 != MathError.NO_ERROR) {
            return (err1, Exp({mantissa: 0}));
        }

        return (MathError.NO_ERROR, Exp({mantissa: rational}));
    }

    /**
     * @dev Adds two exponentials, returning a new exponential.
     */
    function addExp(Exp memory a, Exp memory b) pure internal returns (MathError, Exp memory) {
        (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);

        return (error, Exp({mantissa: result}));
    }

    /**
     * @dev Subtracts two exponentials, returning a new exponential.
     */
    function subExp(Exp memory a, Exp memory b) pure internal returns (MathError, Exp memory) {
        (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);

        return (error, Exp({mantissa: result}));
    }

    /**
     * @dev Multiply an Exp by a scalar, returning a new Exp.
     */
    function mulScalar(Exp memory a, uint scalar) pure internal returns (MathError, Exp memory) {
        (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);
        if (err0 != MathError.NO_ERROR) {
            return (err0, Exp({mantissa: 0}));
        }

        return (MathError.NO_ERROR, Exp({mantissa: scaledMantissa}));
    }

    /**
     * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.
     */
    function mulScalarTruncate(Exp memory a, uint scalar) pure internal returns (MathError, uint) {
        (MathError err, Exp memory product) = mulScalar(a, scalar);
        if (err != MathError.NO_ERROR) {
            return (err, 0);
        }

        return (MathError.NO_ERROR, truncate(product));
    }

    /**
     * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.
     */
    function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) pure internal returns (MathError, uint) {
        (MathError err, Exp memory product) = mulScalar(a, scalar);
        if (err != MathError.NO_ERROR) {
            return (err, 0);
        }

        return addUInt(truncate(product), addend);
    }

    /**
     * @dev Divide an Exp by a scalar, returning a new Exp.
     */
    function divScalar(Exp memory a, uint scalar) pure internal returns (MathError, Exp memory) {
        (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);
        if (err0 != MathError.NO_ERROR) {
            return (err0, Exp({mantissa: 0}));
        }

        return (MathError.NO_ERROR, Exp({mantissa: descaledMantissa}));
    }

    /**
     * @dev Divide a scalar by an Exp, returning a new Exp.
     */
    function divScalarByExp(uint scalar, Exp memory divisor) pure internal returns (MathError, Exp memory) {
        /*
          We are doing this as:
          getExp(mulUInt(expScale, scalar), divisor.mantissa)

          How it works:
          Exp = a / b;
          Scalar = s;
          `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`
        */
        (MathError err0, uint numerator) = mulUInt(expScale, scalar);
        if (err0 != MathError.NO_ERROR) {
            return (err0, Exp({mantissa: 0}));
        }
        return getExp(numerator, divisor.mantissa);
    }

    /**
     * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.
     */
    function divScalarByExpTruncate(uint scalar, Exp memory divisor) pure internal returns (MathError, uint) {
        (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);
        if (err != MathError.NO_ERROR) {
            return (err, 0);
        }

        return (MathError.NO_ERROR, truncate(fraction));
    }

    /**
     * @dev Multiplies two exponentials, returning a new exponential.
     */
    function mulExp(Exp memory a, Exp memory b) pure internal returns (MathError, Exp memory) {

        (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);
        if (err0 != MathError.NO_ERROR) {
            return (err0, Exp({mantissa: 0}));
        }

        // We add half the scale before dividing so that we get rounding instead of truncation.
        //  See "Listing 6" and text above it at https://accu.org/index.php/journals/1717
        // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.
        (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);
        if (err1 != MathError.NO_ERROR) {
            return (err1, Exp({mantissa: 0}));
        }

        (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);
        // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.
        assert(err2 == MathError.NO_ERROR);

        return (MathError.NO_ERROR, Exp({mantissa: product}));
    }

    /**
     * @dev Multiplies two exponentials given their mantissas, returning a new exponential.
     */
    function mulExp(uint a, uint b) pure internal returns (MathError, Exp memory) {
        return mulExp(Exp({mantissa: a}), Exp({mantissa: b}));
    }

    /**
     * @dev Multiplies three exponentials, returning a new exponential.
     */
    function mulExp3(Exp memory a, Exp memory b, Exp memory c) pure internal returns (MathError, Exp memory) {
        (MathError err, Exp memory ab) = mulExp(a, b);
        if (err != MathError.NO_ERROR) {
            return (err, ab);
        }
        return mulExp(ab, c);
    }

    /**
     * @dev Divides two exponentials, returning a new exponential.
     *     (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,
     *  which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)
     */
    function divExp(Exp memory a, Exp memory b) pure internal returns (MathError, Exp memory) {
        return getExp(a.mantissa, b.mantissa);
    }

    /**
     * @dev Truncates the given exp to a whole number value.
     *      For example, truncate(Exp{mantissa: 15 * expScale}) = 15
     */
    function truncate(Exp memory exp) pure internal returns (uint) {
        // Note: We are not using careful math here as we're performing a division that cannot fail
        return exp.mantissa / expScale;
    }

    /**
     * @dev Checks if first Exp is less than second Exp.
     */
    function lessThanExp(Exp memory left, Exp memory right) pure internal returns (bool) {
        return left.mantissa < right.mantissa;
    }

    /**
     * @dev Checks if left Exp <= right Exp.
     */
    function lessThanOrEqualExp(Exp memory left, Exp memory right) pure internal returns (bool) {
        return left.mantissa <= right.mantissa;
    }

    /**
     * @dev Checks if left Exp > right Exp.
     */
    function greaterThanExp(Exp memory left, Exp memory right) pure internal returns (bool) {
        return left.mantissa > right.mantissa;
    }

    /**
     * @dev returns true if Exp is exactly zero
     */
    function isZeroExp(Exp memory value) pure internal returns (bool) {
        return value.mantissa == 0;
    }

    function safe224(uint n, string memory errorMessage) pure internal returns (uint224) {
        require(n < 2**224, errorMessage);
        return uint224(n);
    }

    function safe32(uint n, string memory errorMessage) pure internal returns (uint32) {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }

    function add_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
        return Exp({mantissa: add_(a.mantissa, b.mantissa)});
    }

    function add_(Double memory a, Double memory b) pure internal returns (Double memory) {
        return Double({mantissa: add_(a.mantissa, b.mantissa)});
    }

    function add_(uint a, uint b) pure internal returns (uint) {
        return add_(a, b, "addition overflow");
    }

    function add_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
        uint c = a + b;
        require(c >= a, errorMessage);
        return c;
    }

    function sub_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
        return Exp({mantissa: sub_(a.mantissa, b.mantissa)});
    }

    function sub_(Double memory a, Double memory b) pure internal returns (Double memory) {
        return Double({mantissa: sub_(a.mantissa, b.mantissa)});
    }

    function sub_(uint a, uint b) pure internal returns (uint) {
        return sub_(a, b, "subtraction underflow");
    }

    function sub_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
        require(b <= a, errorMessage);
        return a - b;
    }

    function mul_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
        return Exp({mantissa: mul_(a.mantissa, b.mantissa) / expScale});
    }

    function mul_(Exp memory a, uint b) pure internal returns (Exp memory) {
        return Exp({mantissa: mul_(a.mantissa, b)});
    }

    function mul_(uint a, Exp memory b) pure internal returns (uint) {
        return mul_(a, b.mantissa) / expScale;
    }

    function mul_(Double memory a, Double memory b) pure internal returns (Double memory) {
        return Double({mantissa: mul_(a.mantissa, b.mantissa) / doubleScale});
    }

    function mul_(Double memory a, uint b) pure internal returns (Double memory) {
        return Double({mantissa: mul_(a.mantissa, b)});
    }

    function mul_(uint a, Double memory b) pure internal returns (uint) {
        return mul_(a, b.mantissa) / doubleScale;
    }

    function mul_(uint a, uint b) pure internal returns (uint) {
        return mul_(a, b, "multiplication overflow");
    }

    function mul_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
        if (a == 0 || b == 0) {
            return 0;
        }
        uint c = a * b;
        require(c / a == b, errorMessage);
        return c;
    }

    function div_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
        return Exp({mantissa: div_(mul_(a.mantissa, expScale), b.mantissa)});
    }

    function div_(Exp memory a, uint b) pure internal returns (Exp memory) {
        return Exp({mantissa: div_(a.mantissa, b)});
    }

    function div_(uint a, Exp memory b) pure internal returns (uint) {
        return div_(mul_(a, expScale), b.mantissa);
    }

    function div_(Double memory a, Double memory b) pure internal returns (Double memory) {
        return Double({mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa)});
    }

    function div_(Double memory a, uint b) pure internal returns (Double memory) {
        return Double({mantissa: div_(a.mantissa, b)});
    }

    function div_(uint a, Double memory b) pure internal returns (uint) {
        return div_(mul_(a, doubleScale), b.mantissa);
    }

    function div_(uint a, uint b) pure internal returns (uint) {
        return div_(a, b, "divide by zero");
    }

    function div_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
        require(b > 0, errorMessage);
        return a / b;
    }

    function fraction(uint a, uint b) pure internal returns (Double memory) {
        return Double({mantissa: div_(mul_(a, doubleScale), b)});
    }
}

// File: contracts\compound\InterestRateModel.sol

pragma solidity ^0.6.0;

/**
  * @title Compound's InterestRateModel Interface
  * @author Compound
  */
abstract contract InterestRateModel {
    /// @notice Indicator that this is an InterestRateModel contract (for inspection)
    bool public constant isInterestRateModel = true;

    /**
      * @notice Calculates the current borrow interest rate per block
      * @param cash The total amount of cash the market has
      * @param borrows The total amount of borrows the market has outstanding
      * @param reserves The total amount of reserves the market has
      * @return The borrow rate per block (as a percentage, and scaled by 1e18)
      */
    function getBorrowRate(uint cash, uint borrows, uint reserves) external virtual view returns (uint);

    /**
      * @notice Calculates the current supply interest rate per block
      * @param cash The total amount of cash the market has
      * @param borrows The total amount of borrows the market has outstanding
      * @param reserves The total amount of reserves the market has
      * @param reserveFactorMantissa The current reserve factor the market has
      * @return The supply rate per block (as a percentage, and scaled by 1e18)
      */
    function getSupplyRate(uint cash, uint borrows, uint reserves, uint reserveFactorMantissa) external virtual view returns (uint);

}

// File: contracts\interfaces\UniswapLPOracleFactoryI.sol

pragma solidity ^0.6.0;

////////////////////////////////////////////////////////////////////////////////////////////
/// @title UniswapLPOracleFactoryI
/// @author Christopher Dixon
////////////////////////////////////////////////////////////////////////////////////////////
/**
The UniswapLPOracleFactoryI contract an abstract contract the Warp platform uses to interface
    With the UniswapOracleFactory to retrieve token prices.
**/

abstract contract UniswapLPOracleFactoryI {
    function createNewOracles(
        address _tokenA,
        address _tokenB,
        address _lpToken
    ) public virtual;

    function OneUSDC() public virtual view returns (uint256);

    function getUnderlyingPrice(address _MMI) public virtual returns (uint256);

    function viewUnderlyingPrice(address _MMI)
        public
        virtual
        view
        returns (uint256);

    function getPriceOfToken(address _token, uint256 _amount)
        public
        virtual
        returns (uint256);

    function viewPriceOfToken(address token, uint256 _amount)
        public
        virtual
        view
        returns (uint256);

    function transferOwnership(address _newOwner) public virtual;

    function _calculatePriceOfLP(
        uint256 supply,
        uint256 value0,
        uint256 value1,
        uint8 supplyDecimals
    ) public virtual pure returns (uint256);
}

// File: contracts\WarpWrapperToken.sol

pragma solidity ^0.6.2;



////////////////////////////////////////////////////////////////////////////////////////////
/// @title WarpWrapperToken
/// @author Christopher Dixon
////////////////////////////////////////////////////////////////////////////////////////////
/**
@notice the WarpWrapperToken contract is designed  as a token Wrapper to represent ownership of stablecoins added to a specific
        WarpVault. This contract inherits Ownership and ERC20 functionality from the Open Zeppelin Library.
**/
contract WarpWrapperToken is Ownable, ERC20 {
    address public stablecoin;

    ///@notice constructor sets up token names and symbols for the WarpWrapperToken
    constructor(
        address _SC,
        string memory _tokenName,
        string memory _tokenSymbol
    ) public ERC20(_tokenSymbol, _tokenName) {
        stablecoin = _SC;
    }

    /**
    @notice mint is an only owner function that allows the owner to mint new tokens to an input account
    @param _to is the address that will receive the new tokens
    @param _amount is the amount of token they will receive
    **/
    function mint(address _to, uint256 _amount) public onlyOwner {
        _mint(_to, _amount);
    }

    /**
    @notice burn is an only owner function that allows the owner to burn  tokens from an input account
    @param _from is the address where the tokens will be burnt
    @param _amount is the amount of token to be burnt
    **/
    function burn(address _from, uint256 _amount) public onlyOwner {
        _burn(_from, _amount);
    }
}

// File: contracts\interfaces\WarpControlI.sol

pragma solidity ^0.6.0;

////////////////////////////////////////////////////////////////////////////////////////////
/// @title WarpVaultI
/// @author Christopher Dixon
////////////////////////////////////////////////////////////////////////////////////////////
/**
The WarpControlI contract is an abstract contract used by individual WarpVault contracts to call the
  maxWithdrawAllowed function on the WarpControl contract
**/

abstract contract WarpControlI {
    function getMaxWithdrawAllowed(address account, address lpToken)
        public
        virtual
        returns (uint256);

    function viewMaxWithdrawAllowed(address account, address lpToken)
        public
        virtual
        view
        returns (uint256);

    function viewPriceOfCollateral(address lpToken)
        public
        virtual
        view
        returns (uint256);

    function addMemberToGroup(address _refferalCode, address _member)
        public
        virtual;

    function checkIfGroupMember(address _account)
        public
        virtual
        view
        returns (bool);

    function getTotalAvailableCollateralValue(address _account)
        public
        virtual
        returns (uint256);

    function viewTotalAvailableCollateralValue(address _account)
        public
        virtual
        view
        returns (uint256);

    function viewPriceOfToken(address token)
        public
        virtual
        view
        returns (uint256);

    function viewTotalBorrowedValue(address _account)
        public
        virtual
        view
        returns (uint256);

    function getTotalBorrowedValue(address _account)
        public
        virtual
        returns (uint256);

    function calcBorrowLimit(uint256 _collateralValue)
        public
        virtual
        pure
        returns (uint256);

    function calcCollateralRequired(uint256 _borrowAmount)
        public
        virtual
        view
        returns (uint256);

    function getBorrowLimit(address _account) public virtual returns (uint256);

    function viewBorrowLimit(address _account)
        public
        virtual
        view
        returns (uint256);

    function liquidateAccount(address _borrower) public virtual;
}

// File: contracts\WarpVaultSC.sol

pragma solidity ^0.6.2;










////////////////////////////////////////////////////////////////////////////////////////////
/// @title WarpVaultSC
/// @author Christopher Dixon
////////////////////////////////////////////////////////////////////////////////////////////
/**
@notice the WarpVaultSC contract is the main point of interface for a specific LP asset class and an end user in the
Warp lending platform. This contract is responsible for distributing WarpWrapper tokens in exchange for stablecoin assets,
holding and accounting of stablecoins and LP tokens and all associates lending/borrowing calculations for a specific Warp LP asset class.
This contract inherits Ownership and ERC20 functionality from the Open Zeppelin Library as well as Exponential and the InterestRateModel contracts
from the coumpound protocol.
**/

contract WarpVaultSC is Exponential {
    using SafeMath for uint256;
    using SafeERC20 for ERC20;

    uint256 internal initialExchangeRateMantissa;
    uint256 public reserveFactorMantissa;
    uint256 public accrualBlockNumber;
    uint256 public borrowIndex;
    uint256 public totalBorrows;
    uint256 public totalReserves;
    uint256 internal constant borrowRateMaxMantissa = 0.0005e16;
    uint256 public percent = 1500;
    uint256 public divisor = 10000;
    uint256 public timeWizard;
    address public warpTeam;

    ERC20 public stablecoin;
    WarpWrapperToken public wStableCoin;
    WarpControlI public warpControl;
    InterestRateModel public InterestRate;

    mapping(address => BorrowSnapshot) public accountBorrows;
    mapping(address => uint256) public principalBalance;
    mapping(address => uint256) public historicalReward;

    event InterestAccrued(
        uint256 accrualBlockNumber,
        uint256 borrowIndex,
        uint256 totalBorrows,
        uint256 totalReserves
    );
    event StableCoinLent(
        address _lender,
        uint256 _amountLent,
        uint256 _amountOfWarpMinted
    );
    event StableCoinWithdraw(
        address _lender,
        uint256 _amountWithdrawn,
        uint256 _amountOfWarpBurnt
    );
    event LoanRepayed(
        address _borrower,
        uint256 _repayAmount,
        uint256 remainingPrinciple,
        uint256 remainingInterest
    );
    event ReserveWithdraw(uint256 _amount);
    event InterestShortCircuit(uint256 _blockNumber);
    event WarpControlChanged(address _newControl, address _oldControl);
    event WarpTeamChanged(address _newTeam, address _newControl);
    event InterestRateModelUpdate(address _newIRM);
    event ReserveFactorUpdated(uint _newRF);

    /**
    @notice struct for borrow balance information
    @member principal Total balance (with accrued interest), after applying the most recent balance-changing action
    @member interestIndex Global borrowIndex as of the most recent balance-changing action
    */
    struct BorrowSnapshot {
        uint256 principal;
        uint256 interestIndex;
    }

    /**
    @dev Throws if called by any account other than a warp control
    **/
    modifier onlyWarpControl() {
        require(msg.sender == address(warpControl));
        _;
    }

    /**
    @dev Throws if a function is called before the time wizard allows it
    **/
    modifier angryWizard() {
        require(now > timeWizard);
        _;
    }

    /**
    @dev Throws if a function is called by anyone but the warp team
    **/
    modifier onlyWarpTeam() {
        require(msg.sender == warpTeam);
        _;
    }

    /**
    @notice constructor sets up token names and symbols for the WarpWrapperToken
    @param _InterestRate is the address of the Interest Rate Model this vault will be using
    @param _StableCoin is the address of the stablecoin this vault will manage
    @param _warpTeam is the address of the Warp Team used for fees
    @param _initialExchangeRate is the initial exchange rate mantissa used to determine how a Warp wrapper token will be distributed when stablecoin is received
    @param _timelock is a variable representing the number of seconds the timeWizard will prevent withdraws and borrows from a contracts(one week is 605800 seconds)
    **/
    constructor(
        address _InterestRate,
        address _StableCoin,
        address _warpControl,
        address _warpTeam,
        uint256 _initialExchangeRate,
        uint256 _timelock,
        uint256 _reserveFactorMantissa
    ) public {
        warpControl = WarpControlI(_warpControl);
        stablecoin = ERC20(_StableCoin);
        InterestRate = InterestRateModel(_InterestRate);
        accrualBlockNumber = getBlockNumber();
        borrowIndex = mantissaOne;
        initialExchangeRateMantissa = _initialExchangeRate; //sets the initialExchangeRateMantissa
        warpTeam = _warpTeam;
        timeWizard = now.add(_timelock);
        reserveFactorMantissa = _reserveFactorMantissa;

        bytes memory name = abi.encodePacked("Warp-");
        name = abi.encodePacked(name, stablecoin.name());
        //abi encode and concat strings
        bytes memory symbol = abi.encodePacked("W-");
        symbol = abi.encodePacked(symbol, stablecoin.symbol());
        //abi encode and concat strings
        string memory assetName = string(name);
        string memory assetSymbol = string(symbol);


        wStableCoin = new WarpWrapperToken(
            address(stablecoin),
            assetName,
            assetSymbol
        );
    }

    /**
    @notice getSCDecimals allows for easy retrieval of the vaults stablecoin decimals
    **/
    function getSCDecimals() public view returns (uint8) {
        return stablecoin.decimals();
    }

    /**
    @notice getSCAddress allows for the easy retrieval of the vaults stablecoin address
    **/
    function getSCAddress() public view returns (address) {
        return address(stablecoin);
    }

    /**
    @notice upgrade is used when upgrading to a new version of the WarpControl contracts
    @dev this is a protected function that can only be called by the WarpControl contract
    **/
    function updateWarpControl(address _warpControl) public onlyWarpControl {
        emit WarpControlChanged(_warpControl, address(warpControl));
        warpControl = WarpControlI(_warpControl);
    }

    function updateTeam(address _team) public onlyWarpControl {
        emit WarpTeamChanged(_team, warpTeam);
        warpTeam = _team;
    }

    /**
    @notice getCashPrior is a view funcion that returns the USD balance of all held underlying stablecoin assets
    **/
    function getCashPrior() public view returns (uint256) {
        return stablecoin.balanceOf(address(this));
    }

    /**
    @notice calculateFee is used to calculate the fee earned by the Warp Platform
    @param _payedAmount is a uint representing the full amount of stablecoin earned as interest
        **/
    function calculateFee(uint256 _payedAmount) public view returns (uint256) {
        uint256 fee = _payedAmount.mul(percent).div(divisor);
        return fee;
    }

    /**
    @notice withdrawFees allows the warp team to withdraw the reserves earned by fees
    @param _amount is the amount of a stablecoin being withdrawn
    @dev this is a protected function that can only be called by the warpTeam address
    **/
    function withdrawFees(uint256 _amount) public onlyWarpTeam {
        require(
            totalReserves >= _amount,
            "You are trying to withdraw too much"
        );
        totalReserves = totalReserves.sub(_amount);
        stablecoin.safeTransfer(warpTeam, _amount);
        emit ReserveWithdraw(_amount);
    }

    /**
    @notice setNewInterestModel allows for a new interest rate model to be set for this vault
    @param _newModel is the address of the new interest rate model contract
    @dev this is a protected function that can only be called by the WarpControl contract
    **/
    function setNewInterestModel(address _newModel) public onlyWarpControl {
        InterestRate = InterestRateModel(_newModel);
        emit InterestRateModelUpdate(_newModel);
    }

    /**
    @notice updateReserve allows for a new reserv percentage to be set
    @param _newReserveMantissa is the reserve percentage scaled by 1e18
    **/
    function updateReserve(uint256 _newReserveMantissa) public onlyWarpTeam {
        reserveFactorMantissa = _newReserveMantissa;
        emit ReserveFactorUpdated(_newReserveMantissa);
    }

    /**
    @notice Applies accrued interest to total borrows and reserves
    @dev This calculates interest accrued from the last checkpointed block
        up to the current block and writes new checkpoint to storage.
    **/
    function accrueInterest() public {
        //Remember the initial block number
        uint256 currentBlockNumber = getBlockNumber();
        uint256 accrualBlockNumberPrior = accrualBlockNumber;

        //Short-circuit accumulating 0 interest
        if (accrualBlockNumberPrior == currentBlockNumber) {
            emit InterestShortCircuit(currentBlockNumber);
            return;
        }

        //Read the previous values out of storage
        uint256 cashPrior = getCashPrior();
        uint256 borrowsPrior = totalBorrows;
        uint256 reservesPrior = totalReserves;
        uint256 borrowIndexPrior = borrowIndex;
        //Calculate the current borrow interest rate
        uint256 borrowRateMantissa = InterestRate.getBorrowRate(
            cashPrior,
            borrowsPrior,
            reservesPrior
        );
        require(
            borrowRateMantissa <= borrowRateMaxMantissa,
            "Borrow Rate mantissa error"
        );
        //Calculate the number of blocks elapsed since the last accrual
        (MathError mathErr, uint256 blockDelta) = subUInt(
            currentBlockNumber,
            accrualBlockNumberPrior
        );
        //Calculate the interest accumulated into borrows and reserves and the new index:
        Exp memory simpleInterestFactor;
        uint256 interestAccumulated;
        uint256 totalBorrowsNew;
        uint256 totalReservesNew;
        uint256 borrowIndexNew;
        //simpleInterestFactor = borrowRate * blockDelta
        (mathErr, simpleInterestFactor) = mulScalar(
            Exp({mantissa: borrowRateMantissa}),
            blockDelta
        );
        //interestAccumulated = simpleInterestFactor * totalBorrows
        (mathErr, interestAccumulated) = mulScalarTruncate(
            simpleInterestFactor,
            borrowsPrior
        );
        //totalBorrowsNew = interestAccumulated + totalBorrows
        (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);
        //totalReservesNew = interestAccumulated * reserveFactor + totalReserves
        (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(
            Exp({mantissa: reserveFactorMantissa}),
            interestAccumulated,
            reservesPrior
        );
        //borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex
        (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(
            simpleInterestFactor,
            borrowIndexPrior,
            borrowIndexPrior
        );

        //Write the previously calculated values into storage
        accrualBlockNumber = currentBlockNumber;
        borrowIndex = borrowIndexNew;
        totalBorrows = totalBorrowsNew;
        totalReserves = totalReservesNew;
        emit InterestAccrued(
            accrualBlockNumber,
            borrowIndex,
            totalBorrows,
            totalReserves
        );
    }

    /**
    @notice returns last calculated account's borrow balance using the prior borrowIndex
    @param account The address whose balance should be calculated after updating borrowIndex
    @return The calculated balance
    **/
    function borrowBalancePrior(address account) public view returns (uint256) {
        MathError mathErr;
        uint256 principalTimesIndex;
        uint256 result;

        //Get borrowBalance and borrowIndex
        BorrowSnapshot storage borrowSnapshot = accountBorrows[account];
        //If borrowBalance = 0 then borrowIndex is likely also 0.
        //Rather than failing the calculation with a division by 0, we immediately return 0 in this case.
        if (borrowSnapshot.principal == 0) {
            return (0);
        }
        //Calculate new borrow balance using the interest index:
        //recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex
        (mathErr, principalTimesIndex) = mulUInt(
            borrowSnapshot.principal,
            borrowIndex
        );
        //if theres a math error return zero so as not to fail
        if (mathErr != MathError.NO_ERROR) {
            return (0);
        }
        (mathErr, result) = divUInt(
            principalTimesIndex,
            borrowSnapshot.interestIndex
        );
        //if theres a math error return zero so as not to fail
        if (mathErr != MathError.NO_ERROR) {
            return (0);
        }
        return (result);
    }

    /**
    @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex
    @param account The address whose balance should be calculated after updating borrowIndex
    @return The calculated balance
    **/
    function borrowBalanceCurrent(address account) public returns (uint256) {
        accrueInterest();
        return borrowBalancePrior(account);
    }

    /**
    @notice getBlockNumber allows for easy retrieval of block number
    **/
    function getBlockNumber() internal view returns (uint256) {
        return block.number;
    }

    /**
    @notice Returns the current per-block borrow interest rate for this cToken
    @return The borrow interest rate per block, scaled by 1e18
    **/
    function borrowRatePerBlock() public view returns (uint256) {
        return
            InterestRate.getBorrowRate(
                getCashPrior(),
                totalBorrows,
                totalReserves
            );
    }

    /**
    @notice Returns the current per-block supply interest rate for this cToken
    @return The supply interest rate per block, scaled by 1e18
    **/
    function supplyRatePerBlock() public view returns (uint256) {
        return
            InterestRate.getSupplyRate(
                getCashPrior(),
                totalBorrows,
                totalReserves,
                reserveFactorMantissa
            );
    }

    /**
     @notice Returns the current total borrows plus accrued interest
     @return The total borrows with interest
     **/
    function totalBorrowsCurrent() external returns (uint256) {
        accrueInterest();
        return totalBorrows;
    }

    /**
    @notice  return the not up-to-date exchange rate
    @return Calculated exchange rate scaled by 1e18
    **/
    function exchangeRatePrior() public view returns (uint256) {
        if (wStableCoin.totalSupply() == 0) {
            //If there are no tokens minted: exchangeRate = initialExchangeRate
            return initialExchangeRateMantissa;
        } else {
            //Otherwise: exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply
            uint256 totalCash = getCashPrior(); //get contract asset balance
            uint256 cashPlusBorrowsMinusReserves;
            Exp memory exchangeRate;
            MathError mathErr;
            //calculate total value held by contract plus owed to contract
            (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(
                totalCash,
                totalBorrows,
                totalReserves
            );
            //calculate exchange rate
            (mathErr, exchangeRate) = getExp(
                cashPlusBorrowsMinusReserves,
                wStableCoin.totalSupply()
            );
            return (exchangeRate.mantissa);
        }
    }

    /**
     @notice Accrue interest then return the up-to-date exchange rate
     @return Calculated exchange rate scaled by 1e18
     **/
    function exchangeRateCurrent() public returns (uint256) {
        accrueInterest();

        if (wStableCoin.totalSupply() == 0) {
            //If there are no tokens minted: exchangeRate = initialExchangeRate
            return initialExchangeRateMantissa;
        } else {
            //Otherwise: exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply
            uint256 totalCash = getCashPrior(); //get contract asset balance
            uint256 cashPlusBorrowsMinusReserves;
            Exp memory exchangeRate;
            MathError mathErr;
            //calculate total value held by contract plus owed to contract
            (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(
                totalCash,
                totalBorrows,
                totalReserves
            );
            //calculate exchange rate
            (mathErr, exchangeRate) = getExp(
                cashPlusBorrowsMinusReserves,
                wStableCoin.totalSupply()
            );
            return (exchangeRate.mantissa);
        }
    }

    /**
    @notice Get cash balance of this cToken in the underlying asset in other contracts
    @return The quantity of underlying asset owned by this contract
    **/
    function getCash() external view returns (uint256) {
        return getCashPrior();
    }

    //struct used by mint to avoid stack too deep errors
    struct MintLocalVars {
        MathError mathErr;
        uint256 exchangeRateMantissa;
        uint256 mintTokens;
        bool isMember;
    }

    /**
    @notice lendToWarpVault is used to lend stablecoin assets to a WaprVault
    @param _amount is the amount of the asset being lent
    @dev the user will need to first approve the transfer of the underlying asset
    **/
    function lendToWarpVault(uint256 _amount) public {
        //declare struct
        MintLocalVars memory vars;
        //retrieve exchange rate
        vars.exchangeRateMantissa = exchangeRateCurrent();
        //We get the current exchange rate and calculate the number of WarpWrapperToken to be minted:
        //mintTokens = _amount / exchangeRate
        (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(
            _amount,
            Exp({mantissa: vars.exchangeRateMantissa})
        );

        //transfer appropriate amount of DAI from msg.sender to the Vault
        stablecoin.safeTransferFrom(msg.sender, address(this), _amount);

        principalBalance[msg.sender] = principalBalance[msg.sender] + _amount;

        //mint appropriate Warp DAI
        wStableCoin.mint(msg.sender, vars.mintTokens);
        emit StableCoinLent(msg.sender, _amount, vars.mintTokens);
    }

    struct RedeemLocalVars {
        MathError mathErr;
        uint256 exchangeRateMantissa;
        uint256 burnTokens;
        uint256 currentWarpBalance;
        uint256 currentCoinBalance;
        uint256 principalRedeemed;
        uint256 amount;
    }

    /**
    @notice redeem allows a user to redeem their Warp Wrapper Token for the appropriate amount of underlying stablecoin asset
    @param _amount is the amount of StableCoin the user wishes to exchange
    **/
    function redeem(uint256 _amount) public {
        RedeemLocalVars memory vars;
        //retreive the users current Warp Wrapper balance
        vars.currentWarpBalance = wStableCoin.balanceOf(msg.sender);
        //retreive current exchange rate
        vars.exchangeRateMantissa = exchangeRateCurrent();

        (vars.mathErr, vars.currentCoinBalance) = mulScalarTruncate(
            Exp({mantissa: vars.exchangeRateMantissa}),
            vars.currentWarpBalance
        );
        if (_amount == 0) {
            vars.amount = vars.currentCoinBalance;
        } else {
            vars.amount = _amount;
        }
        //We get the current exchange rate and calculate the number of WarpWrapperToken to be burned:
        //burnTokens = _amount / exchangeRate
        (vars.mathErr, vars.burnTokens) = divScalarByExpTruncate(
            vars.amount,
            Exp({mantissa: vars.exchangeRateMantissa})
        );
        //require the vault has enough stablecoin
        require(
            stablecoin.balanceOf(address(this)) >= vars.amount,
            "Not enough stablecoin in vault."
        );
        //calculate the users current stablecoin balance

        //calculate and record balances for historical tracking
        uint256 currentStableCoinReward = 0;
        if (vars.currentCoinBalance > principalBalance[msg.sender]) {
            currentStableCoinReward = vars.currentCoinBalance.sub(
                principalBalance[msg.sender]
            );
        }
        vars.principalRedeemed = vars.amount.sub(currentStableCoinReward);

        if (vars.amount >= currentStableCoinReward) {
            historicalReward[msg.sender] = historicalReward[msg.sender].add(
                currentStableCoinReward
            );
            require(
                vars.principalRedeemed <= principalBalance[msg.sender],
                "Error calculating reward."
            );
            principalBalance[msg.sender] = principalBalance[msg.sender].sub(
                vars.principalRedeemed
            );
        } else {
            historicalReward[msg.sender] = historicalReward[msg.sender].add(
                vars.amount
            );
        }
        wStableCoin.burn(msg.sender, vars.burnTokens);
        stablecoin.safeTransfer(msg.sender, vars.amount);
        emit StableCoinWithdraw(msg.sender, vars.amount, vars.burnTokens);
    }

    /**
    @notice viewAccountBalance is used to view the current balance of an account
    @param _account is the account whos balance is being viewed
    **/
    function viewAccountBalance(address _account)
        public
        view
        returns (uint256)
    {
        uint256 exchangeRate = exchangeRatePrior();
        uint256 accountBalance = wStableCoin.balanceOf(_account);

        MathError mathError;
        uint256 balance;
        (mathError, balance) = mulScalarTruncate(
            Exp({mantissa: exchangeRate}),
            accountBalance
        );

        return balance;
    }

    /**
    @notice viewHistoricalReward is used to view the total gains of an account
    @param _account is the account whos gains are being viewed
    **/
    function viewHistoricalReward(address _account)
        public
        view
        returns (uint256)
    {
        uint256 exchangeRate = exchangeRatePrior();
        uint256 currentWarpBalance = wStableCoin.balanceOf(_account);
        uint256 principal = principalBalance[_account];

        if (currentWarpBalance == 0) {
            return historicalReward[_account];
        }

        MathError mathError;
        uint256 currentStableCoinBalance;
        (mathError, currentStableCoinBalance) = mulScalarTruncate(
            Exp({mantissa: exchangeRate}),
            currentWarpBalance
        );

        uint256 currentGains = currentStableCoinBalance.sub(principal);
        uint256 totalGains = currentGains.add(historicalReward[_account]);

        return totalGains;
    }

    //struct used by borrow function to avoid stack too deep errors
    struct BorrowLocalVars {
        MathError mathErr;
        uint256 accountBorrows;
        uint256 accountBorrowsNew;
        uint256 totalBorrowsNew;
    }

    /**
    @notice Sender borrows stablecoin assets from the protocol to their own address
    @param _borrowAmount The amount of the underlying asset to borrow
    */
    function _borrow(uint256 _borrowAmount, address _borrower)
        external
        onlyWarpControl
        angryWizard
    {
        //create local vars storage
        BorrowLocalVars memory vars;

        //Fail if protocol has insufficient underlying cash
        require(getCashPrior() > _borrowAmount, "Not enough tokens to lend");
        //calculate the new borrower and total borrow balances, failing on overflow:
        vars.accountBorrows = borrowBalancePrior(_borrower);
        //accountBorrowsNew = accountBorrows + borrowAmount
        (vars.mathErr, vars.accountBorrowsNew) = addUInt(
            vars.accountBorrows,
            _borrowAmount
        );
        //totalBorrowsNew = totalBorrows + borrowAmount
        (vars.mathErr, vars.totalBorrowsNew) = addUInt(
            totalBorrows,
            _borrowAmount
        );
        //We write the previously calculated values into storage
        accountBorrows[_borrower].principal = vars.accountBorrowsNew;
        accountBorrows[_borrower].interestIndex = borrowIndex;
        totalBorrows = vars.totalBorrowsNew;
        //send them their loaned asset
        stablecoin.safeTransfer(_borrower, _borrowAmount);
    }

    struct RepayBorrowLocalVars {
        MathError mathErr;
        uint256 repayAmount;
        uint256 borrowerIndex;
        uint256 accountBorrows;
        uint256 accountBorrowsNew;
        uint256 totalBorrowsNew;
        uint256 totalOwed;
        uint256 borrowPrinciple;
        uint256 interestPayed;
    }

    /**
    @notice Sender repays their own borrow
    @param _repayAmount The amount to repay
    */
    function repayBorrow(uint256 _repayAmount) public angryWizard {
        //create local vars storage
        RepayBorrowLocalVars memory vars;

        //We fetch the amount the borrower owes, with accumulated interest
        vars.accountBorrows = borrowBalanceCurrent(msg.sender);
        //require the borrower cant pay more than they owe
        require(
            _repayAmount <= vars.accountBorrows,
            "You are trying to pay back more than you owe"
        );

        //If repayAmount == 0, repayAmount = accountBorrows
        if (_repayAmount == 0) {
            vars.repayAmount = vars.accountBorrows;
        } else {
            vars.repayAmount = _repayAmount;
        }

        require(
            stablecoin.balanceOf(msg.sender) >= vars.repayAmount,
            "Not enough stablecoin to repay"
        );
        //transfer the stablecoin from the borrower
        stablecoin.safeTransferFrom(
            msg.sender,
            address(this),
            vars.repayAmount
        );

        //We calculate the new borrower and total borrow balances
        //accountBorrowsNew = accountBorrows - actualRepayAmount
        (vars.mathErr, vars.accountBorrowsNew) = subUInt(
            vars.accountBorrows,
            vars.repayAmount
        );
        require(
            vars.mathErr == MathError.NO_ERROR,
            "Repay borrow new account balance calculation failed"
        );

        //totalBorrowsNew = totalBorrows - actualRepayAmount
        (vars.mathErr, vars.totalBorrowsNew) = subUInt(
            totalBorrows,
            vars.repayAmount
        );
        require(
            vars.mathErr == MathError.NO_ERROR,
            "Repay borrow new total balance calculation failed"
        );

        /* We write the previously calculated values into storage */
        totalBorrows = vars.totalBorrowsNew;
        accountBorrows[msg.sender].principal = vars.accountBorrowsNew;
        accountBorrows[msg.sender].interestIndex = borrowIndex;

        emit LoanRepayed(
            msg.sender,
            _repayAmount,
            accountBorrows[msg.sender].principal,
            accountBorrows[msg.sender].interestIndex
        );
    }

    /**
    @notice repayLiquidatedLoan is a function used by the Warp Control contract to repay a loan on behalf of a liquidator
    @param _borrower is the address of the borrower who took out the loan
    @param _liquidator is the address of the account who is liquidating the loan
    @param _amount is the amount of StableCoin being repayed
    @dev this function uses the onlyWarpControl modifier which means it can only be called by the Warp Control contract
    **/
    function _repayLiquidatedLoan(
        address _borrower,
        address _liquidator,
        uint256 _amount
    ) public onlyWarpControl angryWizard {
        stablecoin.safeTransferFrom(_liquidator, address(this), _amount);
        //calculate the fee on the principle received
        uint256 fee = calculateFee(_amount);
        //transfer fee amount to Warp team
        totalReserves = totalReserves.add(fee);
        // Clear the borrowers loan
        accountBorrows[_borrower].principal = 0;
        accountBorrows[_borrower].interestIndex = 0;
        totalBorrows = totalBorrows.sub(_amount);

        //transfer the owed amount of stablecoin from the borrower to this contract
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_InterestRate","type":"address"},{"internalType":"address","name":"_StableCoin","type":"address"},{"internalType":"address","name":"_warpControl","type":"address"},{"internalType":"address","name":"_warpTeam","type":"address"},{"internalType":"uint256","name":"_initialExchangeRate","type":"uint256"},{"internalType":"uint256","name":"_timelock","type":"uint256"},{"internalType":"uint256","name":"_reserveFactorMantissa","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"accrualBlockNumber","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"borrowIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBorrows","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalReserves","type":"uint256"}],"name":"InterestAccrued","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newIRM","type":"address"}],"name":"InterestRateModelUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_blockNumber","type":"uint256"}],"name":"InterestShortCircuit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"_repayAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"remainingPrinciple","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"remainingInterest","type":"uint256"}],"name":"LoanRepayed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_newRF","type":"uint256"}],"name":"ReserveFactorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"ReserveWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_lender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amountLent","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountOfWarpMinted","type":"uint256"}],"name":"StableCoinLent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_lender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amountWithdrawn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountOfWarpBurnt","type":"uint256"}],"name":"StableCoinWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newControl","type":"address"},{"indexed":false,"internalType":"address","name":"_oldControl","type":"address"}],"name":"WarpControlChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newTeam","type":"address"},{"indexed":false,"internalType":"address","name":"_newControl","type":"address"}],"name":"WarpTeamChanged","type":"event"},{"inputs":[],"name":"InterestRate","outputs":[{"internalType":"contract InterestRateModel","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_borrowAmount","type":"uint256"},{"internalType":"address","name":"_borrower","type":"address"}],"name":"_borrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_borrower","type":"address"},{"internalType":"address","name":"_liquidator","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"_repayLiquidatedLoan","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accountBorrows","outputs":[{"internalType":"uint256","name":"principal","type":"uint256"},{"internalType":"uint256","name":"interestIndex","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accrualBlockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accrueInterest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"borrowBalanceCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"borrowBalancePrior","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrowIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrowRatePerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_payedAmount","type":"uint256"}],"name":"calculateFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"divisor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exchangeRateCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exchangeRatePrior","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCash","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCashPrior","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSCAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSCDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"historicalReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"lendToWarpVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"percent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"principalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_repayAmount","type":"uint256"}],"name":"repayBorrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveFactorMantissa","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newModel","type":"address"}],"name":"setNewInterestModel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stablecoin","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"supplyRatePerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeWizard","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBorrows","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBorrowsCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newReserveMantissa","type":"uint256"}],"name":"updateReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_team","type":"address"}],"name":"updateTeam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_warpControl","type":"address"}],"name":"updateWarpControl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"viewAccountBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"viewHistoricalReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wStableCoin","outputs":[{"internalType":"contract WarpWrapperToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"warpControl","outputs":[{"internalType":"contract WarpControlI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"warpTeam","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526105dc6006556127106007553480156200001d57600080fd5b506040516200416b3803806200416b833981810160405260e08110156200004357600080fd5b508051602082015160408301516060840151608085015160a086015160c090960151600c80546001600160a01b038087166001600160a01b031992831617909255600a8054838916908316179055600d8054928916929091169190911790559495939492939192909190620000c06001600160e01b036200068816565b600255670de0b6b3a76400006003556000839055600980546001600160a01b0319166001600160a01b0386161790556200010742836200068c602090811b62001faa17901c565b60085560018190556040805164576172702d60d81b60208201528151808203600501815260258201808452600a546306fdde0360e01b9091529251909283926001600160a01b03909116916306fdde0391602980820192600092909190829003018186803b1580156200017957600080fd5b505afa1580156200018e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015620001b857600080fd5b8101908080516040519392919084640100000000821115620001d957600080fd5b908301906020820185811115620001ef57600080fd5b82516401000000008111828201881017156200020a57600080fd5b82525081516020918201929091019080838360005b83811015620002395781810151838201526020016200021f565b50505050905090810190601f168015620002675780820380516001836020036101000a031916815260200191505b506040525050506040516020018083805190602001908083835b60208310620002a25780518252601f19909201916020918201910162000281565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310620002ec5780518252601f199092019160209182019101620002cb565b51815160209384036101000a60001901801990921691161790526040805192909401828103601f1901835280855261572d60f01b918101919091528351600281830301815260228201808652600a546395d89b4160e01b909152945192985096508695506001600160a01b0390931693506395d89b41926026808201935060009291829003018186803b1580156200038357600080fd5b505afa15801562000398573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015620003c257600080fd5b8101908080516040519392919084640100000000821115620003e357600080fd5b908301906020820185811115620003f957600080fd5b82516401000000008111828201881017156200041457600080fd5b82525081516020918201929091019080838360005b838110156200044357818101518382015260200162000429565b50505050905090810190601f168015620004715780820380516001836020036101000a031916815260200191505b506040525050506040516020018083805190602001908083835b60208310620004ac5780518252601f1990920191602091820191016200048b565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310620004f65780518252601f199092019160209182019101620004d5565b5181516020939093036101000a60001901801990911692169190911790526040805191909301818103601f1901825292839052600a549096508795508694506001600160a01b0316925084918491506200055090620006ee565b6001600160a01b0384168152606060208083018281528551928401929092528451604084019160808501919087019080838360005b838110156200059f57818101518382015260200162000585565b50505050905090810190601f168015620005cd5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101562000602578181015183820152602001620005e8565b50505050905090810190601f168015620006305780820380516001836020036101000a031916815260200191505b5095505050505050604051809103906000f08015801562000655573d6000803e3d6000fd5b50600b80546001600160a01b0319166001600160a01b039290921691909117905550620006fc9950505050505050505050565b4390565b600082820183811015620006e7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6113a18062002dca83390190565b6126be806200070c6000396000f3fe608060405234801561001057600080fd5b50600436106102535760003560e01c80638f7bf4fd11610146578063bbb7d489116100c3578063db006a7511610087578063db006a751461057a578063dd5a612c14610597578063e6136ab61461059f578063e68fc0ee146105c5578063e9cbd822146105eb578063f8f9da28146105f357610253565b8063bbb7d4891461051b578063bd6d894d14610523578063cb7b42061461052b578063cd5c6f5714610533578063d40e8f4a1461053b57610253565b8063aa5af0fd1161010a578063aa5af0fd14610489578063ab292f9b14610491578063ae9d70b0146104c7578063b1be82f1146104cf578063b23f3594146104f557610253565b80638f7bf4fd146104185780638f840ddd1461043e57806394d359901461044657806399a5d74714610464578063a6afed951461048157610253565b80634cf3e784116101d45780635e318e07116101985780635e318e07146103bd5780636c540baf146103da57806370ba1113146103e257806373acee98146103ea5780637746efab146103f257610253565b80634cf3e784146103625780634ee8acc01461038857806357d32b7a14610390578063591cec86146103ad5780635cf57389146103b557610253565b80633662454d1161021b5780633662454d146102eb57806336820e4b146103085780633b1d21a21461032e57806347bd37181461033657806348dc0b6e1461033e57610253565b80630e75270214610258578063173b99041461027757806317bfdfbc146102915780631f2dc5ef146102b7578063232d46d2146102bf575b600080fd5b6102756004803603602081101561026e57600080fd5b50356105fb565b005b61027f6108eb565b60408051918252519081900360200190f35b61027f600480360360208110156102a757600080fd5b50356001600160a01b03166108f1565b61027f61090c565b610275600480360360408110156102d557600080fd5b50803590602001356001600160a01b0316610912565b6102756004803603602081101561030157600080fd5b5035610a54565b61027f6004803603602081101561031e57600080fd5b50356001600160a01b0316610aa6565b61027f610ab8565b61027f610ac8565b610346610ace565b604080516001600160a01b039092168252519081900360200190f35b6102756004803603602081101561037857600080fd5b50356001600160a01b0316610add565b610346610b5e565b610275600480360360208110156103a657600080fd5b5035610b6d565b610346610ca7565b610346610cb6565b610275600480360360208110156103d357600080fd5b5035610cc5565b61027f610d8c565b61027f610d92565b61027f610d98565b61027f6004803603602081101561040857600080fd5b50356001600160a01b0316610da9565b61027f6004803603602081101561042e57600080fd5b50356001600160a01b0316610e4c565b61027f610f01565b61044e610f07565b6040805160ff9092168252519081900360200190f35b61027f6004803603602081101561047a57600080fd5b5035610f7d565b610275610fae565b61027f611211565b610275600480360360608110156104a757600080fd5b506001600160a01b03813581169160208101359091169060400135611217565b61027f6112b9565b610275600480360360208110156104e557600080fd5b50356001600160a01b0316611327565b6102756004803603602081101561050b57600080fd5b50356001600160a01b0316611392565b610346611413565b61027f611422565b61027f611573565b61027f611579565b6105616004803603602081101561055157600080fd5b50356001600160a01b03166115be565b6040805192835260208301919091528051918290030190f35b6102756004803603602081101561059057600080fd5b50356115d7565b61027f611a20565b61027f600480360360208110156105b557600080fd5b50356001600160a01b0316611a6b565b61027f600480360360208110156105db57600080fd5b50356001600160a01b0316611ba5565b610346611bb7565b61027f611bc6565b600854421161060957600080fd5b610611612498565b61061a336108f1565b6060820181905282111561065f5760405162461bcd60e51b815260040180806020018281038252602c81526020018061258b602c913960400191505060405180910390fd5b81610673576060810151602082015261067b565b602081018290525b602080820151600a54604080516370a0823160e01b8152336004820152905192936001600160a01b03909216926370a0823192602480840193919291829003018186803b1580156106cb57600080fd5b505afa1580156106df573d6000803e3d6000fd5b505050506040513d60208110156106f557600080fd5b5051101561074a576040805162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f75676820737461626c65636f696e20746f2072657061790000604482015290519081900360640190fd5b6020810151600a54610771916001600160a01b03909116903390309063ffffffff611c2a16565b61078381606001518260200151611c8a565b608083018190528282600381111561079757fe5b60038111156107a257fe5b90525060009050815160038111156107b657fe5b146107f25760405162461bcd60e51b81526004018080602001828103825260338152602001806125fb6033913960400191505060405180910390fd5b6108026004548260200151611c8a565b60a083018190528282600381111561081657fe5b600381111561082157fe5b905250600090508151600381111561083557fe5b146108715760405162461bcd60e51b815260040180806020018281038252603181526020018061262e6031913960400191505060405180910390fd5b60a0810151600455608080820151336000818152600e60209081526040918290208481556003546001909101819055825193845290830187905282820193909352606082019290925290517f0bc102cfc64751888477c44e529873a602bf746175b1e41c6b54e45f926f90f9929181900390910190a15050565b60015481565b60006108fb610fae565b61090482610da9565b90505b919050565b60075481565b600c546001600160a01b0316331461092957600080fd5b600854421161093757600080fd5b61093f6124e5565b82610948611a20565b1161099a576040805162461bcd60e51b815260206004820152601960248201527f4e6f7420656e6f75676820746f6b656e7320746f206c656e6400000000000000604482015290519081900360640190fd5b6109a382610da9565b602082018190526109b49084611cb0565b60408301819052828260038111156109c857fe5b60038111156109d357fe5b81525050506109e460045484611cb0565b60608301819052828260038111156109f857fe5b6003811115610a0357fe5b905250506040808201516001600160a01b038085166000908152600e602052929092209081556003546001909101556060820151600455600a54610a4f9116838563ffffffff611cd616565b505050565b6009546001600160a01b03163314610a6b57600080fd5b60018190556040805182815290517f1804cd3c6ff50c5878703b3136dbf22bce42299e390b6627af008fde9bc763ae9181900360200190a150565b60106020526000908152604090205481565b6000610ac2611a20565b90505b90565b60045481565b600d546001600160a01b031681565b600c546001600160a01b03163314610af457600080fd5b600c54604080516001600160a01b038085168252909216602083015280517ff31f198b56fc88f5180e2da8285f8fc0e39731c96e24af25bab67838a32c5d799281900390910190a1600c80546001600160a01b0319166001600160a01b0392909216919091179055565b600b546001600160a01b031681565b610b7561250e565b610b7d611422565b602080830191825260408051918201905290518152610b9d908390611d28565b6040830181905282826003811115610bb157fe5b6003811115610bbc57fe5b90525050600a54610bde906001600160a01b031633308563ffffffff611c2a16565b336000818152600f6020526040808220805486019055600b548482015182516340c10f1960e01b81526004810195909552602485015290516001600160a01b03909116926340c10f1992604480830193919282900301818387803b158015610c4557600080fd5b505af1158015610c59573d6000803e3d6000fd5b5050506040808301518151338152602081018690528083019190915290517fac45f50416433593e7c9a1f3e0d5f887c530c22d776e1057ecaacb750d24b94092509081900360600190a15050565b600a546001600160a01b031690565b6009546001600160a01b031681565b6009546001600160a01b03163314610cdc57600080fd5b806005541015610d1d5760405162461bcd60e51b81526004018080602001828103825260238152602001806125b76023913960400191505060405180910390fd5b600554610d30908263ffffffff611d7b16565b600555600954600a54610d56916001600160a01b0391821691168363ffffffff611cd616565b6040805182815290517f2b33eb7f7ae0d9bb1596ccbff4b5ed6460dd64eb6bef0c24870065aa469bbb749181900360200190a150565b60025481565b60065481565b6000610da2610fae565b5060045490565b6001600160a01b0381166000908152600e60205260408120805482918291829190610ddb576000945050505050610907565b610deb8160000154600354611dc6565b90945092506000846003811115610dfe57fe5b14610e10576000945050505050610907565b610e1e838260010154611e05565b90945091506000846003811115610e3157fe5b14610e43576000945050505050610907565b50949350505050565b600080610e57611579565b600b54604080516370a0823160e01b81526001600160a01b038781166004830152915193945060009391909216916370a08231916024808301926020929190829003018186803b158015610eaa57600080fd5b505afa158015610ebe573d6000803e3d6000fd5b505050506040513d6020811015610ed457600080fd5b505160408051602081019091528381529091506000908190610ef69084611e30565b979650505050505050565b60055481565b600a546040805163313ce56760e01b815290516000926001600160a01b03169163313ce567916004808301926020929190829003018186803b158015610f4c57600080fd5b505afa158015610f60573d6000803e3d6000fd5b505050506040513d6020811015610f7657600080fd5b5051905090565b600080610fa7600754610f9b60065486611e4790919063ffffffff16565b9063ffffffff611ea016565b9392505050565b6000610fb8611ee2565b60025490915080821415611000576040805183815290517fe307fb74a265b8255fabc1154131917ce875f96118a807f88eda1e751722538d9181900360200190a1505061120f565b600061100a611a20565b60048054600554600354600d54604080516315f2405360e01b81529586018790526024860185905260448601849052519596509294919390926000926001600160a01b03909116916315f24053916064808301926020929190829003018186803b15801561107757600080fd5b505afa15801561108b573d6000803e3d6000fd5b505050506040513d60208110156110a157600080fd5b5051905065048c27395000811115611100576040805162461bcd60e51b815260206004820152601a60248201527f426f72726f772052617465206d616e7469737361206572726f72000000000000604482015290519081900360640190fd5b60008061110d8989611c8a565b91509150611119612539565b60008060008061113760405180602001604052808a81525087611ee6565b9097509450611146858c611e30565b9097509350611155848c611cb0565b60408051602081019091526001548152919850935061117590858c611f4e565b9097509150611185858a80611f4e565b80925081985050508d6002819055508060038190555082600481905550816005819055507fe3972ae250606e82c6683843383cb8a51755588d2f443af42e8cb5b1e085392d6002546003546004546005546040518085815260200184815260200183815260200182815260200194505050505060405180910390a150505050505050505050505050505b565b60035481565b600c546001600160a01b0316331461122e57600080fd5b600854421161123c57600080fd5b600a5461125a906001600160a01b031683308463ffffffff611c2a16565b600061126582610f7d565b60055490915061127b908263ffffffff611faa16565b6005556001600160a01b0384166000908152600e60205260408120818155600101556004546112b0908363ffffffff611d7b16565b60045550505050565b600d546000906001600160a01b031663b81688166112d5611a20565b6004546005546001546040518563ffffffff1660e01b81526004018085815260200184815260200183815260200182815260200194505050505060206040518083038186803b158015610f4c57600080fd5b600c546001600160a01b0316331461133e57600080fd5b600d80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f7d15df4d1352c1d406124f1da1c26fb576738b2a62fb49aad60d454485c6afb29181900360200190a150565b600c546001600160a01b031633146113a957600080fd5b600954604080516001600160a01b038085168252909216602083015280517fe1ad690b4e5d7c6172f2c241aa6998a8ebcb0392e02cdf10105a33b3955538b49281900390910190a1600980546001600160a01b0319166001600160a01b0392909216919091179055565b600c546001600160a01b031681565b600061142c610fae565b600b60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561147a57600080fd5b505afa15801561148e573d6000803e3d6000fd5b505050506040513d60208110156114a457600080fd5b50516114b35750600054610ac5565b60006114bd611a20565b905060006114c9612539565b60006114da84600454600554612004565b809450819250505061156583600b60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561153457600080fd5b505afa158015611548573d6000803e3d6000fd5b505050506040513d602081101561155e57600080fd5b5051612042565b519550610ac5945050505050565b60085481565b600b54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561147a57600080fd5b600e602052600090815260409020805460019091015482565b6115df61254c565b600b54604080516370a0823160e01b815233600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561162a57600080fd5b505afa15801561163e573d6000803e3d6000fd5b505050506040513d602081101561165457600080fd5b50516060820152611663611422565b60208083019182526040805191820190529051815260608201516116879190611e30565b608083018190528282600381111561169b57fe5b60038111156116a657fe5b90525050816116be57608081015160c08201526116c6565b60c081018290525b6116e68160c0015160405180602001604052808460200151815250611d28565b60408301819052828260038111156116fa57fe5b600381111561170557fe5b9052505060c0810151600a54604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561175957600080fd5b505afa15801561176d573d6000803e3d6000fd5b505050506040513d602081101561178357600080fd5b505110156117d8576040805162461bcd60e51b815260206004820152601f60248201527f4e6f7420656e6f75676820737461626c65636f696e20696e207661756c742e00604482015290519081900360640190fd5b336000908152600f60205260408120546080830151111561181a57336000908152600f602052604090205460808301516118179163ffffffff611d7b16565b90505b60c082015161182f908263ffffffff611d7b16565b60a083015260c0820151811161190c573360009081526010602052604090205461185f908263ffffffff611faa16565b33600090815260106020908152604080832093909355600f9052205460a083015111156118d3576040805162461bcd60e51b815260206004820152601960248201527f4572726f722063616c63756c6174696e67207265776172642e00000000000000604482015290519081900360640190fd5b60a0820151336000908152600f60205260409020546118f79163ffffffff611d7b16565b336000908152600f6020526040902055611941565b60c0820151336000908152601060205260409020546119309163ffffffff611faa16565b336000908152601060205260409020555b600b546040808401518151632770a7eb60e21b8152336004820152602481019190915290516001600160a01b0390921691639dc29fac9160448082019260009290919082900301818387803b15801561199957600080fd5b505af11580156119ad573d6000803e3d6000fd5b50505060c0830151600a546119d492506001600160a01b031690339063ffffffff611cd616565b60c08201516040808401518151338152602081019390935282820152517f01fee552fc58f62ae566675c42acc86f4aeaf48d6a4e21385c0e23bd551ecd129181900360600190a1505050565b600a54604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610f4c57600080fd5b600080611a76611579565b600b54604080516370a0823160e01b81526001600160a01b038781166004830152915193945060009391909216916370a08231916024808301926020929190829003018186803b158015611ac957600080fd5b505afa158015611add573d6000803e3d6000fd5b505050506040513d6020811015611af357600080fd5b50516001600160a01b0385166000908152600f602052604090205490915081611b3857505050506001600160a01b038116600090815260106020526040902054610907565b600080611b5360405180602001604052808781525085611e30565b90925090506000611b6a828563ffffffff611d7b16565b6001600160a01b03891660009081526010602052604081205491925090611b9890839063ffffffff611faa16565b9998505050505050505050565b600f6020526000908152604090205481565b600a546001600160a01b031681565b600d546000906001600160a01b03166315f24053611be2611a20565b6004546005546040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b158015610f4c57600080fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611c849085906120f3565b50505050565b600080838311611ca1575060009050818303611ca9565b506003905060005b9250929050565b600080838301848110611cc857600092509050611ca9565b506002915060009050611ca9565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610a4f9084906120f3565b6000806000611d35612539565b611d3f86866121a4565b90925090506000826003811115611d5257fe5b14611d635750915060009050611ca9565b6000611d6e82612203565b9350935050509250929050565b6000611dbd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612212565b90505b92915050565b60008083611dd957506000905080611ca9565b83830283858281611de657fe5b0414611dfa57506002915060009050611ca9565b600092509050611ca9565b60008082611e195750600190506000611ca9565b6000838581611e2457fe5b04915091509250929050565b6000806000611e3d612539565b611d3f8686611ee6565b600082611e5657506000611dc0565b82820282848281611e6357fe5b0414611dbd5760405162461bcd60e51b81526004018080602001828103825260218152602001806125da6021913960400191505060405180910390fd5b6000611dbd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506122a9565b4390565b6000611ef0612539565b600080611f01866000015186611dc6565b90925090506000826003811115611f1457fe5b14611f3357506040805160208101909152600081529092509050611ca9565b60408051602081019091529081526000969095509350505050565b6000806000611f5b612539565b611f658787611ee6565b90925090506000826003811115611f7857fe5b14611f895750915060009050611fa2565b611f9b611f9582612203565b86611cb0565b9350935050505b935093915050565b600082820183811015611dbd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000806000806120148787611cb0565b9092509050600082600381111561202757fe5b146120385750915060009050611fa2565b611f9b8186611c8a565b600061204c612539565b60008061206186670de0b6b3a7640000611dc6565b9092509050600082600381111561207457fe5b1461209357506040805160208101909152600081529092509050611ca9565b6000806120a08388611e05565b909250905060008260038111156120b357fe5b146120d65781604051806020016040528060008152509550955050505050611ca9565b604080516020810190915290815260009890975095505050505050565b6060612148826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661230e9092919063ffffffff16565b805190915015610a4f5780806020019051602081101561216757600080fd5b5051610a4f5760405162461bcd60e51b815260040180806020018281038252602a81526020018061265f602a913960400191505060405180910390fd5b60006121ae612539565b6000806121c3670de0b6b3a764000087611dc6565b909250905060008260038111156121d657fe5b146121f557506040805160208101909152600081529092509050611ca9565b611d6e818660000151612042565b51670de0b6b3a7640000900490565b600081848411156122a15760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561226657818101518382015260200161224e565b50505050905090810190601f1680156122935780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836122f85760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561226657818101518382015260200161224e565b50600083858161230457fe5b0495945050505050565b606061231d8484600085612325565b949350505050565b606061233085612492565b612381576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106123c05780518252601f1990920191602091820191016123a1565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612422576040519150601f19603f3d011682016040523d82523d6000602084013e612427565b606091505b5091509150811561243b57915061231d9050565b80511561244b5780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561226657818101518382015260200161224e565b3b151590565b604080516101208101909152806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516080810190915280600081526020016000815260200160008152602001600081525090565b6040805160808101909152806000815260200160008152602001600081526020016000151581525090565b6040518060200160405280600081525090565b6040805160e081019091528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe596f752061726520747279696e6720746f20706179206261636b206d6f7265207468616e20796f75206f7765596f752061726520747279696e6720746f20776974686472617720746f6f206d756368536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77526570617920626f72726f77206e6577206163636f756e742062616c616e63652063616c63756c6174696f6e206661696c6564526570617920626f72726f77206e657720746f74616c2062616c616e63652063616c63756c6174696f6e206661696c65645361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212207caea02b22e8269dd552a513187de2894fc8c3b2ee333f1831417352f7ef021564736f6c6343000606003360806040523480156200001157600080fd5b50604051620013a1380380620013a1833981810160405260608110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011157600080fd5b9083019060208201858111156200012757600080fd5b82516401000000008111828201881017156200014257600080fd5b82525081516020918201929091019080838360005b838110156200017157818101518382015260200162000157565b50505050905090810190601f1680156200019f5780820380516001836020036101000a031916815260200191505b5060405250505080826000620001ba6200026c60201b60201c565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35081516200021990600490602085019062000271565b5080516200022f90600590602084019062000271565b5050600680546001600160a01b0390951661010002610100600160a81b031960ff1990961660121795909516949094179093555062000313915050565b335b90565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002b457805160ff1916838001178555620002e4565b82800160010185558215620002e4579182015b82811115620002e4578251825591602001919060010190620002c7565b50620002f2929150620002f6565b5090565b6200026e91905b80821115620002f25760008155600101620002fd565b61107e80620003236000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c8063715018a6116100a2578063a457c2d711610071578063a457c2d71461031b578063a9059cbb14610347578063dd62ed3e14610373578063e9cbd822146103a1578063f2fde38b146103a95761010b565b8063715018a6146102bb5780638da5cb5b146102c357806395d89b41146102e75780639dc29fac146102ef5761010b565b8063313ce567116100de578063313ce5671461021d578063395093511461023b57806340c10f191461026757806370a08231146102955761010b565b806306fdde0314610110578063095ea7b31461018d57806318160ddd146101cd57806323b872dd146101e7575b600080fd5b6101186103cf565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015257818101518382015260200161013a565b50505050905090810190601f16801561017f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101b9600480360360408110156101a357600080fd5b506001600160a01b038135169060200135610465565b604080519115158252519081900360200190f35b6101d5610482565b60408051918252519081900360200190f35b6101b9600480360360608110156101fd57600080fd5b506001600160a01b03813581169160208101359091169060400135610488565b610225610515565b6040805160ff9092168252519081900360200190f35b6101b96004803603604081101561025157600080fd5b506001600160a01b03813516906020013561051e565b6102936004803603604081101561027d57600080fd5b506001600160a01b038135169060200135610572565b005b6101d5600480360360208110156102ab57600080fd5b50356001600160a01b03166105d8565b6102936105f3565b6102cb610695565b604080516001600160a01b039092168252519081900360200190f35b6101186106a4565b6102936004803603604081101561030557600080fd5b506001600160a01b038135169060200135610705565b6101b96004803603604081101561033157600080fd5b506001600160a01b038135169060200135610767565b6101b96004803603604081101561035d57600080fd5b506001600160a01b0381351690602001356107d5565b6101d56004803603604081101561038957600080fd5b506001600160a01b03813581169160200135166107e9565b6102cb610814565b610293600480360360208110156103bf57600080fd5b50356001600160a01b0316610828565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561045b5780601f106104305761010080835404028352916020019161045b565b820191906000526020600020905b81548152906001019060200180831161043e57829003601f168201915b5050505050905090565b6000610479610472610920565b8484610924565b50600192915050565b60035490565b6000610495848484610a10565b61050b846104a1610920565b61050685604051806060016040528060288152602001610f72602891396001600160a01b038a166000908152600260205260408120906104df610920565b6001600160a01b03168152602081019190915260400160002054919063ffffffff610b7916565b610924565b5060019392505050565b60065460ff1690565b600061047961052b610920565b84610506856002600061053c610920565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff610c1016565b61057a610920565b6000546001600160a01b039081169116146105ca576040805162461bcd60e51b81526020600482018190526024820152600080516020610f9a833981519152604482015290519081900360640190fd5b6105d48282610c71565b5050565b6001600160a01b031660009081526001602052604090205490565b6105fb610920565b6000546001600160a01b0390811691161461064b576040805162461bcd60e51b81526020600482018190526024820152600080516020610f9a833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60058054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561045b5780601f106104305761010080835404028352916020019161045b565b61070d610920565b6000546001600160a01b0390811691161461075d576040805162461bcd60e51b81526020600482018190526024820152600080516020610f9a833981519152604482015290519081900360640190fd5b6105d48282610d6f565b6000610479610774610920565b8461050685604051806060016040528060258152602001611024602591396002600061079e610920565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff610b7916565b60006104796107e2610920565b8484610a10565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60065461010090046001600160a01b031681565b610830610920565b6000546001600160a01b03908116911614610880576040805162461bcd60e51b81526020600482018190526024820152600080516020610f9a833981519152604482015290519081900360640190fd5b6001600160a01b0381166108c55760405162461bcd60e51b8152600401808060200182810382526026815260200180610f046026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6001600160a01b0383166109695760405162461bcd60e51b81526004018080602001828103825260248152602001806110006024913960400191505060405180910390fd5b6001600160a01b0382166109ae5760405162461bcd60e51b8152600401808060200182810382526022815260200180610f2a6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610a555760405162461bcd60e51b8152600401808060200182810382526025815260200180610fdb6025913960400191505060405180910390fd5b6001600160a01b038216610a9a5760405162461bcd60e51b8152600401808060200182810382526023815260200180610ebf6023913960400191505060405180910390fd5b610aa5838383610e77565b610ae881604051806060016040528060268152602001610f4c602691396001600160a01b038616600090815260016020526040902054919063ffffffff610b7916565b6001600160a01b038085166000908152600160205260408082209390935590841681522054610b1d908263ffffffff610c1016565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610c085760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610bcd578181015183820152602001610bb5565b50505050905090810190601f168015610bfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610c6a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610ccc576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b610cd860008383610e77565b600354610ceb908263ffffffff610c1016565b6003556001600160a01b038216600090815260016020526040902054610d17908263ffffffff610c1016565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216610db45760405162461bcd60e51b8152600401808060200182810382526021815260200180610fba6021913960400191505060405180910390fd5b610dc082600083610e77565b610e0381604051806060016040528060228152602001610ee2602291396001600160a01b038516600090815260016020526040902054919063ffffffff610b7916565b6001600160a01b038316600090815260016020526040902055600354610e2f908263ffffffff610e7c16565b6003556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b505050565b6000610c6a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610b7956fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212203cbab76297dd65551a6b7fbbfff57acaaadb19ff497b171843179fb385b47ead64736f6c63430006060033000000000000000000000000f289b48636f6a66f8aea4c2d422a88d4f73b3894000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000ba539b9a5c2d412cb10e5770435f362094f9541c0000000000000000000000000efe54e77e5cc430342088da27ef73f42b482d330000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000

Deployed ByteCode Sourcemap

55301:28381:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;55301:28381:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;80226:2252:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;80226:2252:0;;:::i;:::-;;55462:36;;;:::i;:::-;;;;;;;;;;;;;;;;68058:152;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;68058:152:0;-1:-1:-1;;;;;68058:152:0;;:::i;55749:30::-;;;:::i;78560:1221::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;78560:1221:0;;;;;;-1:-1:-1;;;;;78560:1221:0;;:::i;62869:191::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;62869:191:0;;:::i;56127:51::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;56127:51:0;-1:-1:-1;;;;;56127:51:0;;:::i;72134:91::-;;;:::i;55578:27::-;;;:::i;55960:37::-;;;:::i;:::-;;;;-1:-1:-1;;;;;55960:37:0;;;;;;;;;;;;;;60646:201;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;60646:201:0;-1:-1:-1;;;;;60646:201:0;;:::i;55880:35::-;;;:::i;72685:916::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;72685:916:0;;:::i;60340:99::-;;;:::i;55818:23::-;;;:::i;61893:333::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;61893:333:0;;:::i;55505:33::-;;;:::i;55713:29::-;;;:::i;69397:123::-;;;:::i;66488:1288::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;66488:1288:0;-1:-1:-1;;;;;66488:1288:0;;:::i;76702:456::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;76702:456:0;-1:-1:-1;;;;;76702:456:0;;:::i;55612:28::-;;;:::i;60125:100::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;61461:166;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;61461:166:0;;:::i;63301:2941::-;;;:::i;55545:26::-;;;:::i;82967:712::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;82967:712:0;;;;;;;;;;;;;;;;;:::i;68978:276::-;;;:::i;62515:183::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;62515:183:0;-1:-1:-1;;;;;62515:183:0;;:::i;60855:141::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;60855:141:0;-1:-1:-1;;;;;60855:141:0;;:::i;55922:31::-;;;:::i;70865:1086::-;;;:::i;55786:25::-;;;:::i;69653:1060::-;;;:::i;56006:56::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;56006:56:0;-1:-1:-1;;;;;56006:56:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;74100:2429;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;74100:2429:0;;:::i;61136:115::-;;;:::i;77328:812::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;77328:812:0;-1:-1:-1;;;;;77328:812:0;;:::i;56069:51::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;56069:51:0;-1:-1:-1;;;;;56069:51:0;;:::i;55850:23::-;;;:::i;68572:236::-;;;:::i;80226:2252::-;57830:10;;57824:3;:16;57816:25;;12:1:-1;9;2:12;57816:25:0;80336:32:::1;;:::i;:::-;80479;80500:10;80479:20;:32::i;:::-;80457:19;::::0;::::1;:54:::0;;;80604:35;::::1;;80582:129;;;;-1:-1:-1::0;;;80582:129:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;80789:17:::0;80785:152:::1;;80842:19;::::0;::::1;::::0;80823:16:::1;::::0;::::1;:38:::0;80785:152:::1;;;80894:16;::::0;::::1;:31:::0;;;80785:152:::1;81007:16;::::0;;::::1;::::0;80971:10:::1;::::0;:32:::1;::::0;;-1:-1:-1;;;80971:32:0;;80992:10:::1;80971:32;::::0;::::1;::::0;;;81007:16;;-1:-1:-1;;;;;80971:10:0;;::::1;::::0;:20:::1;::::0;:32;;;;;81007:16;;80971:32;;;;;;:10;:32;::::1;;2:2:-1::0;::::1;;;27:1;24::::0;17:12:::1;2:2;80971:32:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;80971:32:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28::::0;21:12:::1;4:2;-1:-1:::0;80971:32:0;:52:::1;;80949:132;;;::::0;;-1:-1:-1;;;80949:132:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;81240:16;::::0;::::1;::::0;81145:10:::1;::::0;:122:::1;::::0;-1:-1:-1;;;;;81145:10:0;;::::1;::::0;81187::::1;::::0;81220:4:::1;::::0;81145:122:::1;:27;:122;:::i;:::-;81454:83;81476:4;:19;;;81510:4;:16;;;81454:7;:83::i;:::-;81428:22;::::0;::::1;81413:124:::0;;;81414:4;81413:124;::::1;::::0;::::1;;;;;;;;;;;;;;::::0;;-1:-1:-1;81586:18:0::1;::::0;-1:-1:-1;81570:12:0;;:34:::1;::::0;::::1;;;;;;;81548:135;;;;-1:-1:-1::0;;;81548:135:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;81797:76;81819:12;;81846:4;:16;;;81797:7;:76::i;:::-;81773:20;::::0;::::1;81758:115:::0;;;81759:4;81758:115;::::1;::::0;::::1;;;;;;;;;;;;;;::::0;;-1:-1:-1;81922:18:0::1;::::0;-1:-1:-1;81906:12:0;;:34:::1;::::0;::::1;;;;;;;81884:133;;;;-1:-1:-1::0;;;81884:133:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;82115:20;::::0;::::1;::::0;82100:12:::1;:35:::0;82185:22:::1;::::0;;::::1;::::0;82161:10:::1;82146:26;::::0;;;:14:::1;:26;::::0;;;;;;;;:61;;;82261:11:::1;::::0;82218:40:::1;::::0;;::::1;:54:::0;;;82290:180;;;;;;;::::1;::::0;;;;;;;;;;;;;;;;;;;::::1;::::0;;;;;;;;;::::1;57852:1;80226:2252:::0;:::o;55462:36::-;;;;:::o;68058:152::-;68121:7;68141:16;:14;:16::i;:::-;68175:27;68194:7;68175:18;:27::i;:::-;68168:34;;68058:152;;;;:::o;55749:30::-;;;;:::o;78560:1221::-;57649:11;;-1:-1:-1;;;;;57649:11:0;57627:10;:34;57619:43;;12:1:-1;9;2:12;57619:43:0;57830:10:::1;;57824:3;:16;57816:25;;12:1:-1;9::::0;2:12:::1;57816:25:0;78736:27:::2;;:::i;:::-;78862:13;78845:14;:12;:14::i;:::-;:30;78837:68;;;::::0;;-1:-1:-1;;;78837:68:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;::::2;::::0;;;;;;;;;;;;;::::2;;79024:29;79043:9;79024:18;:29::i;:::-;79002:19;::::0;::::2;:51:::0;;;79166:80:::2;::::0;79222:13;79166:7:::2;:80::i;:::-;79140:22;::::0;::::2;79125:121:::0;;;79126:4;79125:121;::::2;::::0;::::2;;;;;;;;;;;;;;;;::::0;::::2;;79353:73;79375:12;;79402:13;79353:7;:73::i;:::-;79329:20;::::0;::::2;79314:112:::0;;;79315:4;79314:112;::::2;::::0;::::2;;;;;;;;;;;;;;::::0;;-1:-1:-1;;79541:22:0::2;::::0;;::::2;::::0;-1:-1:-1;;;;;79503:25:0;;::::2;;::::0;;;:14:::2;:25;::::0;;;;;:60;;;79616:11:::2;::::0;79574:39:::2;::::0;;::::2;:53:::0;79653:20:::2;::::0;::::2;::::0;79638:12:::2;:35:::0;79724:10:::2;::::0;:49:::2;::::0;:10:::2;79518:9:::0;79759:13;79724:49:::2;:23;:49;:::i;:::-;57852:1;78560:1221:::0;;:::o;62869:191::-;58013:8;;-1:-1:-1;;;;;58013:8:0;57999:10;:22;57991:31;;12:1:-1;9;2:12;57991:31:0;62952:21:::1;:43:::0;;;63011:41:::1;::::0;;;;;;;::::1;::::0;;;;::::1;::::0;;::::1;62869:191:::0;:::o;56127:51::-;;;;;;;;;;;;;:::o;72134:91::-;72176:7;72203:14;:12;:14::i;:::-;72196:21;;72134:91;;:::o;55578:27::-;;;;:::o;55960:37::-;;;-1:-1:-1;;;;;55960:37:0;;:::o;60646:201::-;57649:11;;-1:-1:-1;;;;;57649:11:0;57627:10;:34;57619:43;;12:1:-1;9;2:12;57619:43:0;60775:11:::1;::::0;60734:54:::1;::::0;;-1:-1:-1;;;;;60734:54:0;;::::1;::::0;;60775:11;;::::1;60734:54;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;60799:11;:40:::0;;-1:-1:-1;;;;;;60799:40:0::1;-1:-1:-1::0;;;;;60799:40:0;;;::::1;::::0;;;::::1;::::0;;60646:201::o;55880:35::-;;;-1:-1:-1;;;;;55880:35:0;;:::o;72685:916::-;72771:25;;:::i;:::-;72869:21;:19;:21::i;:::-;72841:25;;;;:49;;;73144:42;;;;;;;;73159:25;;73144:42;;73085:112;;73122:7;;73085:22;:112::i;:::-;73066:15;;;73051:146;;;73052:4;73051:146;;;;;;;;;;;;;;;;;;;-1:-1:-1;;73285:10:0;;:63;;-1:-1:-1;;;;;73285:10:0;73313;73333:4;73340:7;73285:63;:27;:63;:::i;:::-;73409:10;73392:28;;;;:16;:28;;;;;;;;:38;;73361:69;;73480:11;;73509:15;;;;73480:45;;-1:-1:-1;;;73480:45:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;73480:11:0;;;;:16;;:45;;;;;73392:28;;73480:45;;;;;73392:28;73480:11;:45;;;2:2:-1;;;;27:1;24;17:12;2:2;73480:45:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;;73577:15:0;;;;;73541:52;;73556:10;73541:52;;;;;;;;;;;;;;;;;;;-1:-1:-1;73541:52:0;;;;;;;;72685:916;;:::o;60340:99::-;60420:10;;-1:-1:-1;;;;;60420:10:0;60340:99;:::o;55818:23::-;;;-1:-1:-1;;;;;55818:23:0;;:::o;61893:333::-;58013:8;;-1:-1:-1;;;;;58013:8:0;57999:10;:22;57991:31;;12:1:-1;9;2:12;57991:31:0;62002:7:::1;61985:13;;:24;;61963:109;;;;-1:-1:-1::0;;;61963:109:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;62099:13;::::0;:26:::1;::::0;62117:7;62099:26:::1;:17;:26;:::i;:::-;62083:13;:42:::0;62160:8:::1;::::0;62136:10:::1;::::0;:42:::1;::::0;-1:-1:-1;;;;;62136:10:0;;::::1;::::0;62160:8:::1;62170:7:::0;62136:42:::1;:23;:42;:::i;:::-;62194:24;::::0;;;;;;;::::1;::::0;;;;::::1;::::0;;::::1;61893:333:::0;:::o;55505:33::-;;;;:::o;55713:29::-;;;;:::o;69397:123::-;69446:7;69466:16;:14;:16::i;:::-;-1:-1:-1;69500:12:0;;69397:123;:::o;66488:1288::-;-1:-1:-1;;;;;66752:23:0;;66554:7;66752:23;;;:14;:23;;;;;66964:24;;66554:7;;;;;;66752:23;66960:72;;67018:1;67010:10;;;;;;;;66960:72;67241:83;67263:14;:24;;;67302:11;;67241:7;:83::i;:::-;67208:116;;-1:-1:-1;67208:116:0;-1:-1:-1;67414:18:0;67403:7;:29;;;;;;;;;67399:72;;67457:1;67449:10;;;;;;;;67399:72;67501:95;67523:19;67557:14;:28;;;67501:7;:95::i;:::-;67481:115;;-1:-1:-1;67481:115:0;-1:-1:-1;67686:18:0;67675:7;:29;;;;;;;;;67671:72;;67729:1;67721:10;;;;;;;;67671:72;-1:-1:-1;67761:6:0;66488:1288;-1:-1:-1;;;;66488:1288:0:o;76702:456::-;76796:7;76821:20;76844:19;:17;:19::i;:::-;76899:11;;:31;;;-1:-1:-1;;;76899:31:0;;-1:-1:-1;;;;;76899:31:0;;;;;;;;;76821:42;;-1:-1:-1;76874:22:0;;76899:11;;;;;:21;;:31;;;;;;;;;;;;;;:11;:31;;;2:2:-1;;;;27:1;24;17:12;2:2;76899:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;76899:31:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;76899:31:0;77054:29;;;76899:31;77054:29;;;;;;;;76899:31;;-1:-1:-1;76943:19:0;;;;77022:101;;76899:31;77022:17;:101::i;:::-;76999:124;76702:456;-1:-1:-1;;;;;;;76702:456:0:o;55612:28::-;;;;:::o;60125:100::-;60196:10;;:21;;;-1:-1:-1;;;60196:21:0;;;;60171:5;;-1:-1:-1;;;;;60196:10:0;;:19;;:21;;;;;;;;;;;;;;:10;:21;;;2:2:-1;;;;27:1;24;17:12;2:2;60196:21:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;60196:21:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;60196:21:0;;-1:-1:-1;60125:100:0;:::o;61461:166::-;61526:7;61546:11;61560:38;61590:7;;61560:25;61577:7;;61560:12;:16;;:25;;;;:::i;:::-;:29;:38;:29;:38;:::i;:::-;61546:52;61461:166;-1:-1:-1;;;61461:166:0:o;63301:2941::-;63390:26;63419:16;:14;:16::i;:::-;63480:18;;63390:45;;-1:-1:-1;63564:45:0;;;63560:144;;;63631:40;;;;;;;;;;;;;;;;;63686:7;;;;63560:144;63767:17;63787:14;:12;:14::i;:::-;63835:12;;;63882:13;;63933:11;;64038:12;;:116;;;-1:-1:-1;;;64038:116:0;;;;;;;;;;;;;;;;;;;;;63767:34;;-1:-1:-1;63835:12:0;;63882:13;;63933:11;;63812:20;;-1:-1:-1;;;;;64038:12:0;;;;:26;;:116;;;;;;;;;;;;;;:12;:116;;;2:2:-1;;;;27:1;24;17:12;2:2;64038:116:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;64038:116:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;64038:116:0;;-1:-1:-1;55697:9:0;64187:43;;;64165:119;;;;;-1:-1:-1;;;64165:119:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;64369:17;64388:18;64410:89;64432:18;64465:23;64410:7;:89::i;:::-;64368:131;;;;64601:31;;:::i;:::-;64643:27;64681:23;64715:24;64750:22;64875:95;64899:35;;;;;;;;64914:18;64899:35;;;64949:10;64875:9;:95::i;:::-;64841:129;;-1:-1:-1;64841:129:0;-1:-1:-1;65083:90:0;64841:129;65150:12;65083:17;:90::i;:::-;65050:123;;-1:-1:-1;65050:123:0;-1:-1:-1;65277:42:0;65050:123;65306:12;65277:7;:42::i;:::-;65481:38;;;;;;;;;65496:21;;65481:38;;65248:71;;-1:-1:-1;65248:71:0;-1:-1:-1;65442:150:0;;65534:19;65568:13;65442:24;:150::i;:::-;65412:180;;-1:-1:-1;65412:180:0;-1:-1:-1;65708:132:0;65747:20;65782:16;;65708:24;:132::i;:::-;65680:160;;;;;;;;65937:18;65916;:39;;;;65980:14;65966:11;:28;;;;66020:15;66005:12;:30;;;;66062:16;66046:13;:32;;;;66094:140;66124:18;;66157:11;;66183:12;;66210:13;;66094:140;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;63301:2941;;;;;;;;;;;;;;;:::o;55545:26::-;;;;:::o;82967:712::-;57649:11;;-1:-1:-1;;;;;57649:11:0;57627:10;:34;57619:43;;12:1:-1;9;2:12;57619:43:0;57830:10:::1;;57824:3;:16;57816:25;;12:1:-1;9::::0;2:12:::1;57816:25:0;83134:10:::2;::::0;:64:::2;::::0;-1:-1:-1;;;;;83134:10:0::2;83162:11:::0;83183:4:::2;83190:7:::0;83134:64:::2;:27;:64;:::i;:::-;83264:11;83278:21;83291:7;83278:12;:21::i;:::-;83370:13;::::0;83264:35;;-1:-1:-1;83370:22:0::2;::::0;83264:35;83370:22:::2;:17;:22;:::i;:::-;83354:13;:38:::0;-1:-1:-1;;;;;83440:25:0;::::2;83478:1;83440:25:::0;;;:14:::2;:25;::::0;;;;:39;;;83490::::2;;:43:::0;83559:12:::2;::::0;:25:::2;::::0;83576:7;83559:25:::2;:16;:25;:::i;:::-;83544:12;:40:::0;-1:-1:-1;;;;82967:712:0:o;68978:276::-;69069:12;;69029:7;;-1:-1:-1;;;;;69069:12:0;:26;69114:14;:12;:14::i;:::-;69147:12;;69178:13;;69210:21;;69069:177;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;62515:183:0;57649:11;;-1:-1:-1;;;;;57649:11:0;57627:10;:34;57619:43;;12:1:-1;9;2:12;57619:43:0;62597:12:::1;:43:::0;;-1:-1:-1;;;;;62597:43:0;::::1;-1:-1:-1::0;;;;;;62597:43:0;;::::1;::::0;::::1;::::0;;;62656:34:::1;::::0;;;;;;::::1;::::0;;;;::::1;::::0;;::::1;62515:183:::0;:::o;60855:141::-;57649:11;;-1:-1:-1;;;;;57649:11:0;57627:10;:34;57619:43;;12:1:-1;9;2:12;57619:43:0;60952:8:::1;::::0;60929:32:::1;::::0;;-1:-1:-1;;;;;60929:32:0;;::::1;::::0;;60952:8;;::::1;60929:32;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;60972:8;:16:::0;;-1:-1:-1;;;;;;60972:16:0::1;-1:-1:-1::0;;;;;60972:16:0;;;::::1;::::0;;;::::1;::::0;;60855:141::o;55922:31::-;;;-1:-1:-1;;;;;55922:31:0;;:::o;70865:1086::-;70912:7;70932:16;:14;:16::i;:::-;70965:11;;;;;;;;;-1:-1:-1;;;;;70965:11:0;-1:-1:-1;;;;;70965:23:0;;:25;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;70965:25:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;70965:25:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;70965:25:0;70961:983;;-1:-1:-1;71100:27:0;;71093:34;;70961:983;71258:17;71278:14;:12;:14::i;:::-;71258:34;;71336:36;71387:23;;:::i;:::-;71425:17;71575:120;71608:9;71636:12;;71667:13;;71575:14;:120::i;:::-;71533:162;;;;;;;;71775:112;71800:28;71847:11;;;;;;;;;-1:-1:-1;;;;;71847:11:0;-1:-1:-1;;;;;71847:23:0;;:25;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;71847:25:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;71847:25:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;71847:25:0;71775:6;:112::i;:::-;71910:21;;-1:-1:-1;71902:30:0;;-1:-1:-1;;;;;71902:30:0;55786:25;;;;:::o;69653:1060::-;69727:11;;:25;;;-1:-1:-1;;;69727:25:0;;;;69703:7;;-1:-1:-1;;;;;69727:11:0;;:23;;:25;;;;;;;;;;;;;;:11;:25;;;2:2:-1;;;;27:1;24;17:12;56006:56:0;;;;;;;;;;;;;;;;;;;:::o;74100:2429::-;74151:27;;:::i;:::-;74274:11;;:33;;;-1:-1:-1;;;74274:33:0;;74296:10;74274:33;;;;;;-1:-1:-1;;;;;74274:11:0;;;;:21;;:33;;;;;;;;;;;;;;;:11;:33;;;2:2:-1;;;;27:1;24;17:12;2:2;74274:33:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;74274:33:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;74274:33:0;74248:23;;;:59;74388:21;:19;:21::i;:::-;74360:25;;;;:49;;;74496:42;;;;;;;;74511:25;;74496:42;;74553:23;;;;74464:123;;74496:42;74464:17;:123::i;:::-;74437:23;;;74422:165;;;74423:4;74422:165;;;;;;;;;;;;;;;;;;;-1:-1:-1;;74602:12:0;74598:136;;74645:23;;;;74631:11;;;:37;74598:136;;;74701:11;;;:21;;;74598:136;74928:116;74965:4;:11;;;74991:42;;;;;;;;75006:4;:25;;;74991:42;;;74928:22;:116::i;:::-;74909:15;;;74894:150;;;74895:4;74894:150;;;;;;;;;;;;;;;;;;;-1:-1:-1;;75167:11:0;;;;75128:10;;:35;;;-1:-1:-1;;;75128:35:0;;75157:4;75128:35;;;;;;-1:-1:-1;;;;;75128:10:0;;;;:20;;:35;;;;;;;;;;;;;;;:10;:35;;;2:2:-1;;;;27:1;24;17:12;2:2;75128:35:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;75128:35:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;75128:35:0;:50;;75106:131;;;;;-1:-1:-1;;;75106:131:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;75466:10;75373:31;75449:28;;;:16;:28;;;;;;75423:23;;;;:54;75419:202;;;75583:10;75566:28;;;;:16;:28;;;;;;75520:23;;;;:89;;;:27;:89;:::i;:::-;75494:115;;75419:202;75656:11;;;;:40;;75672:23;75656:40;:15;:40;:::i;:::-;75631:22;;;:65;75713:11;;;;:38;-1:-1:-1;75709:622:0;;75816:10;75799:28;;;;:16;:28;;;;;;:89;;75850:23;75799:89;:32;:89;:::i;:::-;75785:10;75768:28;;;;:16;:28;;;;;;;;:120;;;;75955:16;:28;;;;75929:22;;;;:54;;75903:141;;;;;-1:-1:-1;;;75903:141:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;76141:22;;;;76107:10;76090:28;;;;:16;:28;;;;;;:88;;;:32;:88;:::i;:::-;76076:10;76059:28;;;;:16;:28;;;;;:119;75709:622;;;76293:11;;;;76259:10;76242:28;;;;:16;:28;;;;;;:77;;;:32;:77;:::i;:::-;76228:10;76211:28;;;;:16;:28;;;;;:108;75709:622;76341:11;;76370:15;;;;;76341:45;;-1:-1:-1;;;76341:45:0;;76358:10;76341:45;;;;;;;;;;;;;-1:-1:-1;;;;;76341:11:0;;;;:16;;:45;;;;;:11;;:45;;;;;;;;:11;;:45;;;2:2:-1;;;;27:1;24;17:12;2:2;76341:45:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;;76433:11:0;;;;76397:10;;:48;;-1:-1:-1;;;;;;76397:10:0;;76421;;76397:48;:23;:48;:::i;:::-;76492:11;;;;76505:15;;;;;76461:60;;76480:10;76461:60;;;;;;;;;;;;;;;;;;;;;;;74100:2429;;;:::o;61136:115::-;61208:10;;:35;;;-1:-1:-1;;;61208:35:0;;61237:4;61208:35;;;;;;61181:7;;-1:-1:-1;;;;;61208:10:0;;:20;;:35;;;;;;;;;;;;;;:10;:35;;;2:2:-1;;;;27:1;24;17:12;77328:812:0;77424:7;77449:20;77472:19;:17;:19::i;:::-;77531:11;;:31;;;-1:-1:-1;;;77531:31:0;;-1:-1:-1;;;;;77531:31:0;;;;;;;;;77449:42;;-1:-1:-1;77502:26:0;;77531:11;;;;;:21;;:31;;;;;;;;;;;;;;:11;:31;;;2:2:-1;;;;27:1;24;17:12;2:2;77531:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;77531:31:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;77531:31:0;-1:-1:-1;;;;;77593:26:0;;77573:17;77593:26;;;:16;77531:31;77593:26;;;;;77531:31;;-1:-1:-1;77636:23:0;77632:89;;-1:-1:-1;;;;;;;;;77683:26:0;;;;;;:16;:26;;;;;;77676:33;;77632:89;77733:19;77763:32;77846:105;77878:29;;;;;;;;77893:12;77878:29;;;77922:18;77846:17;:105::i;:::-;77806:145;;-1:-1:-1;77806:145:0;-1:-1:-1;77964:20:0;77987:39;77806:145;78016:9;77987:39;:28;:39;:::i;:::-;-1:-1:-1;;;;;78075:26:0;;78037:18;78075:26;;;:16;:26;;;;;;77964:62;;-1:-1:-1;78037:18:0;78058:44;;77964:62;;78058:44;:16;:44;:::i;:::-;78037:65;77328:812;-1:-1:-1;;;;;;;;;77328:812:0:o;56069:51::-;;;;;;;;;;;;;:::o;55850:23::-;;;-1:-1:-1;;;;;55850:23:0;;:::o;68572:236::-;68663:12;;68623:7;;-1:-1:-1;;;;;68663:12:0;:26;68708:14;:12;:14::i;:::-;68741:12;;68772:13;;68663:137;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;29622:205:0;29750:68;;;-1:-1:-1;;;;;29750:68:0;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;29750:68:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;29723:96:0;;29743:5;;29723:19;:96::i;:::-;29622:205;;;;:::o;33789:236::-;33845:9;33856:4;33882:1;33877;:6;33873:145;;-1:-1:-1;33908:18:0;;-1:-1:-1;33928:5:0;;;33900:34;;33873:145;-1:-1:-1;33975:27:0;;-1:-1:-1;34004:1:0;33873:145;33789:236;;;;;:::o;34110:258::-;34166:9;;34203:5;;;34225:6;;;34221:140;;34256:18;;-1:-1:-1;34276:1:0;-1:-1:-1;34248:30:0;;34221:140;-1:-1:-1;34319:26:0;;-1:-1:-1;34347:1:0;;-1:-1:-1;34311:38:0;;29437:177;29547:58;;;-1:-1:-1;;;;;29547:58:0;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;29547:58:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;29520:86:0;;29540:5;;29520:19;:86::i;39393:337::-;39481:9;39492:4;39510:13;39525:19;;:::i;:::-;39548:31;39563:6;39571:7;39548:14;:31::i;:::-;39509:70;;-1:-1:-1;39509:70:0;-1:-1:-1;39601:18:0;39594:3;:25;;;;;;;;;39590:73;;-1:-1:-1;39644:3:0;-1:-1:-1;39649:1:0;;-1:-1:-1;39636:15:0;;39590:73;39683:18;39703;39712:8;39703;:18::i;:::-;39675:47;;;;;;39393:337;;;;;:::o;7625:136::-;7683:7;7710:43;7714:1;7717;7710:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;7703:50;;7625:136;;;;;:::o;33001:343::-;33057:9;;33089:6;33085:69;;-1:-1:-1;33120:18:0;;-1:-1:-1;33120:18:0;33112:30;;33085:69;33175:5;;;33179:1;33175;:5;:1;33197:5;;;;;:10;33193:144;;-1:-1:-1;33232:26:0;;-1:-1:-1;33260:1:0;;-1:-1:-1;33224:38:0;;33193:144;33303:18;;-1:-1:-1;33323:1:0;-1:-1:-1;33295:30:0;;33439:215;33495:9;;33527:6;33523:77;;-1:-1:-1;33558:26:0;;-1:-1:-1;33586:1:0;33550:38;;33523:77;33620:18;33644:1;33640;:5;;;;;;33612:34;;;;33439:215;;;;;:::o;37345:313::-;37422:9;37433:4;37451:13;37466:18;;:::i;:::-;37488:20;37498:1;37501:6;37488:9;:20::i;8515:471::-;8573:7;8818:6;8814:47;;-1:-1:-1;8848:1:0;8841:8;;8814:47;8885:5;;;8889:1;8885;:5;:1;8909:5;;;;;:10;8901:56;;;;-1:-1:-1;;;8901:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9462:132;9520:7;9547:39;9551:1;9554;9547:39;;;;;;;;;;;;;;;;;:3;:39::i;68306:96::-;68382:12;68306:96;:::o;36879:353::-;36948:9;36959:10;;:::i;:::-;36983:14;36999:19;37022:27;37030:1;:10;;;37042:6;37022:7;:27::i;:::-;36982:67;;-1:-1:-1;36982:67:0;-1:-1:-1;37072:18:0;37064:4;:26;;;;;;;;;37060:92;;-1:-1:-1;37121:18:0;;;;;;;;;-1:-1:-1;37121:18:0;;37115:4;;-1:-1:-1;37121:18:0;-1:-1:-1;37107:33:0;;37060:92;37192:31;;;;;;;;;;;;-1:-1:-1;;37192:31:0;;-1:-1:-1;36879:353:0;-1:-1:-1;;;;36879:353:0:o;37803:328::-;37900:9;37911:4;37929:13;37944:18;;:::i;:::-;37966:20;37976:1;37979:6;37966:9;:20::i;:::-;37928:58;;-1:-1:-1;37928:58:0;-1:-1:-1;38008:18:0;38001:3;:25;;;;;;;;;37997:73;;-1:-1:-1;38051:3:0;-1:-1:-1;38056:1:0;;-1:-1:-1;38043:15:0;;37997:73;38089:34;38097:17;38106:7;38097:8;:17::i;:::-;38116:6;38089:7;:34::i;:::-;38082:41;;;;;;37803:328;;;;;;;:::o;7161:181::-;7219:7;7251:5;;;7275:6;;;;7267:46;;;;;-1:-1:-1;;;7267:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;34437:271;34508:9;34519:4;34537:14;34553:8;34565:13;34573:1;34576;34565:7;:13::i;:::-;34536:42;;-1:-1:-1;34536:42:0;-1:-1:-1;34603:18:0;34595:4;:26;;;;;;;;;34591:75;;-1:-1:-1;34646:4:0;-1:-1:-1;34652:1:0;;-1:-1:-1;34638:16:0;;34591:75;34685:15;34693:3;34698:1;34685:7;:15::i;35638:515::-;35699:9;35710:10;;:::i;:::-;35734:14;35750:20;35774:22;35782:3;35191:4;35774:7;:22::i;:::-;35733:63;;-1:-1:-1;35733:63:0;-1:-1:-1;35819:18:0;35811:4;:26;;;;;;;;;35807:92;;-1:-1:-1;35868:18:0;;;;;;;;;-1:-1:-1;35868:18:0;;35862:4;;-1:-1:-1;35868:18:0;-1:-1:-1;35854:33:0;;35807:92;35912:14;35928:13;35945:31;35953:15;35970:5;35945:7;:31::i;:::-;35911:65;;-1:-1:-1;35911:65:0;-1:-1:-1;35999:18:0;35991:4;:26;;;;;;;;;35987:92;;36042:4;36048:18;;;;;;;;36063:1;36048:18;;;36034:33;;;;;;;;;;35987:92;36119:25;;;;;;;;;;;;-1:-1:-1;;36119:25:0;;-1:-1:-1;35638:515:0;-1:-1:-1;;;;;;35638:515:0:o;31742:761::-;32166:23;32192:69;32220:4;32192:69;;;;;;;;;;;;;;;;;32200:5;-1:-1:-1;;;;;32192:27:0;;;:69;;;;;:::i;:::-;32276:17;;32166:95;;-1:-1:-1;32276:21:0;32272:224;;32418:10;32407:30;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;32407:30:0;32399:85;;;;-1:-1:-1;;;32399:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38662:620;38742:9;38753:10;;:::i;:::-;39060:14;39076;39094:25;35191:4;39112:6;39094:7;:25::i;:::-;39059:60;;-1:-1:-1;39059:60:0;-1:-1:-1;39142:18:0;39134:4;:26;;;;;;;;;39130:92;;-1:-1:-1;39191:18:0;;;;;;;;;-1:-1:-1;39191:18:0;;39185:4;;-1:-1:-1;39191:18:0;-1:-1:-1;39177:33:0;;39130:92;39239:35;39246:9;39257:7;:16;;;39239:6;:35::i;42158:213::-;42340:12;35191:4;42340:23;;;42158:213::o;8064:192::-;8150:7;8186:12;8178:6;;;;8170:29;;;;-1:-1:-1;;;8170:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;8170:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;8222:5:0;;;8064:192::o;10090:278::-;10176:7;10211:12;10204:5;10196:28;;;;-1:-1:-1;;;10196:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;10196:28:0;;10235:9;10251:1;10247;:5;;;;;;;10090:278;-1:-1:-1;;;;;10090:278:0:o;15349:196::-;15452:12;15484:53;15507:6;15515:4;15521:1;15524:12;15484:22;:53::i;:::-;15477:60;15349:196;-1:-1:-1;;;;15349:196:0:o;16726:979::-;16856:12;16889:18;16900:6;16889:10;:18::i;:::-;16881:60;;;;;-1:-1:-1;;;16881:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;17015:12;17029:23;17056:6;-1:-1:-1;;;;;17056:11:0;17076:8;17087:4;17056:36;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;17056:36:0;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;19;14:27;;;;67:4;61:11;56:16;;134:4;130:9;123:4;105:16;101:27;97:43;94:1;90:51;84:4;77:65;157:16;154:1;147:27;211:16;208:1;201:4;198:1;194:12;179:49;5:228;;14:27;32:4;27:9;;5:228;;17014:78:0;;;;17107:7;17103:595;;;17138:10;-1:-1:-1;17131:17:0;;-1:-1:-1;17131:17:0;17103:595;17252:17;;:21;17248:439;;17515:10;17509:17;17576:15;17563:10;17559:2;17555:19;17548:44;17463:148;17651:20;;-1:-1:-1;;;17651:20:0;;;;;;;;;;;;;;;;;17658:12;;17651:20;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;12431:422:0;12798:20;12837:8;;;12431:422::o;55301:28381::-;;;;;;;;;;;-1:-1:-1;55301:28381:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;-1:-1:-1;55301:28381:0;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;-1:-1:-1;55301:28381:0;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;-1:-1:-1;55301:28381:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o

Swarm Source

ipfs://3cbab76297dd65551a6b7fbbfff57acaaadb19ff497b171843179fb385b47ead
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.