Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 8 from a total of 8 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 19079717 | 299 days ago | IN | 0 ETH | 0.00037241 | ||||
Set Imbalance Th... | 19079603 | 299 days ago | IN | 0 ETH | 0.0006213 | ||||
Set Imbalance Th... | 19079596 | 299 days ago | IN | 0 ETH | 0.00062115 | ||||
Set Imbalance Th... | 19079587 | 299 days ago | IN | 0 ETH | 0.00057351 | ||||
Set Imbalance Th... | 19079576 | 299 days ago | IN | 0 ETH | 0.00057351 | ||||
Set Imbalance Th... | 19079574 | 299 days ago | IN | 0 ETH | 0.00057351 | ||||
Set Imbalance Th... | 19079539 | 299 days ago | IN | 0 ETH | 0.00057351 | ||||
0x60a06040 | 19079513 | 299 days ago | IN | 0 ETH | 0.01838041 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers. Name tag integration is not available in advanced view.
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | ||||
---|---|---|---|---|---|---|---|
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH | |||||
21217303 | 5 hrs ago | 0 ETH |
Loading...
Loading
Contract Name:
CurveLPOracle
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 CurveLPOracle is IOracle, Ownable { using ScaledMath for uint256; event ImbalanceThresholdUpdated(address indexed token, uint256 threshold); event InternalImbalanceThresholdUpdated(address indexed token, uint256 threshold); uint256 internal constant _MAX_IMBALANCE_BUFFER = 0.1e18; mapping(address => uint256) public customImbalanceBuffers; /// @notice these are used when the oracle is called internally for pricing metapool base pools mapping(address => uint256) public customInternalImbalanceBuffers; 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) { return _getUSDPrice(token, false); } function _getUSDPrice(address token, bool isInternal) internal view returns (uint256) { IGenericOracle 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 imbalanceBuffers = new uint256[](numberOfCoins); for (uint256 i; i < numberOfCoins; i++) { address coin = coins[i]; IOracle oracle = genericOracle.getOracle(coin); uint256 imbalanceBuffer = isInternal ? customInternalImbalanceBuffers[coin] : customImbalanceBuffers[coin]; uint256 price = address(oracle) == address(this) ? _getUSDPrice(coin, true) : oracle.getUSDPrice(coin); prices[i] = price; imbalanceBuffers[i] = imbalanceBuffer; 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, imbalanceBuffers: imbalanceBuffers }) ); // Returning the value of the pool in USD per LP Token return value.divDown(IERC20(token).totalSupply()); } function setImbalanceThreshold(address token, uint256 buffer) external onlyOwner { require(buffer <= _MAX_IMBALANCE_BUFFER, "buffer too high"); customImbalanceBuffers[token] = buffer; emit ImbalanceThresholdUpdated(token, buffer); } function setInternalImbalanceThreshold(address token, uint256 buffer) external onlyOwner { require(buffer <= _MAX_IMBALANCE_BUFFER, "buffer too high"); customInternalImbalanceBuffers[token] = buffer; emit InternalImbalanceThresholdUpdated(token, buffer); } 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.9.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.9.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. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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; } struct CliffInfo { uint256 currentCliff; bool withinThreshold; } }
// 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; } } function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } function min(uint256 a, uint256 b) internal pure returns (uint256) { return a <= b ? a : b; } }
// 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; error NotWithinThreshold(address pool, uint256 assetA, uint256 assetB); /// @dev by default, allow for 30 bps deviation regardless of pool fees uint256 internal constant _DEFAULT_IMBALANCE_BUFFER = 30e14; /// @dev Curve scales the `fee` by 1e10 uint8 internal constant _CURVE_POOL_FEE_DECIMALS = 10; /// @dev allow imbalance to be buffer + 3x the fee, e.g. if fee is 3.6 bps and buffer is 30 bps, allow 40.8 bps uint256 internal constant _FEE_IMBALANCE_MULTIPLIER = 3; enum AssetType { USD, ETH, BTC, OTHER, CRYPTO } struct PoolMeta { address pool; uint256 numberOfCoins; AssetType assetType; uint256[] decimals; uint256[] prices; uint256[] imbalanceBuffers; } function ensurePoolBalanced(PoolMeta memory poolMeta) internal view { uint256 poolFee = ICurvePoolV1(poolMeta.pool).fee().convertScale( _CURVE_POOL_FEE_DECIMALS, 18 ); for (uint256 i = 0; i < poolMeta.numberOfCoins - 1; i++) { uint256 fromDecimals = poolMeta.decimals[i]; uint256 fromBalance = 10 ** fromDecimals; uint256 fromPrice = poolMeta.prices[i]; for (uint256 j = i + 1; j < poolMeta.numberOfCoins; j++) { uint256 toDecimals = poolMeta.decimals[j]; uint256 toPrice = poolMeta.prices[j]; 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(i, j, fromBalance); } else { // Handling other pools toActual = ICurvePoolV1(poolMeta.pool).get_dy( int128(uint128(i)), int128(uint128(j)), fromBalance ); } uint256 _maxImbalanceBuffer = poolMeta.imbalanceBuffers[i].max( poolMeta.imbalanceBuffers[j] ); if (!_isWithinThreshold(toExpected, toActual, poolFee, _maxImbalanceBuffer)) revert NotWithinThreshold(poolMeta.pool, i, j); } } } function _isWithinThreshold( uint256 a, uint256 b, uint256 poolFee, uint256 imbalanceBuffer ) internal pure returns (bool) { if (imbalanceBuffer == 0) imbalanceBuffer = _DEFAULT_IMBALANCE_BUFFER; uint256 imbalanceTreshold = imbalanceBuffer + poolFee * _FEE_IMBALANCE_MULTIPLIER; 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; function fee() external view returns (uint256); }
// 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 "IConicPoolWeightManagement.sol"; import "IConicPool.sol"; import "IGenericOracle.sol"; import "IInflationManager.sol"; import "ILpTokenStaker.sol"; import "IBonding.sol"; import "IPoolAdapter.sol"; import "IFeeRecipient.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 BondingSet(address bonding); event FeeRecipientSet(address feeRecipient); event PriceOracleSet(address priceOracle); event WeightUpdateMinDelaySet(uint256 weightUpdateMinDelay); event PauseManagerSet(address indexed manager, bool isManager); event MultiDepositsWithdrawsWhitelistSet(address pool, bool allowed); event MinimumTaintedTransferAmountSet(address indexed token, uint256 amount); event DefaultPoolAdapterSet(address poolAdapter); event CustomPoolAdapterSet(address indexed pool, address poolAdapter); struct WeightUpdate { address conicPoolAddress; IConicPoolWeightManagement.PoolWeight[] weights; } function initialize(address _lpTokenStaker) external; // inflation manager function inflationManager() external view returns (IInflationManager); function setInflationManager(address manager) external; // views function curveRegistryCache() external view returns (ICurveRegistryCache); // pool adapter function poolAdapterFor(address pool) external view returns (IPoolAdapter); function defaultPoolAdapter() external view returns (IPoolAdapter); function setDefaultPoolAdapter(address poolAdapter) external; function setCustomPoolAdapter(address pool, address poolAdapter) external; /// lp token staker function switchLpTokenStaker(address _lpTokenStaker) external; function lpTokenStaker() external view returns (ILpTokenStaker); // bonding function bonding() external view returns (IBonding); function setBonding(address _bonding) external; // fees function feeRecipient() external view returns (IFeeRecipient); function setFeeRecipient(address _feeRecipient) external; // oracle function priceOracle() external view returns (IGenericOracle); 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 setWeightUpdateMinDelay(uint256 delay) external; function isPauseManager(address account) external view returns (bool); function listPauseManagers() external view returns (address[] memory); function setPauseManager(address account, bool isManager) external; // deposit/withdrawal whitelist function isAllowedMultipleDepositsWithdraws(address poolAddress) external view returns (bool); function setAllowedMultipleDepositsWithdraws(address account, bool allowed) external; function getMultipleDepositsWithdrawsWhitelist() external view returns (address[] memory); // tainted transfer amount function setMinimumTaintedTransferAmount(address token, uint256 amount) external; function getMinimumTaintedTransferAmount(address token) external view returns (uint256); // constants function MAX_WEIGHT_UPDATE_MIN_DELAY() external view returns (uint256); function MIN_WEIGHT_UPDATE_MIN_DELAY() external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; interface IConicPoolWeightManagement { struct PoolWeight { address poolAddress; uint256 weight; } function addPool(address pool) external; function removePool(address pool) external; function updateWeights(PoolWeight[] memory poolWeights) external; function handleDepeggedCurvePool(address curvePool_) external; function handleInvalidConvexPid(address pool) external returns (uint256); function allPools() external view returns (address[] memory); function poolsCount() external view returns (uint256); function getPoolAtIndex(uint256 _index) external view returns (address); function getWeight(address curvePool) external view returns (uint256); function getWeights() external view returns (PoolWeight[] memory); function isRegisteredPool(address _pool) external view returns (bool); }
// 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"; import "IPausable.sol"; import "IConicPoolWeightManagement.sol"; interface IConicPool is IConicPoolWeightManagement, IPausable { 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); event RebalancingRewardsEnabledSet(bool enabled); event EmergencyRebalancingRewardFactorUpdated(uint256 factor); 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 depegThreshold() external view returns (uint256); function maxIdleCurveLpRatio() external view returns (uint256); function setMaxIdleCurveLpRatio(uint256 value) external; function setMaxDeviation(uint256 maxDeviation_) external; function updateDepegThreshold(uint256 value) external; 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 unstakeAndWithdraw(uint256 _amount, uint256 _minAmount) external returns (uint256); function unstakeAndWithdraw( uint256 _amount, uint256 _minAmount, address _to ) external returns (uint256); function withdraw(uint256 _amount, uint256 _minAmount) external returns (uint256); function withdraw(uint256 _amount, uint256 _minAmount, address _to) external returns (uint256); function getAllocatedUnderlying() external view returns (PoolWithAmount[] memory); 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 updateRewardSpendingApproval(address token, bool approved) external; function shutdownPool() external; function isShutdown() external view returns (bool); function isBalanced() external view returns (bool); function rebalancingRewardsEnabled() external view returns (bool); function setRebalancingRewardsEnabled(bool enabled) external; function getAllUnderlyingCoins() external view returns (address[] memory result); function rebalancingRewardsFactor() external view returns (uint256); function rebalancingRewardsActivatedAt() external view returns (uint64); function getWeights() external view returns (PoolWeight[] memory); function runSanityChecks() external; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; import "IERC20Metadata.sol"; interface ILpToken is IERC20Metadata { function minter() external view returns (address); function mint(address account, uint256 amount, address ubo) external returns (uint256); function burn(address _owner, uint256 _amount, address ubo) external returns (uint256); function taint(address from, address to, uint256 amount) external; }
// 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 conicPool() 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; function feePercentage() external view returns (uint256); function feesEnabled() external view returns (bool); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; import "Ownable.sol"; import "IController.sol"; interface IPausable { event Paused(uint256 pausedUntil); event PauseDurationSet(uint256 pauseDuration); function controller() external view returns (IController); function pausedUntil() external view returns (uint256); function pauseDuration() external view returns (uint256); function isPaused() external view returns (bool); function setPauseDuration(uint256 _pauseDuration) external; function pause() external; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; import "IOracle.sol"; interface IGenericOracle is IOracle { /// @notice returns the oracle to be used to price `token` function getOracle(address token) external view returns (IOracle); /// @notice converts the price of an LP token to the given underlying function curveLpToUnderlying( address curveLpToken, address underlying, uint256 curveLpAmount ) external view returns (uint256); /// @notice same as above but avoids fetching the underlying price again function curveLpToUnderlying( address curveLpToken, address underlying, uint256 curveLpAmount, uint256 underlyingPrice ) external view returns (uint256); /// @notice converts the price an underlying asset to a given Curve LP token function underlyingToCurveLp( address underlying, address curveLpToken, uint256 underlyingAmount ) external view returns (uint256); }
// 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 hasPoolRebalancingRewardHandler( 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); function isShutdown() external view returns (bool); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; interface IBonding { event CncStartPriceSet(uint256 startPrice); event PriceIncreaseFactorSet(uint256 factor); event MinBondingAmountSet(uint256 amount); event Bonded( address indexed account, address indexed recipient, uint256 lpTokenAmount, uint256 cncReceived, uint256 lockTime ); event DebtPoolSet(address indexed pool); event DebtPoolFeesClaimed(uint256 crvAmount, uint256 cvxAmount, uint256 cncAmount); event StreamClaimed(address indexed account, uint256 amount); event BondingStarted(uint256 amount, uint256 epochs); event RemainingCNCRecovered(uint256 amount); function startBonding() external; function setCncStartPrice(uint256 _cncStartPrice) external; function setCncPriceIncreaseFactor(uint256 _priceIncreaseFactor) external; function setMinBondingAmount(uint256 _minBondingAmount) external; function setDebtPool(address _debtPool) external; function bondCncCrvUsd( uint256 lpTokenAmount, uint256 minCncReceived, uint64 cncLockTime ) external returns (uint256); function recoverRemainingCNC() external; function claimStream() external; function claimFeesForDebtPool() external; function streamCheckpoint() external; function accountCheckpoint(address account) external; function computeCurrentCncBondPrice() external view returns (uint256); function cncAvailable() external view returns (uint256); function cncBondPrice() external view returns (uint256); function bondCncCrvUsdFor( uint256 lpTokenAmount, uint256 minCncReceived, uint64 cncLockTime, address recipient ) external returns (uint256); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; interface IPoolAdapter { /// @notice This is to set which LP token price the value computation should use /// `Latest` uses a freshly computed price /// `Cached` uses the price in cache /// `Minimum` uses the minimum of these two enum PriceMode { Latest, Cached, Minimum } /// @notice Deposit `underlyingAmount` of `underlying` into `pool` /// @dev This function should be written with the assumption that it will be delegate-called into function deposit(address pool, address underlying, uint256 underlyingAmount) external; /// @notice Withdraw `underlyingAmount` of `underlying` from `pool` /// @dev This function should be written with the assumption that it will be delegate-called into function withdraw(address pool, address underlying, uint256 underlyingAmount) external; /// @notice Returns the amount of of assets that `conicPool` holds in `pool`, in terms of USD function computePoolValueInUSD( address conicPool, address pool ) external view returns (uint256 usdAmount); /// @notice Updates the price caches of the given pools function updatePriceCache(address pool) external; /// @notice Returns the amount of of assets that `conicPool` holds in `pool`, in terms of USD /// using the given price mode function computePoolValueInUSD( address conicPool, address pool, PriceMode priceMode ) external view returns (uint256 usdAmount); /// @notice Returns the amount of of assets that `conicPool` holds in `pool`, in terms of underlying function computePoolValueInUnderlying( address conicPool, address pool, address underlying, uint256 underlyingPrice ) external view returns (uint256 underlyingAmount); /// @notice Returns the amount of of assets that `conicPool` holds in `pool`, in terms of underlying /// using the given price mode function computePoolValueInUnderlying( address conicPool, address pool, address underlying, uint256 underlyingPrice, PriceMode priceMode ) external view returns (uint256 underlyingAmount); /// @notice Claim earnings of `conicPool` from `pool` function claimEarnings(address conicPool, address pool) external; /// @notice Returns the LP token of a given `pool` function lpToken(address pool) external view returns (address); /// @notice Returns true if `pool` supports `asset` function supportsAsset(address pool, address asset) external view returns (bool); /// @notice Returns the amount of CRV earned by `pool` on Convex function getCRVEarnedOnConvex( address account, address curvePool ) external view returns (uint256); /// @notice Executes a sanity check, e.g. checking for reentrancy function executeSanityCheck(address pool) external; /// @notice returns all the underlying coins of the pool function getAllUnderlyingCoins(address pool) external view returns (address[] memory); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; interface IFeeRecipient { event FeesReceived(address indexed sender, uint256 crvAmount, uint256 cvxAmount); function receiveFees(uint256 amountCrv, uint256 amountCvx) external; }
// 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); /// @notice this returns the underlying coins of a pool, including the underlying of the base pool /// if the given pool is a meta pool /// This does not return the LP token of the base pool as an underlying /// e.g. if the pool is 3CrvFrax, this will return FRAX, DAI, USDC, USDT function getAllUnderlyingCoins(address pool) external view returns (address[] memory); }
// 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": { "CurveLPOracle.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"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"assetA","type":"uint256"},{"internalType":"uint256","name":"assetB","type":"uint256"}],"name":"NotWithinThreshold","type":"error"},{"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":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"threshold","type":"uint256"}],"name":"InternalImbalanceThresholdUpdated","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":"","type":"address"}],"name":"customImbalanceBuffers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"customInternalImbalanceBuffers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getUSDPrice","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":"buffer","type":"uint256"}],"name":"setImbalanceThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"buffer","type":"uint256"}],"name":"setInternalImbalanceThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b5060405162001b5138038062001b518339810160408190526100319161009b565b61003a3361004b565b6001600160a01b03166080526100cb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100ad57600080fd5b81516001600160a01b03811681146100c457600080fd5b9392505050565b608051611a476200010a60003960008181610248015281816102db015281816106f6015281816107e70152818161087a0152610f560152611a476000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806375151b631161006657806375151b63146101085780638b2f0f4f1461012b5780638da5cb5b1461013e578063bfd1bbc414610159578063f2fde38b1461016c57600080fd5b806338726f0814610098578063523acec8146100ad5780636bf69111146100e0578063715018a614610100575b600080fd5b6100ab6100a63660046115ed565b61017f565b005b6100cd6100bb366004611619565b60026020526000908152604090205481565b6040519081526020015b60405180910390f35b6100cd6100ee366004611619565b60016020526000908152604090205481565b6100ab61022f565b61011b610116366004611619565b610243565b60405190151581526020016100d7565b6100cd610139366004611619565b61051d565b6000546040516001600160a01b0390911681526020016100d7565b6100ab6101673660046115ed565b610530565b6100ab61017a366004611619565b6105cf565b610187610648565b67016345785d8a00008111156101d65760405162461bcd60e51b815260206004820152600f60248201526e0c4eacccccae440e8dede40d0d2ced608b1b60448201526064015b60405180910390fd5b6001600160a01b03821660008181526001602052604090819020839055517f7b718dc4e7c7ee990f859e57df5619938b679591799489da97280f53d0295439906102239084815260200190565b60405180910390a25050565b610237610648565b61024160006106a2565b565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632630c12f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c89190611636565b905060006102d5846106f2565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa158015610337573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035b9190611636565b60405163c3c5a54760e01b81526001600160a01b0384811660048301529192509082169063c3c5a54790602401602060405180830381865afa1580156103a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c99190611653565b6103d857506000949350505050565b604051630fa1ef5160e31b81526001600160a01b03838116600483015260009190831690637d0f7a8890602401600060405180830381865afa158015610422573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261044a91908101906116e0565b905060005b815181101561051057846001600160a01b03166375151b638383815181106104795761047961177f565b60200260200101516040518263ffffffff1660e01b81526004016104ac91906001600160a01b0391909116815260200190565b602060405180830381865afa1580156104c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ed9190611653565b6104fe575060009695505050505050565b80610508816117ab565b91505061044f565b5060019695505050505050565b600061052a8260006107e2565b92915050565b610538610648565b67016345785d8a00008111156105825760405162461bcd60e51b815260206004820152600f60248201526e0c4eacccccae440e8dede40d0d2ced608b1b60448201526064016101cd565b6001600160a01b03821660008181526002602052604090819020839055517f51c89a307557aeea126c4caefee33731a9195f3b2c41b443e6a22fa5160f31b1906102239084815260200190565b6105d7610648565b6001600160a01b03811661063c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101cd565b610645816106a2565b50565b6000546001600160a01b031633146102415760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101cd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa158015610752573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107769190611636565b604051634060c02560e01b81526001600160a01b0384811660048301529190911690634060c02590602401602060405180830381865afa1580156107be573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052a9190611636565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632630c12f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610843573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108679190611636565b90506000610874856106f2565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fa9190611636565b60405163c3c5a54760e01b81526001600160a01b0384811660048301529192509082169063c3c5a54790602401602060405180830381865afa158015610944573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109689190611653565b6109aa5760405162461bcd60e51b81526020600482015260136024820152721d1bdad95b881b9bdd081cdd5c1c1bdc9d1959606a1b60448201526064016101cd565b604051636a24d41960e11b81526001600160a01b0383811660048301526000919083169063d449a83290602401600060405180830381865afa1580156109f4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a1c91908101906117c4565b604051630fa1ef5160e31b81526001600160a01b038581166004830152919250600091841690637d0f7a8890602401600060405180830381865afa158015610a68573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a9091908101906116e0565b604051635f92e81560e11b81526001600160a01b03868116600483015291925060009182919086169063bf25d02a90602401602060405180830381865afa158015610adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b03919061184a565b905060008167ffffffffffffffff811115610b2057610b20611675565b604051908082528060200260200182016040528015610b49578160200160208202803683370190505b50905060008267ffffffffffffffff811115610b6757610b67611675565b604051908082528060200260200182016040528015610b90578160200160208202803683370190505b50905060005b83811015610e23576000868281518110610bb257610bb261177f565b6020908102919091010151604051630869e91760e11b81526001600160a01b0380831660048301529192506000918d16906310d3d22e90602401602060405180830381865afa158015610c09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2d9190611636565b905060008e610c54576001600160a01b038316600090815260016020526040902054610c6e565b6001600160a01b0383166000908152600260205260409020545b905060006001600160a01b0383163014610cf157604051638b2f0f4f60e01b81526001600160a01b038581166004830152841690638b2f0f4f90602401602060405180830381865afa158015610cc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cec919061184a565b610cfc565b610cfc8460016107e2565b905080878681518110610d1157610d1161177f565b60200260200101818152505081868681518110610d3057610d3061177f565b60200260200101818152505060008111610d795760405162461bcd60e51b815260206004820152600a6024820152690707269636520697320360b41b60448201526064016101cd565b6000610d858e87610f52565b905060008111610dc65760405162461bcd60e51b815260206004820152600c60248201526b062616c616e636520697320360a41b60448201526064016101cd565b610dff82610df98e8981518110610ddf57610ddf61177f565b602002602001015160128561112b9092919063ffffffff16565b90611174565b610e09908b611863565b995050505050508080610e1b906117ab565b915050610b96565b506040805160c0810182526001600160a01b03808b168083526020830187905283516372056c6560e11b81526004810191909152610ed6938301918b169063e40ad8ca90602401602060405180830381865afa158015610e87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eab9190611876565b6004811115610ebc57610ebc611897565b815260200188815260200184815260200183815250611196565b610f428c6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3b919061184a565b85906114f6565b9c9b505050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd69190611636565b604051630bb075af60e11b81526001600160a01b0385811660048301529190911690631760eb5e90602401602060405180830381865afa15801561101e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611042919061184a565b6000036110bb5760405162cb501b60e31b8152600f83900b60048201526001600160a01b0384169063065a80d890602401602060405180830381865afa158015611090573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b4919061184a565b905061052a565b604051634903b0d160e01b8152600481018390526001600160a01b03841690634903b0d190602401602060405180830381865afa158015611100573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611124919061184a565b9392505050565b60008160ff168360ff1603611141575082611124565b8160ff168360ff1611156111615761115a84848461150f565b9050611124565b61116c848484611530565b949350505050565b60006111826012600a611991565b61118c838561199d565b61112491906119b4565b600061120c600a601284600001516001600160a01b031663ddca3f436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611205919061184a565b919061112b565b905060005b6001836020015161122291906119d6565b8110156114f1576000836060015182815181106112415761124161177f565b60200260200101519050600081600a61125a9190611991565b90506000856080015184815181106112745761127461177f565b60200260200101519050600084600161128d9190611863565b90505b86602001518110156114da576000876060015182815181106112b4576112b461177f565b602002602001015190506000886080015183815181106112d6576112d661177f565b6020026020010151905060008185876112ef919061199d565b6112f991906119b4565b9050600061130882898661112b565b9050600060048c60400151600481111561132457611324611897565b036113aa578b5160405163556d6e9f60e01b8152600481018c905260248101889052604481018a90526001600160a01b039091169063556d6e9f90606401602060405180830381865afa15801561137f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a3919061184a565b905061142b565b8b51604051635e0d443f60e01b8152600f8c810b600483015288900b6024820152604481018a90526001600160a01b0390911690635e0d443f90606401602060405180830381865afa158015611404573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611428919061184a565b90505b600061147a8d60a0015188815181106114465761144661177f565b60200260200101518e60a001518d815181106114645761146461177f565b602002602001015161155190919063ffffffff16565b905061148883838e84611568565b6114c1578c5160405163c512c56b60e01b81526001600160a01b039091166004820152602481018c9052604481018890526064016101cd565b50505050505080806114d2906117ab565b915050611290565b5050505080806114e9906117ab565b915050611211565b505050565b6000816115056012600a611991565b61118c908561199d565b600061151b82846119e9565b61152690600a611a02565b61116c90856119b4565b600061153c83836119e9565b61154790600a611a02565b61116c908561199d565b6000818310156115615781611124565b5090919050565b60008160000361157d57660aa87bee53800091505b600061158a60038561199d565b6115949084611863565b9050848611156115bd57806115b3876115ad88826119d6565b906114f6565b111591505061116c565b806115cc866115ad89826119d6565b11159695505050505050565b6001600160a01b038116811461064557600080fd5b6000806040838503121561160057600080fd5b823561160b816115d8565b946020939093013593505050565b60006020828403121561162b57600080fd5b8135611124816115d8565b60006020828403121561164857600080fd5b8151611124816115d8565b60006020828403121561166557600080fd5b8151801515811461112457600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156116b4576116b4611675565b604052919050565b600067ffffffffffffffff8211156116d6576116d6611675565b5060051b60200190565b600060208083850312156116f357600080fd5b825167ffffffffffffffff81111561170a57600080fd5b8301601f8101851361171b57600080fd5b805161172e611729826116bc565b61168b565b81815260059190911b8201830190838101908783111561174d57600080fd5b928401925b82841015611774578351611765816115d8565b82529284019290840190611752565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016117bd576117bd611795565b5060010190565b600060208083850312156117d757600080fd5b825167ffffffffffffffff8111156117ee57600080fd5b8301601f810185136117ff57600080fd5b805161180d611729826116bc565b81815260059190911b8201830190838101908783111561182c57600080fd5b928401925b8284101561177457835182529284019290840190611831565b60006020828403121561185c57600080fd5b5051919050565b8082018082111561052a5761052a611795565b60006020828403121561188857600080fd5b81516005811061112457600080fd5b634e487b7160e01b600052602160045260246000fd5b600181815b808511156118e85781600019048211156118ce576118ce611795565b808516156118db57918102915b93841c93908002906118b2565b509250929050565b6000826118ff5750600161052a565b8161190c5750600061052a565b8160018114611922576002811461192c57611948565b600191505061052a565b60ff84111561193d5761193d611795565b50506001821b61052a565b5060208310610133831016604e8410600b841016171561196b575081810a61052a565b61197583836118ad565b806000190482111561198957611989611795565b029392505050565b600061112483836118f0565b808202811582820484141761052a5761052a611795565b6000826119d157634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561052a5761052a611795565b60ff828116828216039081111561052a5761052a611795565b600061112460ff8416836118f056fea2646970667358221220a52141e1eec47e6095db987e4aa0bd99f9b5a06ee6b7975cc36f3b560c34e8ac64736f6c634300081100330000000000000000000000002790ec478f150a98f5d96755601a26403df57eae
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100935760003560e01c806375151b631161006657806375151b63146101085780638b2f0f4f1461012b5780638da5cb5b1461013e578063bfd1bbc414610159578063f2fde38b1461016c57600080fd5b806338726f0814610098578063523acec8146100ad5780636bf69111146100e0578063715018a614610100575b600080fd5b6100ab6100a63660046115ed565b61017f565b005b6100cd6100bb366004611619565b60026020526000908152604090205481565b6040519081526020015b60405180910390f35b6100cd6100ee366004611619565b60016020526000908152604090205481565b6100ab61022f565b61011b610116366004611619565b610243565b60405190151581526020016100d7565b6100cd610139366004611619565b61051d565b6000546040516001600160a01b0390911681526020016100d7565b6100ab6101673660046115ed565b610530565b6100ab61017a366004611619565b6105cf565b610187610648565b67016345785d8a00008111156101d65760405162461bcd60e51b815260206004820152600f60248201526e0c4eacccccae440e8dede40d0d2ced608b1b60448201526064015b60405180910390fd5b6001600160a01b03821660008181526001602052604090819020839055517f7b718dc4e7c7ee990f859e57df5619938b679591799489da97280f53d0295439906102239084815260200190565b60405180910390a25050565b610237610648565b61024160006106a2565b565b6000807f0000000000000000000000002790ec478f150a98f5d96755601a26403df57eae6001600160a01b0316632630c12f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c89190611636565b905060006102d5846106f2565b905060007f0000000000000000000000002790ec478f150a98f5d96755601a26403df57eae6001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa158015610337573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035b9190611636565b60405163c3c5a54760e01b81526001600160a01b0384811660048301529192509082169063c3c5a54790602401602060405180830381865afa1580156103a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c99190611653565b6103d857506000949350505050565b604051630fa1ef5160e31b81526001600160a01b03838116600483015260009190831690637d0f7a8890602401600060405180830381865afa158015610422573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261044a91908101906116e0565b905060005b815181101561051057846001600160a01b03166375151b638383815181106104795761047961177f565b60200260200101516040518263ffffffff1660e01b81526004016104ac91906001600160a01b0391909116815260200190565b602060405180830381865afa1580156104c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ed9190611653565b6104fe575060009695505050505050565b80610508816117ab565b91505061044f565b5060019695505050505050565b600061052a8260006107e2565b92915050565b610538610648565b67016345785d8a00008111156105825760405162461bcd60e51b815260206004820152600f60248201526e0c4eacccccae440e8dede40d0d2ced608b1b60448201526064016101cd565b6001600160a01b03821660008181526002602052604090819020839055517f51c89a307557aeea126c4caefee33731a9195f3b2c41b443e6a22fa5160f31b1906102239084815260200190565b6105d7610648565b6001600160a01b03811661063c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101cd565b610645816106a2565b50565b6000546001600160a01b031633146102415760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101cd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60007f0000000000000000000000002790ec478f150a98f5d96755601a26403df57eae6001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa158015610752573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107769190611636565b604051634060c02560e01b81526001600160a01b0384811660048301529190911690634060c02590602401602060405180830381865afa1580156107be573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052a9190611636565b6000807f0000000000000000000000002790ec478f150a98f5d96755601a26403df57eae6001600160a01b0316632630c12f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610843573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108679190611636565b90506000610874856106f2565b905060007f0000000000000000000000002790ec478f150a98f5d96755601a26403df57eae6001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fa9190611636565b60405163c3c5a54760e01b81526001600160a01b0384811660048301529192509082169063c3c5a54790602401602060405180830381865afa158015610944573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109689190611653565b6109aa5760405162461bcd60e51b81526020600482015260136024820152721d1bdad95b881b9bdd081cdd5c1c1bdc9d1959606a1b60448201526064016101cd565b604051636a24d41960e11b81526001600160a01b0383811660048301526000919083169063d449a83290602401600060405180830381865afa1580156109f4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a1c91908101906117c4565b604051630fa1ef5160e31b81526001600160a01b038581166004830152919250600091841690637d0f7a8890602401600060405180830381865afa158015610a68573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a9091908101906116e0565b604051635f92e81560e11b81526001600160a01b03868116600483015291925060009182919086169063bf25d02a90602401602060405180830381865afa158015610adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b03919061184a565b905060008167ffffffffffffffff811115610b2057610b20611675565b604051908082528060200260200182016040528015610b49578160200160208202803683370190505b50905060008267ffffffffffffffff811115610b6757610b67611675565b604051908082528060200260200182016040528015610b90578160200160208202803683370190505b50905060005b83811015610e23576000868281518110610bb257610bb261177f565b6020908102919091010151604051630869e91760e11b81526001600160a01b0380831660048301529192506000918d16906310d3d22e90602401602060405180830381865afa158015610c09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2d9190611636565b905060008e610c54576001600160a01b038316600090815260016020526040902054610c6e565b6001600160a01b0383166000908152600260205260409020545b905060006001600160a01b0383163014610cf157604051638b2f0f4f60e01b81526001600160a01b038581166004830152841690638b2f0f4f90602401602060405180830381865afa158015610cc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cec919061184a565b610cfc565b610cfc8460016107e2565b905080878681518110610d1157610d1161177f565b60200260200101818152505081868681518110610d3057610d3061177f565b60200260200101818152505060008111610d795760405162461bcd60e51b815260206004820152600a6024820152690707269636520697320360b41b60448201526064016101cd565b6000610d858e87610f52565b905060008111610dc65760405162461bcd60e51b815260206004820152600c60248201526b062616c616e636520697320360a41b60448201526064016101cd565b610dff82610df98e8981518110610ddf57610ddf61177f565b602002602001015160128561112b9092919063ffffffff16565b90611174565b610e09908b611863565b995050505050508080610e1b906117ab565b915050610b96565b506040805160c0810182526001600160a01b03808b168083526020830187905283516372056c6560e11b81526004810191909152610ed6938301918b169063e40ad8ca90602401602060405180830381865afa158015610e87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eab9190611876565b6004811115610ebc57610ebc611897565b815260200188815260200184815260200183815250611196565b610f428c6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3b919061184a565b85906114f6565b9c9b505050505050505050505050565b60007f0000000000000000000000002790ec478f150a98f5d96755601a26403df57eae6001600160a01b0316639f82b2176040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd69190611636565b604051630bb075af60e11b81526001600160a01b0385811660048301529190911690631760eb5e90602401602060405180830381865afa15801561101e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611042919061184a565b6000036110bb5760405162cb501b60e31b8152600f83900b60048201526001600160a01b0384169063065a80d890602401602060405180830381865afa158015611090573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b4919061184a565b905061052a565b604051634903b0d160e01b8152600481018390526001600160a01b03841690634903b0d190602401602060405180830381865afa158015611100573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611124919061184a565b9392505050565b60008160ff168360ff1603611141575082611124565b8160ff168360ff1611156111615761115a84848461150f565b9050611124565b61116c848484611530565b949350505050565b60006111826012600a611991565b61118c838561199d565b61112491906119b4565b600061120c600a601284600001516001600160a01b031663ddca3f436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611205919061184a565b919061112b565b905060005b6001836020015161122291906119d6565b8110156114f1576000836060015182815181106112415761124161177f565b60200260200101519050600081600a61125a9190611991565b90506000856080015184815181106112745761127461177f565b60200260200101519050600084600161128d9190611863565b90505b86602001518110156114da576000876060015182815181106112b4576112b461177f565b602002602001015190506000886080015183815181106112d6576112d661177f565b6020026020010151905060008185876112ef919061199d565b6112f991906119b4565b9050600061130882898661112b565b9050600060048c60400151600481111561132457611324611897565b036113aa578b5160405163556d6e9f60e01b8152600481018c905260248101889052604481018a90526001600160a01b039091169063556d6e9f90606401602060405180830381865afa15801561137f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a3919061184a565b905061142b565b8b51604051635e0d443f60e01b8152600f8c810b600483015288900b6024820152604481018a90526001600160a01b0390911690635e0d443f90606401602060405180830381865afa158015611404573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611428919061184a565b90505b600061147a8d60a0015188815181106114465761144661177f565b60200260200101518e60a001518d815181106114645761146461177f565b602002602001015161155190919063ffffffff16565b905061148883838e84611568565b6114c1578c5160405163c512c56b60e01b81526001600160a01b039091166004820152602481018c9052604481018890526064016101cd565b50505050505080806114d2906117ab565b915050611290565b5050505080806114e9906117ab565b915050611211565b505050565b6000816115056012600a611991565b61118c908561199d565b600061151b82846119e9565b61152690600a611a02565b61116c90856119b4565b600061153c83836119e9565b61154790600a611a02565b61116c908561199d565b6000818310156115615781611124565b5090919050565b60008160000361157d57660aa87bee53800091505b600061158a60038561199d565b6115949084611863565b9050848611156115bd57806115b3876115ad88826119d6565b906114f6565b111591505061116c565b806115cc866115ad89826119d6565b11159695505050505050565b6001600160a01b038116811461064557600080fd5b6000806040838503121561160057600080fd5b823561160b816115d8565b946020939093013593505050565b60006020828403121561162b57600080fd5b8135611124816115d8565b60006020828403121561164857600080fd5b8151611124816115d8565b60006020828403121561166557600080fd5b8151801515811461112457600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156116b4576116b4611675565b604052919050565b600067ffffffffffffffff8211156116d6576116d6611675565b5060051b60200190565b600060208083850312156116f357600080fd5b825167ffffffffffffffff81111561170a57600080fd5b8301601f8101851361171b57600080fd5b805161172e611729826116bc565b61168b565b81815260059190911b8201830190838101908783111561174d57600080fd5b928401925b82841015611774578351611765816115d8565b82529284019290840190611752565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016117bd576117bd611795565b5060010190565b600060208083850312156117d757600080fd5b825167ffffffffffffffff8111156117ee57600080fd5b8301601f810185136117ff57600080fd5b805161180d611729826116bc565b81815260059190911b8201830190838101908783111561182c57600080fd5b928401925b8284101561177457835182529284019290840190611831565b60006020828403121561185c57600080fd5b5051919050565b8082018082111561052a5761052a611795565b60006020828403121561188857600080fd5b81516005811061112457600080fd5b634e487b7160e01b600052602160045260246000fd5b600181815b808511156118e85781600019048211156118ce576118ce611795565b808516156118db57918102915b93841c93908002906118b2565b509250929050565b6000826118ff5750600161052a565b8161190c5750600061052a565b8160018114611922576002811461192c57611948565b600191505061052a565b60ff84111561193d5761193d611795565b50506001821b61052a565b5060208310610133831016604e8410600b841016171561196b575081810a61052a565b61197583836118ad565b806000190482111561198957611989611795565b029392505050565b600061112483836118f0565b808202811582820484141761052a5761052a611795565b6000826119d157634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561052a5761052a611795565b60ff828116828216039081111561052a5761052a611795565b600061112460ff8416836118f056fea2646970667358221220a52141e1eec47e6095db987e4aa0bd99f9b5a06ee6b7975cc36f3b560c34e8ac64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002790ec478f150a98f5d96755601a26403df57eae
-----Decoded View---------------
Arg [0] : controller_ (address): 0x2790EC478f150a98F5D96755601a26403DF57EaE
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002790ec478f150a98f5d96755601a26403df57eae
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.