Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
107557775 | 494 days ago | 0 ETH | ||||
107549673 | 495 days ago | 0 ETH | ||||
107542907 | 495 days ago | 0 ETH | ||||
107540119 | 495 days ago | 0 ETH | ||||
107537548 | 495 days ago | 0 ETH | ||||
107531753 | 495 days ago | 0 ETH | ||||
107493248 | 496 days ago | 0 ETH | ||||
107483194 | 496 days ago | 0 ETH | ||||
107482754 | 496 days ago | 0 ETH | ||||
107482738 | 496 days ago | 0 ETH | ||||
107475215 | 496 days ago | 0 ETH | ||||
107475045 | 496 days ago | 0 ETH | ||||
107474959 | 496 days ago | 0 ETH | ||||
107474956 | 496 days ago | 0 ETH | ||||
107474949 | 496 days ago | 0 ETH | ||||
107474933 | 496 days ago | 0 ETH | ||||
107474917 | 496 days ago | 0 ETH | ||||
107474829 | 496 days ago | 0 ETH | ||||
107468583 | 496 days ago | 0 ETH | ||||
107452022 | 497 days ago | 0 ETH | ||||
107435683 | 497 days ago | 0 ETH | ||||
107431490 | 497 days ago | 0 ETH | ||||
107419825 | 498 days ago | 0 ETH | ||||
107416891 | 498 days ago | 0 ETH | ||||
107413401 | 498 days ago | 0 ETH |
Loading...
Loading
Contract Name:
AmmVault
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "../utils/proxy/solidity-0.8.0/ProxyReentrancyGuard.sol"; import "../utils/proxy/solidity-0.8.0/ProxyOwned.sol"; import "../interfaces/IThalesAMM.sol"; import "../interfaces/IPositionalMarket.sol"; import "../interfaces/IStakingThales.sol"; contract AmmVault is Initializable, ProxyOwned, PausableUpgradeable, ProxyReentrancyGuard { /* ========== LIBRARIES ========== */ using SafeERC20Upgradeable for IERC20Upgradeable; struct DepositReceipt { uint round; uint amount; } struct InitParams { address _owner; IThalesAMM _thalesAmm; IERC20Upgradeable _sUSD; uint _roundLength; uint _priceLowerLimit; uint _priceUpperLimit; int _skewImpactLimit; uint _allocationLimitsPerMarketPerRound; uint _maxAllowedDeposit; uint _utilizationRate; uint _minDepositAmount; uint _maxAllowedUsers; uint _minTradeAmount; } /* ========== CONSTANTS ========== */ uint private constant HUNDRED = 1e20; uint private constant ONE = 1e18; /* ========== STATE VARIABLES ========== */ IThalesAMM public thalesAMM; IERC20Upgradeable public sUSD; bool public vaultStarted; uint public round; uint public roundLength; mapping(uint => uint) public roundStartTime; mapping(uint => address[]) public usersPerRound; mapping(uint => mapping(address => bool)) public userInRound; mapping(uint => mapping(address => uint)) public balancesPerRound; mapping(address => bool) public withdrawalRequested; mapping(address => DepositReceipt) public depositReceipts; mapping(uint => uint) public allocationPerRound; mapping(uint => address[]) public tradingMarketsPerRound; mapping(uint => mapping(address => IThalesAMM.Position)) public tradingMarketPositionPerRound; mapping(uint => mapping(address => bool)) public isTradingMarketInARound; mapping(uint => uint) public profitAndLossPerRound; mapping(uint => uint) public cumulativeProfitAndLoss; uint public maxAllowedDeposit; uint public utilizationRate; mapping(uint => uint) public capPerRound; uint public minDepositAmount; uint public maxAllowedUsers; uint public usersCurrentlyInVault; uint public allocationLimitsPerMarketPerRound; mapping(uint => mapping(address => uint)) public allocationSpentPerRound; uint public priceLowerLimit; uint public priceUpperLimit; int public skewImpactLimit; uint public minTradeAmount; /// @return The address of the Staking contract IStakingThales public stakingThales; mapping(uint => uint) public allocationSpentInARound; /* ========== CONSTRUCTOR ========== */ function __BaseVault_init( address _owner, IThalesAMM _thalesAmm, IERC20Upgradeable _sUSD, uint _roundLength, uint _maxAllowedDeposit, uint _utilizationRate, uint _minDepositAmount, uint _maxAllowedUsers ) internal onlyInitializing { setOwner(_owner); initNonReentrant(); thalesAMM = IThalesAMM(_thalesAmm); sUSD = _sUSD; roundLength = _roundLength; maxAllowedDeposit = _maxAllowedDeposit; utilizationRate = _utilizationRate; minDepositAmount = _minDepositAmount; maxAllowedUsers = _maxAllowedUsers; sUSD.approve(address(thalesAMM), type(uint256).max); } function initialize(InitParams calldata params) external initializer { __BaseVault_init( params._owner, params._thalesAmm, params._sUSD, params._roundLength, params._maxAllowedDeposit, params._utilizationRate, params._minDepositAmount, params._maxAllowedUsers ); priceLowerLimit = params._priceLowerLimit; priceUpperLimit = params._priceUpperLimit; skewImpactLimit = params._skewImpactLimit; allocationLimitsPerMarketPerRound = params._allocationLimitsPerMarketPerRound; minTradeAmount = params._minTradeAmount; } /// @notice Start vault and begin round #1 function startVault() external onlyOwner { require(!vaultStarted, "Vault has already started"); round = 1; roundStartTime[round] = block.timestamp; vaultStarted = true; capPerRound[2] = capPerRound[1]; emit VaultStarted(); } /// @notice Close current round and begin next round, /// excercise options of trading markets and calculate profit and loss function closeRound() external nonReentrant whenNotPaused { require(canCloseCurrentRound(), "Can't close current round"); // excercise market options _exerciseMarketsReadyToExercised(); // balance in next round does not affect PnL in a current round uint currentVaultBalance = sUSD.balanceOf(address(this)) - allocationPerRound[round + 1]; // calculate PnL // if no allocation for current round if (allocationPerRound[round] == 0) { profitAndLossPerRound[round] = 1; } else { profitAndLossPerRound[round] = (currentVaultBalance * ONE) / allocationPerRound[round]; } for (uint i = 0; i < usersPerRound[round].length; i++) { address user = usersPerRound[round][i]; uint balanceAfterCurRound = (balancesPerRound[round][user] * profitAndLossPerRound[round]) / ONE; if (userInRound[round][user]) { if (!withdrawalRequested[user]) { balancesPerRound[round + 1][user] = balancesPerRound[round + 1][user] + balanceAfterCurRound; userInRound[round + 1][user] = true; usersPerRound[round + 1].push(user); if (address(stakingThales) != address(0)) { stakingThales.updateVolume(user, balanceAfterCurRound); } } else { balancesPerRound[round + 1][user] = 0; sUSD.safeTransfer(user, balanceAfterCurRound); withdrawalRequested[user] = false; userInRound[round + 1][user] = false; emit Claimed(user, balanceAfterCurRound); } } } if (round == 1) { cumulativeProfitAndLoss[round] = profitAndLossPerRound[round]; } else { cumulativeProfitAndLoss[round] = (cumulativeProfitAndLoss[round - 1] * profitAndLossPerRound[round]) / ONE; } // start next round round += 1; roundStartTime[round] = block.timestamp; // allocation for next round doesn't include withdrawal queue share from previous round allocationPerRound[round] = sUSD.balanceOf(address(this)); capPerRound[round + 1] = allocationPerRound[round]; emit RoundClosed(round - 1, profitAndLossPerRound[round - 1]); } /// @notice Deposit funds from user into vault for the next round /// @param amount Value to be deposited function deposit(uint amount) external canDeposit(amount) { sUSD.safeTransferFrom(msg.sender, address(this), amount); uint nextRound = round + 1; // new user enters the vault if (balancesPerRound[round][msg.sender] == 0 && balancesPerRound[nextRound][msg.sender] == 0) { require(usersCurrentlyInVault < maxAllowedUsers, "Max amount of users reached"); usersPerRound[nextRound].push(msg.sender); userInRound[nextRound][msg.sender] = true; usersCurrentlyInVault = usersCurrentlyInVault + 1; } balancesPerRound[nextRound][msg.sender] += amount; // update deposit state of a user depositReceipts[msg.sender] = DepositReceipt(nextRound, balancesPerRound[nextRound][msg.sender]); allocationPerRound[nextRound] += amount; capPerRound[nextRound] += amount; if (address(stakingThales) != address(0)) { stakingThales.updateVolume(msg.sender, amount); } emit Deposited(msg.sender, amount); } function withdrawalRequest() external { require(vaultStarted, "Vault has not started"); require(!withdrawalRequested[msg.sender], "Withdrawal already requested"); require(balancesPerRound[round][msg.sender] > 0, "Nothing to withdraw"); require(balancesPerRound[round + 1][msg.sender] == 0, "Can't withdraw as you already deposited for next round"); uint nextRound = round + 1; if (capPerRound[nextRound] > balancesPerRound[round][msg.sender]) { capPerRound[nextRound] -= balancesPerRound[round][msg.sender]; } usersCurrentlyInVault = usersCurrentlyInVault - 1; withdrawalRequested[msg.sender] = true; emit WithdrawalRequested(msg.sender); } /// @notice Buy market options from Thales AMM /// @param market address of a market /// @param amount number of options to be bought /// @param position to buy options for function trade( address market, uint amount, IThalesAMM.Position position ) external nonReentrant whenNotPaused { require(vaultStarted, "Vault has not started"); require(amount >= minTradeAmount, "Amount less than minimum"); IPositionalMarket marketContract = IPositionalMarket(market); (uint maturity, ) = marketContract.times(); require(maturity < (roundStartTime[round] + roundLength), "Market time not valid"); uint pricePosition = thalesAMM.price(address(market), position); require(pricePosition > 0, "Price not more than 0"); int pricePositionImpact = thalesAMM.buyPriceImpact(address(market), position, amount); require(pricePosition >= priceLowerLimit && pricePosition <= priceUpperLimit, "Market price not valid"); require(pricePositionImpact < skewImpactLimit, "Skew impact too high"); _buyFromAmm(market, position, amount); if (!isTradingMarketInARound[round][market]) { tradingMarketsPerRound[round].push(market); isTradingMarketInARound[round][market] = true; } } /// @notice Set length of rounds /// @param _roundLength Length of a round in miliseconds function setRoundLength(uint _roundLength) external onlyOwner { roundLength = _roundLength; emit RoundLengthChanged(_roundLength); } /// @notice Set ThalesAMM contract /// @param _thalesAMM ThalesAMM address function setThalesAmm(IThalesAMM _thalesAMM) external onlyOwner { thalesAMM = _thalesAMM; sUSD.approve(address(thalesAMM), type(uint256).max); emit ThalesAMMChanged(address(_thalesAMM)); } /// @notice Set IStakingThales contract /// @param _stakingThales IStakingThales address function setStakingThales(IStakingThales _stakingThales) external onlyOwner { stakingThales = _stakingThales; emit StakingThalesChanged(address(_stakingThales)); } /// @notice Set utilization rate parameter /// @param _utilizationRate Value in percents function setUtilizationRate(uint _utilizationRate) external onlyOwner { utilizationRate = _utilizationRate; emit UtilizationRateChanged(_utilizationRate); } /// @notice Set max allowed deposit /// @param _maxAllowedDeposit Deposit value function setMaxAllowedDeposit(uint _maxAllowedDeposit) external onlyOwner { maxAllowedDeposit = _maxAllowedDeposit; emit MaxAllowedDepositChanged(_maxAllowedDeposit); } /// @notice Set min allowed deposit /// @param _minDepositAmount Deposit value function setMinAllowedDeposit(uint _minDepositAmount) external onlyOwner { minDepositAmount = _minDepositAmount; emit MinAllowedDepositChanged(_minDepositAmount); } /// @notice Set _maxAllowedUsers /// @param _maxAllowedUsers Deposit value function setMaxAllowedUsers(uint _maxAllowedUsers) external onlyOwner { maxAllowedUsers = _maxAllowedUsers; emit MaxAllowedUsersChanged(_maxAllowedUsers); } /// @notice Set allocation limits for assets to be spent in one round /// @param _allocationLimitsPerMarketPerRound allocation per market in percent function setAllocationLimits(uint _allocationLimitsPerMarketPerRound) external onlyOwner { require(_allocationLimitsPerMarketPerRound < HUNDRED, "Invalid allocation limit values"); allocationLimitsPerMarketPerRound = _allocationLimitsPerMarketPerRound; emit SetAllocationLimits(allocationLimitsPerMarketPerRound); } /// @notice Set price limit for options to be bought from AMM /// @param _priceLowerLimit lower limit /// @param _priceUpperLimit upper limit function setPriceLimits(uint _priceLowerLimit, uint _priceUpperLimit) external onlyOwner { require(_priceLowerLimit < _priceUpperLimit, "Invalid price limit values"); priceLowerLimit = _priceLowerLimit; priceUpperLimit = _priceUpperLimit; emit SetPriceLimits(_priceLowerLimit, _priceUpperLimit); } /// @notice Set skew impact limit for AMM /// @param _skewImpactLimit limit in percents function setSkewImpactLimit(int _skewImpactLimit) external onlyOwner { skewImpactLimit = _skewImpactLimit; emit SetSkewImpactLimit(_skewImpactLimit); } /// @notice Set _minTradeAmount /// @param _minTradeAmount limit in percents function setMinTradeAmount(uint _minTradeAmount) external onlyOwner { minTradeAmount = _minTradeAmount; emit SetMinTradeAmount(_minTradeAmount); } /* ========== INTERNAL FUNCTIONS ========== */ function _exerciseMarketsReadyToExercised() internal { IPositionalMarket market; for (uint i = 0; i < tradingMarketsPerRound[round].length; i++) { market = IPositionalMarket(tradingMarketsPerRound[round][i]); if (market.resolved()) { (uint upBalance, uint downBalance) = market.balancesOf(address(this)); if (upBalance > 0 || downBalance > 0) { market.exerciseOptions(); } } } } /// @notice Buy options from AMM /// @param market address of a market /// @param position position to be bought /// @param amount amount of positions to be bought function _buyFromAmm( address market, IThalesAMM.Position position, uint amount ) internal { uint quote = thalesAMM.buyFromAmmQuote(market, position, amount); require(quote < (tradingAllocation() - allocationSpentInARound[round]), "Amount exceeds available allocation"); uint allocationAsset = (tradingAllocation() * allocationLimitsPerMarketPerRound) / HUNDRED; require( (quote + allocationSpentPerRound[round][market]) < allocationAsset, "Amount exceeds available allocation for asset" ); uint balanceBeforeTrade = sUSD.balanceOf(address(this)); thalesAMM.buyFromAMM(market, position, amount, quote, 0); uint balanceAfterTrade = sUSD.balanceOf(address(this)); allocationSpentInARound[round] += quote; allocationSpentPerRound[round][market] += quote; tradingMarketPositionPerRound[round][market] = position; emit TradeExecuted(market, position, amount, quote); } /// @notice Return trading allocation in current round based on utilization rate param /// @return uint function tradingAllocation() public view returns (uint) { return (allocationPerRound[round] * utilizationRate) / ONE; } /* ========== VIEWS ========== */ /// @notice Checks if all conditions are met to close the round /// @return bool function canCloseCurrentRound() public view returns (bool) { if (!vaultStarted || block.timestamp < (roundStartTime[round] + roundLength)) { return false; } for (uint i = 0; i < tradingMarketsPerRound[round].length; i++) { IPositionalMarket market = IPositionalMarket(tradingMarketsPerRound[round][i]); if ((!market.resolved())) { return false; } } return true; } /// @notice Get available amount to spend on an asset in a round /// @param market to fetch available allocation for /// @return uint function getAvailableAllocationForMarket(address market) external view returns (uint) { uint allocationMarket = (tradingAllocation() * allocationLimitsPerMarketPerRound) / HUNDRED; uint remainingAvailable = allocationMarket - allocationSpentPerRound[round][market]; return remainingAvailable < (tradingAllocation() - allocationSpentInARound[round]) ? remainingAvailable : (tradingAllocation() - allocationSpentInARound[round]); } /// @notice Return user balance in a round /// @param _round Round number /// @param user Address of the user /// @return uint function getBalancesPerRound(uint _round, address user) external view returns (uint) { return balancesPerRound[_round][user]; } /// @notice Return available to deposit /// @return returned how much more users can deposit function getAvailableToDeposit() external view returns (uint returned) { if (capPerRound[round + 1] < maxAllowedDeposit) { returned = maxAllowedDeposit - capPerRound[round + 1]; } } /// @notice end of current round /// @return uint function getCurrentRoundEnd() external view returns (uint) { return roundStartTime[round] + roundLength; } /// @notice Return multiplied PnLs between rounds /// @param roundA Round number from /// @param roundB Round number to /// @return uint function cumulativePnLBetweenRounds(uint roundA, uint roundB) public view returns (uint) { return (cumulativeProfitAndLoss[roundB] * profitAndLossPerRound[roundA]) / cumulativeProfitAndLoss[roundA]; } /* ========== MODIFIERS ========== */ modifier canDeposit(uint amount) { require(!withdrawalRequested[msg.sender], "Withdrawal is requested, cannot deposit"); require(amount >= minDepositAmount, "Invalid amount"); require(capPerRound[round + 1] + amount <= maxAllowedDeposit, "Deposit amount exceeds vault cap"); _; } /* ========== EVENTS ========== */ event VaultStarted(); event RoundClosed(uint round, uint roundPnL); event RoundLengthChanged(uint roundLength); event ThalesAMMChanged(address thalesAmm); event StakingThalesChanged(address stakingThales); event SetSUSD(address sUSD); event Deposited(address user, uint amount); event Claimed(address user, uint amount); event WithdrawalRequested(address user); event UtilizationRateChanged(uint utilizationRate); event MaxAllowedDepositChanged(uint maxAllowedDeposit); event MinAllowedDepositChanged(uint minAllowedDeposit); event MaxAllowedUsersChanged(uint MaxAllowedUsersChanged); event SetAllocationLimits(uint allocationLimitsPerMarketPerRound); event SetPriceLimits(uint priceLowerLimit, uint priceUpperLimit); event SetSkewImpactLimit(int skewImpact); event SetMinTradeAmount(uint SetMinTradeAmount); event TradeExecuted(address market, IThalesAMM.Position position, uint amount, uint quote); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../../../utils/AddressUpgradeable.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable 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( IERC20Upgradeable token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @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(IERC20Upgradeable token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @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. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual 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 { _transferOwnership(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"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Context_init_unchained(); __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the `nonReentrant` modifier * available, which can be aplied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. */ contract ProxyReentrancyGuard { /// @dev counter to allow mutex lock with only one SSTORE operation uint256 private _guardCounter; bool private _initialized; function initNonReentrant() public { require(!_initialized, "Already initialized"); _initialized = true; _guardCounter = 1; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { _guardCounter += 1; uint256 localCounter = _guardCounter; _; require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call"); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // Clone of syntetix contract without constructor contract ProxyOwned { address public owner; address public nominatedOwner; bool private _initialized; bool private _transferredAtInit; function setOwner(address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); require(!_initialized, "Already initialized, use nominateNewOwner"); _initialized = true; owner = _owner; emit OwnerChanged(address(0), _owner); } function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } function acceptOwnership() external { require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership"); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); } function transferOwnershipAtInit(address proxyAddress) external onlyOwner { require(proxyAddress != address(0), "Invalid address"); require(!_transferredAtInit, "Already transferred"); owner = proxyAddress; _transferredAtInit = true; emit OwnerChanged(owner, proxyAddress); } modifier onlyOwner { _onlyOwner(); _; } function _onlyOwner() private view { require(msg.sender == owner, "Only the contract owner may perform this action"); } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; import "./IPriceFeed.sol"; interface IThalesAMM { enum Position { Up, Down } function manager() external view returns (address); function availableToBuyFromAMM(address market, Position position) external view returns (uint); function impliedVolatilityPerAsset(bytes32 oracleKey) external view returns (uint); function buyFromAmmQuote( address market, Position position, uint amount ) external view returns (uint); function buyFromAMM( address market, Position position, uint amount, uint expectedPayout, uint additionalSlippage ) external returns (uint); function availableToSellToAMM(address market, Position position) external view returns (uint); function sellToAmmQuote( address market, Position position, uint amount ) external view returns (uint); function sellToAMM( address market, Position position, uint amount, uint expectedPayout, uint additionalSlippage ) external returns (uint); function isMarketInAMMTrading(address market) external view returns (bool); function price(address market, Position position) external view returns (uint); function buyPriceImpact( address market, Position position, uint amount ) external view returns (int); function priceFeed() external view returns (IPriceFeed); }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; import "../interfaces/IPositionalMarketManager.sol"; import "../interfaces/IPosition.sol"; import "../interfaces/IPriceFeed.sol"; interface IPositionalMarket { /* ========== TYPES ========== */ enum Phase { Trading, Maturity, Expiry } enum Side { Up, Down } /* ========== VIEWS / VARIABLES ========== */ function getOptions() external view returns (IPosition up, IPosition down); function times() external view returns (uint maturity, uint destructino); function getOracleDetails() external view returns ( bytes32 key, uint strikePrice, uint finalPrice ); function fees() external view returns (uint poolFee, uint creatorFee); function deposited() external view returns (uint); function creator() external view returns (address); function resolved() external view returns (bool); function phase() external view returns (Phase); function oraclePrice() external view returns (uint); function oraclePriceAndTimestamp() external view returns (uint price, uint updatedAt); function canResolve() external view returns (bool); function result() external view returns (Side); function balancesOf(address account) external view returns (uint up, uint down); function totalSupplies() external view returns (uint up, uint down); function getMaximumBurnable(address account) external view returns (uint amount); /* ========== MUTATIVE FUNCTIONS ========== */ function mint(uint value) external; function exerciseOptions() external returns (uint); function burnOptions(uint amount) external; function burnOptionsMaximum() external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; interface IStakingThales { function updateVolume(address account, uint amount) external; /* ========== VIEWS / VARIABLES ========== */ function totalStakedAmount() external view returns (uint); function stakedBalanceOf(address account) external view returns (uint); function currentPeriodRewards() external view returns (uint); function currentPeriodFees() external view returns (uint); function getLastPeriodOfClaimedRewards(address account) external view returns (uint); function getRewardsAvailable(address account) external view returns (uint); function getRewardFeesAvailable(address account) external view returns (uint); function getAlreadyClaimedRewards(address account) external view returns (uint); function getContractRewardFunds() external view returns (uint); function getContractFeeFunds() external view returns (uint); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; 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"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { __Context_init_unchained(); } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; interface IPriceFeed { // Structs struct RateAndUpdatedTime { uint216 rate; uint40 time; } // Mutative functions function addAggregator(bytes32 currencyKey, address aggregatorAddress) external; function removeAggregator(bytes32 currencyKey) external; // Views function rateForCurrency(bytes32 currencyKey) external view returns (uint); function rateAndUpdatedTime(bytes32 currencyKey) external view returns (uint rate, uint time); function getRates() external view returns (uint[] memory); function getCurrencies() external view returns (bytes32[] memory); }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; import "../interfaces/IPositionalMarket.sol"; interface IPositionalMarketManager { /* ========== VIEWS / VARIABLES ========== */ function durations() external view returns (uint expiryDuration, uint maxTimeToMaturity); function capitalRequirement() external view returns (uint); function marketCreationEnabled() external view returns (bool); function onlyAMMMintingAndBurning() external view returns (bool); function transformCollateral(uint value) external view returns (uint); function reverseTransformCollateral(uint value) external view returns (uint); function totalDeposited() external view returns (uint); function numActiveMarkets() external view returns (uint); function activeMarkets(uint index, uint pageSize) external view returns (address[] memory); function numMaturedMarkets() external view returns (uint); function maturedMarkets(uint index, uint pageSize) external view returns (address[] memory); function isActiveMarket(address candidate) external view returns (bool); function isKnownMarket(address candidate) external view returns (bool); function getThalesAMM() external view returns (address); /* ========== MUTATIVE FUNCTIONS ========== */ function createMarket( bytes32 oracleKey, uint strikePrice, uint maturity, uint initialMint // initial sUSD to mint options for, ) external returns (IPositionalMarket); function resolveMarket(address market) external; function expireMarkets(address[] calldata market) external; function transferSusdTo( address sender, address receiver, uint amount ) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.16; import "./IPositionalMarket.sol"; interface IPosition { /* ========== VIEWS / VARIABLES ========== */ function getBalanceOf(address account) external view returns (uint); function getTotalSupply() external view returns (uint); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxAllowedDeposit","type":"uint256"}],"name":"MaxAllowedDepositChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"MaxAllowedUsersChanged","type":"uint256"}],"name":"MaxAllowedUsersChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minAllowedDeposit","type":"uint256"}],"name":"MinAllowedDepositChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"round","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"roundPnL","type":"uint256"}],"name":"RoundClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"roundLength","type":"uint256"}],"name":"RoundLengthChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"allocationLimitsPerMarketPerRound","type":"uint256"}],"name":"SetAllocationLimits","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"SetMinTradeAmount","type":"uint256"}],"name":"SetMinTradeAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"priceLowerLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"priceUpperLimit","type":"uint256"}],"name":"SetPriceLimits","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sUSD","type":"address"}],"name":"SetSUSD","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"int256","name":"skewImpact","type":"int256"}],"name":"SetSkewImpactLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"stakingThales","type":"address"}],"name":"StakingThalesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"thalesAmm","type":"address"}],"name":"ThalesAMMChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"market","type":"address"},{"indexed":false,"internalType":"enum IThalesAMM.Position","name":"position","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quote","type":"uint256"}],"name":"TradeExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"utilizationRate","type":"uint256"}],"name":"UtilizationRateChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"VaultStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"}],"name":"WithdrawalRequested","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allocationLimitsPerMarketPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allocationPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allocationSpentInARound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"allocationSpentPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"balancesPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canCloseCurrentRound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"capPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"closeRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"roundA","type":"uint256"},{"internalType":"uint256","name":"roundB","type":"uint256"}],"name":"cumulativePnLBetweenRounds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"cumulativeProfitAndLoss","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"depositReceipts","outputs":[{"internalType":"uint256","name":"round","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"market","type":"address"}],"name":"getAvailableAllocationForMarket","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableToDeposit","outputs":[{"internalType":"uint256","name":"returned","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_round","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"getBalancesPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentRoundEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initNonReentrant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"contract IThalesAMM","name":"_thalesAmm","type":"address"},{"internalType":"contract IERC20Upgradeable","name":"_sUSD","type":"address"},{"internalType":"uint256","name":"_roundLength","type":"uint256"},{"internalType":"uint256","name":"_priceLowerLimit","type":"uint256"},{"internalType":"uint256","name":"_priceUpperLimit","type":"uint256"},{"internalType":"int256","name":"_skewImpactLimit","type":"int256"},{"internalType":"uint256","name":"_allocationLimitsPerMarketPerRound","type":"uint256"},{"internalType":"uint256","name":"_maxAllowedDeposit","type":"uint256"},{"internalType":"uint256","name":"_utilizationRate","type":"uint256"},{"internalType":"uint256","name":"_minDepositAmount","type":"uint256"},{"internalType":"uint256","name":"_maxAllowedUsers","type":"uint256"},{"internalType":"uint256","name":"_minTradeAmount","type":"uint256"}],"internalType":"struct AmmVault.InitParams","name":"params","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"isTradingMarketInARound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAllowedDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAllowedUsers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minDepositAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minTradeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceLowerLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceUpperLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"profitAndLossPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"round","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"roundLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"roundStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sUSD","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocationLimitsPerMarketPerRound","type":"uint256"}],"name":"setAllocationLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxAllowedDeposit","type":"uint256"}],"name":"setMaxAllowedDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxAllowedUsers","type":"uint256"}],"name":"setMaxAllowedUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minDepositAmount","type":"uint256"}],"name":"setMinAllowedDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minTradeAmount","type":"uint256"}],"name":"setMinTradeAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_priceLowerLimit","type":"uint256"},{"internalType":"uint256","name":"_priceUpperLimit","type":"uint256"}],"name":"setPriceLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundLength","type":"uint256"}],"name":"setRoundLength","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"_skewImpactLimit","type":"int256"}],"name":"setSkewImpactLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IStakingThales","name":"_stakingThales","type":"address"}],"name":"setStakingThales","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IThalesAMM","name":"_thalesAMM","type":"address"}],"name":"setThalesAmm","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_utilizationRate","type":"uint256"}],"name":"setUtilizationRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"skewImpactLimit","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingThales","outputs":[{"internalType":"contract IStakingThales","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"thalesAMM","outputs":[{"internalType":"contract IThalesAMM","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"market","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum IThalesAMM.Position","name":"position","type":"uint8"}],"name":"trade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tradingAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"tradingMarketPositionPerRound","outputs":[{"internalType":"enum IThalesAMM.Position","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tradingMarketsPerRound","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"transferOwnershipAtInit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInRound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usersCurrentlyInVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"usersPerRound","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"utilizationRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawalRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"withdrawalRequested","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506137e1806100206000396000f3fe608060405234801561001057600080fd5b50600436106103c55760003560e01c806371143ab9116101ff578063c137a60f1161011a578063ddcc8fe9116100ad578063e76a02791161007c578063e76a0279146108bc578063ebc79772146108cf578063ee161cce146108d7578063fd8a8cc6146108df57600080fd5b8063ddcc8fe914610878578063e278fe6f1461088b578063e48a694b14610893578063e75c93d9146108b357600080fd5b8063d27c0797116100e9578063d27c07971461084b578063db7f92d414610854578063dd636bc714610867578063dda9046f1461086f57600080fd5b8063c137a60f146107f1578063c3b83f5f14610811578063c9f4ff4614610824578063cee73a761461083757600080fd5b80638da5cb5b11610192578063a250badb11610161578063a250badb146107b9578063a9050d4d146107cc578063b6b55f25146107d5578063be805e3c146107e857600080fd5b80638da5cb5b146107275780639324cac714610740578063942f53571461075357806395ba9a701461078e57600080fd5b806379ba5097116101ce57806379ba5097146106f05780637f852582146106f8578063871176301461070b5780638b649b941461071e57600080fd5b806371143ab91461068757806371bb4b47146106b557806374094edd146106bd57806378fe782d146106dd57600080fd5b8063384e631c116102ef5780635d1c236d11610282578063645006ca11610251578063645006ca146106265780636719b2ee1461062f578063681312f51461066b5780636c321c8a1461067e57600080fd5b80635d1c236d146105bc5780635ddd3e83146105c4578063610589e1146105ef578063634e0d97146105f857600080fd5b806353a47bb7116102be57806353a47bb7146105735780635699179114610586578063572e36e6146105995780635c975abb146105b157600080fd5b8063384e631c1461052457806340774ff614610537578063456ff7881461054a5780634ae7937f1461055357600080fd5b8063202ffce811610367578063322ce77a11610336578063322ce77a146104d5578063336d30ed146104de578063343e4f9f146104fe578063370faeb01461051157600080fd5b8063202ffce81461048757806325a663951461049a5780632ef04761146104ba578063311c56df146104cd57600080fd5b8063146ca531116103a3578063146ca531146104305780631627540c146104395780631daae1731461044c5780631e9224601461047f57600080fd5b806306d1fb3c146103ca578063082f9fd4146103f057806313af40351461041b575b600080fd5b6103dd6103d8366004613529565b6108f2565b6040519081526020015b60405180910390f35b6104036103fe366004613558565b61091c565b6040516001600160a01b0390911681526020016103e7565b61042e610429366004613461565b610954565b005b6103dd60695481565b61042e610447366004613461565b610a94565b61046f61045a366004613461565b606f6020526000908152604090205460ff1681565b60405190151581526020016103e7565b6103dd610aea565b61042e6104953660046134e1565b610b24565b6103dd6104a83660046134e1565b60796020526000908152604090205481565b61042e6104c83660046134e1565b610b61565b61042e610b9e565b6103dd607c5481565b6103dd6104ec3660046134e1565b60766020526000908152604090205481565b61040361050c366004613558565b610e29565b61042e61051f366004613558565b610e45565b61042e610532366004613511565b610ee3565b61042e6105453660046134e1565b611018565b6103dd60815481565b6103dd6105613660046134e1565b60716020526000908152604090205481565b600154610403906001600160a01b031681565b61042e61059436600461347d565b611055565b6067546104039061010090046001600160a01b031681565b60345460ff1661046f565b61042e61152b565b6103dd6105d2366004613529565b606e60209081526000928352604080842090915290825290205481565b6103dd607b5481565b61046f610606366004613529565b606d60209081526000928352604080842090915290825290205460ff1681565b6103dd607a5481565b61065661063d366004613461565b6070602052600090815260409020805460019091015482565b604080519283526020830191909152016103e7565b61042e6106793660046134e1565b611644565b6103dd60785481565b61046f610695366004613529565b607460209081526000928352604080842090915290825290205460ff1681565b6103dd611681565b6103dd6106cb3660046134e1565b60756020526000908152604090205481565b61042e6106eb366004613461565b6116a1565b61042e61178b565b61042e610706366004613461565b611888565b61042e6107193660046134e1565b6118de565b6103dd606a5481565b600054610403906201000090046001600160a01b031681565b606854610403906001600160a01b031681565b610781610761366004613529565b607360209081526000928352604080842090915290825290205460ff1681565b6040516103e7919061368a565b6103dd61079c366004613529565b607e60209081526000928352604080842090915290825290205481565b6103dd6107c7366004613461565b611973565b6103dd607d5481565b61042e6107e33660046134e1565b611a33565b6103dd60805481565b6103dd6107ff3660046134e1565b606b6020526000908152604090205481565b61042e61081f366004613461565b611df5565b6103dd610832366004613558565b611f0e565b60685461046f90600160a01b900460ff1681565b6103dd60775481565b61042e6108623660046134e1565b611f4e565b6103dd611f8b565b6103dd60825481565b61042e6108863660046134e1565b611fea565b61042e612027565b6103dd6108a13660046134e1565b60846020526000908152604090205481565b6103dd607f5481565b61042e6108ca3660046134e1565b6127ec565b61042e612829565b61046f612887565b608354610403906001600160a01b031681565b6000828152606e602090815260408083206001600160a01b03851684529091529020545b92915050565b6072602052816000526040600020818154811061093857600080fd5b6000918252602090912001546001600160a01b03169150829050565b6001600160a01b0381166109af5760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f7420626520300000000000000060448201526064015b60405180910390fd5b600154600160a01b900460ff1615610a1b5760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b60648201526084016109a6565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91015b60405180910390a150565b610a9c6129c4565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610a89565b6078546069546000908152607160205260408120549091670de0b6b3a764000091610b159190613703565b610b1f91906136e3565b905090565b610b2c6129c4565b607b8190556040518181527fe7c2c09f66c8b970b4a99250f4d0844e1496b9d51d4760a17b0134ddd52023e190602001610a89565b610b696129c4565b60818190556040518181527f137f353e194da87258fd6c2b78eb1cfb9f2ce996f3466729d2464eccb7ce612990602001610a89565b606854600160a01b900460ff16610bef5760405162461bcd60e51b815260206004820152601560248201527415985d5b1d081a185cc81b9bdd081cdd185c9d1959605a1b60448201526064016109a6565b336000908152606f602052604090205460ff1615610c4f5760405162461bcd60e51b815260206004820152601c60248201527f5769746864726177616c20616c7265616479207265717565737465640000000060448201526064016109a6565b6069546000908152606e60209081526040808320338452909152902054610cae5760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b60448201526064016109a6565b606e60006069546001610cc191906136cb565b81526020808201929092526040908101600090812033825290925290205415610d4b5760405162461bcd60e51b815260206004820152603660248201527f43616e277420776974686472617720617320796f7520616c72656164792064656044820152751c1bdcda5d195908199bdc881b995e1d081c9bdd5b9960521b60648201526084016109a6565b60006069546001610d5c91906136cb565b6069546000908152606e602090815260408083203384528252808320548484526079909252909120549192501015610dcc576069546000908152606e6020908152604080832033845282528083205484845260799092528220805491929091610dc6908490613722565b90915550505b6001607c54610ddb9190613722565b607c55336000818152606f6020908152604091829020805460ff1916600117905590519182527fe5892ff2a8b08efb903ffbba1f0514c1d3e22eea34dd5b89cf30aabce03dde5a9101610a89565b606c602052816000526040600020818154811061093857600080fd5b610e4d6129c4565b808210610e9c5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964207072696365206c696d69742076616c75657300000000000060448201526064016109a6565b607f829055608081905560408051838152602081018390527f34b23d671026520e294c1060acc36120677e8c9bd073a8f6577a6f241785b1a6910160405180910390a15050565b600054610100900460ff16610efe5760005460ff1615610f02565b303b155b610f655760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016109a6565b600054610100900460ff16158015610f87576000805461ffff19166101011790555b610fd9610f976020840184613461565b610fa76040850160208601613461565b610fb76060860160408701613461565b8560600135866101000135876101200135886101400135896101600135612a3e565b608080830135607f5560a0830135905560c082013560815560e0820135607d556101808201356082558015611014576000805461ff00191690555b5050565b6110206129c4565b60788190556040518181527fc117ccf765672707ebe3c1606037488c1e27dc1f42b5266e3d6b496db7d4209e90602001610a89565b60016066600082825461106891906136cb565b909155505060665460345460ff16156110b65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109a6565b606854600160a01b900460ff166111075760405162461bcd60e51b815260206004820152601560248201527415985d5b1d081a185cc81b9bdd081cdd185c9d1959605a1b60448201526064016109a6565b6082548310156111595760405162461bcd60e51b815260206004820152601860248201527f416d6f756e74206c657373207468616e206d696e696d756d000000000000000060448201526064016109a6565b60008490506000816001600160a01b0316639e3b34bf6040518163ffffffff1660e01b8152600401604080518083038186803b15801561119857600080fd5b505afa1580156111ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d09190613579565b50606a546069546000908152606b60205260409020549192506111f2916136cb565b81106112385760405162461bcd60e51b815260206004820152601560248201527413585c9ad95d081d1a5b59481b9bdd081d985b1a59605a1b60448201526064016109a6565b606754604051630dda067f60e31b815260009161010090046001600160a01b031690636ed033f890611270908a9089906004016135da565b60206040518083038186803b15801561128857600080fd5b505afa15801561129c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c091906134f9565b90506000811161130a5760405162461bcd60e51b815260206004820152601560248201527405072696365206e6f74206d6f7265207468616e203605c1b60448201526064016109a6565b606754604051632fd1b02d60e21b815260009161010090046001600160a01b03169063bf46c0b490611344908b908a908c906004016135f7565b60206040518083038186803b15801561135c57600080fd5b505afa158015611370573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139491906134f9565b9050607f5482101580156113aa57506080548211155b6113ef5760405162461bcd60e51b815260206004820152601660248201527513585c9ad95d081c1c9a58d9481b9bdd081d985b1a5960521b60448201526064016109a6565b60815481126114375760405162461bcd60e51b81526020600482015260146024820152730a6d6caee40d2dae0c2c6e840e8dede40d0d2ced60631b60448201526064016109a6565b611442888789612b98565b60695460009081526074602090815260408083206001600160a01b038c16845290915290205460ff166114d0576069805460009081526072602090815260408083208054600180820183559185528385200180546001600160a01b0319166001600160a01b038f169081179091559454845260748352818420948452939091529020805460ff191690911790555b5050505060665481146115255760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a6565b50505050565b6115336129c4565b606854600160a01b900460ff161561158d5760405162461bcd60e51b815260206004820152601960248201527f5661756c742068617320616c726561647920737461727465640000000000000060448201526064016109a6565b6001606955427fa775687211c2b3346a0f5a2a0e7590e6c1838453e3785e6dd2a8efd6265ddf15556068805460ff60a01b1916600160a01b17905560796020527fdf6d6ad01a16c6118cfd605fcb55ad218b43517981ef4cc6d63a492cf34990d954600260009081527f7d4d2b02426547888e9185e69135196c4ed1edbc114060100a6ef94f8b5f60df919091556040517f59760ad83ef06d1a0bc439d8b39a42a870493f0cd3bc3d53bbd3e7c6991f494f9190a1565b61164c6129c4565b606a8190556040518181527f1d1fb7111c3779798bd4aefb2daea07ee8257a13c7eaceba89b4b1ccd405050d90602001610a89565b606a546069546000908152606b60205260408120549091610b1f916136cb565b6116a96129c4565b60678054610100600160a81b0319166101006001600160a01b038481168202929092179283905560685460405163095ea7b360e01b81529190930482166004820152600019602482015291169063095ea7b390604401602060405180830381600087803b15801561171957600080fd5b505af115801561172d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061175191906134c1565b506040516001600160a01b03821681527fcd9f73cb77eb3f2287cdfd1b291c691d33e2cb7ca1774dba627bc61f163d6b9b90602001610a89565b6001546001600160a01b031633146118035760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b60648201526084016109a6565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b6118906129c4565b608380546001600160a01b0319166001600160a01b0383169081179091556040519081527f3c7faa500efbd341aedbf1ee7ebd52ea36d226dda76bc01dd39b43d46f55b8d390602001610a89565b6118e66129c4565b68056bc75e2d63100000811061193e5760405162461bcd60e51b815260206004820152601f60248201527f496e76616c696420616c6c6f636174696f6e206c696d69742076616c7565730060448201526064016109a6565b607d8190556040518181527f9fb019ef2cdd86e0c7772694b935b2fd45131410802474ef0a8bf0afff94a40390602001610a89565b60008068056bc75e2d63100000607d5461198b610aea565b6119959190613703565b61199f91906136e3565b6069546000908152607e602090815260408083206001600160a01b0388168452909152812054919250906119d39083613722565b6069546000908152608460205260409020549091506119f0610aea565b6119fa9190613722565b8110611a2957606954600090815260846020526040902054611a1a610aea565b611a249190613722565b611a2b565b805b949350505050565b336000908152606f6020526040902054819060ff1615611aa55760405162461bcd60e51b815260206004820152602760248201527f5769746864726177616c206973207265717565737465642c2063616e6e6f742060448201526619195c1bdcda5d60ca1b60648201526084016109a6565b607a54811015611ae85760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b60448201526064016109a6565b60775481607960006069546001611aff91906136cb565b815260200190815260200160002054611b1891906136cb565b1115611b665760405162461bcd60e51b815260206004820181905260248201527f4465706f73697420616d6f756e742065786365656473207661756c742063617060448201526064016109a6565b606854611b7e906001600160a01b0316333085612ff0565b60006069546001611b8f91906136cb565b6069546000908152606e60209081526040808320338452909152902054909150158015611bd357506000818152606e60209081526040808320338452909152902054155b15611c8c57607b54607c5410611c2b5760405162461bcd60e51b815260206004820152601b60248201527f4d617820616d6f756e74206f662075736572732072656163686564000000000060448201526064016109a6565b6000818152606c602090815260408083208054600181810183559185528385200180546001600160a01b03191633908117909155858552606d8452828520908552909252909120805460ff191682179055607c54611c88916136cb565b607c555b6000818152606e6020908152604080832033845290915281208054859290611cb59084906136cb565b90915550506040805180820182528281526000838152606e6020908152838220338084529082528483205482850190815290835260708252848320935184555160019093019290925583815260719091529081208054859290611d199084906136cb565b909155505060008181526079602052604081208054859290611d3c9084906136cb565b90915550506083546001600160a01b031615611db7576083546040516302c7739b60e01b8152336004820152602481018590526001600160a01b03909116906302c7739b90604401600060405180830381600087803b158015611d9e57600080fd5b505af1158015611db2573d6000803e3d6000fd5b505050505b60408051338152602081018590527f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4910160405180910390a1505050565b611dfd6129c4565b6001600160a01b038116611e455760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016109a6565b600154600160a81b900460ff1615611e955760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b60448201526064016109a6565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610a89565b6000828152607660208181526040808420546075835281852054868652939092528320549091611f3d91613703565b611f4791906136e3565b9392505050565b611f566129c4565b607a8190556040518181527f990717cc219e5348c1b88bb0ff530d804f0b6f54f3b03844a2bfbe4eb1e9c5d690602001610a89565b6000607754607960006069546001611fa391906136cb565b8152602001908152602001600020541015611fe757607960006069546001611fcb91906136cb565b815260200190815260200160002054607754610b1f9190613722565b90565b611ff26129c4565b60778190556040518181527f8c43aa02599ac8f8bab4724621ceea5e7a06b07bbbfaf3b7bd0386cbe481ea3c90602001610a89565b60016066600082825461203a91906136cb565b909155505060665460345460ff16156120885760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109a6565b612090612887565b6120dc5760405162461bcd60e51b815260206004820152601960248201527f43616e277420636c6f73652063757272656e7420726f756e640000000000000060448201526064016109a6565b6120e461305b565b60006071600060695460016120f991906136cb565b8152602081019190915260409081016000205460685491516370a0823160e01b815230600482015290916001600160a01b0316906370a082319060240160206040518083038186803b15801561214e57600080fd5b505afa158015612162573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061218691906134f9565b6121909190613722565b6069546000908152607160205260409020549091506121c357606954600090815260756020526040902060019055612204565b6069546000908152607160205260409020546121e7670de0b6b3a764000083613703565b6121f191906136e3565b6069546000908152607560205260409020555b60005b6069546000908152606c60205260409020548110156125aa576069546000908152606c6020526040812080548390811061225157634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910154606954835260758252604080842054606e84528185206001600160a01b0390931680865292909352832054909350670de0b6b3a7640000916122a091613703565b6122aa91906136e3565b6069546000908152606d602090815260408083206001600160a01b038716845290915290205490915060ff1615612595576001600160a01b0382166000908152606f602052604090205460ff166124a55780606e6000606954600161230f91906136cb565b81526020019081526020016000206000846001600160a01b03166001600160a01b031681526020019081526020016000205461234b91906136cb565b606e6000606954600161235e91906136cb565b81526020019081526020016000206000846001600160a01b03166001600160a01b03168152602001908152602001600020819055506001606d600060695460016123a891906136cb565b8152602080820192909252604090810160009081206001600160a01b03871682529092528120805460ff191692151592909217909155606954606c91906123f09060016136cb565b8152602080820192909252604001600090812080546001810182559082529190200180546001600160a01b0319166001600160a01b038481169190911790915560835416156124a0576083546040516302c7739b60e01b81526001600160a01b03848116600483015260248201849052909116906302c7739b90604401600060405180830381600087803b15801561248757600080fd5b505af115801561249b573d6000803e3d6000fd5b505050505b612595565b6000606e600060695460016124ba91906136cb565b8152602080820192909252604090810160009081206001600160a01b038088168352935220919091556068546124f29116838361324f565b6001600160a01b0382166000908152606f60205260408120805460ff19169055606954606d9082906125259060016136cb565b8152602080820192909252604090810160009081206001600160a01b03871680835290845290829020805460ff19169415159490941790935580519283529082018390527fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a910160405180910390a15b505080806125a290613765565b915050612207565b50606954600114156125d95760695460009081526075602090815260408083205460769092529091205561263c565b606954600081815260756020526040812054670de0b6b3a764000092909160769161260690600190613722565b81526020019081526020016000205461261f9190613703565b61262991906136e3565b6069546000908152607660205260409020555b60016069600082825461264f91906136cb565b90915550506069546000908152606b60205260409081902042905560685490516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156126ac57600080fd5b505afa1580156126c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126e491906134f9565b606980546000908152607160205260408082209390935590548082529181205491607991906127149060016136cb565b8152602001908152602001600020819055507fc67dda8e11f1aa941c7e74466b1859a07a32f46aaf641d29b83be348424d93cd60016069546127569190613722565b6075600060016069546127699190613722565b81526020019081526020016000205460405161278f929190918252602082015260400190565b60405180910390a15060665481146127e95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a6565b50565b6127f46129c4565b60828190556040518181527f26ea09cdab135064e784e44516fc5b3d619360d241ae64bff47153b2e5ee610e90602001610a89565b60675460ff16156128725760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064016109a6565b6067805460ff19166001908117909155606655565b606854600090600160a01b900460ff1615806128c05750606a546069546000908152606b60205260409020546128bd91906136cb565b42105b156128cb5750600090565b60005b6069546000908152607260205260409020548110156129bc57606954600090815260726020526040812080548390811061291857634e487b7160e01b600052603260045260246000fd5b6000918252602091829020015460408051633f6fa65560e01b815290516001600160a01b0390921693508392633f6fa65592600480840193829003018186803b15801561296457600080fd5b505afa158015612978573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061299c91906134c1565b6129a95760009250505090565b50806129b481613765565b9150506128ce565b506001905090565b6000546201000090046001600160a01b03163314612a3c5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b60648201526084016109a6565b565b600054610100900460ff16612aa95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016109a6565b612ab288610954565b612aba612829565b60678054610100600160a81b0319166101006001600160a01b038a811682029290921792839055606880546001600160a01b0319168a8416908117909155606a89905560778890556078879055607a869055607b85905560405163095ea7b360e01b8152919093049091166004820152600019602482015263095ea7b390604401602060405180830381600087803b158015612b5557600080fd5b505af1158015612b69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b8d91906134c1565b505050505050505050565b60675460405163270e13ef60e01b815260009161010090046001600160a01b03169063270e13ef90612bd2908790879087906004016135f7565b60206040518083038186803b158015612bea57600080fd5b505afa158015612bfe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c2291906134f9565b606954600090815260846020526040902054909150612c3f610aea565b612c499190613722565b8110612ca35760405162461bcd60e51b815260206004820152602360248201527f416d6f756e74206578636565647320617661696c61626c6520616c6c6f63617460448201526234b7b760e91b60648201526084016109a6565b600068056bc75e2d63100000607d54612cba610aea565b612cc49190613703565b612cce91906136e3565b6069546000908152607e602090815260408083206001600160a01b038a1684529091529020549091508190612d0390846136cb565b10612d665760405162461bcd60e51b815260206004820152602d60248201527f416d6f756e74206578636565647320617661696c61626c6520616c6c6f63617460448201526c1a5bdb88199bdc88185cdcd95d609a1b60648201526084016109a6565b6068546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015612daa57600080fd5b505afa158015612dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612de291906134f9565b60675460405163221d7ae160e21b815291925061010090046001600160a01b031690638875eb8490612e21908990899089908990600090600401613651565b602060405180830381600087803b158015612e3b57600080fd5b505af1158015612e4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e7391906134f9565b506068546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015612eb857600080fd5b505afa158015612ecc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ef091906134f9565b9050836084600060695481526020019081526020016000206000828254612f1791906136cb565b90915550506069546000908152607e602090815260408083206001600160a01b038b16845290915281208054869290612f519084906136cb565b909155505060695460009081526073602090815260408083206001600160a01b038b1684529091529020805487919060ff191660018381811115612fa557634e487b7160e01b600052602160045260246000fd5b02179055507fd1fc86fd7e2808fb6a4d745c0f26983bd36784721df1e29a27a28ce3fcdc741687878787604051612fdf9493929190613622565b60405180910390a150505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526115259085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613284565b6000805b6069546000908152607260205260409020548110156110145760695460009081526072602052604090208054829081106130a957634e487b7160e01b600052603260045260246000fd5b6000918252602091829020015460408051633f6fa65560e01b815290516001600160a01b0390921694508492633f6fa65592600480840193829003018186803b1580156130f557600080fd5b505afa158015613109573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061312d91906134c1565b1561323d57604051636392a51f60e01b815230600482015260009081906001600160a01b03851690636392a51f90602401604080518083038186803b15801561317557600080fd5b505afa158015613189573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131ad9190613579565b9150915060008211806131c05750600081115b1561323a57836001600160a01b031663851492586040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561320057600080fd5b505af1158015613214573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061323891906134f9565b505b50505b8061324781613765565b91505061305f565b6040516001600160a01b03831660248201526044810182905261327f90849063a9059cbb60e01b90606401613024565b505050565b60006132d9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166133569092919063ffffffff16565b80519091501561327f57808060200190518101906132f791906134c1565b61327f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109a6565b6060611a2b848460008585843b6133af5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109a6565b600080866001600160a01b031685876040516133cb91906135be565b60006040518083038185875af1925050503d8060008114613408576040519150601f19603f3d011682016040523d82523d6000602084013e61340d565b606091505b509150915061341d828286613428565b979650505050505050565b60608315613437575081611f47565b8251156134475782518084602001fd5b8160405162461bcd60e51b81526004016109a69190613698565b600060208284031215613472578081fd5b8135611f4781613796565b600080600060608486031215613491578182fd5b833561349c81613796565b9250602084013591506040840135600281106134b6578182fd5b809150509250925092565b6000602082840312156134d2578081fd5b81518015158114611f47578182fd5b6000602082840312156134f2578081fd5b5035919050565b60006020828403121561350a578081fd5b5051919050565b60006101a08284031215613523578081fd5b50919050565b6000806040838503121561353b578182fd5b82359150602083013561354d81613796565b809150509250929050565b6000806040838503121561356a578182fd5b50508035926020909101359150565b6000806040838503121561358b578182fd5b505080516020909101519092909150565b600281106135ba57634e487b7160e01b600052602160045260246000fd5b9052565b600082516135d0818460208701613739565b9190910192915050565b6001600160a01b038316815260408101611f47602083018461359c565b6001600160a01b038416815260608101613614602083018561359c565b826040830152949350505050565b6001600160a01b03851681526080810161363f602083018661359c565b60408201939093526060015292915050565b6001600160a01b038616815260a0810161366e602083018761359c565b8460408301528360608301528260808301529695505050505050565b60208101610916828461359c565b60208152600082518060208401526136b7816040850160208701613739565b601f01601f19169190910160400192915050565b600082198211156136de576136de613780565b500190565b6000826136fe57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561371d5761371d613780565b500290565b60008282101561373457613734613780565b500390565b60005b8381101561375457818101518382015260200161373c565b838111156115255750506000910152565b600060001982141561377957613779613780565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146127e957600080fdfea2646970667358221220d6e3413f75a14efaa914bf060ac4e700a74a91981cdd9b6f3fad03aa4b71655b64736f6c63430008040033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103c55760003560e01c806371143ab9116101ff578063c137a60f1161011a578063ddcc8fe9116100ad578063e76a02791161007c578063e76a0279146108bc578063ebc79772146108cf578063ee161cce146108d7578063fd8a8cc6146108df57600080fd5b8063ddcc8fe914610878578063e278fe6f1461088b578063e48a694b14610893578063e75c93d9146108b357600080fd5b8063d27c0797116100e9578063d27c07971461084b578063db7f92d414610854578063dd636bc714610867578063dda9046f1461086f57600080fd5b8063c137a60f146107f1578063c3b83f5f14610811578063c9f4ff4614610824578063cee73a761461083757600080fd5b80638da5cb5b11610192578063a250badb11610161578063a250badb146107b9578063a9050d4d146107cc578063b6b55f25146107d5578063be805e3c146107e857600080fd5b80638da5cb5b146107275780639324cac714610740578063942f53571461075357806395ba9a701461078e57600080fd5b806379ba5097116101ce57806379ba5097146106f05780637f852582146106f8578063871176301461070b5780638b649b941461071e57600080fd5b806371143ab91461068757806371bb4b47146106b557806374094edd146106bd57806378fe782d146106dd57600080fd5b8063384e631c116102ef5780635d1c236d11610282578063645006ca11610251578063645006ca146106265780636719b2ee1461062f578063681312f51461066b5780636c321c8a1461067e57600080fd5b80635d1c236d146105bc5780635ddd3e83146105c4578063610589e1146105ef578063634e0d97146105f857600080fd5b806353a47bb7116102be57806353a47bb7146105735780635699179114610586578063572e36e6146105995780635c975abb146105b157600080fd5b8063384e631c1461052457806340774ff614610537578063456ff7881461054a5780634ae7937f1461055357600080fd5b8063202ffce811610367578063322ce77a11610336578063322ce77a146104d5578063336d30ed146104de578063343e4f9f146104fe578063370faeb01461051157600080fd5b8063202ffce81461048757806325a663951461049a5780632ef04761146104ba578063311c56df146104cd57600080fd5b8063146ca531116103a3578063146ca531146104305780631627540c146104395780631daae1731461044c5780631e9224601461047f57600080fd5b806306d1fb3c146103ca578063082f9fd4146103f057806313af40351461041b575b600080fd5b6103dd6103d8366004613529565b6108f2565b6040519081526020015b60405180910390f35b6104036103fe366004613558565b61091c565b6040516001600160a01b0390911681526020016103e7565b61042e610429366004613461565b610954565b005b6103dd60695481565b61042e610447366004613461565b610a94565b61046f61045a366004613461565b606f6020526000908152604090205460ff1681565b60405190151581526020016103e7565b6103dd610aea565b61042e6104953660046134e1565b610b24565b6103dd6104a83660046134e1565b60796020526000908152604090205481565b61042e6104c83660046134e1565b610b61565b61042e610b9e565b6103dd607c5481565b6103dd6104ec3660046134e1565b60766020526000908152604090205481565b61040361050c366004613558565b610e29565b61042e61051f366004613558565b610e45565b61042e610532366004613511565b610ee3565b61042e6105453660046134e1565b611018565b6103dd60815481565b6103dd6105613660046134e1565b60716020526000908152604090205481565b600154610403906001600160a01b031681565b61042e61059436600461347d565b611055565b6067546104039061010090046001600160a01b031681565b60345460ff1661046f565b61042e61152b565b6103dd6105d2366004613529565b606e60209081526000928352604080842090915290825290205481565b6103dd607b5481565b61046f610606366004613529565b606d60209081526000928352604080842090915290825290205460ff1681565b6103dd607a5481565b61065661063d366004613461565b6070602052600090815260409020805460019091015482565b604080519283526020830191909152016103e7565b61042e6106793660046134e1565b611644565b6103dd60785481565b61046f610695366004613529565b607460209081526000928352604080842090915290825290205460ff1681565b6103dd611681565b6103dd6106cb3660046134e1565b60756020526000908152604090205481565b61042e6106eb366004613461565b6116a1565b61042e61178b565b61042e610706366004613461565b611888565b61042e6107193660046134e1565b6118de565b6103dd606a5481565b600054610403906201000090046001600160a01b031681565b606854610403906001600160a01b031681565b610781610761366004613529565b607360209081526000928352604080842090915290825290205460ff1681565b6040516103e7919061368a565b6103dd61079c366004613529565b607e60209081526000928352604080842090915290825290205481565b6103dd6107c7366004613461565b611973565b6103dd607d5481565b61042e6107e33660046134e1565b611a33565b6103dd60805481565b6103dd6107ff3660046134e1565b606b6020526000908152604090205481565b61042e61081f366004613461565b611df5565b6103dd610832366004613558565b611f0e565b60685461046f90600160a01b900460ff1681565b6103dd60775481565b61042e6108623660046134e1565b611f4e565b6103dd611f8b565b6103dd60825481565b61042e6108863660046134e1565b611fea565b61042e612027565b6103dd6108a13660046134e1565b60846020526000908152604090205481565b6103dd607f5481565b61042e6108ca3660046134e1565b6127ec565b61042e612829565b61046f612887565b608354610403906001600160a01b031681565b6000828152606e602090815260408083206001600160a01b03851684529091529020545b92915050565b6072602052816000526040600020818154811061093857600080fd5b6000918252602090912001546001600160a01b03169150829050565b6001600160a01b0381166109af5760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f7420626520300000000000000060448201526064015b60405180910390fd5b600154600160a01b900460ff1615610a1b5760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b60648201526084016109a6565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b03831662010000810262010000600160b01b03199092169190911782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91015b60405180910390a150565b610a9c6129c4565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610a89565b6078546069546000908152607160205260408120549091670de0b6b3a764000091610b159190613703565b610b1f91906136e3565b905090565b610b2c6129c4565b607b8190556040518181527fe7c2c09f66c8b970b4a99250f4d0844e1496b9d51d4760a17b0134ddd52023e190602001610a89565b610b696129c4565b60818190556040518181527f137f353e194da87258fd6c2b78eb1cfb9f2ce996f3466729d2464eccb7ce612990602001610a89565b606854600160a01b900460ff16610bef5760405162461bcd60e51b815260206004820152601560248201527415985d5b1d081a185cc81b9bdd081cdd185c9d1959605a1b60448201526064016109a6565b336000908152606f602052604090205460ff1615610c4f5760405162461bcd60e51b815260206004820152601c60248201527f5769746864726177616c20616c7265616479207265717565737465640000000060448201526064016109a6565b6069546000908152606e60209081526040808320338452909152902054610cae5760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b60448201526064016109a6565b606e60006069546001610cc191906136cb565b81526020808201929092526040908101600090812033825290925290205415610d4b5760405162461bcd60e51b815260206004820152603660248201527f43616e277420776974686472617720617320796f7520616c72656164792064656044820152751c1bdcda5d195908199bdc881b995e1d081c9bdd5b9960521b60648201526084016109a6565b60006069546001610d5c91906136cb565b6069546000908152606e602090815260408083203384528252808320548484526079909252909120549192501015610dcc576069546000908152606e6020908152604080832033845282528083205484845260799092528220805491929091610dc6908490613722565b90915550505b6001607c54610ddb9190613722565b607c55336000818152606f6020908152604091829020805460ff1916600117905590519182527fe5892ff2a8b08efb903ffbba1f0514c1d3e22eea34dd5b89cf30aabce03dde5a9101610a89565b606c602052816000526040600020818154811061093857600080fd5b610e4d6129c4565b808210610e9c5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964207072696365206c696d69742076616c75657300000000000060448201526064016109a6565b607f829055608081905560408051838152602081018390527f34b23d671026520e294c1060acc36120677e8c9bd073a8f6577a6f241785b1a6910160405180910390a15050565b600054610100900460ff16610efe5760005460ff1615610f02565b303b155b610f655760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016109a6565b600054610100900460ff16158015610f87576000805461ffff19166101011790555b610fd9610f976020840184613461565b610fa76040850160208601613461565b610fb76060860160408701613461565b8560600135866101000135876101200135886101400135896101600135612a3e565b608080830135607f5560a0830135905560c082013560815560e0820135607d556101808201356082558015611014576000805461ff00191690555b5050565b6110206129c4565b60788190556040518181527fc117ccf765672707ebe3c1606037488c1e27dc1f42b5266e3d6b496db7d4209e90602001610a89565b60016066600082825461106891906136cb565b909155505060665460345460ff16156110b65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109a6565b606854600160a01b900460ff166111075760405162461bcd60e51b815260206004820152601560248201527415985d5b1d081a185cc81b9bdd081cdd185c9d1959605a1b60448201526064016109a6565b6082548310156111595760405162461bcd60e51b815260206004820152601860248201527f416d6f756e74206c657373207468616e206d696e696d756d000000000000000060448201526064016109a6565b60008490506000816001600160a01b0316639e3b34bf6040518163ffffffff1660e01b8152600401604080518083038186803b15801561119857600080fd5b505afa1580156111ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d09190613579565b50606a546069546000908152606b60205260409020549192506111f2916136cb565b81106112385760405162461bcd60e51b815260206004820152601560248201527413585c9ad95d081d1a5b59481b9bdd081d985b1a59605a1b60448201526064016109a6565b606754604051630dda067f60e31b815260009161010090046001600160a01b031690636ed033f890611270908a9089906004016135da565b60206040518083038186803b15801561128857600080fd5b505afa15801561129c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c091906134f9565b90506000811161130a5760405162461bcd60e51b815260206004820152601560248201527405072696365206e6f74206d6f7265207468616e203605c1b60448201526064016109a6565b606754604051632fd1b02d60e21b815260009161010090046001600160a01b03169063bf46c0b490611344908b908a908c906004016135f7565b60206040518083038186803b15801561135c57600080fd5b505afa158015611370573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139491906134f9565b9050607f5482101580156113aa57506080548211155b6113ef5760405162461bcd60e51b815260206004820152601660248201527513585c9ad95d081c1c9a58d9481b9bdd081d985b1a5960521b60448201526064016109a6565b60815481126114375760405162461bcd60e51b81526020600482015260146024820152730a6d6caee40d2dae0c2c6e840e8dede40d0d2ced60631b60448201526064016109a6565b611442888789612b98565b60695460009081526074602090815260408083206001600160a01b038c16845290915290205460ff166114d0576069805460009081526072602090815260408083208054600180820183559185528385200180546001600160a01b0319166001600160a01b038f169081179091559454845260748352818420948452939091529020805460ff191690911790555b5050505060665481146115255760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a6565b50505050565b6115336129c4565b606854600160a01b900460ff161561158d5760405162461bcd60e51b815260206004820152601960248201527f5661756c742068617320616c726561647920737461727465640000000000000060448201526064016109a6565b6001606955427fa775687211c2b3346a0f5a2a0e7590e6c1838453e3785e6dd2a8efd6265ddf15556068805460ff60a01b1916600160a01b17905560796020527fdf6d6ad01a16c6118cfd605fcb55ad218b43517981ef4cc6d63a492cf34990d954600260009081527f7d4d2b02426547888e9185e69135196c4ed1edbc114060100a6ef94f8b5f60df919091556040517f59760ad83ef06d1a0bc439d8b39a42a870493f0cd3bc3d53bbd3e7c6991f494f9190a1565b61164c6129c4565b606a8190556040518181527f1d1fb7111c3779798bd4aefb2daea07ee8257a13c7eaceba89b4b1ccd405050d90602001610a89565b606a546069546000908152606b60205260408120549091610b1f916136cb565b6116a96129c4565b60678054610100600160a81b0319166101006001600160a01b038481168202929092179283905560685460405163095ea7b360e01b81529190930482166004820152600019602482015291169063095ea7b390604401602060405180830381600087803b15801561171957600080fd5b505af115801561172d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061175191906134c1565b506040516001600160a01b03821681527fcd9f73cb77eb3f2287cdfd1b291c691d33e2cb7ca1774dba627bc61f163d6b9b90602001610a89565b6001546001600160a01b031633146118035760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b60648201526084016109a6565b60005460015460408051620100009093046001600160a01b03908116845290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a1600180546000805462010000600160b01b0319166001600160a01b03831662010000021790556001600160a01b0319169055565b6118906129c4565b608380546001600160a01b0319166001600160a01b0383169081179091556040519081527f3c7faa500efbd341aedbf1ee7ebd52ea36d226dda76bc01dd39b43d46f55b8d390602001610a89565b6118e66129c4565b68056bc75e2d63100000811061193e5760405162461bcd60e51b815260206004820152601f60248201527f496e76616c696420616c6c6f636174696f6e206c696d69742076616c7565730060448201526064016109a6565b607d8190556040518181527f9fb019ef2cdd86e0c7772694b935b2fd45131410802474ef0a8bf0afff94a40390602001610a89565b60008068056bc75e2d63100000607d5461198b610aea565b6119959190613703565b61199f91906136e3565b6069546000908152607e602090815260408083206001600160a01b0388168452909152812054919250906119d39083613722565b6069546000908152608460205260409020549091506119f0610aea565b6119fa9190613722565b8110611a2957606954600090815260846020526040902054611a1a610aea565b611a249190613722565b611a2b565b805b949350505050565b336000908152606f6020526040902054819060ff1615611aa55760405162461bcd60e51b815260206004820152602760248201527f5769746864726177616c206973207265717565737465642c2063616e6e6f742060448201526619195c1bdcda5d60ca1b60648201526084016109a6565b607a54811015611ae85760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b60448201526064016109a6565b60775481607960006069546001611aff91906136cb565b815260200190815260200160002054611b1891906136cb565b1115611b665760405162461bcd60e51b815260206004820181905260248201527f4465706f73697420616d6f756e742065786365656473207661756c742063617060448201526064016109a6565b606854611b7e906001600160a01b0316333085612ff0565b60006069546001611b8f91906136cb565b6069546000908152606e60209081526040808320338452909152902054909150158015611bd357506000818152606e60209081526040808320338452909152902054155b15611c8c57607b54607c5410611c2b5760405162461bcd60e51b815260206004820152601b60248201527f4d617820616d6f756e74206f662075736572732072656163686564000000000060448201526064016109a6565b6000818152606c602090815260408083208054600181810183559185528385200180546001600160a01b03191633908117909155858552606d8452828520908552909252909120805460ff191682179055607c54611c88916136cb565b607c555b6000818152606e6020908152604080832033845290915281208054859290611cb59084906136cb565b90915550506040805180820182528281526000838152606e6020908152838220338084529082528483205482850190815290835260708252848320935184555160019093019290925583815260719091529081208054859290611d199084906136cb565b909155505060008181526079602052604081208054859290611d3c9084906136cb565b90915550506083546001600160a01b031615611db7576083546040516302c7739b60e01b8152336004820152602481018590526001600160a01b03909116906302c7739b90604401600060405180830381600087803b158015611d9e57600080fd5b505af1158015611db2573d6000803e3d6000fd5b505050505b60408051338152602081018590527f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4910160405180910390a1505050565b611dfd6129c4565b6001600160a01b038116611e455760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016109a6565b600154600160a81b900460ff1615611e955760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b60448201526064016109a6565b600080546001600160a01b038381166201000081810262010000600160b01b031990941693909317938490556001805460ff60a81b1916600160a81b1790556040805193909404909116825260208201527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610a89565b6000828152607660208181526040808420546075835281852054868652939092528320549091611f3d91613703565b611f4791906136e3565b9392505050565b611f566129c4565b607a8190556040518181527f990717cc219e5348c1b88bb0ff530d804f0b6f54f3b03844a2bfbe4eb1e9c5d690602001610a89565b6000607754607960006069546001611fa391906136cb565b8152602001908152602001600020541015611fe757607960006069546001611fcb91906136cb565b815260200190815260200160002054607754610b1f9190613722565b90565b611ff26129c4565b60778190556040518181527f8c43aa02599ac8f8bab4724621ceea5e7a06b07bbbfaf3b7bd0386cbe481ea3c90602001610a89565b60016066600082825461203a91906136cb565b909155505060665460345460ff16156120885760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109a6565b612090612887565b6120dc5760405162461bcd60e51b815260206004820152601960248201527f43616e277420636c6f73652063757272656e7420726f756e640000000000000060448201526064016109a6565b6120e461305b565b60006071600060695460016120f991906136cb565b8152602081019190915260409081016000205460685491516370a0823160e01b815230600482015290916001600160a01b0316906370a082319060240160206040518083038186803b15801561214e57600080fd5b505afa158015612162573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061218691906134f9565b6121909190613722565b6069546000908152607160205260409020549091506121c357606954600090815260756020526040902060019055612204565b6069546000908152607160205260409020546121e7670de0b6b3a764000083613703565b6121f191906136e3565b6069546000908152607560205260409020555b60005b6069546000908152606c60205260409020548110156125aa576069546000908152606c6020526040812080548390811061225157634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910154606954835260758252604080842054606e84528185206001600160a01b0390931680865292909352832054909350670de0b6b3a7640000916122a091613703565b6122aa91906136e3565b6069546000908152606d602090815260408083206001600160a01b038716845290915290205490915060ff1615612595576001600160a01b0382166000908152606f602052604090205460ff166124a55780606e6000606954600161230f91906136cb565b81526020019081526020016000206000846001600160a01b03166001600160a01b031681526020019081526020016000205461234b91906136cb565b606e6000606954600161235e91906136cb565b81526020019081526020016000206000846001600160a01b03166001600160a01b03168152602001908152602001600020819055506001606d600060695460016123a891906136cb565b8152602080820192909252604090810160009081206001600160a01b03871682529092528120805460ff191692151592909217909155606954606c91906123f09060016136cb565b8152602080820192909252604001600090812080546001810182559082529190200180546001600160a01b0319166001600160a01b038481169190911790915560835416156124a0576083546040516302c7739b60e01b81526001600160a01b03848116600483015260248201849052909116906302c7739b90604401600060405180830381600087803b15801561248757600080fd5b505af115801561249b573d6000803e3d6000fd5b505050505b612595565b6000606e600060695460016124ba91906136cb565b8152602080820192909252604090810160009081206001600160a01b038088168352935220919091556068546124f29116838361324f565b6001600160a01b0382166000908152606f60205260408120805460ff19169055606954606d9082906125259060016136cb565b8152602080820192909252604090810160009081206001600160a01b03871680835290845290829020805460ff19169415159490941790935580519283529082018390527fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a910160405180910390a15b505080806125a290613765565b915050612207565b50606954600114156125d95760695460009081526075602090815260408083205460769092529091205561263c565b606954600081815260756020526040812054670de0b6b3a764000092909160769161260690600190613722565b81526020019081526020016000205461261f9190613703565b61262991906136e3565b6069546000908152607660205260409020555b60016069600082825461264f91906136cb565b90915550506069546000908152606b60205260409081902042905560685490516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156126ac57600080fd5b505afa1580156126c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126e491906134f9565b606980546000908152607160205260408082209390935590548082529181205491607991906127149060016136cb565b8152602001908152602001600020819055507fc67dda8e11f1aa941c7e74466b1859a07a32f46aaf641d29b83be348424d93cd60016069546127569190613722565b6075600060016069546127699190613722565b81526020019081526020016000205460405161278f929190918252602082015260400190565b60405180910390a15060665481146127e95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109a6565b50565b6127f46129c4565b60828190556040518181527f26ea09cdab135064e784e44516fc5b3d619360d241ae64bff47153b2e5ee610e90602001610a89565b60675460ff16156128725760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064016109a6565b6067805460ff19166001908117909155606655565b606854600090600160a01b900460ff1615806128c05750606a546069546000908152606b60205260409020546128bd91906136cb565b42105b156128cb5750600090565b60005b6069546000908152607260205260409020548110156129bc57606954600090815260726020526040812080548390811061291857634e487b7160e01b600052603260045260246000fd5b6000918252602091829020015460408051633f6fa65560e01b815290516001600160a01b0390921693508392633f6fa65592600480840193829003018186803b15801561296457600080fd5b505afa158015612978573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061299c91906134c1565b6129a95760009250505090565b50806129b481613765565b9150506128ce565b506001905090565b6000546201000090046001600160a01b03163314612a3c5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b60648201526084016109a6565b565b600054610100900460ff16612aa95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016109a6565b612ab288610954565b612aba612829565b60678054610100600160a81b0319166101006001600160a01b038a811682029290921792839055606880546001600160a01b0319168a8416908117909155606a89905560778890556078879055607a869055607b85905560405163095ea7b360e01b8152919093049091166004820152600019602482015263095ea7b390604401602060405180830381600087803b158015612b5557600080fd5b505af1158015612b69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b8d91906134c1565b505050505050505050565b60675460405163270e13ef60e01b815260009161010090046001600160a01b03169063270e13ef90612bd2908790879087906004016135f7565b60206040518083038186803b158015612bea57600080fd5b505afa158015612bfe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c2291906134f9565b606954600090815260846020526040902054909150612c3f610aea565b612c499190613722565b8110612ca35760405162461bcd60e51b815260206004820152602360248201527f416d6f756e74206578636565647320617661696c61626c6520616c6c6f63617460448201526234b7b760e91b60648201526084016109a6565b600068056bc75e2d63100000607d54612cba610aea565b612cc49190613703565b612cce91906136e3565b6069546000908152607e602090815260408083206001600160a01b038a1684529091529020549091508190612d0390846136cb565b10612d665760405162461bcd60e51b815260206004820152602d60248201527f416d6f756e74206578636565647320617661696c61626c6520616c6c6f63617460448201526c1a5bdb88199bdc88185cdcd95d609a1b60648201526084016109a6565b6068546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015612daa57600080fd5b505afa158015612dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612de291906134f9565b60675460405163221d7ae160e21b815291925061010090046001600160a01b031690638875eb8490612e21908990899089908990600090600401613651565b602060405180830381600087803b158015612e3b57600080fd5b505af1158015612e4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e7391906134f9565b506068546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015612eb857600080fd5b505afa158015612ecc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ef091906134f9565b9050836084600060695481526020019081526020016000206000828254612f1791906136cb565b90915550506069546000908152607e602090815260408083206001600160a01b038b16845290915281208054869290612f519084906136cb565b909155505060695460009081526073602090815260408083206001600160a01b038b1684529091529020805487919060ff191660018381811115612fa557634e487b7160e01b600052602160045260246000fd5b02179055507fd1fc86fd7e2808fb6a4d745c0f26983bd36784721df1e29a27a28ce3fcdc741687878787604051612fdf9493929190613622565b60405180910390a150505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526115259085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613284565b6000805b6069546000908152607260205260409020548110156110145760695460009081526072602052604090208054829081106130a957634e487b7160e01b600052603260045260246000fd5b6000918252602091829020015460408051633f6fa65560e01b815290516001600160a01b0390921694508492633f6fa65592600480840193829003018186803b1580156130f557600080fd5b505afa158015613109573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061312d91906134c1565b1561323d57604051636392a51f60e01b815230600482015260009081906001600160a01b03851690636392a51f90602401604080518083038186803b15801561317557600080fd5b505afa158015613189573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131ad9190613579565b9150915060008211806131c05750600081115b1561323a57836001600160a01b031663851492586040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561320057600080fd5b505af1158015613214573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061323891906134f9565b505b50505b8061324781613765565b91505061305f565b6040516001600160a01b03831660248201526044810182905261327f90849063a9059cbb60e01b90606401613024565b505050565b60006132d9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166133569092919063ffffffff16565b80519091501561327f57808060200190518101906132f791906134c1565b61327f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109a6565b6060611a2b848460008585843b6133af5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109a6565b600080866001600160a01b031685876040516133cb91906135be565b60006040518083038185875af1925050503d8060008114613408576040519150601f19603f3d011682016040523d82523d6000602084013e61340d565b606091505b509150915061341d828286613428565b979650505050505050565b60608315613437575081611f47565b8251156134475782518084602001fd5b8160405162461bcd60e51b81526004016109a69190613698565b600060208284031215613472578081fd5b8135611f4781613796565b600080600060608486031215613491578182fd5b833561349c81613796565b9250602084013591506040840135600281106134b6578182fd5b809150509250925092565b6000602082840312156134d2578081fd5b81518015158114611f47578182fd5b6000602082840312156134f2578081fd5b5035919050565b60006020828403121561350a578081fd5b5051919050565b60006101a08284031215613523578081fd5b50919050565b6000806040838503121561353b578182fd5b82359150602083013561354d81613796565b809150509250929050565b6000806040838503121561356a578182fd5b50508035926020909101359150565b6000806040838503121561358b578182fd5b505080516020909101519092909150565b600281106135ba57634e487b7160e01b600052602160045260246000fd5b9052565b600082516135d0818460208701613739565b9190910192915050565b6001600160a01b038316815260408101611f47602083018461359c565b6001600160a01b038416815260608101613614602083018561359c565b826040830152949350505050565b6001600160a01b03851681526080810161363f602083018661359c565b60408201939093526060015292915050565b6001600160a01b038616815260a0810161366e602083018761359c565b8460408301528360608301528260808301529695505050505050565b60208101610916828461359c565b60208152600082518060208401526136b7816040850160208701613739565b601f01601f19169190910160400192915050565b600082198211156136de576136de613780565b500190565b6000826136fe57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561371d5761371d613780565b500290565b60008282101561373457613734613780565b500390565b60005b8381101561375457818101518382015260200161373c565b838111156115255750506000910152565b600060001982141561377957613779613780565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146127e957600080fdfea2646970667358221220d6e3413f75a14efaa914bf060ac4e700a74a91981cdd9b6f3fad03aa4b71655b64736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.