Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60a06040 | 17613365 | 421 days ago | IN | 0 ETH | 0.09681308 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
CurveLPOracleV2
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; import "IERC20.sol"; import "Ownable.sol"; import "Types.sol"; import "ScaledMath.sol"; import "ScaledMath.sol"; import "CurvePoolUtils.sol"; import "IOracle.sol"; import "IController.sol"; import "ICurveFactory.sol"; import "ICurvePoolV0.sol"; import "ICurvePoolV1.sol"; import "ICurveMetaRegistry.sol"; contract CurveLPOracleV2 is IOracle, Ownable { using ScaledMath for uint256; event ImbalanceThresholdUpdated(address indexed token, uint256 threshold); uint256 internal constant _MAX_IMBALANCE_THRESHOLD = 0.1e18; mapping(address => uint256) public imbalanceThresholds; IController private immutable controller; constructor(address controller_) { controller = IController(controller_); } function isTokenSupported(address token) external view override returns (bool) { IOracle genericOracle = controller.priceOracle(); address pool = _getCurvePool(token); ICurveRegistryCache curveRegistryCache_ = controller.curveRegistryCache(); if (!curveRegistryCache_.isRegistered(pool)) return false; address[] memory coins = curveRegistryCache_.coins(pool); for (uint256 i; i < coins.length; i++) { if (!genericOracle.isTokenSupported(coins[i])) return false; } return true; } function getUSDPrice(address token) external view returns (uint256) { IOracle genericOracle = controller.priceOracle(); // Getting the pool data address pool = _getCurvePool(token); ICurveRegistryCache curveRegistryCache_ = controller.curveRegistryCache(); require(curveRegistryCache_.isRegistered(pool), "token not supported"); uint256[] memory decimals = curveRegistryCache_.decimals(pool); address[] memory coins = curveRegistryCache_.coins(pool); // Adding up the USD value of all the coins in the pool uint256 value; uint256 numberOfCoins = curveRegistryCache_.nCoins(pool); uint256[] memory prices = new uint256[](numberOfCoins); uint256[] memory thresholds = new uint256[](numberOfCoins); for (uint256 i; i < numberOfCoins; i++) { address coin = coins[i]; uint256 price = genericOracle.getUSDPrice(coin); prices[i] = price; thresholds[i] = imbalanceThresholds[token]; require(price > 0, "price is 0"); uint256 balance = _getBalance(pool, i); require(balance > 0, "balance is 0"); value += balance.convertScale(uint8(decimals[i]), 18).mulDown(price); } // Verifying the pool is balanced CurvePoolUtils.ensurePoolBalanced( CurvePoolUtils.PoolMeta({ pool: pool, numberOfCoins: numberOfCoins, assetType: curveRegistryCache_.assetType(pool), decimals: decimals, prices: prices, thresholds: thresholds }) ); // Returning the value of the pool in USD per LP Token return value.divDown(IERC20(token).totalSupply()); } function setImbalanceThreshold(address token, uint256 threshold) external onlyOwner { require(threshold <= _MAX_IMBALANCE_THRESHOLD, "threshold too high"); imbalanceThresholds[token] = threshold; emit ImbalanceThresholdUpdated(token, threshold); } function _getCurvePool(address lpToken_) internal view returns (address) { return controller.curveRegistryCache().poolFromLpToken(lpToken_); } function _getBalance(address curvePool, uint256 index) internal view returns (uint256) { if (controller.curveRegistryCache().interfaceVersion(curvePool) == 0) { return ICurvePoolV0(curvePool).balances(int128(uint128(index))); } return ICurvePoolV1(curvePool).balances(index); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev 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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "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. */ abstract 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() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.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 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) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; library Types { struct Coin { address coinAddress; uint8 decimals; } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; library ScaledMath { uint256 internal constant DECIMALS = 18; uint256 internal constant ONE = 10 ** DECIMALS; function mulDown(uint256 a, uint256 b) internal pure returns (uint256) { return (a * b) / ONE; } function mulDown(uint256 a, uint256 b, uint256 decimals) internal pure returns (uint256) { return (a * b) / (10 ** decimals); } function divDown(uint256 a, uint256 b) internal pure returns (uint256) { return (a * ONE) / b; } function divDown(uint256 a, uint256 b, uint256 decimals) internal pure returns (uint256) { return (a * 10 ** decimals) / b; } function divUp(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } return ((a * ONE) - 1) / b + 1; } function mulDown(int256 a, int256 b) internal pure returns (int256) { return (a * b) / int256(ONE); } function mulDownUint128(uint128 a, uint128 b) internal pure returns (uint128) { return (a * b) / uint128(ONE); } function mulDown(int256 a, int256 b, uint256 decimals) internal pure returns (int256) { return (a * b) / int256(10 ** decimals); } function divDown(int256 a, int256 b) internal pure returns (int256) { return (a * int256(ONE)) / b; } function divDownUint128(uint128 a, uint128 b) internal pure returns (uint128) { return (a * uint128(ONE)) / b; } function divDown(int256 a, int256 b, uint256 decimals) internal pure returns (int256) { return (a * int256(10 ** decimals)) / b; } function convertScale( uint256 a, uint8 fromDecimals, uint8 toDecimals ) internal pure returns (uint256) { if (fromDecimals == toDecimals) return a; if (fromDecimals > toDecimals) return downscale(a, fromDecimals, toDecimals); return upscale(a, fromDecimals, toDecimals); } function convertScale( int256 a, uint8 fromDecimals, uint8 toDecimals ) internal pure returns (int256) { if (fromDecimals == toDecimals) return a; if (fromDecimals > toDecimals) return downscale(a, fromDecimals, toDecimals); return upscale(a, fromDecimals, toDecimals); } function upscale( uint256 a, uint8 fromDecimals, uint8 toDecimals ) internal pure returns (uint256) { return a * (10 ** (toDecimals - fromDecimals)); } function downscale( uint256 a, uint8 fromDecimals, uint8 toDecimals ) internal pure returns (uint256) { return a / (10 ** (fromDecimals - toDecimals)); } function upscale( int256 a, uint8 fromDecimals, uint8 toDecimals ) internal pure returns (int256) { return a * int256(10 ** (toDecimals - fromDecimals)); } function downscale( int256 a, uint8 fromDecimals, uint8 toDecimals ) internal pure returns (int256) { return a / int256(10 ** (fromDecimals - toDecimals)); } function intPow(uint256 a, uint256 n) internal pure returns (uint256) { uint256 result = ONE; for (uint256 i; i < n; ) { result = mulDown(result, a); unchecked { ++i; } } return result; } function absSub(uint256 a, uint256 b) internal pure returns (uint256) { unchecked { return a >= b ? a - b : b - a; } } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; import "ICurvePoolV2.sol"; import "ICurvePoolV1.sol"; import "ScaledMath.sol"; library CurvePoolUtils { using ScaledMath for uint256; uint256 internal constant _DEFAULT_IMBALANCE_THRESHOLD = 0.02e18; enum AssetType { USD, ETH, BTC, OTHER, CRYPTO } struct PoolMeta { address pool; uint256 numberOfCoins; AssetType assetType; uint256[] decimals; uint256[] prices; uint256[] thresholds; } function ensurePoolBalanced(PoolMeta memory poolMeta) internal view { uint256 fromDecimals = poolMeta.decimals[0]; uint256 fromBalance = 10 ** fromDecimals; uint256 fromPrice = poolMeta.prices[0]; for (uint256 i = 1; i < poolMeta.numberOfCoins; i++) { uint256 toDecimals = poolMeta.decimals[i]; uint256 toPrice = poolMeta.prices[i]; uint256 toExpectedUnscaled = (fromBalance * fromPrice) / toPrice; uint256 toExpected = toExpectedUnscaled.convertScale( uint8(fromDecimals), uint8(toDecimals) ); uint256 toActual; if (poolMeta.assetType == AssetType.CRYPTO) { // Handling crypto pools toActual = ICurvePoolV2(poolMeta.pool).get_dy(0, i, fromBalance); } else { // Handling other pools toActual = ICurvePoolV1(poolMeta.pool).get_dy(0, int128(uint128(i)), fromBalance); } require( _isWithinThreshold(toExpected, toActual, poolMeta.thresholds[i]), "pool is not balanced" ); } } function _isWithinThreshold( uint256 a, uint256 b, uint256 imbalanceTreshold ) internal pure returns (bool) { if (imbalanceTreshold == 0) imbalanceTreshold = _DEFAULT_IMBALANCE_THRESHOLD; if (a > b) return (a - b).divDown(a) <= imbalanceTreshold; return (b - a).divDown(b) <= imbalanceTreshold; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; interface ICurvePoolV2 { function token() external view returns (address); function coins(uint256 i) external view returns (address); function factory() external view returns (address); function exchange( uint256 i, uint256 j, uint256 dx, uint256 min_dy, bool use_eth, address receiver ) external returns (uint256); function exchange_underlying( uint256 i, uint256 j, uint256 dx, uint256 min_dy, address receiver ) external returns (uint256); function add_liquidity( uint256[2] memory amounts, uint256 min_mint_amount, bool use_eth, address receiver ) external returns (uint256); function add_liquidity( uint256[2] memory amounts, uint256 min_mint_amount ) external returns (uint256); function add_liquidity( uint256[3] memory amounts, uint256 min_mint_amount, bool use_eth, address receiver ) external returns (uint256); function add_liquidity( uint256[3] memory amounts, uint256 min_mint_amount ) external returns (uint256); function remove_liquidity( uint256 _amount, uint256[2] memory min_amounts, bool use_eth, address receiver ) external; function remove_liquidity(uint256 _amount, uint256[2] memory min_amounts) external; function remove_liquidity( uint256 _amount, uint256[3] memory min_amounts, bool use_eth, address receiver ) external; function remove_liquidity(uint256 _amount, uint256[3] memory min_amounts) external; function remove_liquidity_one_coin( uint256 token_amount, uint256 i, uint256 min_amount, bool use_eth, address receiver ) external returns (uint256); function get_dy(uint256 i, uint256 j, uint256 dx) external view returns (uint256); function calc_token_amount(uint256[] memory amounts) external view returns (uint256); function calc_withdraw_one_coin( uint256 token_amount, uint256 i ) external view returns (uint256); function get_virtual_price() external view returns (uint256); }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; interface ICurvePoolV1 { function get_virtual_price() external view returns (uint256); function add_liquidity(uint256[8] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[7] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[6] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[5] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[4] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[3] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[2] calldata amounts, uint256 min_mint_amount) external; function remove_liquidity_imbalance( uint256[4] calldata amounts, uint256 max_burn_amount ) external; function remove_liquidity_imbalance( uint256[3] calldata amounts, uint256 max_burn_amount ) external; function remove_liquidity_imbalance( uint256[2] calldata amounts, uint256 max_burn_amount ) external; function lp_token() external view returns (address); function A_PRECISION() external view returns (uint256); function A_precise() external view returns (uint256); function remove_liquidity(uint256 _amount, uint256[3] calldata min_amounts) external; function exchange( int128 from, int128 to, uint256 _from_amount, uint256 _min_to_amount ) external; function coins(uint256 i) external view returns (address); function balances(uint256 i) external view returns (uint256); function get_dy(int128 i, int128 j, uint256 _dx) external view returns (uint256); function calc_token_amount( uint256[4] calldata amounts, bool deposit ) external view returns (uint256); function calc_token_amount( uint256[3] calldata amounts, bool deposit ) external view returns (uint256); function calc_token_amount( uint256[2] calldata amounts, bool deposit ) external view returns (uint256); function calc_withdraw_one_coin( uint256 _token_amount, int128 i ) external view returns (uint256); function remove_liquidity_one_coin( uint256 _token_amount, int128 i, uint256 min_amount ) external; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; interface IOracle { event TokenUpdated(address indexed token, address feed, uint256 maxDelay, bool isEthPrice); /// @notice returns the price in USD of symbol. function getUSDPrice(address token) external view returns (uint256); /// @notice returns if the given token is supported for pricing. function isTokenSupported(address token) external view returns (bool); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; import "IConicPool.sol"; import "IOracle.sol"; import "IInflationManager.sol"; import "ILpTokenStaker.sol"; import "ICurveRegistryCache.sol"; interface IController { event PoolAdded(address indexed pool); event PoolRemoved(address indexed pool); event PoolShutdown(address indexed pool); event ConvexBoosterSet(address convexBooster); event CurveHandlerSet(address curveHandler); event ConvexHandlerSet(address convexHandler); event CurveRegistryCacheSet(address curveRegistryCache); event InflationManagerSet(address inflationManager); event PriceOracleSet(address priceOracle); event WeightUpdateMinDelaySet(uint256 weightUpdateMinDelay); struct WeightUpdate { address conicPoolAddress; IConicPool.PoolWeight[] weights; } // inflation manager function inflationManager() external view returns (IInflationManager); function setInflationManager(address manager) external; // views function curveRegistryCache() external view returns (ICurveRegistryCache); /// lp token staker function setLpTokenStaker(address _lpTokenStaker) external; function lpTokenStaker() external view returns (ILpTokenStaker); // oracle function priceOracle() external view returns (IOracle); function setPriceOracle(address oracle) external; // pool functions function listPools() external view returns (address[] memory); function listActivePools() external view returns (address[] memory); function isPool(address poolAddress) external view returns (bool); function isActivePool(address poolAddress) external view returns (bool); function addPool(address poolAddress) external; function shutdownPool(address poolAddress) external; function removePool(address poolAddress) external; function cncToken() external view returns (address); function lastWeightUpdate(address poolAddress) external view returns (uint256); function updateWeights(WeightUpdate memory update) external; function updateAllWeights(WeightUpdate[] memory weights) external; // handler functions function convexBooster() external view returns (address); function curveHandler() external view returns (address); function convexHandler() external view returns (address); function setConvexBooster(address _convexBooster) external; function setCurveHandler(address _curveHandler) external; function setConvexHandler(address _convexHandler) external; function setCurveRegistryCache(address curveRegistryCache_) external; function emergencyMinter() external view returns (address); function setWeightUpdateMinDelay(uint256 delay) external; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; import "ILpToken.sol"; import "IRewardManager.sol"; import "IOracle.sol"; import "IController.sol"; interface IConicPool { event Deposit( address indexed sender, address indexed receiver, uint256 depositedAmount, uint256 lpReceived ); event Withdraw(address indexed account, uint256 amount); event NewWeight(address indexed curvePool, uint256 newWeight); event NewMaxIdleCurveLpRatio(uint256 newRatio); event ClaimedRewards(uint256 claimedCrv, uint256 claimedCvx); event HandledDepeggedCurvePool(address curvePool_); event HandledInvalidConvexPid(address curvePool_, uint256 pid_); event CurvePoolAdded(address curvePool_); event CurvePoolRemoved(address curvePool_); event Shutdown(); event DepegThresholdUpdated(uint256 newThreshold); event MaxDeviationUpdated(uint256 newMaxDeviation); struct PoolWeight { address poolAddress; uint256 weight; } struct PoolWithAmount { address poolAddress; uint256 amount; } function underlying() external view returns (IERC20Metadata); function lpToken() external view returns (ILpToken); function rewardManager() external view returns (IRewardManager); function controller() external view returns (IController); function depegThreshold() external view returns (uint256); function maxIdleCurveLpRatio() external view returns (uint256); function getPoolWeight(address curvePool) external view returns (uint256); function setMaxIdleCurveLpRatio(uint256 value) external; function updateDepegThreshold(uint256 value) external; function computeDeviationRatio() external view returns (uint256); function depositFor( address _account, uint256 _amount, uint256 _minLpReceived, bool stake ) external returns (uint256); function deposit(uint256 _amount, uint256 _minLpReceived) external returns (uint256); function deposit( uint256 _amount, uint256 _minLpReceived, bool stake ) external returns (uint256); function exchangeRate() external view returns (uint256); function usdExchangeRate() external view returns (uint256); function allCurvePools() external view returns (address[] memory); function curvePoolsCount() external view returns (uint256); function getCurvePoolAtIndex(uint256 _index) external view returns (address); function unstakeAndWithdraw(uint256 _amount, uint256 _minAmount) external returns (uint256); function withdraw(uint256 _amount, uint256 _minAmount) external returns (uint256); function updateWeights(PoolWeight[] memory poolWeights) external; function getWeight(address curvePool) external view returns (uint256); function getWeights() external view returns (PoolWeight[] memory); function getAllocatedUnderlying() external view returns (PoolWithAmount[] memory); function removeCurvePool(address pool) external; function addCurvePool(address pool) external; function totalCurveLpBalance(address curvePool_) external view returns (uint256); function rebalancingRewardActive() external view returns (bool); function totalDeviationAfterWeightUpdate() external view returns (uint256); function computeTotalDeviation() external view returns (uint256); /// @notice returns the total amount of funds held by this pool in terms of underlying function totalUnderlying() external view returns (uint256); function getTotalAndPerPoolUnderlying() external view returns ( uint256 totalUnderlying_, uint256 totalAllocated_, uint256[] memory perPoolUnderlying_ ); /// @notice same as `totalUnderlying` but returns a cached version /// that might be slightly outdated if oracle prices have changed /// @dev this is useful in cases where we want to reduce gas usage and do /// not need a precise value function cachedTotalUnderlying() external view returns (uint256); function handleInvalidConvexPid(address pool) external; function shutdownPool() external; function isShutdown() external view returns (bool); function handleDepeggedCurvePool(address curvePool_) external; function isBalanced() external view returns (bool); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; import "IERC20Metadata.sol"; interface ILpToken is IERC20Metadata { function mint(address account, uint256 amount) external returns (uint256); function burn(address _owner, uint256 _amount) external returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; interface IRewardManager { event ClaimedRewards(uint256 claimedCrv, uint256 claimedCvx); event SoldRewardTokens(uint256 targetTokenReceived); event ExtraRewardAdded(address reward); event ExtraRewardRemoved(address reward); event ExtraRewardsCurvePoolSet(address extraReward, address curvePool); event FeesSet(uint256 feePercentage); event FeesEnabled(uint256 feePercentage); event EarningsClaimed( address indexed claimedBy, uint256 cncEarned, uint256 crvEarned, uint256 cvxEarned ); function accountCheckpoint(address account) external; function poolCheckpoint() external returns (bool); function addExtraReward(address reward) external returns (bool); function addBatchExtraRewards(address[] memory rewards) external; function pool() external view returns (address); function setFeePercentage(uint256 _feePercentage) external; function claimableRewards( address account ) external view returns (uint256 cncRewards, uint256 crvRewards, uint256 cvxRewards); function claimEarnings() external returns (uint256, uint256, uint256); function claimPoolEarningsAndSellRewardTokens() external; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; interface IInflationManager { event TokensClaimed(address indexed pool, uint256 cncAmount); event RebalancingRewardHandlerAdded(address indexed pool, address indexed handler); event RebalancingRewardHandlerRemoved(address indexed pool, address indexed handler); event PoolWeightsUpdated(); function executeInflationRateUpdate() external; function updatePoolWeights() external; /// @notice returns the weights of the Conic pools to know how much inflation /// each of them will receive, as well as the total amount of USD value in all the pools function computePoolWeights() external view returns (address[] memory _pools, uint256[] memory poolWeights, uint256 totalUSDValue); function computePoolWeight( address pool ) external view returns (uint256 poolWeight, uint256 totalUSDValue); function currentInflationRate() external view returns (uint256); function getCurrentPoolInflationRate(address pool) external view returns (uint256); function handleRebalancingRewards( address account, uint256 deviationBefore, uint256 deviationAfter ) external; function addPoolRebalancingRewardHandler( address poolAddress, address rebalancingRewardHandler ) external; function removePoolRebalancingRewardHandler( address poolAddress, address rebalancingRewardHandler ) external; function rebalancingRewardHandlers( address poolAddress ) external view returns (address[] memory); function hasPoolRebalancingRewardHandlers( address poolAddress, address handler ) external view returns (bool); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; interface ILpTokenStaker { event LpTokenStaked(address indexed account, uint256 amount); event LpTokenUnstaked(address indexed account, uint256 amount); event TokensClaimed(address indexed pool, uint256 cncAmount); event Shutdown(); function stake(uint256 amount, address conicPool) external; function unstake(uint256 amount, address conicPool) external; function stakeFor(uint256 amount, address conicPool, address account) external; function unstakeFor(uint256 amount, address conicPool, address account) external; function unstakeFrom(uint256 amount, address account) external; function getUserBalanceForPool( address conicPool, address account ) external view returns (uint256); function getBalanceForPool(address conicPool) external view returns (uint256); function updateBoost(address user) external; function claimCNCRewardsForPool(address pool) external; function claimableCnc(address pool) external view returns (uint256); function checkpoint(address pool) external returns (uint256); function shutdown() external; function getBoost(address user) external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; import "IBooster.sol"; import "CurvePoolUtils.sol"; interface ICurveRegistryCache { event PoolInitialized(address indexed pool, uint256 indexed pid); function BOOSTER() external view returns (IBooster); function initPool(address pool_) external; function initPool(address pool_, uint256 pid_) external; function lpToken(address pool_) external view returns (address); function assetType(address pool_) external view returns (CurvePoolUtils.AssetType); function isRegistered(address pool_) external view returns (bool); function hasCoinDirectly(address pool_, address coin_) external view returns (bool); function hasCoinAnywhere(address pool_, address coin_) external view returns (bool); function basePool(address pool_) external view returns (address); function coinIndex(address pool_, address coin_) external view returns (int128); function nCoins(address pool_) external view returns (uint256); function coinIndices( address pool_, address from_, address to_ ) external view returns (int128, int128, bool); function decimals(address pool_) external view returns (uint256[] memory); function interfaceVersion(address pool_) external view returns (uint256); function poolFromLpToken(address lpToken_) external view returns (address); function coins(address pool_) external view returns (address[] memory); function getPid(address _pool) external view returns (uint256); function getRewardPool(address _pool) external view returns (address); function isShutdownPid(uint256 pid_) external view returns (bool); }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; interface IBooster { function poolInfo( uint256 pid ) external view returns ( address lpToken, address token, address gauge, address crvRewards, address stash, bool shutdown ); function poolLength() external view returns (uint256); function deposit(uint256 _pid, uint256 _amount, bool _stake) external returns (bool); function withdraw(uint256 _pid, uint256 _amount) external returns (bool); function withdrawAll(uint256 _pid) external returns (bool); function depositAll(uint256 _pid, bool _stake) external returns (bool); function earmarkRewards(uint256 _pid) external returns (bool); function isShutdown() external view returns (bool); }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; interface ICurveFactory { function get_n_coins(address _pool) external view returns (uint256); function get_decimals(address curvePool_) external view returns (uint256[4] memory); }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; interface ICurvePoolV0 { function get_virtual_price() external view returns (uint256); function add_liquidity(uint256[8] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[7] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[6] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[5] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[4] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[3] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[2] calldata amounts, uint256 min_mint_amount) external; function remove_liquidity_imbalance( uint256[4] calldata amounts, uint256 max_burn_amount ) external; function remove_liquidity_imbalance( uint256[3] calldata amounts, uint256 max_burn_amount ) external; function remove_liquidity_imbalance( uint256[2] calldata amounts, uint256 max_burn_amount ) external; function lp_token() external view returns (address); function A_PRECISION() external view returns (uint256); function A_precise() external view returns (uint256); function remove_liquidity(uint256 _amount, uint256[2] calldata min_amounts) external; function remove_liquidity(uint256 _amount, uint256[3] calldata min_amounts) external; function remove_liquidity(uint256 _amount, uint256[4] calldata min_amounts) external; function remove_liquidity(uint256 _amount, uint256[5] calldata min_amounts) external; function remove_liquidity(uint256 _amount, uint256[6] calldata min_amounts) external; function remove_liquidity(uint256 _amount, uint256[7] calldata min_amounts) external; function remove_liquidity(uint256 _amount, uint256[8] calldata min_amounts) external; function exchange( int128 from, int128 to, uint256 _from_amount, uint256 _min_to_amount ) external; function coins(int128 i) external view returns (address); function balances(int128 i) external view returns (uint256); function get_dy(int128 i, int128 j, uint256 _dx) external view returns (uint256); function calc_token_amount( uint256[4] calldata amounts, bool deposit ) external view returns (uint256); function calc_token_amount( uint256[3] calldata amounts, bool deposit ) external view returns (uint256); function calc_token_amount( uint256[2] calldata amounts, bool deposit ) external view returns (uint256); function calc_withdraw_one_coin( uint256 _token_amount, int128 i ) external view returns (uint256); }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; interface ICurveMetaRegistry { event CommitNewAdmin(uint256 indexed deadline, address indexed admin); event NewAdmin(address indexed admin); function add_registry_handler(address _registry_handler) external; function update_registry_handler(uint256 _index, address _registry_handler) external; function get_registry_handlers_from_pool( address _pool ) external view returns (address[10] memory); function get_base_registry(address registry_handler) external view returns (address); function find_pool_for_coins(address _from, address _to) external view returns (address); function find_pool_for_coins( address _from, address _to, uint256 i ) external view returns (address); function find_pools_for_coins( address _from, address _to ) external view returns (address[] memory); function get_admin_balances(address _pool) external view returns (uint256[8] memory); function get_admin_balances( address _pool, uint256 _handler_id ) external view returns (uint256[8] memory); function get_balances(address _pool) external view returns (uint256[8] memory); function get_balances( address _pool, uint256 _handler_id ) external view returns (uint256[8] memory); function get_base_pool(address _pool) external view returns (address); function get_base_pool(address _pool, uint256 _handler_id) external view returns (address); function get_coin_indices( address _pool, address _from, address _to ) external view returns (int128, int128, bool); function get_coin_indices( address _pool, address _from, address _to, uint256 _handler_id ) external view returns (int128, int128, bool); function get_coins(address _pool) external view returns (address[8] memory); function get_coins( address _pool, uint256 _handler_id ) external view returns (address[8] memory); function get_decimals(address _pool) external view returns (uint256[8] memory); function get_decimals( address _pool, uint256 _handler_id ) external view returns (uint256[8] memory); function get_fees(address _pool) external view returns (uint256[10] memory); function get_fees( address _pool, uint256 _handler_id ) external view returns (uint256[10] memory); function get_gauge(address _pool) external view returns (address); function get_gauge(address _pool, uint256 gauge_idx) external view returns (address); function get_gauge( address _pool, uint256 gauge_idx, uint256 _handler_id ) external view returns (address); function get_gauge_type(address _pool) external view returns (int128); function get_gauge_type(address _pool, uint256 gauge_idx) external view returns (int128); function get_gauge_type( address _pool, uint256 gauge_idx, uint256 _handler_id ) external view returns (int128); function get_lp_token(address _pool) external view returns (address); function get_lp_token(address _pool, uint256 _handler_id) external view returns (address); function get_n_coins(address _pool) external view returns (uint256); function get_n_coins(address _pool, uint256 _handler_id) external view returns (uint256); function get_n_underlying_coins(address _pool) external view returns (uint256); function get_n_underlying_coins( address _pool, uint256 _handler_id ) external view returns (uint256); function get_pool_asset_type(address _pool) external view returns (uint256); function get_pool_asset_type( address _pool, uint256 _handler_id ) external view returns (uint256); function get_pool_from_lp_token(address _token) external view returns (address); function get_pool_from_lp_token( address _token, uint256 _handler_id ) external view returns (address); function get_pool_params(address _pool) external view returns (uint256[20] memory); function get_pool_params( address _pool, uint256 _handler_id ) external view returns (uint256[20] memory); function get_pool_name(address _pool) external view returns (string memory); function get_pool_name( address _pool, uint256 _handler_id ) external view returns (string memory); function get_underlying_balances(address _pool) external view returns (uint256[8] memory); function get_underlying_balances( address _pool, uint256 _handler_id ) external view returns (uint256[8] memory); function get_underlying_coins(address _pool) external view returns (address[8] memory); function get_underlying_coins( address _pool, uint256 _handler_id ) external view returns (address[8] memory); function get_underlying_decimals(address _pool) external view returns (uint256[8] memory); function get_underlying_decimals( address _pool, uint256 _handler_id ) external view returns (uint256[8] memory); function get_virtual_price_from_lp_token(address _token) external view returns (uint256); function get_virtual_price_from_lp_token( address _token, uint256 _handler_id ) external view returns (uint256); function is_meta(address _pool) external view returns (bool); function is_meta(address _pool, uint256 _handler_id) external view returns (bool); function is_registered(address _pool) external view returns (bool); function is_registered(address _pool, uint256 _handler_id) external view returns (bool); function pool_count() external view returns (uint256); function pool_list(uint256 _index) external view returns (address); function address_provider() external view returns (address); function owner() external view returns (address); function get_registry(uint256 arg0) external view returns (address); function registry_length() external view returns (uint256); }
{ "evmVersion": "london", "optimizer": { "enabled": true, "runs": 200 }, "libraries": { "CurveLPOracleV2.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"controller_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"threshold","type":"uint256"}],"name":"ImbalanceThresholdUpdated","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":"token","type":"address"},{"indexed":false,"internalType":"address","name":"feed","type":"address"},{"indexed":false,"internalType":"uint256","name":"maxDelay","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isEthPrice","type":"bool"}],"name":"TokenUpdated","type":"event"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getUSDPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"imbalanceThresholds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"isTokenSupported","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"threshold","type":"uint256"}],"name":"setImbalanceThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b5060405161189e38038061189e83398101604081905261002f91610099565b61003833610049565b6001600160a01b03166080526100c9565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100ab57600080fd5b81516001600160a01b03811681146100c257600080fd5b9392505050565b6080516117976101076000396000818161020201528181610295015281816104dc0152818161056f01528181610cc10152610db701526117976000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806375151b631161005b57806375151b63146100d25780638b2f0f4f146100f55780638da5cb5b14610108578063f2fde38b1461012357600080fd5b806338726f08146100825780634b5a518e14610097578063715018a6146100ca575b600080fd5b61009561009036600461133d565b610136565b005b6100b76100a5366004611369565b60016020526000908152604090205481565b6040519081526020015b60405180910390f35b6100956101e9565b6100e56100e0366004611369565b6101fd565b60405190151581526020016100c1565b6100b7610103366004611369565b6104d7565b6000546040516001600160a01b0390911681526020016100c1565b610095610131366004611369565b610b9a565b61013e610c13565b67016345785d8a00008111156101905760405162461bcd60e51b81526020600482015260126024820152710e8d0e4cae6d0ded8c840e8dede40d0d2ced60731b60448201526064015b60405180910390fd5b6001600160a01b03821660008181526001602052604090819020839055517f7b718dc4e7c7ee990f859e57df5619938b679591799489da97280f53d0295439906101dd9084815260200190565b60405180910390a25050565b6101f1610c13565b6101fb6000610c6d565b565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632630c12f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561025e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102829190611386565b9050600061028f84610cbd565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103159190611386565b60405163c3c5a54760e01b81526001600160a01b0384811660048301529192509082169063c3c5a54790602401602060405180830381865afa15801561035f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038391906113a3565b61039257506000949350505050565b604051630fa1ef5160e31b81526001600160a01b03838116600483015260009190831690637d0f7a8890602401600060405180830381865afa1580156103dc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104049190810190611430565b905060005b81518110156104ca57846001600160a01b03166375151b63838381518110610433576104336114cf565b60200260200101516040518263ffffffff1660e01b815260040161046691906001600160a01b0391909116815260200190565b602060405180830381865afa158015610483573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a791906113a3565b6104b8575060009695505050505050565b806104c2816114fb565b915050610409565b5060019695505050505050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632630c12f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610538573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055c9190611386565b9050600061056984610cbd565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ef9190611386565b60405163c3c5a54760e01b81526001600160a01b0384811660048301529192509082169063c3c5a54790602401602060405180830381865afa158015610639573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065d91906113a3565b61069f5760405162461bcd60e51b81526020600482015260136024820152721d1bdad95b881b9bdd081cdd5c1c1bdc9d1959606a1b6044820152606401610187565b604051636a24d41960e11b81526001600160a01b0383811660048301526000919083169063d449a83290602401600060405180830381865afa1580156106e9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107119190810190611514565b604051630fa1ef5160e31b81526001600160a01b038581166004830152919250600091841690637d0f7a8890602401600060405180830381865afa15801561075d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107859190810190611430565b604051635f92e81560e11b81526001600160a01b03868116600483015291925060009182919086169063bf25d02a90602401602060405180830381865afa1580156107d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f8919061159a565b905060008167ffffffffffffffff811115610815576108156113c5565b60405190808252806020026020018201604052801561083e578160200160208202803683370190505b50905060008267ffffffffffffffff81111561085c5761085c6113c5565b604051908082528060200260200182016040528015610885578160200160208202803683370190505b50905060005b83811015610a6c5760008682815181106108a7576108a76114cf565b6020908102919091010151604051638b2f0f4f60e01b81526001600160a01b0380831660048301529192506000918d1690638b2f0f4f90602401602060405180830381865afa1580156108fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610922919061159a565b905080858481518110610937576109376114cf565b602002602001018181525050600160008f6001600160a01b03166001600160a01b031681526020019081526020016000205484848151811061097b5761097b6114cf565b602002602001018181525050600081116109c45760405162461bcd60e51b815260206004820152600a6024820152690707269636520697320360b41b6044820152606401610187565b60006109d08c85610db3565b905060008111610a115760405162461bcd60e51b815260206004820152600c60248201526b062616c616e636520697320360a41b6044820152606401610187565b610a4a82610a448c8781518110610a2a57610a2a6114cf565b6020026020010151601285610f8c9092919063ffffffff16565b90610fd5565b610a5490896115b3565b97505050508080610a64906114fb565b91505061088b565b506040805160c0810182526001600160a01b03808b168083526020830187905283516372056c6560e11b81526004810191909152610b1f938301918b169063e40ad8ca90602401602060405180830381865afa158015610ad0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af491906115c6565b6004811115610b0557610b056115e7565b815260200188815260200184815260200183815250610ff7565b610b8b8b6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b84919061159a565b8590611279565b9b9a5050505050505050505050565b610ba2610c13565b6001600160a01b038116610c075760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610187565b610c1081610c6d565b50565b6000546001600160a01b031633146101fb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610187565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d419190611386565b604051634060c02560e01b81526001600160a01b0384811660048301529190911690634060c02590602401602060405180830381865afa158015610d89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dad9190611386565b92915050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e379190611386565b604051630bb075af60e11b81526001600160a01b0385811660048301529190911690631760eb5e90602401602060405180830381865afa158015610e7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea3919061159a565b600003610f1c5760405162cb501b60e31b8152600f83900b60048201526001600160a01b0384169063065a80d890602401602060405180830381865afa158015610ef1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f15919061159a565b9050610dad565b604051634903b0d160e01b8152600481018390526001600160a01b03841690634903b0d190602401602060405180830381865afa158015610f61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f85919061159a565b9392505050565b60008160ff168360ff1603610fa2575082610f85565b8160ff168360ff161115610fc257610fbb848484611292565b9050610f85565b610fcd8484846112b3565b949350505050565b6000610fe36012600a6116e1565b610fed83856116ed565b610f859190611704565b60008160600151600081518110611010576110106114cf565b60200260200101519050600081600a61102991906116e1565b905060008360800151600081518110611044576110446114cf565b602002602001015190506000600190505b846020015181101561127257600085606001518281518110611079576110796114cf565b6020026020010151905060008660800151838151811061109b5761109b6114cf565b6020026020010151905060008185876110b491906116ed565b6110be9190611704565b905060006110cd828986610f8c565b9050600060048a6040015160048111156110e9576110e96115e7565b0361116f57895160405163556d6e9f60e01b81526000600482015260248101889052604481018a90526001600160a01b039091169063556d6e9f90606401602060405180830381865afa158015611144573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611168919061159a565b90506111ef565b8951604051635e0d443f60e01b815260006004820152600f88900b6024820152604481018a90526001600160a01b0390911690635e0d443f90606401602060405180830381865afa1580156111c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ec919061159a565b90505b61121782828c60a00151898151811061120a5761120a6114cf565b60200260200101516112d4565b61125a5760405162461bcd60e51b81526020600482015260146024820152731c1bdbdb081a5cc81b9bdd0818985b185b98d95960621b6044820152606401610187565b5050505050808061126a906114fb565b915050611055565b5050505050565b6000816112886012600a6116e1565b610fed90856116ed565b600061129e8284611726565b6112a990600a61173f565b610fcd9085611704565b60006112bf8383611726565b6112ca90600a61173f565b610fcd90856116ed565b6000816000036112e95766470de4df82000091505b8284111561130f578161130685611300868261174e565b90611279565b11159050610f85565b8161131e84611300878261174e565b1115949350505050565b6001600160a01b0381168114610c1057600080fd5b6000806040838503121561135057600080fd5b823561135b81611328565b946020939093013593505050565b60006020828403121561137b57600080fd5b8135610f8581611328565b60006020828403121561139857600080fd5b8151610f8581611328565b6000602082840312156113b557600080fd5b81518015158114610f8557600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611404576114046113c5565b604052919050565b600067ffffffffffffffff821115611426576114266113c5565b5060051b60200190565b6000602080838503121561144357600080fd5b825167ffffffffffffffff81111561145a57600080fd5b8301601f8101851361146b57600080fd5b805161147e6114798261140c565b6113db565b81815260059190911b8201830190838101908783111561149d57600080fd5b928401925b828410156114c45783516114b581611328565b825292840192908401906114a2565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161150d5761150d6114e5565b5060010190565b6000602080838503121561152757600080fd5b825167ffffffffffffffff81111561153e57600080fd5b8301601f8101851361154f57600080fd5b805161155d6114798261140c565b81815260059190911b8201830190838101908783111561157c57600080fd5b928401925b828410156114c457835182529284019290840190611581565b6000602082840312156115ac57600080fd5b5051919050565b80820180821115610dad57610dad6114e5565b6000602082840312156115d857600080fd5b815160058110610f8557600080fd5b634e487b7160e01b600052602160045260246000fd5b600181815b8085111561163857816000190482111561161e5761161e6114e5565b8085161561162b57918102915b93841c9390800290611602565b509250929050565b60008261164f57506001610dad565b8161165c57506000610dad565b8160018114611672576002811461167c57611698565b6001915050610dad565b60ff84111561168d5761168d6114e5565b50506001821b610dad565b5060208310610133831016604e8410600b84101617156116bb575081810a610dad565b6116c583836115fd565b80600019048211156116d9576116d96114e5565b029392505050565b6000610f858383611640565b8082028115828204841417610dad57610dad6114e5565b60008261172157634e487b7160e01b600052601260045260246000fd5b500490565b60ff8281168282160390811115610dad57610dad6114e5565b6000610f8560ff841683611640565b81810381811115610dad57610dad6114e556fea2646970667358221220e787941ff00452203ea08f8197bbdca581a0eec60c1ff7ec165992a6e7a8558164736f6c63430008110033000000000000000000000000013a3da6591d3427f164862793ab4e388f9b587e
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c806375151b631161005b57806375151b63146100d25780638b2f0f4f146100f55780638da5cb5b14610108578063f2fde38b1461012357600080fd5b806338726f08146100825780634b5a518e14610097578063715018a6146100ca575b600080fd5b61009561009036600461133d565b610136565b005b6100b76100a5366004611369565b60016020526000908152604090205481565b6040519081526020015b60405180910390f35b6100956101e9565b6100e56100e0366004611369565b6101fd565b60405190151581526020016100c1565b6100b7610103366004611369565b6104d7565b6000546040516001600160a01b0390911681526020016100c1565b610095610131366004611369565b610b9a565b61013e610c13565b67016345785d8a00008111156101905760405162461bcd60e51b81526020600482015260126024820152710e8d0e4cae6d0ded8c840e8dede40d0d2ced60731b60448201526064015b60405180910390fd5b6001600160a01b03821660008181526001602052604090819020839055517f7b718dc4e7c7ee990f859e57df5619938b679591799489da97280f53d0295439906101dd9084815260200190565b60405180910390a25050565b6101f1610c13565b6101fb6000610c6d565b565b6000807f000000000000000000000000013a3da6591d3427f164862793ab4e388f9b587e6001600160a01b0316632630c12f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561025e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102829190611386565b9050600061028f84610cbd565b905060007f000000000000000000000000013a3da6591d3427f164862793ab4e388f9b587e6001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103159190611386565b60405163c3c5a54760e01b81526001600160a01b0384811660048301529192509082169063c3c5a54790602401602060405180830381865afa15801561035f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038391906113a3565b61039257506000949350505050565b604051630fa1ef5160e31b81526001600160a01b03838116600483015260009190831690637d0f7a8890602401600060405180830381865afa1580156103dc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104049190810190611430565b905060005b81518110156104ca57846001600160a01b03166375151b63838381518110610433576104336114cf565b60200260200101516040518263ffffffff1660e01b815260040161046691906001600160a01b0391909116815260200190565b602060405180830381865afa158015610483573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a791906113a3565b6104b8575060009695505050505050565b806104c2816114fb565b915050610409565b5060019695505050505050565b6000807f000000000000000000000000013a3da6591d3427f164862793ab4e388f9b587e6001600160a01b0316632630c12f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610538573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055c9190611386565b9050600061056984610cbd565b905060007f000000000000000000000000013a3da6591d3427f164862793ab4e388f9b587e6001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ef9190611386565b60405163c3c5a54760e01b81526001600160a01b0384811660048301529192509082169063c3c5a54790602401602060405180830381865afa158015610639573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065d91906113a3565b61069f5760405162461bcd60e51b81526020600482015260136024820152721d1bdad95b881b9bdd081cdd5c1c1bdc9d1959606a1b6044820152606401610187565b604051636a24d41960e11b81526001600160a01b0383811660048301526000919083169063d449a83290602401600060405180830381865afa1580156106e9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107119190810190611514565b604051630fa1ef5160e31b81526001600160a01b038581166004830152919250600091841690637d0f7a8890602401600060405180830381865afa15801561075d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107859190810190611430565b604051635f92e81560e11b81526001600160a01b03868116600483015291925060009182919086169063bf25d02a90602401602060405180830381865afa1580156107d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f8919061159a565b905060008167ffffffffffffffff811115610815576108156113c5565b60405190808252806020026020018201604052801561083e578160200160208202803683370190505b50905060008267ffffffffffffffff81111561085c5761085c6113c5565b604051908082528060200260200182016040528015610885578160200160208202803683370190505b50905060005b83811015610a6c5760008682815181106108a7576108a76114cf565b6020908102919091010151604051638b2f0f4f60e01b81526001600160a01b0380831660048301529192506000918d1690638b2f0f4f90602401602060405180830381865afa1580156108fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610922919061159a565b905080858481518110610937576109376114cf565b602002602001018181525050600160008f6001600160a01b03166001600160a01b031681526020019081526020016000205484848151811061097b5761097b6114cf565b602002602001018181525050600081116109c45760405162461bcd60e51b815260206004820152600a6024820152690707269636520697320360b41b6044820152606401610187565b60006109d08c85610db3565b905060008111610a115760405162461bcd60e51b815260206004820152600c60248201526b062616c616e636520697320360a41b6044820152606401610187565b610a4a82610a448c8781518110610a2a57610a2a6114cf565b6020026020010151601285610f8c9092919063ffffffff16565b90610fd5565b610a5490896115b3565b97505050508080610a64906114fb565b91505061088b565b506040805160c0810182526001600160a01b03808b168083526020830187905283516372056c6560e11b81526004810191909152610b1f938301918b169063e40ad8ca90602401602060405180830381865afa158015610ad0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af491906115c6565b6004811115610b0557610b056115e7565b815260200188815260200184815260200183815250610ff7565b610b8b8b6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b84919061159a565b8590611279565b9b9a5050505050505050505050565b610ba2610c13565b6001600160a01b038116610c075760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610187565b610c1081610c6d565b50565b6000546001600160a01b031633146101fb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610187565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60007f000000000000000000000000013a3da6591d3427f164862793ab4e388f9b587e6001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d419190611386565b604051634060c02560e01b81526001600160a01b0384811660048301529190911690634060c02590602401602060405180830381865afa158015610d89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dad9190611386565b92915050565b60007f000000000000000000000000013a3da6591d3427f164862793ab4e388f9b587e6001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e379190611386565b604051630bb075af60e11b81526001600160a01b0385811660048301529190911690631760eb5e90602401602060405180830381865afa158015610e7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea3919061159a565b600003610f1c5760405162cb501b60e31b8152600f83900b60048201526001600160a01b0384169063065a80d890602401602060405180830381865afa158015610ef1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f15919061159a565b9050610dad565b604051634903b0d160e01b8152600481018390526001600160a01b03841690634903b0d190602401602060405180830381865afa158015610f61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f85919061159a565b9392505050565b60008160ff168360ff1603610fa2575082610f85565b8160ff168360ff161115610fc257610fbb848484611292565b9050610f85565b610fcd8484846112b3565b949350505050565b6000610fe36012600a6116e1565b610fed83856116ed565b610f859190611704565b60008160600151600081518110611010576110106114cf565b60200260200101519050600081600a61102991906116e1565b905060008360800151600081518110611044576110446114cf565b602002602001015190506000600190505b846020015181101561127257600085606001518281518110611079576110796114cf565b6020026020010151905060008660800151838151811061109b5761109b6114cf565b6020026020010151905060008185876110b491906116ed565b6110be9190611704565b905060006110cd828986610f8c565b9050600060048a6040015160048111156110e9576110e96115e7565b0361116f57895160405163556d6e9f60e01b81526000600482015260248101889052604481018a90526001600160a01b039091169063556d6e9f90606401602060405180830381865afa158015611144573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611168919061159a565b90506111ef565b8951604051635e0d443f60e01b815260006004820152600f88900b6024820152604481018a90526001600160a01b0390911690635e0d443f90606401602060405180830381865afa1580156111c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ec919061159a565b90505b61121782828c60a00151898151811061120a5761120a6114cf565b60200260200101516112d4565b61125a5760405162461bcd60e51b81526020600482015260146024820152731c1bdbdb081a5cc81b9bdd0818985b185b98d95960621b6044820152606401610187565b5050505050808061126a906114fb565b915050611055565b5050505050565b6000816112886012600a6116e1565b610fed90856116ed565b600061129e8284611726565b6112a990600a61173f565b610fcd9085611704565b60006112bf8383611726565b6112ca90600a61173f565b610fcd90856116ed565b6000816000036112e95766470de4df82000091505b8284111561130f578161130685611300868261174e565b90611279565b11159050610f85565b8161131e84611300878261174e565b1115949350505050565b6001600160a01b0381168114610c1057600080fd5b6000806040838503121561135057600080fd5b823561135b81611328565b946020939093013593505050565b60006020828403121561137b57600080fd5b8135610f8581611328565b60006020828403121561139857600080fd5b8151610f8581611328565b6000602082840312156113b557600080fd5b81518015158114610f8557600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611404576114046113c5565b604052919050565b600067ffffffffffffffff821115611426576114266113c5565b5060051b60200190565b6000602080838503121561144357600080fd5b825167ffffffffffffffff81111561145a57600080fd5b8301601f8101851361146b57600080fd5b805161147e6114798261140c565b6113db565b81815260059190911b8201830190838101908783111561149d57600080fd5b928401925b828410156114c45783516114b581611328565b825292840192908401906114a2565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161150d5761150d6114e5565b5060010190565b6000602080838503121561152757600080fd5b825167ffffffffffffffff81111561153e57600080fd5b8301601f8101851361154f57600080fd5b805161155d6114798261140c565b81815260059190911b8201830190838101908783111561157c57600080fd5b928401925b828410156114c457835182529284019290840190611581565b6000602082840312156115ac57600080fd5b5051919050565b80820180821115610dad57610dad6114e5565b6000602082840312156115d857600080fd5b815160058110610f8557600080fd5b634e487b7160e01b600052602160045260246000fd5b600181815b8085111561163857816000190482111561161e5761161e6114e5565b8085161561162b57918102915b93841c9390800290611602565b509250929050565b60008261164f57506001610dad565b8161165c57506000610dad565b8160018114611672576002811461167c57611698565b6001915050610dad565b60ff84111561168d5761168d6114e5565b50506001821b610dad565b5060208310610133831016604e8410600b84101617156116bb575081810a610dad565b6116c583836115fd565b80600019048211156116d9576116d96114e5565b029392505050565b6000610f858383611640565b8082028115828204841417610dad57610dad6114e5565b60008261172157634e487b7160e01b600052601260045260246000fd5b500490565b60ff8281168282160390811115610dad57610dad6114e5565b6000610f8560ff841683611640565b81810381811115610dad57610dad6114e556fea2646970667358221220e787941ff00452203ea08f8197bbdca581a0eec60c1ff7ec165992a6e7a8558164736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000013a3da6591d3427f164862793ab4e388f9b587e
-----Decoded View---------------
Arg [0] : controller_ (address): 0x013A3Da6591d3427F164862793ab4e388F9B587e
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000013a3da6591d3427f164862793ab4e388f9b587e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.