Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| - | 11651949 | 1895 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x1c1c49CE...E32DD272b The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
CRVStrategyStableMainnet
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 150 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "./CRVStrategyStable.sol";
import "./PriceConvertor.sol";
/**
* Adds the mainnet addresses to the CRVStrategyStable
*/
contract CRVStrategyStableMainnet is CRVStrategyStable {
// token addresses
// y-addresses are taken from: https://docs.yearn.finance/yearn.finance/yearn-1
address constant public dai = address(0x6B175474E89094C44Da98b954EedeAC495271d0F);
address constant public ydai = address(0x16de59092dAE5CcF4A1E6439D611fd0653f0Bd01);
address constant public usdc = address(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);
address constant public yusdc = address(0xd6aD7a6750A7593E092a9B218d66C0A814a3436e);
address constant public usdt = address(0xdAC17F958D2ee523a2206206994597C13D831ec7);
address constant public yusdt = address(0x83f798e925BcD4017Eb265844FDDAbb448f1707D);
address constant public tusd = address(0x0000000000085d4780B73119b644AE5ecd22b376);
address constant public ytusd = address(0x73a052500105205d34Daf004eAb301916DA8190f);
// pre-defined constant mapping: underlying -> y-token
mapping(address => address) public yVaults;
// yDAIyUSDCyUSDTyTUSD
address constant public __ycrv = address(0xdF5e0e81Dff6FAF3A7e52BA697820c5e32D806A8);
// ycrvVault
address constant public __ycrvVault = address(0x5dbcF33D8c2E976c6b560249878e6F1491Bca25c);
// protocols
address constant public __curve = address(0x45F783CCE6B7FF23B2ab2D70e416cdb7D6055f51);
constructor(
address _storage,
address _underlying,
address _bundle
)
CRVStrategyStable(_storage, _underlying, _bundle, __ycrvVault, address(0), 0,
__ycrv,
__curve,
address(0)
)
public {
yVaults[dai] = ydai;
yVaults[usdc] = yusdc;
yVaults[usdt] = yusdt;
yVaults[tusd] = ytusd;
yVault = yVaults[underlying];
require(yVault != address(0), "underlying not supported: yVault is not defined");
if (_underlying == dai) {
tokenIndex = TokenIndex.DAI;
} else if (_underlying == usdc) {
tokenIndex = TokenIndex.USDC;
} else if (_underlying == usdt) {
tokenIndex = TokenIndex.USDT;
} else if (_underlying == tusd) {
tokenIndex = TokenIndex.TUSD;
} else {
revert("What is this asset?");
}
convertor = address(new PriceConvertor());
curvePriceCheckpoint = underlyingValueFromYCrv(ycrvUnit);
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "./Governable.sol";
contract Controllable is Governable {
constructor(address _storage) Governable(_storage) public {
}
modifier onlyController() {
require(store.isController(msg.sender), "Not a controller");
_;
}
modifier onlyControllerOrGovernance(){
require((store.isController(msg.sender) || store.isGovernance(msg.sender)),
"The caller must be controller or governance");
_;
}
function controller() public view returns (address) {
return store.controller();
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "./Storage.sol";
contract Governable {
Storage public store;
constructor(address _store) public {
require(_store != address(0), "new storage shouldn't be empty");
store = Storage(_store);
}
modifier onlyGovernance() {
require(store.isGovernance(msg.sender), "Not governance");
_;
}
function setStorage(address _store) public onlyGovernance {
require(_store != address(0), "new storage shouldn't be empty");
store = Storage(_store);
}
function governance() public view returns (address) {
return store.governance();
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
contract Storage {
address public governance;
address public controller;
constructor() public {
governance = msg.sender;
}
modifier onlyGovernance() {
require(isGovernance(msg.sender), "Not governance");
_;
}
function setGovernance(address _governance) public onlyGovernance {
require(_governance != address(0), "new governance shouldn't be empty");
governance = _governance;
}
function setController(address _controller) public onlyGovernance {
require(_controller != address(0), "new controller shouldn't be empty");
controller = _controller;
}
function isGovernance(address account) public view returns (bool) {
return account == governance;
}
function isController(address account) public view returns (bool) {
return account == controller;
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.6.0;
interface IBundle {
function underlyingBalanceInBundle() external view returns (uint256);
function underlyingBalanceWithInvestment() external view returns (uint256);
// function governance() external view returns (address);
// function controller() external view returns (address);
function getUnderlying() external view returns (address);
function getVault() external view returns (address);
function addStrategy(address _strategy, uint256 riskScore, uint256 weightage) external;
// function removeStrategy(address _strategy) external;
function withdrawAll() external;
function withdraw(uint256 underlyingAmountToWithdraw, address holder) external returns (uint256);
function depositArbCheck() external view returns(bool);
function doHardWork() external;
function rebalance() external;
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
interface IController {
// [Grey list]
// An EOA can safely interact with the system no matter what.
// If you're using Metamask, you're using an EOA.
// Only smart contracts may be affected by this grey list.
//
// This contract will not be able to ban any EOA from the system
// even if an EOA is being added to the greyList, he/she will still be able
// to interact with the whole system as if nothing happened.
// Only smart contracts will be affected by being added to the greyList.
// This grey list is only used in Vault.sol, see the code there for reference
function greyList(address _target) external view returns(bool);
function addVaultAndStrategy(address _vault, address _strategy) external;
function doHardWork(address _vault) external;
function hasVault(address _vault) external returns(bool);
function salvage(address _token, uint256 amount) external;
function salvageStrategy(address _strategy, address _token, uint256 amount) external;
function notifyFee(address _underlying, uint256 fee) external;
function profitSharingNumerator() external view returns (uint256);
function profitSharingDenominator() external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol";
interface IStrategy {
// function unsalvagableTokens(address tokens) external view returns (bool);
// function governance() external view returns (address);
// function controller() external view returns (address);
function getUnderlying() external view returns (address);
function getBundle() external view returns (address);
function withdrawAllToBundle() external;
function withdrawToBundle(uint256 amount) external;
function investedUnderlyingBalance() external view returns (uint256); // itsNotMuch()
// should only be called by controller
function salvage(address recipient, address token, uint256 amount) external;
function doHardWork() external;
function depositArbCheck() external view returns(bool);
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts-ethereum-package/contracts/math/Math.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/utils/Address.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/SafeERC20.sol";
import "./interfaces/Gauge.sol";
import "./interfaces/ICurveFi.sol";
import "./interfaces/yVault.sol";
import "./interfaces/IPriceConvertor.sol";
import "../../interfaces/IBundle.sol";
import "../../interfaces/IController.sol";
import "../../interfaces/IStrategy.sol";
import "../../Controllable.sol";
/**
* The goal of this strategy is to take a stable asset (DAI, USDC, USDT), turn it into ycrv using
* the curve mechanisms, and supply ycrv into the ycrv vault. The ycrv vault will likely not have
* a reward token distribution pool to avoid double dipping. All the calls to functions from this
* strategy will be routed to the controller which should then call the respective methods on the
* ycrv vault. This strategy will not be liquidating any yield crops (CRV), because the strategy
* of the ycrv vault will do that for us.
*/
contract CRVStrategyStable is IStrategy, Controllable {
enum TokenIndex {DAI, USDC, USDT, TUSD}
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
// underlying asset
address public underlying;
// the matching enum record used to determine the index
TokenIndex tokenIndex;
// our bundle holding the underlying asset
address public bundle;
// the y-vault (yield tokens from Curve) corresponding to our asset
address public yVault;
// yearn vault for depositing the yCRV tokens
address public ycrvVault;
// the address of yCRV token
address public ycrv;
// the address of the Curve protocol
address public curve;
// the address of the IPriceConvertor
address public convertor;
// these tokens cannot be claimed by the governance
mapping(address => bool) public unsalvagableTokens;
uint256 public curvePriceCheckpoint;
uint256 public ycrvUnit;
uint256 public arbTolerance = 3;
bool public investActivated;
modifier restricted() {
require(msg.sender == bundle || msg.sender == controller()
|| msg.sender == governance(),
"The sender has to be the controller, governance, or bundle");
_;
}
constructor(
address _storage,
address _underlying,
address _bundle,
address _ycrvVault,
address _yVault,
uint256 _tokenIndex,
address _ycrv,
address _curveProtocol,
address _convertor
)
Controllable(_storage) public {
bundle = _bundle;
ycrvVault = _ycrvVault;
underlying = _underlying;
tokenIndex = TokenIndex(_tokenIndex);
yVault = _yVault;
ycrv = _ycrv;
curve = _curveProtocol;
convertor = _convertor;
// set these tokens to be not salvageable
unsalvagableTokens[underlying] = true;
unsalvagableTokens[yVault] = true;
unsalvagableTokens[ycrv] = true;
unsalvagableTokens[ycrvVault] = true;
investActivated = true;
ycrvUnit = 10 ** 18;
// starting with a stable price, the mainnet will override this value
curvePriceCheckpoint = ycrvUnit;
}
function getUnderlying() public override view returns (address) {
return underlying;
}
function getBundle() public override view returns (address) {
return bundle;
}
function depositArbCheck() public override view returns(bool) {
uint256 currentPrice = underlyingValueFromYCrv(ycrvUnit);
if (currentPrice < curvePriceCheckpoint) {
return currentPrice.mul(100).div(curvePriceCheckpoint) > 100 - arbTolerance;
} else {
return currentPrice.mul(100).div(curvePriceCheckpoint) < 100 + arbTolerance;
}
}
function setArbTolerance(uint256 tolerance) external onlyGovernance {
require(tolerance <= 100, "at most 100");
arbTolerance = tolerance;
}
/**
* Uses the Curve protocol to convert the underlying asset into yAsset and then to yCRV.
*/
function yCurveFromUnderlying() internal {
// convert underlying asset to yAsset
uint256 underlyingBalance = IERC20(underlying).balanceOf(address(this));
if (underlyingBalance > 0) {
IERC20(underlying).safeApprove(yVault, 0);
IERC20(underlying).safeApprove(yVault, underlyingBalance);
yERC20(yVault).deposit(underlyingBalance);
}
// convert yAsset to yCRV
uint256 yBalance = IERC20(yVault).balanceOf(address(this));
if (yBalance > 0) {
IERC20(yVault).safeApprove(curve, 0);
IERC20(yVault).safeApprove(curve, yBalance);
// we can accept 0 as minimum because this is called only by a trusted role
uint256 minimum = 0;
uint256[4] memory coinAmounts = wrapCoinAmount(yBalance);
ICurveFi(curve).add_liquidity(
coinAmounts, minimum
);
}
// now we have yCRV
}
/**
* Uses the Curve protocol to convert the yCRV back into the underlying asset. If it cannot acquire
* the limit amount, it will acquire the maximum it can.
*/
function yCurveToUnderlying(uint256 underlyingLimit) internal {
uint256 ycrvBalance = IERC20(ycrv).balanceOf(address(this));
// this is the maximum number of y-tokens we can get for our yCRV
uint256 yTokenMaximumAmount = yTokenValueFromYCrv(ycrvBalance);
if (yTokenMaximumAmount == 0) {
return;
}
// ensure that we will not overflow in the conversion
uint256 yTokenDesiredAmount = underlyingLimit == uint256(~0) ?
yTokenMaximumAmount : yTokenValueFromUnderlying(underlyingLimit);
uint256[4] memory yTokenAmounts = wrapCoinAmount(
Math.min(yTokenMaximumAmount, yTokenDesiredAmount));
uint256 yUnderlyingBalanceBefore = IERC20(yVault).balanceOf(address(this));
IERC20(ycrv).safeApprove(curve, 0);
IERC20(ycrv).safeApprove(curve, ycrvBalance);
ICurveFi(curve).remove_liquidity_imbalance(
yTokenAmounts, ycrvBalance
);
// now we have yUnderlying asset
uint256 yUnderlyingBalanceAfter = IERC20(yVault).balanceOf(address(this));
if (yUnderlyingBalanceAfter > yUnderlyingBalanceBefore) {
// we received new yUnderlying tokens for yCRV
yERC20(yVault).withdraw(yUnderlyingBalanceAfter.sub(yUnderlyingBalanceBefore));
}
}
/**
* Allows Governance to withdraw partial shares to reduce slippage incurred
* and facilitate migration / withdrawal / strategy switch
*/
function withdrawPartialYCRVShares(uint256 shares) external restricted {
yERC20(ycrvVault).withdraw(shares);
yCurveToUnderlying(uint256(~0));
}
function setInvestActivated(bool _investActivated) external restricted {
investActivated = _investActivated;
}
/**
* Withdraws an underlying asset from the strategy to the vault in the specified amount by asking
* the yCRV vault for yCRV (currently all of it), and then removing imbalanced liquidity from
* the Curve protocol. The rest is deposited back to the yCRV vault. If the amount requested cannot
* be obtained, the method will get as much as we have.
*/
function withdrawToBundle(uint256 amountUnderlying) override external restricted {
// todo: If we want to be more accurate, we need to calculate how much yCRV we will need here
if(IERC20(underlying).balanceOf(address(this)) >= amountUnderlying){
IERC20(underlying).safeTransfer(bundle, amountUnderlying);
return;
}
uint256 shares = IERC20(ycrvVault).balanceOf(address(this));
yERC20(ycrvVault).withdraw(shares);
yCurveToUnderlying(amountUnderlying);
// we can transfer the asset to the vault
uint256 actualBalance = IERC20(underlying).balanceOf(address(this));
if (actualBalance > 0) {
IERC20(underlying).safeTransfer(bundle, Math.min(amountUnderlying, actualBalance));
}
// invest back the rest
investAllUnderlying();
}
/**
* Withdraws all assets from the vault. We ask the yCRV vault to give us our entire yCRV balance
* and then convert it to the underlying asset using the Curve protocol.
*/
function withdrawAllToBundle() external override restricted {
uint256 shares = IERC20(ycrvVault).balanceOf(address(this));
yERC20(ycrvVault).withdraw(shares);
// withdraw everything until there is only dust left
yCurveToUnderlying(uint256(~0));
uint256 actualBalance = IERC20(underlying).balanceOf(address(this));
if (actualBalance > 0) {
IERC20(underlying).safeTransfer(bundle, actualBalance);
}
}
/**
* Invests all underlying assets into our yCRV vault.
*/
function investAllUnderlying() internal {
if(!investActivated) {
return;
}
// convert the entire balance not yet invested into yCRV first
yCurveFromUnderlying();
// then deposit into the yCRV vault
uint256 ycrvBalance = IERC20(ycrv).balanceOf(address(this));
if (ycrvBalance > 0) {
IERC20(ycrv).safeApprove(ycrvVault, 0);
IERC20(ycrv).safeApprove(ycrvVault, ycrvBalance);
// deposits the entire balance and also asks the vault to invest it (public function)
yERC20(ycrvVault).deposit(ycrvBalance);
}
}
/**
* The hard work only invests all underlying assets, and then tells the controller to call hard
* work on the yCRV vault.
*/
function doHardWork() public override restricted {
investAllUnderlying();
curvePriceCheckpoint = underlyingValueFromYCrv(ycrvUnit);
}
/**
* Salvages a token. We cannot salvage the shares in the yCRV pool, yCRV tokens, or underlying
* assets.
*/
function salvage(address recipient, address token, uint256 amount) public override onlyGovernance {
// To make sure that governance cannot come in and take away the coins
require(!unsalvagableTokens[token], "token is defined as not salvageable");
IERC20(token).safeTransfer(recipient, amount);
}
/**
* Returns the underlying invested balance. This is the amount of yCRV that we are entitled to
* from the yCRV vault (based on the number of shares we currently have), converted to the
* underlying assets by the Curve protocol, plus the current balance of the underlying assets.
*/
function investedUnderlyingBalance() public override view returns (uint256) {
uint256 shares = IERC20(ycrvVault).balanceOf(address(this));
uint256 price = yERC20(ycrvVault).getPricePerFullShare();
// the price is in yCRV units, because this is a yCRV vault
// the multiplication doubles the number of decimals for shares, so we need to divide
// the precision is always 10 ** 18 as the yCRV vault has 18 decimals
uint256 precision = 10 ** 18;
uint256 ycrvBalance = shares.mul(price).div(precision);
// now we can convert the balance to the token amount
uint256 ycrvValue = underlyingValueFromYCrv(ycrvBalance);
return ycrvValue.add(IERC20(underlying).balanceOf(address(this)));
}
/**
* Returns the value of yCRV in underlying token accounting for slippage and fees.
*/
function yTokenValueFromYCrv(uint256 ycrvBalance) public view returns (uint256) {
return underlyingValueFromYCrv(ycrvBalance) // this is in DAI, we will convert to yDAI
.mul(10 ** 18)
.div(yERC20(yVault).getPricePerFullShare()); // function getPricePerFullShare() has 18 decimals for all tokens
}
/**
* Returns the value of yCRV in y-token (e.g., yCRV -> yDai) accounting for slippage and fees.
*/
function underlyingValueFromYCrv(uint256 ycrvBalance) public view returns (uint256) {
return IPriceConvertor(convertor).yCrvToUnderlying(ycrvBalance, uint256(tokenIndex));
}
/**
* Returns the value of the underlying token in yToken
*/
function yTokenValueFromUnderlying(uint256 amountUnderlying) public view returns (uint256) {
// 1 yToken = this much underlying, 10 ** 18 precision for all tokens
return amountUnderlying
.mul(10 ** 18)
.div(yERC20(yVault).getPricePerFullShare());
}
/**
* Wraps the coin amount in the array for interacting with the Curve protocol
*/
function wrapCoinAmount(uint256 amount) internal view returns (uint256[4] memory) {
uint256[4] memory amounts = [uint256(0), uint256(0), uint256(0), uint256(0)];
amounts[uint56(tokenIndex)] = amount;
return amounts;
}
/**
* Replaces the price convertor
*/
function setConvertor(address _convertor) public onlyGovernance {
// different price conversion from yCurve to yToken can help in emergency recovery situation
// or if there is a bug discovered in the price computation
convertor = _convertor;
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "./interfaces/IPriceConvertor.sol";
interface IConvertor {
function calc_withdraw_one_coin(uint256 _token_amount, int128 i) external view returns (uint256);
}
contract PriceConvertor is IPriceConvertor {
IConvertor public zap = IConvertor(0xbBC81d23Ea2c3ec7e56D39296F0cbB648873a5d3);
function yCrvToUnderlying(uint256 _token_amount, uint256 i) public override view returns (uint256) {
// this returning the DAI amount, not yDAI
return zap.calc_withdraw_one_coin(_token_amount, int128(i));
}
}
contract MockPriceConvertor is IPriceConvertor {
function yCrvToUnderlying(uint256 _token_amount, uint256 /* i */) public override view returns (uint256) {
// counting 1:1
return _token_amount;
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
interface Gauge {
function deposit(uint) external;
function balanceOf(address) external view returns (uint);
function withdraw(uint) external;
function user_checkpoint(address) external;
}
interface VotingEscrow {
function create_lock(uint256 v, uint256 time) external;
function increase_amount(uint256 _value) external;
function increase_unlock_time(uint256 _unlock_time) external;
function withdraw() external;
}
interface Mintr {
function mint(address) external;
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
interface ICurveFi {
function get_virtual_price() external view returns (uint);
function add_liquidity(
uint256[4] calldata amounts,
uint256 min_mint_amount
) external;
function remove_liquidity_imbalance(
uint256[4] calldata amounts,
uint256 max_burn_amount
) external;
function remove_liquidity(
uint256 _amount,
uint256[4] calldata amounts
) external;
function exchange(
int128 from, int128 to, uint256 _from_amount, uint256 _min_to_amount
) external;
function calc_token_amount(
uint256[4] calldata amounts,
bool deposit
) external view returns(uint);
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
interface IPriceConvertor {
function yCrvToUnderlying(uint256 _token_amount, uint256 i) external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
interface yERC20 {
function deposit(uint256 _amount) external;
function withdraw(uint256 _amount) external;
function getPricePerFullShare() external view returns (uint256);
}pragma solidity ^0.6.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
}
}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) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}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);
}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 ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line max-line-length
require((value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(value);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves.
// A Solidity high level call has three parts:
// 1. The target address is checked to verify it contains contract code
// 2. The call itself is made, and success asserted
// 3. The return value is decoded, which in turn checks the size of the returned data.
// solhint-disable-next-line max-line-length
require(address(token).isContract(), "SafeERC20: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = address(token).call(data);
require(success, "SafeERC20: low-level call failed");
if (returndata.length > 0) { // Return data is optional
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}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) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly { codehash := extcodehash(account) }
return (codehash != accountHash && codehash != 0x0);
}
/**
* @dev 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");
}
}{
"remappings": [],
"optimizer": {
"enabled": true,
"runs": 150
},
"evmVersion": "istanbul",
"libraries": {
"": {}
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_storage","type":"address"},{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"address","name":"_bundle","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"__curve","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"__ycrv","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"__ycrvVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"arbTolerance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bundle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"convertor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"curve","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"curvePriceCheckpoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dai","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositArbCheck","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"doHardWork","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getBundle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUnderlying","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"investActivated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"investedUnderlyingBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"salvage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tolerance","type":"uint256"}],"name":"setArbTolerance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_convertor","type":"address"}],"name":"setConvertor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_investActivated","type":"bool"}],"name":"setInvestActivated","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_store","type":"address"}],"name":"setStorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"store","outputs":[{"internalType":"contract Storage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tusd","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ycrvBalance","type":"uint256"}],"name":"underlyingValueFromYCrv","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"unsalvagableTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdc","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAllToBundle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"withdrawPartialYCRVShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountUnderlying","type":"uint256"}],"name":"withdrawToBundle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountUnderlying","type":"uint256"}],"name":"yTokenValueFromUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ycrvBalance","type":"uint256"}],"name":"yTokenValueFromYCrv","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"yVaults","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ycrv","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ycrvUnit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ycrvVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ydai","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ytusd","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yusdc","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yusdt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
0x60806040526003600b553480156200001657600080fd5b5060405162002d3138038062002d31833981810160405260608110156200003c57600080fd5b5080516020820151604090920151909190828282735dbcf33d8c2e976c6b560249878e6f1491bca25c60008073df5e0e81dff6faf3a7e52ba697820c5e32d806a87345f783cce6b7ff23b2ab2d70e416cdb7d6055f518288806001600160a01b038116620000f1576040805162461bcd60e51b815260206004820152601e60248201527f6e65772073746f726167652073686f756c646e277420626520656d7074790000604482015290519081900360640190fd5b600080546001600160a01b03199081166001600160a01b03938416179091556002805482168b84161790556004805482168a841617905560018054909116918b16919091179055508360038111156200014657fe5b6001805460ff60a01b1916600160a01b8360038111156200016357fe5b0217905550600380546001600160a01b039687166001600160a01b031991821617825560058054958816958216959095178555600680549488169482169490941790935560078054928716928416929092179091556001805486166000908152600860209081526040808320805460ff19908116861790915585548a16845281842080548216861790559654891683528083208054881685179055600454891683528083208054881685179055600c80549097168417909655670de0b6b3a7640000600a819055600955600d90527f1d85b10c4aab2237e52422b6a88f540f22293a7bd1795d15372c869d1058e063805485167316de59092dae5ccf4a1e6439d611fd0653f0bd011790557f55adfef67c6837c6309606949b3de496a6863af459a0ee2ee33716dee4091a978054851673d6ad7a6750a7593e092a9b218d66c0a814a3436e1790557fe6e1804945c667f9190787ad0bb70223ba62d97980d113eb0e459576b1e2e096805485167383f798e925bcd4017eb265844fddabb448f1707d1790557f524fd0453f3fcff16be9011b65943e7b0db80504be27fec9d4e1af163b6d6e27805485167373a052500105205d34daf004eab301916da8190f179055905486168152929092205482549091169084161790819055909116151594506200038693505050505760405162461bcd60e51b815260040180806020018281038252602f81526020018062002d02602f913960400191505060405180910390fd5b6001600160a01b038216736b175474e89094c44da98b954eedeac495271d0f1415620003cd57600180546000919060ff60a01b1916600160a01b835b0217905550620004d6565b6001600160a01b03821673a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4814156200040c5760018054819060ff60a01b1916600160a01b82620003c2565b6001600160a01b03821673dac17f958d2ee523a2206206994597c13d831ec714156200044d57600180546002919060ff60a01b1916600160a01b83620003c2565b6001600160a01b0382166e085d4780b73119b644ae5ecd22b37614156200048957600180546003919060ff60a01b1916600160a01b83620003c2565b6040805162461bcd60e51b815260206004820152601360248201527f5768617420697320746869732061737365743f00000000000000000000000000604482015290519081900360640190fd5b604051620004e490620005de565b604051809103906000f08015801562000501573d6000803e3d6000fd5b50600780546001600160a01b0319166001600160a01b0392909216919091179055600a5462000530906200053d565b60095550620005ec915050565b6007546001546000916001600160a01b031690638c92b130908490600160a01b900460ff1660038111156200056e57fe5b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b158015620005aa57600080fd5b505afa158015620005bf573d6000803e3d6000fd5b505050506040513d6020811015620005d657600080fd5b505192915050565b6101a98062002b5983390190565b61255d80620005fc6000396000f3fe608060405234801561001057600080fd5b50600436106102695760003560e01c80636da7880e11610151578063a47406f0116100c3578063c2a2a07b11610087578063c2a2a07b14610500578063c3d2fe3a14610508578063dfb84f6514610510578063f4b9fa7514610518578063f77c479114610520578063f9137fcd1461052857610269565b8063a47406f0146104ae578063a950eec2146104b6578063b5030306146104d3578063b877c22c146104db578063bfa65d17146104f857610269565b80638335fc21116101155780638335fc21146104245780639137c1a71461044a57806395ed7da314610470578063975057e7146104965780639816f4731461049e5780639da1f330146104a657610269565b80636da7880e146103fc5780636f307dc3146104045780637165485d1461040c57806375b5be2d146104145780637680a44b1461041c57610269565b806332bd678f116101ea5780633e413bee116101ae5780633e413bee146103ae57806345d01e4a146103b65780634a1f0ef2146103be5780634fa5d854146103c657806350185946146103ce5780635aa6e675146103f457610269565b806332bd678f1461036f57806333303f8e14610377578063333828ff1461037f578063366cd4f31461039e5780633a7087e0146103a657610269565b80631c13e96e116102315780631c13e96e1461030b578063269a08d5146103255780632aa05b1a146103425780632e3f14741461034a5780632f48ab7d1461036757610269565b80630240c3e91461026e57806309cf00f2146102925780630d2481fe146102ae5780631113ef52146102cd57806317e3a3d514610303575b600080fd5b610276610545565b604080516001600160a01b039092168252519081900360200190f35b61029a61055d565b604080519115158252519081900360200190f35b6102cb600480360360208110156102c457600080fd5b5035610566565b005b6102cb600480360360608110156102e357600080fd5b506001600160a01b03813581169160208101359091169060400135610666565b610276610790565b61031361079f565b60408051918252519081900360200190f35b6103136004803603602081101561033b57600080fd5b50356107a5565b61027661084b565b6102cb6004803603602081101561036057600080fd5b5035610863565b610276610965565b61027661097d565b610276610995565b6102cb6004803603602081101561039557600080fd5b503515156109a4565b610276610a46565b610276610a5e565b610276610a76565b610313610a8e565b610276610c36565b6102cb610c45565b61029a600480360360208110156103e457600080fd5b50356001600160a01b0316610cec565b610276610d01565b610276610d81565b610276610d90565b610276610d9f565b610276610dae565b6102cb610dc1565b6102cb6004803603602081101561043a57600080fd5b50356001600160a01b0316610fdb565b6102cb6004803603602081101561046057600080fd5b50356001600160a01b03166110b6565b6102766004803603602081101561048657600080fd5b50356001600160a01b03166111ec565b610276611207565b610276611216565b610313611225565b61031361122b565b610313600480360360208110156104cc57600080fd5b5035611231565b6102766112c2565b6102cb600480360360208110156104f157600080fd5b50356112d1565b61027661159a565b61029a6115a9565b610276611615565b61027661162d565b610276611645565b61027661165d565b6103136004803603602081101561053e57600080fd5b50356116ac565b7345f783cce6b7ff23b2ab2d70e416cdb7d6055f5181565b600c5460ff1681565b6002546001600160a01b0316331480610597575061058261165d565b6001600160a01b0316336001600160a01b0316145b806105ba57506105a5610d01565b6001600160a01b0316336001600160a01b0316145b6105f55760405162461bcd60e51b815260040180806020018281038252603a81526020018061246d603a913960400191505060405180910390fd5b6004805460408051632e1a7d4d60e01b8152928301849052516001600160a01b0390911691632e1a7d4d91602480830192600092919082900301818387803b15801561064057600080fd5b505af1158015610654573d6000803e3d6000fd5b50505050610663600019611749565b50565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b1580156106b157600080fd5b505afa1580156106c5573d6000803e3d6000fd5b505050506040513d60208110156106db57600080fd5b505161071f576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b03821660009081526008602052604090205460ff16156107775760405162461bcd60e51b815260040180806020018281038252602381526020018061244a6023913960400191505060405180910390fd5b61078b6001600160a01b0383168483611a51565b505050565b6005546001600160a01b031681565b600b5481565b6000610845600360009054906101000a90046001600160a01b03166001600160a01b03166377c7b8fc6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107f857600080fd5b505afa15801561080c573d6000803e3d6000fd5b505050506040513d602081101561082257600080fd5b505161083f670de0b6b3a7640000610839866116ac565b90611aa3565b90611b03565b92915050565b7373a052500105205d34daf004eab301916da8190f81565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b1580156108ae57600080fd5b505afa1580156108c2573d6000803e3d6000fd5b505050506040513d60208110156108d857600080fd5b505161091c576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6064811115610960576040805162461bcd60e51b815260206004820152600b60248201526a06174206d6f7374203130360ac1b604482015290519081900360640190fd5b600b55565b73dac17f958d2ee523a2206206994597c13d831ec781565b73d6ad7a6750a7593e092a9b218d66c0a814a3436e81565b6003546001600160a01b031681565b6002546001600160a01b03163314806109d557506109c061165d565b6001600160a01b0316336001600160a01b0316145b806109f857506109e3610d01565b6001600160a01b0316336001600160a01b0316145b610a335760405162461bcd60e51b815260040180806020018281038252603a81526020018061246d603a913960400191505060405180910390fd5b600c805460ff1916911515919091179055565b7316de59092dae5ccf4a1e6439d611fd0653f0bd0181565b73df5e0e81dff6faf3a7e52ba697820c5e32d806a881565b73a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b60048054604080516370a0823160e01b815230938101939093525160009283926001600160a01b0316916370a0823191602480820192602092909190829003018186803b158015610ade57600080fd5b505afa158015610af2573d6000803e3d6000fd5b505050506040513d6020811015610b0857600080fd5b50516004805460408051631df1ee3f60e21b815290519394506000936001600160a01b03909216926377c7b8fc928282019260209290829003018186803b158015610b5257600080fd5b505afa158015610b66573d6000803e3d6000fd5b505050506040513d6020811015610b7c57600080fd5b50519050670de0b6b3a76400006000610b998261083f8686611aa3565b90506000610ba6826116ac565b600154604080516370a0823160e01b81523060048201529051929350610c2b926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610bf857600080fd5b505afa158015610c0c573d6000803e3d6000fd5b505050506040513d6020811015610c2257600080fd5b50518290611b45565b955050505050505b90565b6002546001600160a01b031681565b6002546001600160a01b0316331480610c765750610c6161165d565b6001600160a01b0316336001600160a01b0316145b80610c995750610c84610d01565b6001600160a01b0316336001600160a01b0316145b610cd45760405162461bcd60e51b815260040180806020018281038252603a81526020018061246d603a913960400191505060405180910390fd5b610cdc611b9f565b610ce7600a546116ac565b600955565b60086020526000908152604090205460ff1681565b60008060009054906101000a90046001600160a01b03166001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5057600080fd5b505afa158015610d64573d6000803e3d6000fd5b505050506040513d6020811015610d7a57600080fd5b5051905090565b6002546001600160a01b031690565b6001546001600160a01b031681565b6006546001600160a01b031681565b6e085d4780b73119b644ae5ecd22b37681565b6002546001600160a01b0316331480610df25750610ddd61165d565b6001600160a01b0316336001600160a01b0316145b80610e155750610e00610d01565b6001600160a01b0316336001600160a01b0316145b610e505760405162461bcd60e51b815260040180806020018281038252603a81526020018061246d603a913960400191505060405180910390fd5b60048054604080516370a0823160e01b81523093810193909352516000926001600160a01b03909216916370a08231916024808301926020929190829003018186803b158015610e9f57600080fd5b505afa158015610eb3573d6000803e3d6000fd5b505050506040513d6020811015610ec957600080fd5b50516004805460408051632e1a7d4d60e01b8152928301849052519293506001600160a01b031691632e1a7d4d9160248082019260009290919082900301818387803b158015610f1857600080fd5b505af1158015610f2c573d6000803e3d6000fd5b50505050610f3b600019611749565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610f8657600080fd5b505afa158015610f9a573d6000803e3d6000fd5b505050506040513d6020811015610fb057600080fd5b505190508015610fd757600254600154610fd7916001600160a01b03918216911683611a51565b5050565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561102657600080fd5b505afa15801561103a573d6000803e3d6000fd5b505050506040513d602081101561105057600080fd5b5051611094576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561110157600080fd5b505afa158015611115573d6000803e3d6000fd5b505050506040513d602081101561112b57600080fd5b505161116f576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b0381166111ca576040805162461bcd60e51b815260206004820152601e60248201527f6e65772073746f726167652073686f756c646e277420626520656d7074790000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600d602052600090815260409020546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031690565b60095481565b600a5481565b6000610845600360009054906101000a90046001600160a01b03166001600160a01b03166377c7b8fc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561128457600080fd5b505afa158015611298573d6000803e3d6000fd5b505050506040513d60208110156112ae57600080fd5b505161083f84670de0b6b3a7640000611aa3565b6007546001600160a01b031681565b6002546001600160a01b031633148061130257506112ed61165d565b6001600160a01b0316336001600160a01b0316145b806113255750611310610d01565b6001600160a01b0316336001600160a01b0316145b6113605760405162461bcd60e51b815260040180806020018281038252603a81526020018061246d603a913960400191505060405180910390fd5b600154604080516370a0823160e01b8152306004820152905183926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156113aa57600080fd5b505afa1580156113be573d6000803e3d6000fd5b505050506040513d60208110156113d457600080fd5b5051106113fd576002546001546113f8916001600160a01b03918216911683611a51565b610663565b60048054604080516370a0823160e01b81523093810193909352516000926001600160a01b03909216916370a08231916024808301926020929190829003018186803b15801561144c57600080fd5b505afa158015611460573d6000803e3d6000fd5b505050506040513d602081101561147657600080fd5b50516004805460408051632e1a7d4d60e01b8152928301849052519293506001600160a01b031691632e1a7d4d9160248082019260009290919082900301818387803b1580156114c557600080fd5b505af11580156114d9573d6000803e3d6000fd5b505050506114e682611749565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561153157600080fd5b505afa158015611545573d6000803e3d6000fd5b505050506040513d602081101561155b57600080fd5b50519050801561159257600254611592906001600160a01b031661157f8584611cd7565b6001546001600160a01b03169190611a51565b61078b611b9f565b6004546001600160a01b031681565b6000806115b7600a546116ac565b90506009548110156115ec57600b546064036115e360095461083f606485611aa390919063ffffffff16565b11915050610c33565b600b5460640161160c60095461083f606485611aa390919063ffffffff16565b10915050610c33565b735dbcf33d8c2e976c6b560249878e6f1491bca25c81565b7383f798e925bcd4017eb265844fddabb448f1707d81565b736b175474e89094c44da98b954eedeac495271d0f81565b60008060009054906101000a90046001600160a01b03166001600160a01b031663f77c47916040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5057600080fd5b6007546001546000916001600160a01b031690638c92b130908490600160a01b900460ff1660038111156116dc57fe5b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561171757600080fd5b505afa15801561172b573d6000803e3d6000fd5b505050506040513d602081101561174157600080fd5b505192915050565b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561179457600080fd5b505afa1580156117a8573d6000803e3d6000fd5b505050506040513d60208110156117be57600080fd5b5051905060006117cd826107a5565b9050806117db575050610663565b600060001984146117f4576117ef84611231565b6117f6565b815b905061180061242b565b61181261180d8484611cd7565b611ced565b600354604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561186357600080fd5b505afa158015611877573d6000803e3d6000fd5b505050506040513d602081101561188d57600080fd5b50516006546005549192506118b0916001600160a01b0390811691166000611d5f565b6006546005546118cd916001600160a01b03918216911687611d5f565b600654604051630c53debb60e11b81526001600160a01b03909116906318a7bd7690849088906004018083608080838360005b83811015611918578181015183820152602001611900565b5050505090500182815260200192505050600060405180830381600087803b15801561194357600080fd5b505af1158015611957573d6000803e3d6000fd5b5050600354604080516370a0823160e01b81523060048201529051600094506001600160a01b0390921692506370a08231916024808301926020929190829003018186803b1580156119a857600080fd5b505afa1580156119bc573d6000803e3d6000fd5b505050506040513d60208110156119d257600080fd5b5051905081811115611a48576003546001600160a01b0316632e1a7d4d6119f98385611e72565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611a2f57600080fd5b505af1158015611a43573d6000803e3d6000fd5b505050505b50505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261078b908490611eb4565b600082611ab257506000610845565b82820282848281611abf57fe5b0414611afc5760405162461bcd60e51b81526004018080602001828103825260218152602001806124a76021913960400191505060405180910390fd5b9392505050565b6000611afc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612072565b600082820183811015611afc576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600c5460ff16611bae57611cd5565b611bb6612114565b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611c0157600080fd5b505afa158015611c15573d6000803e3d6000fd5b505050506040513d6020811015611c2b57600080fd5b50519050801561066357600454600554611c53916001600160a01b0391821691166000611d5f565b600454600554611c70916001600160a01b03918216911683611d5f565b600480546040805163b6b55f2560e01b8152928301849052516001600160a01b039091169163b6b55f2591602480830192600092919082900301818387803b158015611cbb57600080fd5b505af1158015611ccf573d6000803e3d6000fd5b50505050505b565b6000818310611ce65781611afc565b5090919050565b611cf561242b565b611cfd61242b565b6040518060800160405280600081526020016000815260200160008152602001600081525090508281600160149054906101000a900460ff166003811115611d4157fe5b66ffffffffffffff1660048110611d5457fe5b602002015292915050565b801580611de5575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611db757600080fd5b505afa158015611dcb573d6000803e3d6000fd5b505050506040513d6020811015611de157600080fd5b5051155b611e205760405162461bcd60e51b81526004018080602001828103825260368152602001806124f26036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261078b908490611eb4565b6000611afc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612395565b611ec6826001600160a01b03166123ef565b611f17576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310611f555780518252601f199092019160209182019101611f36565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611fb7576040519150601f19603f3d011682016040523d82523d6000602084013e611fbc565b606091505b509150915081612013576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b80511561206c5780806020019051602081101561202f57600080fd5b505161206c5760405162461bcd60e51b815260040180806020018281038252602a8152602001806124c8602a913960400191505060405180910390fd5b50505050565b600081836120fe5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156120c35781810151838201526020016120ab565b50505050905090810190601f1680156120f05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161210a57fe5b0495945050505050565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561215f57600080fd5b505afa158015612173573d6000803e3d6000fd5b505050506040513d602081101561218957600080fd5b505190508015612234576003546001546121b1916001600160a01b0391821691166000611d5f565b6003546001546121ce916001600160a01b03918216911683611d5f565b6003546040805163b6b55f2560e01b81526004810184905290516001600160a01b039092169163b6b55f259160248082019260009290919082900301818387803b15801561221b57600080fd5b505af115801561222f573d6000803e3d6000fd5b505050505b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561227f57600080fd5b505afa158015612293573d6000803e3d6000fd5b505050506040513d60208110156122a957600080fd5b505190508015610fd7576006546003546122d1916001600160a01b0391821691166000611d5f565b6006546003546122ee916001600160a01b03918216911683611d5f565b60006122f861242b565b61230183611ced565b60065460405162a6cbcd60e21b81529192506001600160a01b03169063029b2f3490839085906004018083608080838360005b8381101561234c578181015183820152602001612334565b5050505090500182815260200192505050600060405180830381600087803b15801561237757600080fd5b505af115801561238b573d6000803e3d6000fd5b5050505050505050565b600081848411156123e75760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156120c35781810151838201526020016120ab565b505050900390565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061242357508115155b949350505050565b6040518060800160405280600490602082028036833750919291505056fe746f6b656e20697320646566696e6564206173206e6f742073616c7661676561626c655468652073656e6465722068617320746f2062652074686520636f6e74726f6c6c65722c20676f7665726e616e63652c206f722062756e646c65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220a982674c26cfec47be2f8a9a1df1a8666fa4a3a334f5aa5660626a509a14d17964736f6c634300060c00336080604052600080546001600160a01b03191673bbc81d23ea2c3ec7e56d39296f0cbb648873a5d317905534801561003657600080fd5b50610163806100466000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063262d61521461003b5780638c92b1301461005f575b600080fd5b610043610094565b604080516001600160a01b039092168252519081900360200190f35b6100826004803603604081101561007557600080fd5b50803590602001356100a3565b60408051918252519081900360200190f35b6000546001600160a01b031681565b600080546040805163cc2b27d760e01b815260048101869052600f85900b602482015290516001600160a01b039092169163cc2b27d791604480820192602092909190829003018186803b1580156100fa57600080fd5b505afa15801561010e573d6000803e3d6000fd5b505050506040513d602081101561012457600080fd5b5051939250505056fea26469706673582212209d4f25ee21d34d298877007816371589696107c3bad9a700a3bc614b943c3e4864736f6c634300060c0033756e6465726c79696e67206e6f7420737570706f727465643a20795661756c74206973206e6f7420646566696e6564000000000000000000000000ff9868f59518ea1f1d2874f77fb32e2db920acd20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000fc8a1358f2adf466adb2164e9ccaaaa0370c2e9f
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102695760003560e01c80636da7880e11610151578063a47406f0116100c3578063c2a2a07b11610087578063c2a2a07b14610500578063c3d2fe3a14610508578063dfb84f6514610510578063f4b9fa7514610518578063f77c479114610520578063f9137fcd1461052857610269565b8063a47406f0146104ae578063a950eec2146104b6578063b5030306146104d3578063b877c22c146104db578063bfa65d17146104f857610269565b80638335fc21116101155780638335fc21146104245780639137c1a71461044a57806395ed7da314610470578063975057e7146104965780639816f4731461049e5780639da1f330146104a657610269565b80636da7880e146103fc5780636f307dc3146104045780637165485d1461040c57806375b5be2d146104145780637680a44b1461041c57610269565b806332bd678f116101ea5780633e413bee116101ae5780633e413bee146103ae57806345d01e4a146103b65780634a1f0ef2146103be5780634fa5d854146103c657806350185946146103ce5780635aa6e675146103f457610269565b806332bd678f1461036f57806333303f8e14610377578063333828ff1461037f578063366cd4f31461039e5780633a7087e0146103a657610269565b80631c13e96e116102315780631c13e96e1461030b578063269a08d5146103255780632aa05b1a146103425780632e3f14741461034a5780632f48ab7d1461036757610269565b80630240c3e91461026e57806309cf00f2146102925780630d2481fe146102ae5780631113ef52146102cd57806317e3a3d514610303575b600080fd5b610276610545565b604080516001600160a01b039092168252519081900360200190f35b61029a61055d565b604080519115158252519081900360200190f35b6102cb600480360360208110156102c457600080fd5b5035610566565b005b6102cb600480360360608110156102e357600080fd5b506001600160a01b03813581169160208101359091169060400135610666565b610276610790565b61031361079f565b60408051918252519081900360200190f35b6103136004803603602081101561033b57600080fd5b50356107a5565b61027661084b565b6102cb6004803603602081101561036057600080fd5b5035610863565b610276610965565b61027661097d565b610276610995565b6102cb6004803603602081101561039557600080fd5b503515156109a4565b610276610a46565b610276610a5e565b610276610a76565b610313610a8e565b610276610c36565b6102cb610c45565b61029a600480360360208110156103e457600080fd5b50356001600160a01b0316610cec565b610276610d01565b610276610d81565b610276610d90565b610276610d9f565b610276610dae565b6102cb610dc1565b6102cb6004803603602081101561043a57600080fd5b50356001600160a01b0316610fdb565b6102cb6004803603602081101561046057600080fd5b50356001600160a01b03166110b6565b6102766004803603602081101561048657600080fd5b50356001600160a01b03166111ec565b610276611207565b610276611216565b610313611225565b61031361122b565b610313600480360360208110156104cc57600080fd5b5035611231565b6102766112c2565b6102cb600480360360208110156104f157600080fd5b50356112d1565b61027661159a565b61029a6115a9565b610276611615565b61027661162d565b610276611645565b61027661165d565b6103136004803603602081101561053e57600080fd5b50356116ac565b7345f783cce6b7ff23b2ab2d70e416cdb7d6055f5181565b600c5460ff1681565b6002546001600160a01b0316331480610597575061058261165d565b6001600160a01b0316336001600160a01b0316145b806105ba57506105a5610d01565b6001600160a01b0316336001600160a01b0316145b6105f55760405162461bcd60e51b815260040180806020018281038252603a81526020018061246d603a913960400191505060405180910390fd5b6004805460408051632e1a7d4d60e01b8152928301849052516001600160a01b0390911691632e1a7d4d91602480830192600092919082900301818387803b15801561064057600080fd5b505af1158015610654573d6000803e3d6000fd5b50505050610663600019611749565b50565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b1580156106b157600080fd5b505afa1580156106c5573d6000803e3d6000fd5b505050506040513d60208110156106db57600080fd5b505161071f576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b03821660009081526008602052604090205460ff16156107775760405162461bcd60e51b815260040180806020018281038252602381526020018061244a6023913960400191505060405180910390fd5b61078b6001600160a01b0383168483611a51565b505050565b6005546001600160a01b031681565b600b5481565b6000610845600360009054906101000a90046001600160a01b03166001600160a01b03166377c7b8fc6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107f857600080fd5b505afa15801561080c573d6000803e3d6000fd5b505050506040513d602081101561082257600080fd5b505161083f670de0b6b3a7640000610839866116ac565b90611aa3565b90611b03565b92915050565b7373a052500105205d34daf004eab301916da8190f81565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b1580156108ae57600080fd5b505afa1580156108c2573d6000803e3d6000fd5b505050506040513d60208110156108d857600080fd5b505161091c576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6064811115610960576040805162461bcd60e51b815260206004820152600b60248201526a06174206d6f7374203130360ac1b604482015290519081900360640190fd5b600b55565b73dac17f958d2ee523a2206206994597c13d831ec781565b73d6ad7a6750a7593e092a9b218d66c0a814a3436e81565b6003546001600160a01b031681565b6002546001600160a01b03163314806109d557506109c061165d565b6001600160a01b0316336001600160a01b0316145b806109f857506109e3610d01565b6001600160a01b0316336001600160a01b0316145b610a335760405162461bcd60e51b815260040180806020018281038252603a81526020018061246d603a913960400191505060405180910390fd5b600c805460ff1916911515919091179055565b7316de59092dae5ccf4a1e6439d611fd0653f0bd0181565b73df5e0e81dff6faf3a7e52ba697820c5e32d806a881565b73a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b60048054604080516370a0823160e01b815230938101939093525160009283926001600160a01b0316916370a0823191602480820192602092909190829003018186803b158015610ade57600080fd5b505afa158015610af2573d6000803e3d6000fd5b505050506040513d6020811015610b0857600080fd5b50516004805460408051631df1ee3f60e21b815290519394506000936001600160a01b03909216926377c7b8fc928282019260209290829003018186803b158015610b5257600080fd5b505afa158015610b66573d6000803e3d6000fd5b505050506040513d6020811015610b7c57600080fd5b50519050670de0b6b3a76400006000610b998261083f8686611aa3565b90506000610ba6826116ac565b600154604080516370a0823160e01b81523060048201529051929350610c2b926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610bf857600080fd5b505afa158015610c0c573d6000803e3d6000fd5b505050506040513d6020811015610c2257600080fd5b50518290611b45565b955050505050505b90565b6002546001600160a01b031681565b6002546001600160a01b0316331480610c765750610c6161165d565b6001600160a01b0316336001600160a01b0316145b80610c995750610c84610d01565b6001600160a01b0316336001600160a01b0316145b610cd45760405162461bcd60e51b815260040180806020018281038252603a81526020018061246d603a913960400191505060405180910390fd5b610cdc611b9f565b610ce7600a546116ac565b600955565b60086020526000908152604090205460ff1681565b60008060009054906101000a90046001600160a01b03166001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5057600080fd5b505afa158015610d64573d6000803e3d6000fd5b505050506040513d6020811015610d7a57600080fd5b5051905090565b6002546001600160a01b031690565b6001546001600160a01b031681565b6006546001600160a01b031681565b6e085d4780b73119b644ae5ecd22b37681565b6002546001600160a01b0316331480610df25750610ddd61165d565b6001600160a01b0316336001600160a01b0316145b80610e155750610e00610d01565b6001600160a01b0316336001600160a01b0316145b610e505760405162461bcd60e51b815260040180806020018281038252603a81526020018061246d603a913960400191505060405180910390fd5b60048054604080516370a0823160e01b81523093810193909352516000926001600160a01b03909216916370a08231916024808301926020929190829003018186803b158015610e9f57600080fd5b505afa158015610eb3573d6000803e3d6000fd5b505050506040513d6020811015610ec957600080fd5b50516004805460408051632e1a7d4d60e01b8152928301849052519293506001600160a01b031691632e1a7d4d9160248082019260009290919082900301818387803b158015610f1857600080fd5b505af1158015610f2c573d6000803e3d6000fd5b50505050610f3b600019611749565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610f8657600080fd5b505afa158015610f9a573d6000803e3d6000fd5b505050506040513d6020811015610fb057600080fd5b505190508015610fd757600254600154610fd7916001600160a01b03918216911683611a51565b5050565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561102657600080fd5b505afa15801561103a573d6000803e3d6000fd5b505050506040513d602081101561105057600080fd5b5051611094576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b600054604080516337b87c3960e21b815233600482015290516001600160a01b039092169163dee1f0e491602480820192602092909190829003018186803b15801561110157600080fd5b505afa158015611115573d6000803e3d6000fd5b505050506040513d602081101561112b57600080fd5b505161116f576040805162461bcd60e51b815260206004820152600e60248201526d4e6f7420676f7665726e616e636560901b604482015290519081900360640190fd5b6001600160a01b0381166111ca576040805162461bcd60e51b815260206004820152601e60248201527f6e65772073746f726167652073686f756c646e277420626520656d7074790000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600d602052600090815260409020546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b031690565b60095481565b600a5481565b6000610845600360009054906101000a90046001600160a01b03166001600160a01b03166377c7b8fc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561128457600080fd5b505afa158015611298573d6000803e3d6000fd5b505050506040513d60208110156112ae57600080fd5b505161083f84670de0b6b3a7640000611aa3565b6007546001600160a01b031681565b6002546001600160a01b031633148061130257506112ed61165d565b6001600160a01b0316336001600160a01b0316145b806113255750611310610d01565b6001600160a01b0316336001600160a01b0316145b6113605760405162461bcd60e51b815260040180806020018281038252603a81526020018061246d603a913960400191505060405180910390fd5b600154604080516370a0823160e01b8152306004820152905183926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156113aa57600080fd5b505afa1580156113be573d6000803e3d6000fd5b505050506040513d60208110156113d457600080fd5b5051106113fd576002546001546113f8916001600160a01b03918216911683611a51565b610663565b60048054604080516370a0823160e01b81523093810193909352516000926001600160a01b03909216916370a08231916024808301926020929190829003018186803b15801561144c57600080fd5b505afa158015611460573d6000803e3d6000fd5b505050506040513d602081101561147657600080fd5b50516004805460408051632e1a7d4d60e01b8152928301849052519293506001600160a01b031691632e1a7d4d9160248082019260009290919082900301818387803b1580156114c557600080fd5b505af11580156114d9573d6000803e3d6000fd5b505050506114e682611749565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561153157600080fd5b505afa158015611545573d6000803e3d6000fd5b505050506040513d602081101561155b57600080fd5b50519050801561159257600254611592906001600160a01b031661157f8584611cd7565b6001546001600160a01b03169190611a51565b61078b611b9f565b6004546001600160a01b031681565b6000806115b7600a546116ac565b90506009548110156115ec57600b546064036115e360095461083f606485611aa390919063ffffffff16565b11915050610c33565b600b5460640161160c60095461083f606485611aa390919063ffffffff16565b10915050610c33565b735dbcf33d8c2e976c6b560249878e6f1491bca25c81565b7383f798e925bcd4017eb265844fddabb448f1707d81565b736b175474e89094c44da98b954eedeac495271d0f81565b60008060009054906101000a90046001600160a01b03166001600160a01b031663f77c47916040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5057600080fd5b6007546001546000916001600160a01b031690638c92b130908490600160a01b900460ff1660038111156116dc57fe5b6040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561171757600080fd5b505afa15801561172b573d6000803e3d6000fd5b505050506040513d602081101561174157600080fd5b505192915050565b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561179457600080fd5b505afa1580156117a8573d6000803e3d6000fd5b505050506040513d60208110156117be57600080fd5b5051905060006117cd826107a5565b9050806117db575050610663565b600060001984146117f4576117ef84611231565b6117f6565b815b905061180061242b565b61181261180d8484611cd7565b611ced565b600354604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561186357600080fd5b505afa158015611877573d6000803e3d6000fd5b505050506040513d602081101561188d57600080fd5b50516006546005549192506118b0916001600160a01b0390811691166000611d5f565b6006546005546118cd916001600160a01b03918216911687611d5f565b600654604051630c53debb60e11b81526001600160a01b03909116906318a7bd7690849088906004018083608080838360005b83811015611918578181015183820152602001611900565b5050505090500182815260200192505050600060405180830381600087803b15801561194357600080fd5b505af1158015611957573d6000803e3d6000fd5b5050600354604080516370a0823160e01b81523060048201529051600094506001600160a01b0390921692506370a08231916024808301926020929190829003018186803b1580156119a857600080fd5b505afa1580156119bc573d6000803e3d6000fd5b505050506040513d60208110156119d257600080fd5b5051905081811115611a48576003546001600160a01b0316632e1a7d4d6119f98385611e72565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611a2f57600080fd5b505af1158015611a43573d6000803e3d6000fd5b505050505b50505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261078b908490611eb4565b600082611ab257506000610845565b82820282848281611abf57fe5b0414611afc5760405162461bcd60e51b81526004018080602001828103825260218152602001806124a76021913960400191505060405180910390fd5b9392505050565b6000611afc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612072565b600082820183811015611afc576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600c5460ff16611bae57611cd5565b611bb6612114565b600554604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611c0157600080fd5b505afa158015611c15573d6000803e3d6000fd5b505050506040513d6020811015611c2b57600080fd5b50519050801561066357600454600554611c53916001600160a01b0391821691166000611d5f565b600454600554611c70916001600160a01b03918216911683611d5f565b600480546040805163b6b55f2560e01b8152928301849052516001600160a01b039091169163b6b55f2591602480830192600092919082900301818387803b158015611cbb57600080fd5b505af1158015611ccf573d6000803e3d6000fd5b50505050505b565b6000818310611ce65781611afc565b5090919050565b611cf561242b565b611cfd61242b565b6040518060800160405280600081526020016000815260200160008152602001600081525090508281600160149054906101000a900460ff166003811115611d4157fe5b66ffffffffffffff1660048110611d5457fe5b602002015292915050565b801580611de5575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611db757600080fd5b505afa158015611dcb573d6000803e3d6000fd5b505050506040513d6020811015611de157600080fd5b5051155b611e205760405162461bcd60e51b81526004018080602001828103825260368152602001806124f26036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261078b908490611eb4565b6000611afc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612395565b611ec6826001600160a01b03166123ef565b611f17576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310611f555780518252601f199092019160209182019101611f36565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611fb7576040519150601f19603f3d011682016040523d82523d6000602084013e611fbc565b606091505b509150915081612013576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b80511561206c5780806020019051602081101561202f57600080fd5b505161206c5760405162461bcd60e51b815260040180806020018281038252602a8152602001806124c8602a913960400191505060405180910390fd5b50505050565b600081836120fe5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156120c35781810151838201526020016120ab565b50505050905090810190601f1680156120f05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161210a57fe5b0495945050505050565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561215f57600080fd5b505afa158015612173573d6000803e3d6000fd5b505050506040513d602081101561218957600080fd5b505190508015612234576003546001546121b1916001600160a01b0391821691166000611d5f565b6003546001546121ce916001600160a01b03918216911683611d5f565b6003546040805163b6b55f2560e01b81526004810184905290516001600160a01b039092169163b6b55f259160248082019260009290919082900301818387803b15801561221b57600080fd5b505af115801561222f573d6000803e3d6000fd5b505050505b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561227f57600080fd5b505afa158015612293573d6000803e3d6000fd5b505050506040513d60208110156122a957600080fd5b505190508015610fd7576006546003546122d1916001600160a01b0391821691166000611d5f565b6006546003546122ee916001600160a01b03918216911683611d5f565b60006122f861242b565b61230183611ced565b60065460405162a6cbcd60e21b81529192506001600160a01b03169063029b2f3490839085906004018083608080838360005b8381101561234c578181015183820152602001612334565b5050505090500182815260200192505050600060405180830381600087803b15801561237757600080fd5b505af115801561238b573d6000803e3d6000fd5b5050505050505050565b600081848411156123e75760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156120c35781810151838201526020016120ab565b505050900390565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061242357508115155b949350505050565b6040518060800160405280600490602082028036833750919291505056fe746f6b656e20697320646566696e6564206173206e6f742073616c7661676561626c655468652073656e6465722068617320746f2062652074686520636f6e74726f6c6c65722c20676f7665726e616e63652c206f722062756e646c65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a2646970667358221220a982674c26cfec47be2f8a9a1df1a8666fa4a3a334f5aa5660626a509a14d17964736f6c634300060c0033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.