Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 2,877 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Approve | 21496959 | 22 days ago | IN | 0 ETH | 0.00011595 | ||||
Withdraw LP Toke... | 19179624 | 346 days ago | IN | 0 ETH | 0.00712469 | ||||
Approve | 18932669 | 380 days ago | IN | 0 ETH | 0.00042746 | ||||
Approve | 18397806 | 455 days ago | IN | 0 ETH | 0.00016433 | ||||
Approve | 18359741 | 461 days ago | IN | 0 ETH | 0.00014379 | ||||
Approve | 17691392 | 554 days ago | IN | 0 ETH | 0.00036645 | ||||
Approve | 17012900 | 650 days ago | IN | 0 ETH | 0.00056261 | ||||
Approve | 17009258 | 650 days ago | IN | 0 ETH | 0.00052462 | ||||
Withdraw LP Toke... | 16422352 | 733 days ago | IN | 0 ETH | 0.00612231 | ||||
Approve | 16422327 | 733 days ago | IN | 0 ETH | 0.00171516 | ||||
Withdraw LP Toke... | 16341037 | 744 days ago | IN | 0 ETH | 0.00354583 | ||||
Withdraw LP Toke... | 16309195 | 749 days ago | IN | 0 ETH | 0.00280484 | ||||
Withdraw LP Toke... | 16309134 | 749 days ago | IN | 0 ETH | 0.00305154 | ||||
Withdraw LP Toke... | 16309102 | 749 days ago | IN | 0 ETH | 0.00314548 | ||||
Withdraw LP Toke... | 16269106 | 754 days ago | IN | 0 ETH | 0.00253085 | ||||
Approve | 16111769 | 776 days ago | IN | 0 ETH | 0.00069115 | ||||
Approve | 16047965 | 785 days ago | IN | 0 ETH | 0.00029409 | ||||
Approve | 15857084 | 812 days ago | IN | 0 ETH | 0.00020319 | ||||
Approve | 15857083 | 812 days ago | IN | 0 ETH | 0.00018469 | ||||
Withdraw LP Toke... | 15832184 | 815 days ago | IN | 0 ETH | 0.00298282 | ||||
Withdraw LP Toke... | 15832178 | 815 days ago | IN | 0 ETH | 0.00254647 | ||||
Approve | 15577021 | 851 days ago | IN | 0 ETH | 0.00159679 | ||||
Withdraw LP Toke... | 15486394 | 865 days ago | IN | 0 ETH | 0.00308318 | ||||
Withdraw LP Toke... | 15484521 | 865 days ago | IN | 0 ETH | 0.00274732 | ||||
Approve | 15340524 | 888 days ago | IN | 0 ETH | 0.00024274 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Platform
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./utils/SafeMath16.sol"; import "./interfaces/IPlatform.sol"; contract Platform is IPlatform, Ownable, ERC20 { using SafeERC20 for IERC20; using SafeMath for uint256; struct Position { uint256 positionUnitsAmount; uint256 creationTimestamp; uint256 pendingFees; // Funding fees calculated for earlier positions before merge (if occured) uint256 positionAddressesIndex; } uint256 public constant MAX_FEE_PERCENTAGE = 10000; uint256 public constant MAX_PERCENTAGE = 1000000; uint256 public constant PRECISION_DECIMALS = 1e10; uint256 public constant MAX_CVI_VALUE = 20000; uint256 public immutable initialTokenToLPTokenRate; IERC20 private token; ICVIOracle private cviOracle; IRewards private rewards; ILiquidation private liquidation; IFeesModel private feesModel; IFeesCalculator private feesCalculator; IFeesCollector private feesCollector; uint256 public lpsLockupPeriod = 3 days; uint256 public buyersLockupPeriod = 24 hours; uint256 public totalPositionUnitsAmount; uint256 public totalFundingFeesAmount; bool public emergencyWithdrawAllowed = false; mapping(address => uint256) public lastDepositTimestamp; mapping(address => Position) public positions; mapping(address => bool) public revertLockedTransfered; address[] private holdersAddresses; constructor(IERC20 _token, string memory _lpTokenName, string memory _lpTokenSymbolName, uint256 _initialTokenToLPTokenRate, IFeesModel _feesModel, IFeesCalculator _feesCalculator, ICVIOracle _cviOracle, ILiquidation _liquidation) public ERC20(_lpTokenName, _lpTokenSymbolName) { token = _token; initialTokenToLPTokenRate = _initialTokenToLPTokenRate; feesModel = _feesModel; feesCalculator = _feesCalculator; cviOracle = _cviOracle; liquidation = _liquidation; } function deposit(uint256 _tokenAmount, uint256 _minLPTokenAmount) external override returns (uint256 lpTokenAmount) { lpTokenAmount = _deposit(_tokenAmount, _minLPTokenAmount, true); } function withdraw(uint256 _tokenAmount, uint256 _maxLPTokenBurnAmount) external override returns (uint256 burntAmount, uint256 withdrawnAmount) { (burntAmount, withdrawnAmount) = _withdraw(_tokenAmount, false, _maxLPTokenBurnAmount, true); } function withdrawLPTokens(uint256 _lpTokensAmount) external override returns (uint256 burntAmount, uint256 withdrawnAmount) { require(_lpTokensAmount > 0, "Amount must be positive"); (burntAmount, withdrawnAmount) = _withdraw(0, true, _lpTokensAmount, true); } function openPosition(uint256 _tokenAmount, uint16 _maxCVI) external override returns (uint256 positionUnitsAmount) { positionUnitsAmount = _openPosition(_tokenAmount, _maxCVI, true); } function closePosition(uint256 _positionUnitsAmount, uint16 _minCVI) external override returns (uint256 tokenAmount) { tokenAmount = _closePosition(_positionUnitsAmount, _minCVI, true); } function liquidatePositions(address[] calldata _positionOwners) external override returns (uint256 finderFeeAmount) { finderFeeAmount = _liquidatePositions(_positionOwners); } function setCVIOracle(ICVIOracle _newOracle) external override onlyOwner { cviOracle = _newOracle; } function setRewards(IRewards _newRewards) external override onlyOwner { rewards = _newRewards; } function setLiquidation(ILiquidation _newLiquidation) external override onlyOwner { liquidation = _newLiquidation; } function setFeesCollector(IFeesCollector _newCollector) external override onlyOwner { feesCollector = _newCollector; if (address(_newCollector) != address(0)) { token.safeApprove(address(feesCollector), uint256(-1)); } } function setFeesModel(IFeesModel _newModel) external override onlyOwner { feesModel = _newModel; } function setLPLockupPeriod(uint256 _newLPLockupPeriod) external override onlyOwner { require(_newLPLockupPeriod <= 2 weeks, "Lockup too long"); lpsLockupPeriod = _newLPLockupPeriod; } function setBuyersLockupPeriod(uint256 _newBuyersLockupPeriod) external override onlyOwner { require(_newBuyersLockupPeriod <= 1 weeks, "Lockup too long"); buyersLockupPeriod = _newBuyersLockupPeriod; } function setRevertLockedTransfers(bool _revertLockedTransfers) external override { revertLockedTransfered[msg.sender] = _revertLockedTransfers; } function setFeesCalculator(IFeesCalculator _newCalculator) external override onlyOwner { feesCalculator = _newCalculator; } function setEmergencyWithdrawAllowed(bool _newEmergencyWithdrawAllowed) external override onlyOwner { emergencyWithdrawAllowed = _newEmergencyWithdrawAllowed; } function getToken() external view override returns (IERC20) { return token; } function calculatePositionBalance(address _positionAddress) public view override returns (uint256 currentPositionBalance, bool isPositive, uint256 positionUnitsAmount) { positionUnitsAmount = positions[_positionAddress].positionUnitsAmount; require(positionUnitsAmount > 0, "No position for given address"); (currentPositionBalance, isPositive) = _calculatePositionBalance(_positionAddress); } function calculatePositionPendingFees(address _positionAddress) public view override returns (uint256 pendingFees) { Position memory position = positions[_positionAddress]; pendingFees = position.pendingFees.add(feesModel.calculateFundingFees(position.creationTimestamp, position.positionUnitsAmount)) .add(feesModel.calculateFundingFeesAddendum(position.positionUnitsAmount)); } function totalBalance() public view override returns (uint256 balance) { (uint16 cviValue,) = cviOracle.getCVILatestRoundData(); return token.balanceOf(address(this)).sub(totalPositionUnitsAmount.mul(cviValue).div(MAX_CVI_VALUE)).add(totalFundingFeesAmount); } function totalBalanceWithAddendum() public view override returns (uint256 balance) { return totalBalance().add(feesModel.calculateFundingFeesAddendum(totalPositionUnitsAmount)); } function getLiquidableAddresses() external view override returns (address[] memory) { address[] memory addressesToLiquidate = new address[](holdersAddresses.length); uint256 liquidationAddressesAmount = 0; for (uint256 i = 0; i < holdersAddresses.length; i++) { (uint256 currentPositionBalance, bool isBalancePositive) = _calculatePositionBalance(holdersAddresses[i]); if (liquidation.isLiquidationCandidate(currentPositionBalance, isBalancePositive, positions[holdersAddresses[i]].positionUnitsAmount)) { addressesToLiquidate[liquidationAddressesAmount] = holdersAddresses[i]; liquidationAddressesAmount = liquidationAddressesAmount.add(1); } } address[] memory addressesToActuallyLiquidate = new address[](liquidationAddressesAmount); for (uint256 i = 0; i < liquidationAddressesAmount; i++) { addressesToActuallyLiquidate[i] = addressesToLiquidate[i]; } return addressesToActuallyLiquidate; } function _deposit(uint256 _tokenAmount, uint256 _minLPTokenAmount, bool _transferTokens) internal returns (uint256 lpTokenAmount) { require(_tokenAmount > 0, "Tokens amount must be positive"); lastDepositTimestamp[msg.sender] = block.timestamp; updateSnapshots(); uint256 depositFee = _tokenAmount.mul(uint256(feesCalculator.depositFeePercent())).div(MAX_FEE_PERCENTAGE); uint256 tokenAmountToDeposit = _tokenAmount.sub(depositFee); uint256 supply = totalSupply(); uint256 balance = totalBalance(); if (supply > 0 && balance > 0) { lpTokenAmount = tokenAmountToDeposit.mul(supply).div(balance); } else { lpTokenAmount = tokenAmountToDeposit.mul(initialTokenToLPTokenRate); } emit Deposit(msg.sender, _tokenAmount, lpTokenAmount, depositFee); require(lpTokenAmount >= _minLPTokenAmount, "Too few LP tokens"); require(lpTokenAmount > 0, "Too few tokens"); _mint(msg.sender, lpTokenAmount); if (_transferTokens) { token.safeTransferFrom(msg.sender, address(this), _tokenAmount); } collectProfit(depositFee); } function _withdraw(uint256 _tokenAmount, bool _shouldBurnMax, uint256 _maxLPTokenBurnAmount, bool _transferTokens) internal returns (uint256 burntAmount, uint256 withdrawnAmount) { require(lastDepositTimestamp[msg.sender].add(lpsLockupPeriod) <= block.timestamp, "Funds are locked"); updateSnapshots(); if (_shouldBurnMax) { burntAmount = _maxLPTokenBurnAmount; _tokenAmount = burntAmount.mul(totalBalance()).div(totalSupply()); } else { require(_tokenAmount > 0, "Tokens amount must be positive"); // Note: rounding up (ceiling) the to-burn amount to prevent precision loss burntAmount = _tokenAmount.mul(totalSupply()).sub(1).div(totalBalance()).add(1); require(burntAmount <= _maxLPTokenBurnAmount, "Too much LP tokens to burn"); } require(burntAmount <= balanceOf(msg.sender), "Not enough LP tokens for account"); uint256 withdrawFee = _tokenAmount.mul(uint256(feesCalculator.withdrawFeePercent())).div(MAX_FEE_PERCENTAGE); withdrawnAmount = _tokenAmount.sub(withdrawFee); require(emergencyWithdrawAllowed || token.balanceOf(address(this)).sub(totalPositionUnitsAmount) >= withdrawnAmount, "Collateral ratio broken"); emit Withdraw(msg.sender, _tokenAmount, burntAmount, withdrawFee); _burn(msg.sender, burntAmount); if (_transferTokens) { token.safeTransfer(msg.sender, withdrawnAmount); } collectProfit(withdrawFee); } function _openPosition(uint256 _tokenAmount, uint16 _maxCVI, bool _transferTokens) internal returns (uint256 positionUnitsAmount) { require(_tokenAmount > 0, "Tokens amount must be positive"); require(_maxCVI > 0 && _maxCVI <= MAX_CVI_VALUE, "Bad max CVI value"); (uint16 cviValue,) = cviOracle.getCVILatestRoundData(); require(cviValue <= _maxCVI, "CVI too high"); updateSnapshots(); uint256 openPositionFee = _tokenAmount.mul(uint256(feesCalculator.openPositionFeePercent())).div(MAX_FEE_PERCENTAGE); uint256 positionUnitsAmountWithoutPremium = _tokenAmount.sub(openPositionFee).mul(MAX_CVI_VALUE).div(cviValue); uint256 minPositionUnitsAmount = positionUnitsAmountWithoutPremium.mul(MAX_FEE_PERCENTAGE.sub(feesCalculator.buyingPremiumFeeMaxPercent())).div(MAX_FEE_PERCENTAGE); uint256 collateralRatio = 0; if (token.balanceOf(address(this)) > 0) { collateralRatio = (totalPositionUnitsAmount.add(minPositionUnitsAmount)).mul(PRECISION_DECIMALS).div(token.balanceOf(address(this)).add(_tokenAmount).sub(openPositionFee)); } uint256 buyingPremiumFee = feesCalculator.calculateBuyingPremiumFee(_tokenAmount, collateralRatio); // Leaving buying premium in shared pool uint256 tokenAmountToOpenPosition = _tokenAmount.sub(openPositionFee).sub(buyingPremiumFee); positionUnitsAmount = tokenAmountToOpenPosition.mul(MAX_CVI_VALUE).div(cviValue); totalPositionUnitsAmount = totalPositionUnitsAmount.add(positionUnitsAmount); if (positions[msg.sender].positionUnitsAmount > 0) { Position storage position = positions[msg.sender]; position.pendingFees = position.pendingFees.add(feesModel.calculateFundingFees(position.creationTimestamp, block.timestamp, position.positionUnitsAmount)); position.positionUnitsAmount = position.positionUnitsAmount.add(positionUnitsAmount); position.creationTimestamp = block.timestamp; } else { Position memory newPosition = Position(positionUnitsAmount, block.timestamp, 0, holdersAddresses.length); positions[msg.sender] = newPosition; holdersAddresses.push(msg.sender); } emit OpenPosition(msg.sender, _tokenAmount, openPositionFee.add(buyingPremiumFee), positions[msg.sender].positionUnitsAmount, cviValue); if (_transferTokens) { token.safeTransferFrom(msg.sender, address(this), _tokenAmount); } collectProfit(openPositionFee); // Note: checking collateral ratio after transfering tokens to cover cases where token transfer induces a fee, for example require(totalPositionUnitsAmount <= token.balanceOf(address(this)), "Not enough liquidity"); if (address(rewards) != address(0)) { rewards.reward(msg.sender, positionUnitsAmount); } } function _closePosition(uint256 _positionUnitsAmount, uint16 _minCVI, bool _transferTokens) internal returns (uint256 tokenAmount) { require(_positionUnitsAmount > 0, "Position units not positive"); require(_minCVI > 0 && _minCVI <= MAX_CVI_VALUE, "Bad min CVI value"); require(positions[msg.sender].positionUnitsAmount >= _positionUnitsAmount, "Not enough opened position units"); require(block.timestamp.sub(positions[msg.sender].creationTimestamp) >= buyersLockupPeriod, "Position locked"); (uint16 cviValue,) = cviOracle.getCVILatestRoundData(); require(cviValue >= _minCVI, "CVI too low"); updateSnapshots(); Position storage position = positions[msg.sender]; uint256 positionBalance = _positionUnitsAmount.mul(cviValue).div(MAX_CVI_VALUE); uint256 tokenAmountBeforeFees = positionBalance; uint256 fundingFees = feesModel.calculateFundingFees(position.creationTimestamp, block.timestamp, _positionUnitsAmount); uint256 realizedPendingFees = position.pendingFees.mul(_positionUnitsAmount).div(position.positionUnitsAmount); if (positionBalance <= fundingFees.add(realizedPendingFees)) { checkAndLiquidatePosition(msg.sender); // Will always liquidate return 0; } else { positionBalance = positionBalance.sub(fundingFees.add(realizedPendingFees)); } uint256 closePositionFee = positionBalance .mul(uint256(feesCalculator.calculateClosePositionFeePercent(position.creationTimestamp))) .div(MAX_FEE_PERCENTAGE); position.positionUnitsAmount = position.positionUnitsAmount.sub(_positionUnitsAmount); totalPositionUnitsAmount = totalPositionUnitsAmount.sub(_positionUnitsAmount); if (position.positionUnitsAmount > 0) { position.pendingFees = position.pendingFees.sub(realizedPendingFees); } else { removePosition(msg.sender); } tokenAmount = positionBalance.sub(closePositionFee); emit ClosePosition(msg.sender, tokenAmountBeforeFees, closePositionFee.add(realizedPendingFees).add(fundingFees), positions[msg.sender].positionUnitsAmount, cviValue); collectProfit(closePositionFee); if (_transferTokens) { token.safeTransfer(msg.sender, tokenAmount); } } function _liquidatePositions(address[] calldata _positionOwners) internal returns (uint256 finderFeeAmount) { updateSnapshots(); bool liquidationOccured = false; for ( uint256 i = 0; i < _positionOwners.length; i++) { uint256 positionUnitsAmount = positions[_positionOwners[i]].positionUnitsAmount; (bool wasLiquidated, uint256 liquidatedAmount, bool isPositive) = checkAndLiquidatePosition(_positionOwners[i]); if (wasLiquidated) { liquidationOccured = true; finderFeeAmount = finderFeeAmount.add(liquidation.getLiquidationReward(liquidatedAmount, isPositive, positionUnitsAmount)); } } require(liquidationOccured, "No reported position was found to be liquidatable"); token.safeTransfer(msg.sender, finderFeeAmount); } function _beforeTokenTransfer(address from, address to, uint256) internal override { if (lastDepositTimestamp[from].add(lpsLockupPeriod) > block.timestamp && lastDepositTimestamp[from] > lastDepositTimestamp[to]) { require(!revertLockedTransfered[to], "Recipient refuses locked tokens"); lastDepositTimestamp[to] = lastDepositTimestamp[from]; } } function updateSnapshots() private { uint256 singleUnitFundingFee = feesModel.updateSnapshots(); totalFundingFeesAmount = totalFundingFeesAmount.add(singleUnitFundingFee.mul(totalPositionUnitsAmount).div(PRECISION_DECIMALS)); } function collectProfit(uint256 amount) private { if (address(feesCollector) != address(0)) { feesCollector.sendProfit(amount, token); } } function checkAndLiquidatePosition(address _positionAddress) private returns (bool wasLiquidated, uint256 liquidatedAmount, bool isPositive) { (uint256 currentPositionBalance, bool isBalancePositive) = _calculatePositionBalance(_positionAddress); isPositive = isBalancePositive; liquidatedAmount = currentPositionBalance; if (liquidation.isLiquidationCandidate(currentPositionBalance, isBalancePositive, positions[_positionAddress].positionUnitsAmount)) { liquidatePosition(_positionAddress, currentPositionBalance, isBalancePositive); wasLiquidated = true; } } function liquidatePosition(address _positionAddress, uint256 liquidatedAmount, bool isPositive) private { Position memory position = positions[_positionAddress]; totalPositionUnitsAmount = totalPositionUnitsAmount.sub(position.positionUnitsAmount); totalFundingFeesAmount = totalFundingFeesAmount.sub(position.pendingFees); removePosition(_positionAddress); emit LiquidatePosition(_positionAddress, liquidatedAmount, isPositive, position.positionUnitsAmount); } function removePosition(address _positionAddress) private { uint256 positionIndex = positions[_positionAddress].positionAddressesIndex; if (holdersAddresses.length > 1) { holdersAddresses[positionIndex] = holdersAddresses[holdersAddresses.length.sub(1)]; positions[holdersAddresses[positionIndex]].positionAddressesIndex = positionIndex; } holdersAddresses.pop(); delete positions[_positionAddress]; } function _calculatePositionBalance(address _positionAddress) private view returns (uint256 currentPositionBalance, bool isPositive) { Position memory position = positions[_positionAddress]; (uint16 cviValue,) = cviOracle.getCVILatestRoundData(); uint256 pendingFeesAmount = position.pendingFees.add(feesModel.calculateFundingFees(position.creationTimestamp, position.positionUnitsAmount)) .add(feesModel.calculateFundingFeesAddendum(position.positionUnitsAmount)); uint256 positionBalanceWithoutFees = position.positionUnitsAmount.mul(cviValue).div(MAX_CVI_VALUE); if (positionBalanceWithoutFees >= pendingFeesAmount) { currentPositionBalance = positionBalanceWithoutFees.sub(pendingFeesAmount); isPositive = true; } else { currentPositionBalance = pendingFeesAmount.sub(positionBalanceWithoutFees); } } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.6.2; pragma experimental ABIEncoderV2; interface ICVIOracle { function getCVIRoundData(uint80 roundId) external view returns (uint16 cviValue, uint256 cviTimestamp); function getCVILatestRoundData() external view returns (uint16 cviValue, uint80 cviRoundId); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.6.2; pragma experimental ABIEncoderV2; interface IFeesCalculator { struct CVIValue { uint256 period; uint16 cviValue; } function updateTurbulenceIndicatorPercent(uint256[] calldata periods) external returns (uint16); function setTurbulenceUpdator(address newUpdator) external; function setDepositFee(uint16 newDepositFeePercentage) external; function setWithdrawFee(uint16 newWithdrawFeePercentage) external; function setOpenPositionFee(uint16 newOpenPositionFeePercentage) external; function setClosePositionFee(uint16 newClosePositionFeePercentage) external; function setClosePositionMaxFee(uint16 newClosePositionMaxFeePercentage) external; function setClosePositionFeeDecay(uint256 newClosePositionFeeDecayPeriod) external; function setOracleHeartbeatPeriod(uint256 newOracleHeartbeatPeriod) external; function setBuyingPremiumFeeMax(uint16 newBuyingPremiumFeeMaxPercentage) external; function setBuyingPremiumThreshold(uint16 newBuyingPremiumThreshold) external; function setTurbulenceStep(uint16 newTurbulenceStepPercentage) external; function setTurbulenceFeeMinPercentThreshold(uint16 _newTurbulenceFeeMinPercentThreshold) external; function calculateBuyingPremiumFee(uint256 tokenAmount, uint256 collateralRatio) external view returns (uint256 buyingPremiumFee); function calculateSingleUnitFundingFee(CVIValue[] calldata cviValues) external pure returns (uint256 fundingFee); function calculateClosePositionFeePercent(uint256 creationTimestamp) external view returns (uint16); function calculateWithdrawFeePercent(uint256 lastDepositTimestamp) external view returns (uint16); function depositFeePercent() external returns (uint16); function withdrawFeePercent() external returns (uint16); function openPositionFeePercent() external returns (uint16); function closePositionFeePercent() external returns (uint16); function buyingPremiumFeeMaxPercent() external returns (uint16); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.6.2; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IFeesCollector { function sendProfit(uint256 amount, IERC20 token) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.6.2; pragma experimental ABIEncoderV2; import "./ICVIOracle.sol"; import "./IFeesCalculator.sol"; interface IFeesModel { function updateSnapshots() external returns (uint256); function setCVIOracle(ICVIOracle newOracle) external; function setFeesCalculator(IFeesCalculator newCalculator) external; function setLatestOracleRoundId(uint80 newOracleRoundId) external; function setMaxOracleValuesUsed(uint80 newMaxOracleValuesUsed) external; function calculateFundingFees(uint256 startTime, uint256 positionUnitsAmount) external view returns (uint256); function calculateFundingFees(uint256 startTime, uint256 endTime, uint256 positionUnitsAmount) external view returns (uint256); function calculateFundingFeesAddendum(uint256 positionUnitsAmount) external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.6.2; pragma experimental ABIEncoderV2; interface ILiquidation { function setMinLiquidationThreshold(uint16 newMinThreshold) external; function setMinLiquidationReward(uint16 newMaxRewardAmount) external; function setMaxLiquidationReward(uint16 newMaxRewardAmount) external; function isLiquidationCandidate(uint256 positionBalance, bool isPositive, uint256 positionUnitsAmount) external view returns (bool); function getLiquidationReward(uint256 positionBalance, bool isPositive, uint256 positionUnitsAmount) external view returns (uint256 finderFeeAmount); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.6.2; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./IRewards.sol"; import "./ICVIOracle.sol"; import "./IFeesModel.sol"; import "./IFeesCollector.sol"; import "./IFeesCalculator.sol"; import "./ILiquidation.sol"; interface IPlatform { event Deposit(address indexed account, uint256 tokenAmount, uint256 lpTokensAmount, uint256 feeAmount); event Withdraw(address indexed account, uint256 tokenAmount, uint256 lpTokensAmount, uint256 feeAmount); event OpenPosition(address indexed account, uint256 tokenAmount, uint256 feeAmount, uint256 positionUnitsAmount, uint256 cviValue); event ClosePosition(address indexed account, uint256 tokenAmount, uint256 feeAmount, uint256 positionUnitsAmount, uint256 cviValue); event LiquidatePosition(address indexed positionAddress, uint256 currentPositionBalance, bool isBalancePositive, uint256 positionUnitsAmount); function deposit(uint256 tokenAmount, uint256 minLPTokenAmount) external returns (uint256 lpTokenAmount); function withdraw(uint256 tokenAmount, uint256 maxLPTokenBurnAmount) external returns (uint256 burntAmount, uint256 withdrawnAmount); function withdrawLPTokens(uint256 lpTokenAmount) external returns (uint256 burntAmount, uint256 withdrawnAmount); function openPosition(uint256 tokenAmount, uint16 maxCVI) external returns (uint256 positionUnitsAmount); function closePosition(uint256 positionUnitsAmount, uint16 minCVI) external returns (uint256 tokenAmount); function liquidatePositions(address[] calldata positionOwners) external returns (uint256 finderFeeAmount); function setRevertLockedTransfers(bool revertLockedTransfers) external; function setFeesCollector(IFeesCollector newCollector) external; function setFeesCalculator(IFeesCalculator newCalculator) external; function setFeesModel(IFeesModel newModel) external; function setCVIOracle(ICVIOracle newOracle) external; function setRewards(IRewards newRewards) external; function setLiquidation(ILiquidation newLiquidation) external; function setLPLockupPeriod(uint256 newLPLockupPeriod) external; function setBuyersLockupPeriod(uint256 newBuyersLockupPeriod) external; function setEmergencyWithdrawAllowed(bool newEmergencyWithdrawAllowed) external; function getToken() external view returns (IERC20); function calculatePositionBalance(address positionAddress) external view returns (uint256 currentPositionBalance, bool isPositive, uint256 positionUnitsAmount); function calculatePositionPendingFees(address _positionAddress) external view returns (uint256 pendingFees); function totalBalance() external view returns (uint256 balance); function totalBalanceWithAddendum() external view returns (uint256 balance); function getLiquidableAddresses() external view returns (address[] memory); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.6.2; pragma experimental ABIEncoderV2; interface IRewards { function reward(address account, uint256 positionUnits) external; function claimReward(uint256[] memory openPositionDays) external; function setRewarder(address newRewarder) external; function setDailyReward(uint256 newDailyReward) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath16 { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint16 a, uint16 b) internal pure returns (uint16) { uint16 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint16 a, uint16 b) internal pure returns (uint16) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint16 a, uint16 b, string memory errorMessage) internal pure returns (uint16) { require(b <= a, errorMessage); uint16 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint16 a, uint16 b) internal pure returns (uint16) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint16 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint16 a, uint16 b) internal pure returns (uint16) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint16 a, uint16 b, string memory errorMessage) internal pure returns (uint16) { require(b > 0, errorMessage); uint16 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint16 a, uint16 b) internal pure returns (uint16) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint16 a, uint16 b, string memory errorMessage) internal pure returns (uint16) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "../GSN/Context.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. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "../../GSN/Context.sol"; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name, string memory symbol) public { _name = name; _symbol = symbol; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.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 SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"string","name":"_lpTokenName","type":"string"},{"internalType":"string","name":"_lpTokenSymbolName","type":"string"},{"internalType":"uint256","name":"_initialTokenToLPTokenRate","type":"uint256"},{"internalType":"contract IFeesModel","name":"_feesModel","type":"address"},{"internalType":"contract IFeesCalculator","name":"_feesCalculator","type":"address"},{"internalType":"contract ICVIOracle","name":"_cviOracle","type":"address"},{"internalType":"contract ILiquidation","name":"_liquidation","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"positionUnitsAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cviValue","type":"uint256"}],"name":"ClosePosition","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpTokensAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"positionAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"currentPositionBalance","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isBalancePositive","type":"bool"},{"indexed":false,"internalType":"uint256","name":"positionUnitsAmount","type":"uint256"}],"name":"LiquidatePosition","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"positionUnitsAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cviValue","type":"uint256"}],"name":"OpenPosition","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpTokensAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"MAX_CVI_VALUE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FEE_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRECISION_DECIMALS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyersLockupPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_positionAddress","type":"address"}],"name":"calculatePositionBalance","outputs":[{"internalType":"uint256","name":"currentPositionBalance","type":"uint256"},{"internalType":"bool","name":"isPositive","type":"bool"},{"internalType":"uint256","name":"positionUnitsAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_positionAddress","type":"address"}],"name":"calculatePositionPendingFees","outputs":[{"internalType":"uint256","name":"pendingFees","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_positionUnitsAmount","type":"uint256"},{"internalType":"uint16","name":"_minCVI","type":"uint16"}],"name":"closePosition","outputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"internalType":"uint256","name":"_minLPTokenAmount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"lpTokenAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdrawAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLiquidableAddresses","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialTokenToLPTokenRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastDepositTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_positionOwners","type":"address[]"}],"name":"liquidatePositions","outputs":[{"internalType":"uint256","name":"finderFeeAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lpsLockupPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"internalType":"uint16","name":"_maxCVI","type":"uint16"}],"name":"openPosition","outputs":[{"internalType":"uint256","name":"positionUnitsAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"positions","outputs":[{"internalType":"uint256","name":"positionUnitsAmount","type":"uint256"},{"internalType":"uint256","name":"creationTimestamp","type":"uint256"},{"internalType":"uint256","name":"pendingFees","type":"uint256"},{"internalType":"uint256","name":"positionAddressesIndex","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"revertLockedTransfered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newBuyersLockupPeriod","type":"uint256"}],"name":"setBuyersLockupPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ICVIOracle","name":"_newOracle","type":"address"}],"name":"setCVIOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_newEmergencyWithdrawAllowed","type":"bool"}],"name":"setEmergencyWithdrawAllowed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IFeesCalculator","name":"_newCalculator","type":"address"}],"name":"setFeesCalculator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IFeesCollector","name":"_newCollector","type":"address"}],"name":"setFeesCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IFeesModel","name":"_newModel","type":"address"}],"name":"setFeesModel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newLPLockupPeriod","type":"uint256"}],"name":"setLPLockupPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ILiquidation","name":"_newLiquidation","type":"address"}],"name":"setLiquidation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_revertLockedTransfers","type":"bool"}],"name":"setRevertLockedTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IRewards","name":"_newRewards","type":"address"}],"name":"setRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBalanceWithAddendum","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalFundingFeesAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPositionUnitsAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"internalType":"uint256","name":"_maxLPTokenBurnAmount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"burntAmount","type":"uint256"},{"internalType":"uint256","name":"withdrawnAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lpTokensAmount","type":"uint256"}],"name":"withdrawLPTokens","outputs":[{"internalType":"uint256","name":"burntAmount","type":"uint256"},{"internalType":"uint256","name":"withdrawnAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040526203f480600d5562015180600e556011805460ff191690553480156200002957600080fd5b50604051620044b3380380620044b38339810160408190526200004c9162000299565b868660006200005a62000152565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000b990600490602085019062000156565b508051620000cf90600590602084019062000156565b505060068054601260ff1990911617610100600160a81b0319166101006001600160a01b039b8c160217905550608094909452600a80546001600160a01b0319908116948916949094179055600b805484169288169290921790915560078054831691871691909117905560098054909116919094161790925550620003909050565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200019957805160ff1916838001178555620001c9565b82800160010185558215620001c9579182015b82811115620001c9578251825591602001919060010190620001ac565b50620001d7929150620001db565b5090565b5b80821115620001d75760008155600101620001dc565b600082601f83011262000203578081fd5b81516001600160401b03808211156200021a578283fd5b6040516020601f8401601f19168201810183811183821017156200023c578586fd5b806040525081945083825286818588010111156200025957600080fd5b600092505b838310156200027d57858301810151828401820152918201916200025e565b838311156200028f5760008185840101525b5050505092915050565b600080600080600080600080610100898b031215620002b6578384fd5b8851620002c38162000377565b60208a01519098506001600160401b0380821115620002e0578586fd5b620002ee8c838d01620001f2565b985060408b015191508082111562000304578586fd5b50620003138b828c01620001f2565b9650506060890151945060808901516200032d8162000377565b60a08a0151909450620003408162000377565b60c08a0151909350620003538162000377565b60e08a0151909250620003668162000377565b809150509295985092959890939650565b6001600160a01b03811681146200038d57600080fd5b50565b608051614103620003b060003980610f245280612b7752506141036000f3fe608060405234801561001057600080fd5b50600436106102bb5760003560e01c80636c71564111610182578063a9059cbb116100e9578063dd62ed3e116100a2578063ebc1daf61161007c578063ebc1daf6146105cc578063ec38a862146105d4578063f2fde38b146105e7578063f59ce838146105fa576102bb565b8063dd62ed3e14610593578063e2bbb158146105a6578063e611f8ba146105b9576102bb565b8063a9059cbb14610542578063ab919ee314610555578063aceda7f914610568578063ad7a672f14610570578063b00446b814610578578063b152b29514610580576102bb565b80638dea70411161013b5780638dea7041146104e25780638eb50a38146104f557806395d89b41146104fd578063a457c2d714610505578063a6ca982c14610518578063a8a1eb8c1461053a576102bb565b80636c7156411461048657806370a0823114610499578063715018a6146104ac578063745dd850146104b457806385da0561146104c75780638da5cb5b146104da576102bb565b8063373071f2116102265780634c255c97116101df5780634c255c9714610430578063547ef3e614610438578063558e44d31461044057806355f575101461044857806360ebfee61461046b578063655d8dec14610473576102bb565b8063373071f2146103b057806339509351146103c35780633f2cdd6c146103d6578063441a3e70146103e9578063452d003f1461040a5780634936b4571461041d576102bb565b806321df0da71161027857806321df0da71461034e57806323b872dd146103635780632c31f26b146103765780632f811c221461038b578063313ce5671461039357806332527992146103a8576102bb565b8063068c4db0146102c057806306fdde03146102e9578063095ea7b3146102fe578063124805861461031e57806318160ddd146103315780631a8dd8f714610339575b600080fd5b6102d36102ce3660046136b6565b61060d565b6040516102e09190613f37565b60405180910390f35b6102f1610622565b6040516102e091906137da565b61031161030c36600461355c565b6106b8565b6040516102e091906137cf565b6102d361032c366004613587565b6106d6565b6102d36106e2565b61034c6103473660046134c8565b6106e8565b005b610356610748565b6040516102e09190613717565b61031161037136600461351c565b61075c565b61037e6107e3565b6040516102e09190613782565b6102d3610a44565b61039b610a4a565b6040516102e09190613fcb565b6102d3610a53565b61034c6103be3660046134c8565b610a59565b6103116103d136600461355c565b610ad8565b61034c6103e4366004613686565b610b26565b6103fc6103f73660046136da565b610b83565b6040516102e0929190613f6d565b6103fc610418366004613686565b610b9f565b6102d361042b3660046136b6565b610bdb565b6102d3610be9565b6102d3610bf0565b6102d3610bf6565b61045b6104563660046134c8565b610bfc565b6040516102e09493929190613fb0565b6102d3610c23565b6102d36104813660046134c8565b610c2c565b61034c6104943660046134c8565b610c3e565b6102d36104a73660046134c8565b610c95565b61034c610cb0565b61034c6104c23660046135f6565b610d2f565b61034c6104d5366004613686565b610d4f565b610356610dac565b6102d36104f03660046134c8565b610dbb565b6102d3610f22565b6102f1610f46565b61031161051336600461355c565b610fa7565b61052b6105263660046134c8565b61100f565b6040516102e093929190613f40565b6102d361105c565b61031161055036600461355c565b6110f1565b61034c6105633660046134c8565b611105565b61031161115c565b6102d3611165565b6102d36112a3565b61031161058e3660046134c8565b6112a9565b6102d36105a13660046134e4565b6112be565b6102d36105b43660046136da565b6112e9565b61034c6105c73660046134c8565b6112f7565b6102d361134e565b61034c6105e23660046134c8565b611354565b61034c6105f53660046134c8565b6113ab565b61034c6106083660046135f6565b611461565b600061061b838360016114a9565b9392505050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106ae5780601f10610683576101008083540402835291602001916106ae565b820191906000526020600020905b81548152906001019060200180831161069157829003601f168201915b5050505050905090565b60006106cc6106c5611c44565b8484611c48565b5060015b92915050565b600061061b8383611cfc565b60035490565b6106f0611c44565b6000546001600160a01b039081169116146107265760405162461bcd60e51b815260040161071d90613ae6565b60405180910390fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60065461010090046001600160a01b031690565b6000610769848484611e73565b6107d984610775611c44565b6107d485604051806060016040528060288152602001614081602891396001600160a01b038a166000908152600260205260408120906107b3611c44565b6001600160a01b031681526020810191909152604001600020549190611f88565b611c48565b5060019392505050565b601554606090819067ffffffffffffffff8111801561080157600080fd5b5060405190808252806020026020018201604052801561082b578160200160208202803683370190505b5090506000805b6015548110156109aa576000806108696015848154811061084f57fe5b6000918252602090912001546001600160a01b0316611fb4565b91509150600960009054906101000a90046001600160a01b03166001600160a01b031663f66f29e8838360136000601589815481106108a457fe5b60009182526020808320909101546001600160a01b0316835282019290925260409081019091205490516001600160e01b031960e086901b1681526108ee93929190600401613f40565b60206040518083038186803b15801561090657600080fd5b505afa15801561091a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093e9190613612565b156109a0576015838154811061095057fe5b9060005260206000200160009054906101000a90046001600160a01b031685858151811061097a57fe5b6001600160a01b039092166020928302919091019091015261099d8460016121ee565b93505b5050600101610832565b5060608167ffffffffffffffff811180156109c457600080fd5b506040519080825280602002602001820160405280156109ee578160200160208202803683370190505b50905060005b82811015610a3c57838181518110610a0857fe5b6020026020010151828281518110610a1c57fe5b6001600160a01b03909216602092830291909101909101526001016109f4565b509250505090565b600f5481565b60065460ff1690565b600d5481565b610a61611c44565b6000546001600160a01b03908116911614610a8e5760405162461bcd60e51b815260040161071d90613ae6565b600c80546001600160a01b0319166001600160a01b03831690811790915515610ad557600c54600654610ad5916001600160a01b0361010090920482169116600019612213565b50565b60006106cc610ae5611c44565b846107d48560026000610af6611c44565b6001600160a01b03908116825260208083019390935260409182016000908120918c1681529252902054906121ee565b610b2e611c44565b6000546001600160a01b03908116911614610b5b5760405162461bcd60e51b815260040161071d90613ae6565b62093a80811115610b7e5760405162461bcd60e51b815260040161071d90613ea0565b600e55565b600080610b94846000856001612312565b909590945092505050565b60008060008311610bc25760405162461bcd60e51b815260040161071d90613ec9565b610bd160006001856001612312565b9094909350915050565b600061061b838360016125b6565b620f424081565b60105481565b61271081565b60136020526000908152604090208054600182015460028301546003909301549192909184565b6402540be40081565b60126020526000908152604090205481565b610c46611c44565b6000546001600160a01b03908116911614610c735760405162461bcd60e51b815260040161071d90613ae6565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b031660009081526001602052604090205490565b610cb8611c44565b6000546001600160a01b03908116911614610ce55760405162461bcd60e51b815260040161071d90613ae6565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b336000908152601460205260409020805460ff1916911515919091179055565b610d57611c44565b6000546001600160a01b03908116911614610d845760405162461bcd60e51b815260040161071d90613ae6565b62127500811115610da75760405162461bcd60e51b815260040161071d90613ea0565b600d55565b6000546001600160a01b031690565b6000610dc56134a0565b506001600160a01b03808316600090815260136020908152604091829020825160808101845281548082526001830154938201939093526002820154818501526003909101546060820152600a549251635d04754160e11b8152909361061b93169163ba08ea8291610e3a9190600401613f37565b60206040518083038186803b158015610e5257600080fd5b505afa158015610e66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8a919061369e565b600a54602084015184516040516389518c8760e01b8152610f1c936001600160a01b0316926389518c8792610ec192600401613f6d565b60206040518083038186803b158015610ed957600080fd5b505afa158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f11919061369e565b6040850151906121ee565b906121ee565b7f000000000000000000000000000000000000000000000000000000000000000081565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106ae5780601f10610683576101008083540402835291602001916106ae565b60006106cc610fb4611c44565b846107d4856040518060600160405280602581526020016140a96025913960026000610fde611c44565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611f88565b6001600160a01b0381166000908152601360205260408120548190806110475760405162461bcd60e51b815260040161071d9061396f565b61105084611fb4565b90959094509092509050565b600a54600f54604051635d04754160e11b81526000926110ec926001600160a01b039091169163ba08ea829161109491600401613f37565b60206040518083038186803b1580156110ac57600080fd5b505afa1580156110c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e4919061369e565b610f1c611165565b905090565b60006106cc6110fe611c44565b8484611e73565b61110d611c44565b6000546001600160a01b0390811691161461113a5760405162461bcd60e51b815260040161071d90613ae6565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b60115460ff1681565b6007546040805163c1639a2b60e01b8152815160009384936001600160a01b039091169263c1639a2b9260048083019392829003018186803b1580156111aa57600080fd5b505afa1580156111be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e2919061364a565b50905061129d601054610f1c611213614e2061120d8661ffff16600f546129b790919063ffffffff16565b906129f1565b6006546040516370a0823160e01b81526101009091046001600160a01b0316906370a0823190611247903090600401613717565b60206040518083038186803b15801561125f57600080fd5b505afa158015611273573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611297919061369e565b90612a33565b91505090565b614e2081565b60146020526000908152604090205460ff1681565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b600061061b83836001612a75565b6112ff611c44565b6000546001600160a01b0390811691161461132c5760405162461bcd60e51b815260040161071d90613ae6565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b600e5481565b61135c611c44565b6000546001600160a01b039081169116146113895760405162461bcd60e51b815260040161071d90613ae6565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6113b3611c44565b6000546001600160a01b039081169116146113e05760405162461bcd60e51b815260040161071d90613ae6565b6001600160a01b0381166114065760405162461bcd60e51b815260040161071d90613885565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b611469611c44565b6000546001600160a01b039081169116146114965760405162461bcd60e51b815260040161071d90613ae6565b6011805460ff1916911515919091179055565b60008084116114ca5760405162461bcd60e51b815260040161071d90613bb4565b60008361ffff161180156114e45750614e208361ffff1611155b6115005760405162461bcd60e51b815260040161071d90613b89565b6007546040805163c1639a2b60e01b815281516000936001600160a01b03169263c1639a2b9260048082019391829003018186803b15801561154157600080fd5b505afa158015611555573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611579919061364a565b5090508361ffff168161ffff1611156115a45760405162461bcd60e51b815260040161071d906139a6565b6115ac612c64565b600061164a61271061120d600b60009054906101000a90046001600160a01b03166001600160a01b031663a2028d976040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561160757600080fd5b505af115801561161b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163f919061362e565b899061ffff166129b7565b9050600061166c61ffff841661120d614e206116668b87612a33565b906129b7565b9050600061171861271061120d611711600b60009054906101000a90046001600160a01b03166001600160a01b031663dfc4d2136040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156116cc57600080fd5b505af11580156116e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611704919061362e565b6127109061ffff16612a33565b85906129b7565b6006546040516370a0823160e01b8152919250600091829161010090046001600160a01b0316906370a0823190611753903090600401613717565b60206040518083038186803b15801561176b57600080fd5b505afa15801561177f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a3919061369e565b111561185d576006546040516370a0823160e01b815261185a9161183c918791611297918e9161010090046001600160a01b0316906370a08231906117ec903090600401613717565b60206040518083038186803b15801561180457600080fd5b505afa158015611818573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1c919061369e565b61120d6402540be40061166686600f546121ee90919063ffffffff16565b90505b600b54604051633536d92560e01b81526000916001600160a01b031690633536d92590611890908d908690600401613f6d565b60206040518083038186803b1580156118a857600080fd5b505afa1580156118bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e0919061369e565b905060006118f2826112978d89612a33565b905061190861ffff881661120d83614e206129b7565b600f5490985061191890896121ee565b600f5533600090815260136020526040902054156119fa573360009081526013602052604090819020600a5460018201548254935163124e384560e01b815292936119db936001600160a01b039093169263124e384592611980929091429190600401613f7b565b60206040518083038186803b15801561199857600080fd5b505afa1580156119ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d0919061369e565b6002830154906121ee565b600282015580546119ec908a6121ee565b815542600190910155611a98565b611a026134a0565b5060408051608081018252898152426020808301918252600083850181815260158054606087019081523380855260139095529683209551865593516001808701919091559051600286015594516003909401939093558154938401825591527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec47590910180546001600160a01b03191690911790555b337f4941de5e673640f9e84addc3e999d06b1fbb1b2760106594b9f81cbf5e0ac78f8c611ac589866121ee565b3360009081526013602052604090819020549051611ae7939291908d90613f91565b60405180910390a28815611b1257600654611b129061010090046001600160a01b031633308e612d14565b611b1b86612d3b565b6006546040516370a0823160e01b81526101009091046001600160a01b0316906370a0823190611b4f903090600401613717565b60206040518083038186803b158015611b6757600080fd5b505afa158015611b7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b9f919061369e565b600f541115611bc05760405162461bcd60e51b815260040161071d90613d71565b6008546001600160a01b031615611c36576008546040516310b3879160e11b81526001600160a01b03909116906321670f2290611c039033908c9060040161372b565b600060405180830381600087803b158015611c1d57600080fd5b505af1158015611c31573d6000803e3d6000fd5b505050505b505050505050509392505050565b3390565b6001600160a01b038316611c6e5760405162461bcd60e51b815260040161071d90613c9a565b6001600160a01b038216611c945760405162461bcd60e51b815260040161071d906138cb565b6001600160a01b0380841660008181526002602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590611cef908590613f37565b60405180910390a3505050565b6000611d06612c64565b6000805b83811015611e3257600060136000878785818110611d2457fe5b9050602002016020810190611d3991906134c8565b6001600160a01b03168152602081019190915260400160009081205491508080611d82898987818110611d6857fe5b9050602002016020810190611d7d91906134c8565b612dbe565b9250925092508215611e22576009546040516332d1de6760e01b815260019750611e1f916001600160a01b0316906332d1de6790611dc890869086908a90600401613f40565b60206040518083038186803b158015611de057600080fd5b505afa158015611df4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e18919061369e565b88906121ee565b96505b505060019092019150611d0a9050565b5080611e505760405162461bcd60e51b815260040161071d90613a1f565b600654611e6c9061010090046001600160a01b03163384612e8c565b5092915050565b6001600160a01b038316611e995760405162461bcd60e51b815260040161071d90613c2c565b6001600160a01b038216611ebf5760405162461bcd60e51b815260040161071d9061380d565b611eca838383612eab565b611f078160405180606001604052806026815260200161405b602691396001600160a01b0386166000908152600160205260409020549190611f88565b6001600160a01b038085166000908152600160205260408082209390935590841681522054611f3690826121ee565b6001600160a01b0380841660008181526001602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611cef908590613f37565b60008184841115611fac5760405162461bcd60e51b815260040161071d91906137da565b505050900390565b600080611fbf6134a0565b506001600160a01b038084166000908152601360209081526040808320815160808101835281548152600182015493810193909352600281015483830152600301546060830152600754815163c1639a2b60e01b815282519395919091169263c1639a2b92600480840193919291829003018186803b15801561204157600080fd5b505afa158015612055573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612079919061364a565b50600a548351604051635d04754160e11b8152929350600092612195926001600160a01b03169163ba08ea82916120b39190600401613f37565b60206040518083038186803b1580156120cb57600080fd5b505afa1580156120df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612103919061369e565b600a54602086015186516040516389518c8760e01b8152610f1c936001600160a01b0316926389518c879261213a92600401613f6d565b60206040518083038186803b15801561215257600080fd5b505afa158015612166573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061218a919061369e565b6040870151906121ee565b905060006121ba614e2061120d8561ffff1687600001516129b790919063ffffffff16565b90508181106121d8576121cd8183612a33565b9550600194506121e5565b6121e28282612a33565b95505b50505050915091565b60008282018381101561061b5760405162461bcd60e51b815260040161071d90613938565b80158061229b5750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906122499030908690600401613744565b60206040518083038186803b15801561226157600080fd5b505afa158015612275573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612299919061369e565b155b6122b75760405162461bcd60e51b815260040161071d90613e4a565b61230d8363095ea7b360e01b84846040516024016122d692919061372b565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f66565b505050565b600d543360009081526012602052604081205490918291429161233591906121ee565b11156123535760405162461bcd60e51b815260040161071d90613e20565b61235b612c64565b84156123815783915061237a61236f6106e2565b61120d611711611165565b95506123ea565b600086116123a15760405162461bcd60e51b815260040161071d90613bb4565b6123c86001610f1c6123b1611165565b61120d60016112976123c16106e2565b8d906129b7565b9150838211156123ea5760405162461bcd60e51b815260040161071d90613b52565b6123f333610c95565b8211156124125760405162461bcd60e51b815260040161071d90613850565b60006124b061271061120d600b60009054906101000a90046001600160a01b03166001600160a01b031663495ef7056040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561246d57600080fd5b505af1158015612481573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a5919061362e565b8a9061ffff166129b7565b90506124bc8782612a33565b60115490925060ff1680612516575081612513600f54600660019054906101000a90046001600160a01b03166001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016112479190613717565b10155b6125325760405162461bcd60e51b815260040161071d90613d15565b336001600160a01b03167f02f25270a4d87bea75db541cdfe559334a275b4a233520ed6c0a2429667cca9488858460405161256f93929190613f7b565b60405180910390a26125813384612ff5565b83156125a3576006546125a39061010090046001600160a01b03163384612e8c565b6125ac81612d3b565b5094509492505050565b60008084116125d75760405162461bcd60e51b815260040161071d90613d9f565b60008361ffff161180156125f15750614e208361ffff1611155b61260d5760405162461bcd60e51b815260040161071d906139f4565b3360009081526013602052604090205484111561263c5760405162461bcd60e51b815260040161071d90613ab1565b600e543360009081526013602052604090206001015461265d904290612a33565b101561267b5760405162461bcd60e51b815260040161071d90613c71565b6007546040805163c1639a2b60e01b815281516000936001600160a01b03169263c1639a2b9260048082019391829003018186803b1580156126bc57600080fd5b505afa1580156126d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126f4919061364a565b5090508361ffff168161ffff16101561271f5760405162461bcd60e51b815260040161071d90613d4c565b612727612c64565b3360009081526013602052604081209061274b614e2061120d8961ffff87166129b7565b600a54600184015460405163124e384560e01b815292935083926000926001600160a01b03169163124e384591612789919042908e90600401613f7b565b60206040518083038186803b1580156127a157600080fd5b505afa1580156127b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d9919061369e565b905060006127fc856000015461120d8c88600201546129b790919063ffffffff16565b905061280882826121ee565b84116128295761281733612dbe565b5050506000965050505050505061061b565b61283d61283683836121ee565b8590612a33565b9350600b546001860154604051636f6bb7a760e01b81526000926128db926127109261120d926001600160a01b031691636f6bb7a7916128809190600401613f37565b60206040518083038186803b15801561289857600080fd5b505afa1580156128ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128d0919061362e565b889061ffff166129b7565b86549091506128ea908c612a33565b8655600f546128f9908c612a33565b600f5585541561291c5760028601546129129083612a33565b6002870155612925565b612925336130d7565b61292f8582612a33565b9750337f809fd47bf4a7ee8bf942a84e859111b23397cb1fbe862a8893adc2e04fd756e78561296286610f1c86886121ee565b3360009081526013602052604090819020549051612984939291908d90613f91565b60405180910390a261299581612d3b565b8815611c3657600654611c369061010090046001600160a01b0316338a612e8c565b6000826129c6575060006106d0565b828202828482816129d357fe5b041461061b5760405162461bcd60e51b815260040161071d90613a70565b600061061b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613206565b600061061b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611f88565b6000808411612a965760405162461bcd60e51b815260040161071d90613bb4565b336000908152601260205260409020429055612ab0612c64565b6000612b1f61271061120d600b60009054906101000a90046001600160a01b03166001600160a01b031663cc1252ae6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015612b0b57600080fd5b505af11580156128ac573d6000803e3d6000fd5b90506000612b2d8683612a33565b90506000612b396106e2565b90506000612b45611165565b9050600082118015612b575750600081115b15612b7157612b6a8161120d85856129b7565b9450612b9e565b612b9b837f00000000000000000000000000000000000000000000000000000000000000006129b7565b94505b336001600160a01b03167f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e898787604051612bdb93929190613f7b565b60405180910390a286851015612c035760405162461bcd60e51b815260040161071d9061390d565b60008511612c235760405162461bcd60e51b815260040161071d906139cc565b612c2d338661323d565b8515612c5057600654612c509061010090046001600160a01b031633308b612d14565b612c5984612d3b565b505050509392505050565b600a546040805163110e5fad60e21b815290516000926001600160a01b0316916344397eb491600480830192602092919082900301818787803b158015612caa57600080fd5b505af1158015612cbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ce2919061369e565b9050612d0e612d056402540be40061120d600f54856129b790919063ffffffff16565b601054906121ee565b60105550565b612d35846323b872dd60e01b8585856040516024016122d69392919061375e565b50505050565b600c546001600160a01b031615610ad557600c54600654604051638b0f154d60e01b81526001600160a01b0392831692638b0f154d92612d8992869261010090920490911690600401613f56565b600060405180830381600087803b158015612da357600080fd5b505af1158015612db7573d6000803e3d6000fd5b5050505050565b6000806000806000612dcf86611fb4565b6009546001600160a01b0389811660009081526013602052604090819020549051631ecde53d60e31b8152949850929650879550869450169163f66f29e891612e1e9186918691600401613f40565b60206040518083038186803b158015612e3657600080fd5b505afa158015612e4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e6e9190613612565b15612e8357612e7e8683836132f1565b600194505b50509193909250565b61230d8363a9059cbb60e01b84846040516024016122d692919061372b565b600d546001600160a01b0384166000908152601260205260409020544291612ed391906121ee565b118015612f0057506001600160a01b03808316600090815260126020526040808220549286168252902054115b1561230d576001600160a01b03821660009081526014602052604090205460ff1615612f3e5760405162461bcd60e51b815260040161071d90613b1b565b6001600160a01b03808416600090815260126020526040808220549285168252902055505050565b6060612fbb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166133bf9092919063ffffffff16565b80519091501561230d5780806020019051810190612fd99190613612565b61230d5760405162461bcd60e51b815260040161071d90613dd6565b6001600160a01b03821661301b5760405162461bcd60e51b815260040161071d90613beb565b61302782600083612eab565b61306481604051806060016040528060228152602001614039602291396001600160a01b0385166000908152600160205260409020549190611f88565b6001600160a01b03831660009081526001602052604090205560035461308a9082612a33565b6003556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906130cb908590613f37565b60405180910390a35050565b6001600160a01b038116600090815260136020526040902060030154601554600110156131a6576015805461310d906001612a33565b8154811061311757fe5b600091825260209091200154601580546001600160a01b03909216918390811061313d57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080601360006015848154811061317d57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020600301555b60158054806131b157fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0393909316815260139092525060408120818155600181018290556002810182905560030155565b600081836132275760405162461bcd60e51b815260040161071d91906137da565b50600083858161323357fe5b0495945050505050565b6001600160a01b0382166132635760405162461bcd60e51b815260040161071d90613f00565b61326f60008383612eab565b60035461327c90826121ee565b6003556001600160a01b0382166000908152600160205260409020546132a290826121ee565b6001600160a01b0383166000818152600160205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906130cb908590613f37565b6132f96134a0565b506001600160a01b03831660009081526013602090815260409182902082516080810184528154808252600183015493820193909352600282015493810193909352600301546060830152600f5461335091612a33565b600f55604081015160105461336491612a33565b601055613370846130d7565b836001600160a01b03167f302eaf71224bcd9ed28854139aa87a32dc89622b38a4d8ce4160475aa57a7f13848484600001516040516133b193929190613f40565b60405180910390a250505050565b60606133ce84846000856133d6565b949350505050565b60606133e18561349a565b6133fd5760405162461bcd60e51b815260040161071d90613cde565b60006060866001600160a01b0316858760405161341a91906136fb565b60006040518083038185875af1925050503d8060008114613457576040519150601f19603f3d011682016040523d82523d6000602084013e61345c565b606091505b509150915081156134705791506133ce9050565b8051156134805780518082602001fd5b8360405162461bcd60e51b815260040161071d91906137da565b3b151590565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b6000602082840312156134d9578081fd5b813561061b81614005565b600080604083850312156134f6578081fd5b823561350181614005565b9150602083013561351181614005565b809150509250929050565b600080600060608486031215613530578081fd5b833561353b81614005565b9250602084013561354b81614005565b929592945050506040919091013590565b6000806040838503121561356e578182fd5b823561357981614005565b946020939093013593505050565b60008060208385031215613599578182fd5b823567ffffffffffffffff808211156135b0578384fd5b818501915085601f8301126135c3578384fd5b8135818111156135d1578485fd5b86602080830285010111156135e4578485fd5b60209290920196919550909350505050565b600060208284031215613607578081fd5b813561061b8161401a565b600060208284031215613623578081fd5b815161061b8161401a565b60006020828403121561363f578081fd5b815161061b81614028565b6000806040838503121561365c578182fd5b825161366781614028565b602084015190925069ffffffffffffffffffff81168114613511578182fd5b600060208284031215613697578081fd5b5035919050565b6000602082840312156136af578081fd5b5051919050565b600080604083850312156136c8578182fd5b82359150602083013561351181614028565b600080604083850312156136ec578182fd5b50508035926020909101359150565b6000825161370d818460208701613fd9565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6020808252825182820181905260009190848201906040850190845b818110156137c35783516001600160a01b03168352928401929184019160010161379e565b50909695505050505050565b901515815260200190565b60006020825282518060208401526137f9816040850160208701613fd9565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252818101527f4e6f7420656e6f756768204c5020746f6b656e7320666f72206163636f756e74604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b602080825260119082015270546f6f20666577204c5020746f6b656e7360781b604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601d908201527f4e6f20706f736974696f6e20666f7220676976656e2061646472657373000000604082015260600190565b6020808252600c908201526b086ac9240e8dede40d0d2ced60a31b604082015260600190565b6020808252600e908201526d546f6f2066657720746f6b656e7360901b604082015260600190565b602080825260119082015270426164206d696e204356492076616c756560781b604082015260600190565b60208082526031908201527f4e6f207265706f7274656420706f736974696f6e2077617320666f756e6420746040820152706f206265206c6971756964617461626c6560781b606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4e6f7420656e6f756768206f70656e656420706f736974696f6e20756e697473604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f526563697069656e742072656675736573206c6f636b656420746f6b656e7300604082015260600190565b6020808252601a908201527f546f6f206d756368204c5020746f6b656e7320746f206275726e000000000000604082015260600190565b602080825260119082015270426164206d6178204356492076616c756560781b604082015260600190565b6020808252601e908201527f546f6b656e7320616d6f756e74206d75737420626520706f7369746976650000604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252600f908201526e141bdcda5d1a5bdb881b1bd8dad959608a1b604082015260600190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526017908201527f436f6c6c61746572616c20726174696f2062726f6b656e000000000000000000604082015260600190565b6020808252600b908201526a43564920746f6f206c6f7760a81b604082015260600190565b6020808252601490820152734e6f7420656e6f756768206c697175696469747960601b604082015260600190565b6020808252601b908201527f506f736974696f6e20756e697473206e6f7420706f7369746976650000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526010908201526f119d5b991cc8185c99481b1bd8dad95960821b604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b6020808252600f908201526e4c6f636b757020746f6f206c6f6e6760881b604082015260600190565b60208082526017908201527f416d6f756e74206d75737420626520706f736974697665000000000000000000604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b9283529015156020830152604082015260600190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b9384526020840192909252604083015261ffff16606082015260800190565b93845260208401929092526040830152606082015260800190565b60ff91909116815260200190565b60005b83811015613ff4578181015183820152602001613fdc565b83811115612d355750506000910152565b6001600160a01b0381168114610ad557600080fd5b8015158114610ad557600080fd5b61ffff81168114610ad557600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220c874a249c7dae2f148df9ba5d8cb084ac184c867425822a5b8f33443d716c68364736f6c634300060c0033000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000e8d4a51000000000000000000000000000f5ebf50661ee5b128dad3d71050520ccccc1060100000000000000000000000000000000000000000000000000000000000000000000000000000000000000004fde21b467f6cccfdea1b2b51886d9d0fd05491f000000000000000000000000bb2a8986f1feb41c374658bcd4a5e0b6b536ba1a0000000000000000000000000000000000000000000000000000000000000007555344542d4c50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007555344542d4c5000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102bb5760003560e01c80636c71564111610182578063a9059cbb116100e9578063dd62ed3e116100a2578063ebc1daf61161007c578063ebc1daf6146105cc578063ec38a862146105d4578063f2fde38b146105e7578063f59ce838146105fa576102bb565b8063dd62ed3e14610593578063e2bbb158146105a6578063e611f8ba146105b9576102bb565b8063a9059cbb14610542578063ab919ee314610555578063aceda7f914610568578063ad7a672f14610570578063b00446b814610578578063b152b29514610580576102bb565b80638dea70411161013b5780638dea7041146104e25780638eb50a38146104f557806395d89b41146104fd578063a457c2d714610505578063a6ca982c14610518578063a8a1eb8c1461053a576102bb565b80636c7156411461048657806370a0823114610499578063715018a6146104ac578063745dd850146104b457806385da0561146104c75780638da5cb5b146104da576102bb565b8063373071f2116102265780634c255c97116101df5780634c255c9714610430578063547ef3e614610438578063558e44d31461044057806355f575101461044857806360ebfee61461046b578063655d8dec14610473576102bb565b8063373071f2146103b057806339509351146103c35780633f2cdd6c146103d6578063441a3e70146103e9578063452d003f1461040a5780634936b4571461041d576102bb565b806321df0da71161027857806321df0da71461034e57806323b872dd146103635780632c31f26b146103765780632f811c221461038b578063313ce5671461039357806332527992146103a8576102bb565b8063068c4db0146102c057806306fdde03146102e9578063095ea7b3146102fe578063124805861461031e57806318160ddd146103315780631a8dd8f714610339575b600080fd5b6102d36102ce3660046136b6565b61060d565b6040516102e09190613f37565b60405180910390f35b6102f1610622565b6040516102e091906137da565b61031161030c36600461355c565b6106b8565b6040516102e091906137cf565b6102d361032c366004613587565b6106d6565b6102d36106e2565b61034c6103473660046134c8565b6106e8565b005b610356610748565b6040516102e09190613717565b61031161037136600461351c565b61075c565b61037e6107e3565b6040516102e09190613782565b6102d3610a44565b61039b610a4a565b6040516102e09190613fcb565b6102d3610a53565b61034c6103be3660046134c8565b610a59565b6103116103d136600461355c565b610ad8565b61034c6103e4366004613686565b610b26565b6103fc6103f73660046136da565b610b83565b6040516102e0929190613f6d565b6103fc610418366004613686565b610b9f565b6102d361042b3660046136b6565b610bdb565b6102d3610be9565b6102d3610bf0565b6102d3610bf6565b61045b6104563660046134c8565b610bfc565b6040516102e09493929190613fb0565b6102d3610c23565b6102d36104813660046134c8565b610c2c565b61034c6104943660046134c8565b610c3e565b6102d36104a73660046134c8565b610c95565b61034c610cb0565b61034c6104c23660046135f6565b610d2f565b61034c6104d5366004613686565b610d4f565b610356610dac565b6102d36104f03660046134c8565b610dbb565b6102d3610f22565b6102f1610f46565b61031161051336600461355c565b610fa7565b61052b6105263660046134c8565b61100f565b6040516102e093929190613f40565b6102d361105c565b61031161055036600461355c565b6110f1565b61034c6105633660046134c8565b611105565b61031161115c565b6102d3611165565b6102d36112a3565b61031161058e3660046134c8565b6112a9565b6102d36105a13660046134e4565b6112be565b6102d36105b43660046136da565b6112e9565b61034c6105c73660046134c8565b6112f7565b6102d361134e565b61034c6105e23660046134c8565b611354565b61034c6105f53660046134c8565b6113ab565b61034c6106083660046135f6565b611461565b600061061b838360016114a9565b9392505050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106ae5780601f10610683576101008083540402835291602001916106ae565b820191906000526020600020905b81548152906001019060200180831161069157829003601f168201915b5050505050905090565b60006106cc6106c5611c44565b8484611c48565b5060015b92915050565b600061061b8383611cfc565b60035490565b6106f0611c44565b6000546001600160a01b039081169116146107265760405162461bcd60e51b815260040161071d90613ae6565b60405180910390fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60065461010090046001600160a01b031690565b6000610769848484611e73565b6107d984610775611c44565b6107d485604051806060016040528060288152602001614081602891396001600160a01b038a166000908152600260205260408120906107b3611c44565b6001600160a01b031681526020810191909152604001600020549190611f88565b611c48565b5060019392505050565b601554606090819067ffffffffffffffff8111801561080157600080fd5b5060405190808252806020026020018201604052801561082b578160200160208202803683370190505b5090506000805b6015548110156109aa576000806108696015848154811061084f57fe5b6000918252602090912001546001600160a01b0316611fb4565b91509150600960009054906101000a90046001600160a01b03166001600160a01b031663f66f29e8838360136000601589815481106108a457fe5b60009182526020808320909101546001600160a01b0316835282019290925260409081019091205490516001600160e01b031960e086901b1681526108ee93929190600401613f40565b60206040518083038186803b15801561090657600080fd5b505afa15801561091a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093e9190613612565b156109a0576015838154811061095057fe5b9060005260206000200160009054906101000a90046001600160a01b031685858151811061097a57fe5b6001600160a01b039092166020928302919091019091015261099d8460016121ee565b93505b5050600101610832565b5060608167ffffffffffffffff811180156109c457600080fd5b506040519080825280602002602001820160405280156109ee578160200160208202803683370190505b50905060005b82811015610a3c57838181518110610a0857fe5b6020026020010151828281518110610a1c57fe5b6001600160a01b03909216602092830291909101909101526001016109f4565b509250505090565b600f5481565b60065460ff1690565b600d5481565b610a61611c44565b6000546001600160a01b03908116911614610a8e5760405162461bcd60e51b815260040161071d90613ae6565b600c80546001600160a01b0319166001600160a01b03831690811790915515610ad557600c54600654610ad5916001600160a01b0361010090920482169116600019612213565b50565b60006106cc610ae5611c44565b846107d48560026000610af6611c44565b6001600160a01b03908116825260208083019390935260409182016000908120918c1681529252902054906121ee565b610b2e611c44565b6000546001600160a01b03908116911614610b5b5760405162461bcd60e51b815260040161071d90613ae6565b62093a80811115610b7e5760405162461bcd60e51b815260040161071d90613ea0565b600e55565b600080610b94846000856001612312565b909590945092505050565b60008060008311610bc25760405162461bcd60e51b815260040161071d90613ec9565b610bd160006001856001612312565b9094909350915050565b600061061b838360016125b6565b620f424081565b60105481565b61271081565b60136020526000908152604090208054600182015460028301546003909301549192909184565b6402540be40081565b60126020526000908152604090205481565b610c46611c44565b6000546001600160a01b03908116911614610c735760405162461bcd60e51b815260040161071d90613ae6565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b031660009081526001602052604090205490565b610cb8611c44565b6000546001600160a01b03908116911614610ce55760405162461bcd60e51b815260040161071d90613ae6565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b336000908152601460205260409020805460ff1916911515919091179055565b610d57611c44565b6000546001600160a01b03908116911614610d845760405162461bcd60e51b815260040161071d90613ae6565b62127500811115610da75760405162461bcd60e51b815260040161071d90613ea0565b600d55565b6000546001600160a01b031690565b6000610dc56134a0565b506001600160a01b03808316600090815260136020908152604091829020825160808101845281548082526001830154938201939093526002820154818501526003909101546060820152600a549251635d04754160e11b8152909361061b93169163ba08ea8291610e3a9190600401613f37565b60206040518083038186803b158015610e5257600080fd5b505afa158015610e66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8a919061369e565b600a54602084015184516040516389518c8760e01b8152610f1c936001600160a01b0316926389518c8792610ec192600401613f6d565b60206040518083038186803b158015610ed957600080fd5b505afa158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f11919061369e565b6040850151906121ee565b906121ee565b7f000000000000000000000000000000000000000000000000000000e8d4a5100081565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106ae5780601f10610683576101008083540402835291602001916106ae565b60006106cc610fb4611c44565b846107d4856040518060600160405280602581526020016140a96025913960026000610fde611c44565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611f88565b6001600160a01b0381166000908152601360205260408120548190806110475760405162461bcd60e51b815260040161071d9061396f565b61105084611fb4565b90959094509092509050565b600a54600f54604051635d04754160e11b81526000926110ec926001600160a01b039091169163ba08ea829161109491600401613f37565b60206040518083038186803b1580156110ac57600080fd5b505afa1580156110c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e4919061369e565b610f1c611165565b905090565b60006106cc6110fe611c44565b8484611e73565b61110d611c44565b6000546001600160a01b0390811691161461113a5760405162461bcd60e51b815260040161071d90613ae6565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b60115460ff1681565b6007546040805163c1639a2b60e01b8152815160009384936001600160a01b039091169263c1639a2b9260048083019392829003018186803b1580156111aa57600080fd5b505afa1580156111be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e2919061364a565b50905061129d601054610f1c611213614e2061120d8661ffff16600f546129b790919063ffffffff16565b906129f1565b6006546040516370a0823160e01b81526101009091046001600160a01b0316906370a0823190611247903090600401613717565b60206040518083038186803b15801561125f57600080fd5b505afa158015611273573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611297919061369e565b90612a33565b91505090565b614e2081565b60146020526000908152604090205460ff1681565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b600061061b83836001612a75565b6112ff611c44565b6000546001600160a01b0390811691161461132c5760405162461bcd60e51b815260040161071d90613ae6565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b600e5481565b61135c611c44565b6000546001600160a01b039081169116146113895760405162461bcd60e51b815260040161071d90613ae6565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6113b3611c44565b6000546001600160a01b039081169116146113e05760405162461bcd60e51b815260040161071d90613ae6565b6001600160a01b0381166114065760405162461bcd60e51b815260040161071d90613885565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b611469611c44565b6000546001600160a01b039081169116146114965760405162461bcd60e51b815260040161071d90613ae6565b6011805460ff1916911515919091179055565b60008084116114ca5760405162461bcd60e51b815260040161071d90613bb4565b60008361ffff161180156114e45750614e208361ffff1611155b6115005760405162461bcd60e51b815260040161071d90613b89565b6007546040805163c1639a2b60e01b815281516000936001600160a01b03169263c1639a2b9260048082019391829003018186803b15801561154157600080fd5b505afa158015611555573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611579919061364a565b5090508361ffff168161ffff1611156115a45760405162461bcd60e51b815260040161071d906139a6565b6115ac612c64565b600061164a61271061120d600b60009054906101000a90046001600160a01b03166001600160a01b031663a2028d976040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561160757600080fd5b505af115801561161b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163f919061362e565b899061ffff166129b7565b9050600061166c61ffff841661120d614e206116668b87612a33565b906129b7565b9050600061171861271061120d611711600b60009054906101000a90046001600160a01b03166001600160a01b031663dfc4d2136040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156116cc57600080fd5b505af11580156116e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611704919061362e565b6127109061ffff16612a33565b85906129b7565b6006546040516370a0823160e01b8152919250600091829161010090046001600160a01b0316906370a0823190611753903090600401613717565b60206040518083038186803b15801561176b57600080fd5b505afa15801561177f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a3919061369e565b111561185d576006546040516370a0823160e01b815261185a9161183c918791611297918e9161010090046001600160a01b0316906370a08231906117ec903090600401613717565b60206040518083038186803b15801561180457600080fd5b505afa158015611818573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1c919061369e565b61120d6402540be40061166686600f546121ee90919063ffffffff16565b90505b600b54604051633536d92560e01b81526000916001600160a01b031690633536d92590611890908d908690600401613f6d565b60206040518083038186803b1580156118a857600080fd5b505afa1580156118bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e0919061369e565b905060006118f2826112978d89612a33565b905061190861ffff881661120d83614e206129b7565b600f5490985061191890896121ee565b600f5533600090815260136020526040902054156119fa573360009081526013602052604090819020600a5460018201548254935163124e384560e01b815292936119db936001600160a01b039093169263124e384592611980929091429190600401613f7b565b60206040518083038186803b15801561199857600080fd5b505afa1580156119ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d0919061369e565b6002830154906121ee565b600282015580546119ec908a6121ee565b815542600190910155611a98565b611a026134a0565b5060408051608081018252898152426020808301918252600083850181815260158054606087019081523380855260139095529683209551865593516001808701919091559051600286015594516003909401939093558154938401825591527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec47590910180546001600160a01b03191690911790555b337f4941de5e673640f9e84addc3e999d06b1fbb1b2760106594b9f81cbf5e0ac78f8c611ac589866121ee565b3360009081526013602052604090819020549051611ae7939291908d90613f91565b60405180910390a28815611b1257600654611b129061010090046001600160a01b031633308e612d14565b611b1b86612d3b565b6006546040516370a0823160e01b81526101009091046001600160a01b0316906370a0823190611b4f903090600401613717565b60206040518083038186803b158015611b6757600080fd5b505afa158015611b7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b9f919061369e565b600f541115611bc05760405162461bcd60e51b815260040161071d90613d71565b6008546001600160a01b031615611c36576008546040516310b3879160e11b81526001600160a01b03909116906321670f2290611c039033908c9060040161372b565b600060405180830381600087803b158015611c1d57600080fd5b505af1158015611c31573d6000803e3d6000fd5b505050505b505050505050509392505050565b3390565b6001600160a01b038316611c6e5760405162461bcd60e51b815260040161071d90613c9a565b6001600160a01b038216611c945760405162461bcd60e51b815260040161071d906138cb565b6001600160a01b0380841660008181526002602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590611cef908590613f37565b60405180910390a3505050565b6000611d06612c64565b6000805b83811015611e3257600060136000878785818110611d2457fe5b9050602002016020810190611d3991906134c8565b6001600160a01b03168152602081019190915260400160009081205491508080611d82898987818110611d6857fe5b9050602002016020810190611d7d91906134c8565b612dbe565b9250925092508215611e22576009546040516332d1de6760e01b815260019750611e1f916001600160a01b0316906332d1de6790611dc890869086908a90600401613f40565b60206040518083038186803b158015611de057600080fd5b505afa158015611df4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e18919061369e565b88906121ee565b96505b505060019092019150611d0a9050565b5080611e505760405162461bcd60e51b815260040161071d90613a1f565b600654611e6c9061010090046001600160a01b03163384612e8c565b5092915050565b6001600160a01b038316611e995760405162461bcd60e51b815260040161071d90613c2c565b6001600160a01b038216611ebf5760405162461bcd60e51b815260040161071d9061380d565b611eca838383612eab565b611f078160405180606001604052806026815260200161405b602691396001600160a01b0386166000908152600160205260409020549190611f88565b6001600160a01b038085166000908152600160205260408082209390935590841681522054611f3690826121ee565b6001600160a01b0380841660008181526001602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611cef908590613f37565b60008184841115611fac5760405162461bcd60e51b815260040161071d91906137da565b505050900390565b600080611fbf6134a0565b506001600160a01b038084166000908152601360209081526040808320815160808101835281548152600182015493810193909352600281015483830152600301546060830152600754815163c1639a2b60e01b815282519395919091169263c1639a2b92600480840193919291829003018186803b15801561204157600080fd5b505afa158015612055573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612079919061364a565b50600a548351604051635d04754160e11b8152929350600092612195926001600160a01b03169163ba08ea82916120b39190600401613f37565b60206040518083038186803b1580156120cb57600080fd5b505afa1580156120df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612103919061369e565b600a54602086015186516040516389518c8760e01b8152610f1c936001600160a01b0316926389518c879261213a92600401613f6d565b60206040518083038186803b15801561215257600080fd5b505afa158015612166573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061218a919061369e565b6040870151906121ee565b905060006121ba614e2061120d8561ffff1687600001516129b790919063ffffffff16565b90508181106121d8576121cd8183612a33565b9550600194506121e5565b6121e28282612a33565b95505b50505050915091565b60008282018381101561061b5760405162461bcd60e51b815260040161071d90613938565b80158061229b5750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906122499030908690600401613744565b60206040518083038186803b15801561226157600080fd5b505afa158015612275573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612299919061369e565b155b6122b75760405162461bcd60e51b815260040161071d90613e4a565b61230d8363095ea7b360e01b84846040516024016122d692919061372b565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f66565b505050565b600d543360009081526012602052604081205490918291429161233591906121ee565b11156123535760405162461bcd60e51b815260040161071d90613e20565b61235b612c64565b84156123815783915061237a61236f6106e2565b61120d611711611165565b95506123ea565b600086116123a15760405162461bcd60e51b815260040161071d90613bb4565b6123c86001610f1c6123b1611165565b61120d60016112976123c16106e2565b8d906129b7565b9150838211156123ea5760405162461bcd60e51b815260040161071d90613b52565b6123f333610c95565b8211156124125760405162461bcd60e51b815260040161071d90613850565b60006124b061271061120d600b60009054906101000a90046001600160a01b03166001600160a01b031663495ef7056040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561246d57600080fd5b505af1158015612481573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a5919061362e565b8a9061ffff166129b7565b90506124bc8782612a33565b60115490925060ff1680612516575081612513600f54600660019054906101000a90046001600160a01b03166001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016112479190613717565b10155b6125325760405162461bcd60e51b815260040161071d90613d15565b336001600160a01b03167f02f25270a4d87bea75db541cdfe559334a275b4a233520ed6c0a2429667cca9488858460405161256f93929190613f7b565b60405180910390a26125813384612ff5565b83156125a3576006546125a39061010090046001600160a01b03163384612e8c565b6125ac81612d3b565b5094509492505050565b60008084116125d75760405162461bcd60e51b815260040161071d90613d9f565b60008361ffff161180156125f15750614e208361ffff1611155b61260d5760405162461bcd60e51b815260040161071d906139f4565b3360009081526013602052604090205484111561263c5760405162461bcd60e51b815260040161071d90613ab1565b600e543360009081526013602052604090206001015461265d904290612a33565b101561267b5760405162461bcd60e51b815260040161071d90613c71565b6007546040805163c1639a2b60e01b815281516000936001600160a01b03169263c1639a2b9260048082019391829003018186803b1580156126bc57600080fd5b505afa1580156126d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126f4919061364a565b5090508361ffff168161ffff16101561271f5760405162461bcd60e51b815260040161071d90613d4c565b612727612c64565b3360009081526013602052604081209061274b614e2061120d8961ffff87166129b7565b600a54600184015460405163124e384560e01b815292935083926000926001600160a01b03169163124e384591612789919042908e90600401613f7b565b60206040518083038186803b1580156127a157600080fd5b505afa1580156127b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d9919061369e565b905060006127fc856000015461120d8c88600201546129b790919063ffffffff16565b905061280882826121ee565b84116128295761281733612dbe565b5050506000965050505050505061061b565b61283d61283683836121ee565b8590612a33565b9350600b546001860154604051636f6bb7a760e01b81526000926128db926127109261120d926001600160a01b031691636f6bb7a7916128809190600401613f37565b60206040518083038186803b15801561289857600080fd5b505afa1580156128ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128d0919061362e565b889061ffff166129b7565b86549091506128ea908c612a33565b8655600f546128f9908c612a33565b600f5585541561291c5760028601546129129083612a33565b6002870155612925565b612925336130d7565b61292f8582612a33565b9750337f809fd47bf4a7ee8bf942a84e859111b23397cb1fbe862a8893adc2e04fd756e78561296286610f1c86886121ee565b3360009081526013602052604090819020549051612984939291908d90613f91565b60405180910390a261299581612d3b565b8815611c3657600654611c369061010090046001600160a01b0316338a612e8c565b6000826129c6575060006106d0565b828202828482816129d357fe5b041461061b5760405162461bcd60e51b815260040161071d90613a70565b600061061b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613206565b600061061b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611f88565b6000808411612a965760405162461bcd60e51b815260040161071d90613bb4565b336000908152601260205260409020429055612ab0612c64565b6000612b1f61271061120d600b60009054906101000a90046001600160a01b03166001600160a01b031663cc1252ae6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015612b0b57600080fd5b505af11580156128ac573d6000803e3d6000fd5b90506000612b2d8683612a33565b90506000612b396106e2565b90506000612b45611165565b9050600082118015612b575750600081115b15612b7157612b6a8161120d85856129b7565b9450612b9e565b612b9b837f000000000000000000000000000000000000000000000000000000e8d4a510006129b7565b94505b336001600160a01b03167f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e898787604051612bdb93929190613f7b565b60405180910390a286851015612c035760405162461bcd60e51b815260040161071d9061390d565b60008511612c235760405162461bcd60e51b815260040161071d906139cc565b612c2d338661323d565b8515612c5057600654612c509061010090046001600160a01b031633308b612d14565b612c5984612d3b565b505050509392505050565b600a546040805163110e5fad60e21b815290516000926001600160a01b0316916344397eb491600480830192602092919082900301818787803b158015612caa57600080fd5b505af1158015612cbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ce2919061369e565b9050612d0e612d056402540be40061120d600f54856129b790919063ffffffff16565b601054906121ee565b60105550565b612d35846323b872dd60e01b8585856040516024016122d69392919061375e565b50505050565b600c546001600160a01b031615610ad557600c54600654604051638b0f154d60e01b81526001600160a01b0392831692638b0f154d92612d8992869261010090920490911690600401613f56565b600060405180830381600087803b158015612da357600080fd5b505af1158015612db7573d6000803e3d6000fd5b5050505050565b6000806000806000612dcf86611fb4565b6009546001600160a01b0389811660009081526013602052604090819020549051631ecde53d60e31b8152949850929650879550869450169163f66f29e891612e1e9186918691600401613f40565b60206040518083038186803b158015612e3657600080fd5b505afa158015612e4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e6e9190613612565b15612e8357612e7e8683836132f1565b600194505b50509193909250565b61230d8363a9059cbb60e01b84846040516024016122d692919061372b565b600d546001600160a01b0384166000908152601260205260409020544291612ed391906121ee565b118015612f0057506001600160a01b03808316600090815260126020526040808220549286168252902054115b1561230d576001600160a01b03821660009081526014602052604090205460ff1615612f3e5760405162461bcd60e51b815260040161071d90613b1b565b6001600160a01b03808416600090815260126020526040808220549285168252902055505050565b6060612fbb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166133bf9092919063ffffffff16565b80519091501561230d5780806020019051810190612fd99190613612565b61230d5760405162461bcd60e51b815260040161071d90613dd6565b6001600160a01b03821661301b5760405162461bcd60e51b815260040161071d90613beb565b61302782600083612eab565b61306481604051806060016040528060228152602001614039602291396001600160a01b0385166000908152600160205260409020549190611f88565b6001600160a01b03831660009081526001602052604090205560035461308a9082612a33565b6003556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906130cb908590613f37565b60405180910390a35050565b6001600160a01b038116600090815260136020526040902060030154601554600110156131a6576015805461310d906001612a33565b8154811061311757fe5b600091825260209091200154601580546001600160a01b03909216918390811061313d57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080601360006015848154811061317d57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020600301555b60158054806131b157fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0393909316815260139092525060408120818155600181018290556002810182905560030155565b600081836132275760405162461bcd60e51b815260040161071d91906137da565b50600083858161323357fe5b0495945050505050565b6001600160a01b0382166132635760405162461bcd60e51b815260040161071d90613f00565b61326f60008383612eab565b60035461327c90826121ee565b6003556001600160a01b0382166000908152600160205260409020546132a290826121ee565b6001600160a01b0383166000818152600160205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906130cb908590613f37565b6132f96134a0565b506001600160a01b03831660009081526013602090815260409182902082516080810184528154808252600183015493820193909352600282015493810193909352600301546060830152600f5461335091612a33565b600f55604081015160105461336491612a33565b601055613370846130d7565b836001600160a01b03167f302eaf71224bcd9ed28854139aa87a32dc89622b38a4d8ce4160475aa57a7f13848484600001516040516133b193929190613f40565b60405180910390a250505050565b60606133ce84846000856133d6565b949350505050565b60606133e18561349a565b6133fd5760405162461bcd60e51b815260040161071d90613cde565b60006060866001600160a01b0316858760405161341a91906136fb565b60006040518083038185875af1925050503d8060008114613457576040519150601f19603f3d011682016040523d82523d6000602084013e61345c565b606091505b509150915081156134705791506133ce9050565b8051156134805780518082602001fd5b8360405162461bcd60e51b815260040161071d91906137da565b3b151590565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b6000602082840312156134d9578081fd5b813561061b81614005565b600080604083850312156134f6578081fd5b823561350181614005565b9150602083013561351181614005565b809150509250929050565b600080600060608486031215613530578081fd5b833561353b81614005565b9250602084013561354b81614005565b929592945050506040919091013590565b6000806040838503121561356e578182fd5b823561357981614005565b946020939093013593505050565b60008060208385031215613599578182fd5b823567ffffffffffffffff808211156135b0578384fd5b818501915085601f8301126135c3578384fd5b8135818111156135d1578485fd5b86602080830285010111156135e4578485fd5b60209290920196919550909350505050565b600060208284031215613607578081fd5b813561061b8161401a565b600060208284031215613623578081fd5b815161061b8161401a565b60006020828403121561363f578081fd5b815161061b81614028565b6000806040838503121561365c578182fd5b825161366781614028565b602084015190925069ffffffffffffffffffff81168114613511578182fd5b600060208284031215613697578081fd5b5035919050565b6000602082840312156136af578081fd5b5051919050565b600080604083850312156136c8578182fd5b82359150602083013561351181614028565b600080604083850312156136ec578182fd5b50508035926020909101359150565b6000825161370d818460208701613fd9565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6020808252825182820181905260009190848201906040850190845b818110156137c35783516001600160a01b03168352928401929184019160010161379e565b50909695505050505050565b901515815260200190565b60006020825282518060208401526137f9816040850160208701613fd9565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252818101527f4e6f7420656e6f756768204c5020746f6b656e7320666f72206163636f756e74604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b602080825260119082015270546f6f20666577204c5020746f6b656e7360781b604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601d908201527f4e6f20706f736974696f6e20666f7220676976656e2061646472657373000000604082015260600190565b6020808252600c908201526b086ac9240e8dede40d0d2ced60a31b604082015260600190565b6020808252600e908201526d546f6f2066657720746f6b656e7360901b604082015260600190565b602080825260119082015270426164206d696e204356492076616c756560781b604082015260600190565b60208082526031908201527f4e6f207265706f7274656420706f736974696f6e2077617320666f756e6420746040820152706f206265206c6971756964617461626c6560781b606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4e6f7420656e6f756768206f70656e656420706f736974696f6e20756e697473604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f526563697069656e742072656675736573206c6f636b656420746f6b656e7300604082015260600190565b6020808252601a908201527f546f6f206d756368204c5020746f6b656e7320746f206275726e000000000000604082015260600190565b602080825260119082015270426164206d6178204356492076616c756560781b604082015260600190565b6020808252601e908201527f546f6b656e7320616d6f756e74206d75737420626520706f7369746976650000604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252600f908201526e141bdcda5d1a5bdb881b1bd8dad959608a1b604082015260600190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526017908201527f436f6c6c61746572616c20726174696f2062726f6b656e000000000000000000604082015260600190565b6020808252600b908201526a43564920746f6f206c6f7760a81b604082015260600190565b6020808252601490820152734e6f7420656e6f756768206c697175696469747960601b604082015260600190565b6020808252601b908201527f506f736974696f6e20756e697473206e6f7420706f7369746976650000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526010908201526f119d5b991cc8185c99481b1bd8dad95960821b604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b6020808252600f908201526e4c6f636b757020746f6f206c6f6e6760881b604082015260600190565b60208082526017908201527f416d6f756e74206d75737420626520706f736974697665000000000000000000604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b9283529015156020830152604082015260600190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b9384526020840192909252604083015261ffff16606082015260800190565b93845260208401929092526040830152606082015260800190565b60ff91909116815260200190565b60005b83811015613ff4578181015183820152602001613fdc565b83811115612d355750506000910152565b6001600160a01b0381168114610ad557600080fd5b8015158114610ad557600080fd5b61ffff81168114610ad557600080fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220c874a249c7dae2f148df9ba5d8cb084ac184c867425822a5b8f33443d716c68364736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000e8d4a51000000000000000000000000000f5ebf50661ee5b128dad3d71050520ccccc1060100000000000000000000000000000000000000000000000000000000000000000000000000000000000000004fde21b467f6cccfdea1b2b51886d9d0fd05491f000000000000000000000000bb2a8986f1feb41c374658bcd4a5e0b6b536ba1a0000000000000000000000000000000000000000000000000000000000000007555344542d4c50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007555344542d4c5000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _token (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [1] : _lpTokenName (string): USDT-LP
Arg [2] : _lpTokenSymbolName (string): USDT-LP
Arg [3] : _initialTokenToLPTokenRate (uint256): 1000000000000
Arg [4] : _feesModel (address): 0xF5eBF50661EE5B128Dad3d71050520CccCc10601
Arg [5] : _feesCalculator (address): 0x0000000000000000000000000000000000000000
Arg [6] : _cviOracle (address): 0x4FDe21B467f6CCcfDEa1b2b51886D9D0fd05491F
Arg [7] : _liquidation (address): 0xbB2a8986F1feB41C374658Bcd4A5E0B6b536Ba1a
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 000000000000000000000000000000000000000000000000000000e8d4a51000
Arg [4] : 000000000000000000000000f5ebf50661ee5b128dad3d71050520ccccc10601
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000004fde21b467f6cccfdea1b2b51886d9d0fd05491f
Arg [7] : 000000000000000000000000bb2a8986f1feb41c374658bcd4a5e0b6b536ba1a
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [9] : 555344542d4c5000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [11] : 555344542d4c5000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.998973 | 156.4299 | $156.27 |
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.