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
Multi Chain
Multichain Addresses
1 address found via
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0x6101a060 | 13679760 | 740 days 16 hrs ago | IN | Create: GUniOracle | 0 ETH | 0.09188581 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
GUniOracle
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-11-24 */ // SPDX-License-Identifier: AGPL-3.0-or-later /// GUniOracle.sol // based heavily on GUniLPOracle.sol from MakerDAO // found here: https://github.com/makerdao/univ3-lp-oracle/blob/master/src/GUniLPOracle.sol // Copyright (C) 2017-2020 Maker Ecosystem Growth Holdings, INC. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. /////////////////////////////////////////////////////// // // // Methodology for Calculating LP Token Price // // // /////////////////////////////////////////////////////// // We derive the sqrtPriceX96 via Chainlink Oracles to prevent price manipulation in the pool: // // p0 = price of token0 in USD (18 decimal precision) // p1 = price of token1 in USD (18 decimal precision) // UNITS_0 = decimals of token0 // UNITS_1 = decimals of token1 // // token1/token0 = (p0 / 10^UNITS_0) / (p1 / 10^UNITS_1) [price ratio, Uniswap format] // = (p0 * 10^UNITS_1) / (p1 * 10^UNITS_0) // // sqrtPriceX96 = sqrt(token1/token0) * 2^96 [From Uniswap's definition] // = sqrt((p0 * 10^UNITS_1) / (p1 * 10^UNITS_0)) * 2^96 // = sqrt((p0 * 10^UNITS_1) / (p1 * 10^UNITS_0)) * 2^48 * 2^48 // = sqrt((p0 * 10^UNITS_1 * 2^96) / (p1 * 10^UNITS_0)) * 2^48 // // Once we have the sqrtPriceX96 we can use that to compute the fair reserves for each token. // This part may be slightly subjective depending on the implementation, // but we expect token to provide something like getUnderlyingBalancesAtPrice(uint160 sqrtPriceX96) // which will forward our oracle derived `sqrtPriceX96` // to Uniswap's LiquidityAmounts.getAmountsForLiquidity(...) // This function will return the fair reserves for each token. // Vendor-specific logic is then used to tack any uninvested fees on top of those amounts. // // Once we have the fair reserves and the prices we can compute the token price by: // // Token Price = TVL / Token Supply // = (r0 * p0 + r1 * p1) / totalSupply pragma solidity =0.6.12; interface IExtendedAggregator { enum TokenType {Invalid, Simple, Complex} enum PlatformId {Invalid, Simple, Uniswap, Balancer, GUni} /** * @dev Returns the LP shares token * @return address of the LP shares token */ function getToken() external view returns (address); /** * @dev Returns the number of tokens that composes the LP shares * @return address[] memory of token addresses */ function getSubTokens() external view returns (address[] memory); /** * @dev Returns the latest price * @return int256 price */ function latestAnswer() external view returns (int256); /** * @dev Returns the decimals of latestAnswer() * @return uint8 */ function decimals() external pure returns (uint8); /** * @dev Returns the platform id to categorize the price aggregator * @return uint256 1 = Uniswap, 2 = Balancer, 3 = G-UNI */ function getPlatformId() external pure returns (PlatformId); /** * @dev Returns token type for categorization * @return uint256 1 = Simple (Native or plain ERC20s), 2 = Complex (LP Tokens, Staked tokens) */ function getTokenType() external pure returns (TokenType); } interface IGUniPool { function token0() external view returns (address); function token1() external view returns (address); function getUnderlyingBalancesAtPrice(uint160) external view returns (uint256, uint256); function getUnderlyingBalances() external view returns (uint256, uint256); function totalSupply() external view returns (uint256); } contract GUniOracle is IExtendedAggregator { // solhint-disable private-vars-leading-underscore, var-name-mixedcase uint256 private immutable UNIT_0; uint256 private immutable UNIT_1; uint256 private immutable TO_WAD_0; uint256 private immutable TO_WAD_1; uint256 private immutable TO_WAD_ORACLE_0; uint256 private immutable TO_WAD_ORACLE_1; address public immutable pool; address public immutable priceFeed0; address public immutable priceFeed1; constructor(address _pool, address _feed0, address _feed1) public { uint256 dec0 = uint256(IExtendedAggregator(IGUniPool(_pool).token0()).decimals()); require(dec0 <= 18, "token0-dec-gt-18"); UNIT_0 = 10 ** dec0; TO_WAD_0 = 10 ** (18 - dec0); uint256 dec1 = uint256(IExtendedAggregator(IGUniPool(_pool).token1()).decimals()); require(dec1 <= 18, "token1-dec-gt-18"); UNIT_1 = 10 ** dec1; TO_WAD_1 = 10 ** (18 - dec1); uint256 decOracle0 = uint256(IExtendedAggregator(_feed0).decimals()); require(decOracle0 <= 18, "oracle0-dec-gt-18"); TO_WAD_ORACLE_0 = 10 ** (18 - decOracle0); uint256 decOracle1 = uint256(IExtendedAggregator(_feed1).decimals()); require(decOracle1 <= 18, "oracle1-dec-gt-18"); TO_WAD_ORACLE_1 = 10 ** (18 - decOracle1); pool = _pool; priceFeed0 = _feed0; priceFeed1 = _feed1; } function latestAnswer() external view override returns (int256) { // All Oracle prices are priced with 18 decimals against USD uint256 p0 = _getWADPrice(true); // Query token0 price from oracle (WAD) uint256 p1 = _getWADPrice(false); // Query token1 price from oracle (WAD) uint160 sqrtPriceX96 = _toUint160(_sqrt(_mul(_mul(p0, UNIT_1), (1 << 96)) / (_mul(p1, UNIT_0))) << 48); // Get balances of the tokens in the pool (uint256 r0, uint256 r1) = IGUniPool(pool).getUnderlyingBalancesAtPrice(sqrtPriceX96); require(r0 > 0 || r1 > 0, "invalid-balances"); uint256 totalSupply = IGUniPool(pool).totalSupply(); // Protect against precision errors with dust-levels of collateral require(totalSupply >= 1e9, "total-supply-too-small"); // Add the total value of each token together and divide by totalSupply to get unit price uint256 preq = _add( _mul(p0, _mul(r0, TO_WAD_0)), _mul(p1, _mul(r1, TO_WAD_1)) ) / totalSupply; return int256(preq); } function getToken() external view override returns (address) { return pool; } function getSubTokens() external view override returns (address[] memory) { address[] memory arr = new address[](2); arr[0] = IGUniPool(pool).token0(); arr[1] = IGUniPool(pool).token1(); return arr; } function getPlatformId() external pure override returns (IExtendedAggregator.PlatformId) { return IExtendedAggregator.PlatformId.GUni; } function getTokenType() external pure override returns (IExtendedAggregator.TokenType) { return IExtendedAggregator.TokenType.Complex; } function decimals() external pure override returns (uint8) { return 18; } function _getWADPrice(bool isToken0) internal view returns (uint256) { int256 price = IExtendedAggregator(isToken0 ? priceFeed0 : priceFeed1).latestAnswer(); require(price > 0, "negative-price"); return _mul(uint256(price), isToken0 ? TO_WAD_ORACLE_0 : TO_WAD_ORACLE_1); } function _add(uint256 _x, uint256 _y) internal pure returns (uint256 z) { require((z = _x + _y) >= _x, "add-overflow"); } function _sub(uint256 _x, uint256 _y) internal pure returns (uint256 z) { require((z = _x - _y) <= _x, "sub-underflow"); } function _mul(uint256 _x, uint256 _y) internal pure returns (uint256 z) { require(_y == 0 || (z = _x * _y) / _y == _x, "mul-overflow"); } function _toUint160(uint256 x) internal pure returns (uint160 z) { require((z = uint160(x)) == x, "uint160-overflow"); } // solhint-disable-next-line max-line-length // FROM https://github.com/abdk-consulting/abdk-libraries-solidity/blob/16d7e1dd8628dfa2f88d5dadab731df7ada70bdd/ABDKMath64x64.sol#L687 // solhint-disable-next-line code-complexity function _sqrt(uint256 _x) private pure returns (uint128) { if (_x == 0) return 0; else { uint256 xx = _x; uint256 r = 1; if (xx >= 0x100000000000000000000000000000000) { xx >>= 128; r <<= 64; } if (xx >= 0x10000000000000000) { xx >>= 64; r <<= 32; } if (xx >= 0x100000000) { xx >>= 32; r <<= 16; } if (xx >= 0x10000) { xx >>= 16; r <<= 8; } if (xx >= 0x100) { xx >>= 8; r <<= 4; } if (xx >= 0x10) { xx >>= 4; r <<= 2; } if (xx >= 0x8) { r <<= 1; } r = (r + _x / r) >> 1; r = (r + _x / r) >> 1; r = (r + _x / r) >> 1; r = (r + _x / r) >> 1; r = (r + _x / r) >> 1; r = (r + _x / r) >> 1; r = (r + _x / r) >> 1; // Seven iterations should be enough uint256 r1 = _x / r; return uint128 (r < r1 ? r : r1); } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_pool","type":"address"},{"internalType":"address","name":"_feed0","type":"address"},{"internalType":"address","name":"_feed1","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getPlatformId","outputs":[{"internalType":"enum IExtendedAggregator.PlatformId","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getSubTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenType","outputs":[{"internalType":"enum IExtendedAggregator.TokenType","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceFeed0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceFeed1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6101a06040523480156200001257600080fd5b5060405162000fbf38038062000fbf833981810160405260608110156200003857600080fd5b5080516020808301516040938401518451630dfe168160e01b815294519394919390926000926001600160a01b03871692630dfe168192600480840193919291829003018186803b1580156200008d57600080fd5b505afa158015620000a2573d6000803e3d6000fd5b505050506040513d6020811015620000b957600080fd5b50516040805163313ce56760e01b815290516001600160a01b039092169163313ce56791600480820192602092909190829003018186803b158015620000fe57600080fd5b505afa15801562000113573d6000803e3d6000fd5b505050506040513d60208110156200012a57600080fd5b505160ff16905060128111156200017b576040805162461bcd60e51b815260206004820152601060248201526f0e8ded6cadc605ac8cac65acee85a62760831b604482015290519081900360640190fd5b80600a0a6080818152505080601203600a0a60c081815250506000846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015620001d057600080fd5b505afa158015620001e5573d6000803e3d6000fd5b505050506040513d6020811015620001fc57600080fd5b50516040805163313ce56760e01b815290516001600160a01b039092169163313ce56791600480820192602092909190829003018186803b1580156200024157600080fd5b505afa15801562000256573d6000803e3d6000fd5b505050506040513d60208110156200026d57600080fd5b505160ff1690506012811115620002be576040805162461bcd60e51b815260206004820152601060248201526f0e8ded6cadc625ac8cac65acee85a62760831b604482015290519081900360640190fd5b80600a0a60a0818152505080601203600a0a60e081815250506000846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200031357600080fd5b505afa15801562000328573d6000803e3d6000fd5b505050506040513d60208110156200033f57600080fd5b505160ff169050601281111562000391576040805162461bcd60e51b81526020600482015260116024820152700dee4c2c6d8ca605ac8cac65acee85a627607b1b604482015290519081900360640190fd5b80601203600a0a61010081815250506000846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015620003dc57600080fd5b505afa158015620003f1573d6000803e3d6000fd5b505050506040513d60208110156200040857600080fd5b505160ff16905060128111156200045a576040805162461bcd60e51b81526020600482015260116024820152700dee4c2c6d8ca625ac8cac65acee85a627607b1b604482015290519081900360640190fd5b601203600a0a610120525050506001600160601b0319606093841b81166101405291831b82166101605290911b166101805260805160a05160c05160e05161010051610120516101405160601c6101605160601c6101805160601c610a9f62000520600039806106a852806106d952508061037b52806106ff5250806101a752806101cb528061021352806102c55280610457528061054f5250806107d65250806107fc5250806106695250806106365250806103fc5250806103cf5250610a9f6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063385aee1b11610066578063385aee1b1461013a5780634b0ca9731461014257806350d25bcd1461016b578063ab0ca0e114610185578063fcab18191461018d57610093565b806316f0115b1461009857806321df0da7146100bc57806325f33d76146100c4578063313ce5671461011c575b600080fd5b6100a06101a5565b604080516001600160a01b039092168252519081900360200190f35b6100a06101c9565b6100cc6101ed565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156101085781810151838201526020016100f0565b505050509050019250505060405180910390f35b610124610374565b6040805160ff9092168252519081900360200190f35b6100a0610379565b61014a61039d565b6040518082600481111561015a57fe5b815260200191505060405180910390f35b6101736103a2565b60408051918252519081900360200190f35b6100a06106a6565b6101956106ca565b6040518082600281111561015a57fe5b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000090565b6040805160028082526060808301845292839291906020830190803683370190505090507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561026a57600080fd5b505afa15801561027e573d6000803e3d6000fd5b505050506040513d602081101561029457600080fd5b5051815182906000906102a357fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561031c57600080fd5b505afa158015610330573d6000803e3d6000fd5b505050506040513d602081101561034657600080fd5b505181518290600190811061035757fe5b6001600160a01b0390921660209283029190910190910152905090565b601290565b7f000000000000000000000000000000000000000000000000000000000000000081565b600490565b6000806103af60016106cf565b905060006103bd60006106cf565b9050600061045060306104376103f3857f0000000000000000000000000000000000000000000000000000000000000000610829565b61042a610420887f0000000000000000000000000000000000000000000000000000000000000000610829565b600160601b610829565b8161043157fe5b0461088a565b6001600160801b0316901b6001600160801b03166109d1565b90506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b670ed7d846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050604080518083038186803b1580156104c157600080fd5b505afa1580156104d5573d6000803e3d6000fd5b505050506040513d60408110156104eb57600080fd5b5080516020909101519092509050811515806105075750600081115b61054b576040805162461bcd60e51b815260206004820152601060248201526f696e76616c69642d62616c616e63657360801b604482015290519081900360640190fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105a657600080fd5b505afa1580156105ba573d6000803e3d6000fd5b505050506040513d60208110156105d057600080fd5b50519050633b9aca00811015610626576040805162461bcd60e51b81526020600482015260166024820152751d1bdd185b0b5cdd5c1c1b1e4b5d1bdbcb5cdb585b1b60521b604482015290519081900360640190fd5b60008161069261065f8961065a887f0000000000000000000000000000000000000000000000000000000000000000610829565b610829565b61068d8961065a887f0000000000000000000000000000000000000000000000000000000000000000610829565b610a22565b8161069957fe5b0497505050505050505090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600290565b600080826106fd577f000000000000000000000000000000000000000000000000000000000000000061071f565b7f00000000000000000000000000000000000000000000000000000000000000005b6001600160a01b03166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561075757600080fd5b505afa15801561076b573d6000803e3d6000fd5b505050506040513d602081101561078157600080fd5b50519050600081136107cb576040805162461bcd60e51b815260206004820152600e60248201526d6e656761746976652d707269636560901b604482015290519081900360640190fd5b61082081846107fa577f000000000000000000000000000000000000000000000000000000000000000061065a565b7f0000000000000000000000000000000000000000000000000000000000000000610829565b9150505b919050565b60008115806108445750508082028282828161084157fe5b04145b610884576040805162461bcd60e51b815260206004820152600c60248201526b6d756c2d6f766572666c6f7760a01b604482015290519081900360640190fd5b92915050565b60008161089957506000610824565b816001600160801b82106108b25760809190911c9060401b5b6801000000000000000082106108cd5760409190911c9060201b5b64010000000082106108e45760209190911c9060101b5b6201000082106108f95760109190911c9060081b5b610100821061090d5760089190911c9060041b5b601082106109205760049190911c9060021b5b6008821061092c5760011b5b600181858161093757fe5b048201901c9050600181858161094957fe5b048201901c9050600181858161095b57fe5b048201901c9050600181858161096d57fe5b048201901c9050600181858161097f57fe5b048201901c9050600181858161099157fe5b048201901c905060018185816109a357fe5b048201901c905060008185816109b557fe5b0490508082106109c557806109c7565b815b9350505050610824565b806001600160a01b0381168114610824576040805162461bcd60e51b815260206004820152601060248201526f75696e743136302d6f766572666c6f7760801b604482015290519081900360640190fd5b80820182811015610884576040805162461bcd60e51b815260206004820152600c60248201526b6164642d6f766572666c6f7760a01b604482015290519081900360640190fdfea26469706673582212207bc79256cf247d63ce1f8776b821905908ee9f2ad2ab1bd53bf9a10bc37d84a064736f6c634300060c0033000000000000000000000000d2eec91055f07fe24c9ccb25828ecfefd4be0c41000000000000000000000000986b5e1e1755e3c2440e960477f25201b0a8bbd4000000000000000000000000ee9f2375b4bdf6387aa8265dd4fb8f16512a1d46
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063385aee1b11610066578063385aee1b1461013a5780634b0ca9731461014257806350d25bcd1461016b578063ab0ca0e114610185578063fcab18191461018d57610093565b806316f0115b1461009857806321df0da7146100bc57806325f33d76146100c4578063313ce5671461011c575b600080fd5b6100a06101a5565b604080516001600160a01b039092168252519081900360200190f35b6100a06101c9565b6100cc6101ed565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156101085781810151838201526020016100f0565b505050509050019250505060405180910390f35b610124610374565b6040805160ff9092168252519081900360200190f35b6100a0610379565b61014a61039d565b6040518082600481111561015a57fe5b815260200191505060405180910390f35b6101736103a2565b60408051918252519081900360200190f35b6100a06106a6565b6101956106ca565b6040518082600281111561015a57fe5b7f000000000000000000000000d2eec91055f07fe24c9ccb25828ecfefd4be0c4181565b7f000000000000000000000000d2eec91055f07fe24c9ccb25828ecfefd4be0c4190565b6040805160028082526060808301845292839291906020830190803683370190505090507f000000000000000000000000d2eec91055f07fe24c9ccb25828ecfefd4be0c416001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561026a57600080fd5b505afa15801561027e573d6000803e3d6000fd5b505050506040513d602081101561029457600080fd5b5051815182906000906102a357fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000d2eec91055f07fe24c9ccb25828ecfefd4be0c416001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561031c57600080fd5b505afa158015610330573d6000803e3d6000fd5b505050506040513d602081101561034657600080fd5b505181518290600190811061035757fe5b6001600160a01b0390921660209283029190910190910152905090565b601290565b7f000000000000000000000000986b5e1e1755e3c2440e960477f25201b0a8bbd481565b600490565b6000806103af60016106cf565b905060006103bd60006106cf565b9050600061045060306104376103f3857f00000000000000000000000000000000000000000000000000000000000f4240610829565b61042a610420887f00000000000000000000000000000000000000000000000000000000000f4240610829565b600160601b610829565b8161043157fe5b0461088a565b6001600160801b0316901b6001600160801b03166109d1565b90506000807f000000000000000000000000d2eec91055f07fe24c9ccb25828ecfefd4be0c416001600160a01b031663b670ed7d846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050604080518083038186803b1580156104c157600080fd5b505afa1580156104d5573d6000803e3d6000fd5b505050506040513d60408110156104eb57600080fd5b5080516020909101519092509050811515806105075750600081115b61054b576040805162461bcd60e51b815260206004820152601060248201526f696e76616c69642d62616c616e63657360801b604482015290519081900360640190fd5b60007f000000000000000000000000d2eec91055f07fe24c9ccb25828ecfefd4be0c416001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105a657600080fd5b505afa1580156105ba573d6000803e3d6000fd5b505050506040513d60208110156105d057600080fd5b50519050633b9aca00811015610626576040805162461bcd60e51b81526020600482015260166024820152751d1bdd185b0b5cdd5c1c1b1e4b5d1bdbcb5cdb585b1b60521b604482015290519081900360640190fd5b60008161069261065f8961065a887f000000000000000000000000000000000000000000000000000000e8d4a51000610829565b610829565b61068d8961065a887f000000000000000000000000000000000000000000000000000000e8d4a51000610829565b610a22565b8161069957fe5b0497505050505050505090565b7f000000000000000000000000ee9f2375b4bdf6387aa8265dd4fb8f16512a1d4681565b600290565b600080826106fd577f000000000000000000000000ee9f2375b4bdf6387aa8265dd4fb8f16512a1d4661071f565b7f000000000000000000000000986b5e1e1755e3c2440e960477f25201b0a8bbd45b6001600160a01b03166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561075757600080fd5b505afa15801561076b573d6000803e3d6000fd5b505050506040513d602081101561078157600080fd5b50519050600081136107cb576040805162461bcd60e51b815260206004820152600e60248201526d6e656761746976652d707269636560901b604482015290519081900360640190fd5b61082081846107fa577f000000000000000000000000000000000000000000000000000000000000000161065a565b7f0000000000000000000000000000000000000000000000000000000000000001610829565b9150505b919050565b60008115806108445750508082028282828161084157fe5b04145b610884576040805162461bcd60e51b815260206004820152600c60248201526b6d756c2d6f766572666c6f7760a01b604482015290519081900360640190fd5b92915050565b60008161089957506000610824565b816001600160801b82106108b25760809190911c9060401b5b6801000000000000000082106108cd5760409190911c9060201b5b64010000000082106108e45760209190911c9060101b5b6201000082106108f95760109190911c9060081b5b610100821061090d5760089190911c9060041b5b601082106109205760049190911c9060021b5b6008821061092c5760011b5b600181858161093757fe5b048201901c9050600181858161094957fe5b048201901c9050600181858161095b57fe5b048201901c9050600181858161096d57fe5b048201901c9050600181858161097f57fe5b048201901c9050600181858161099157fe5b048201901c905060018185816109a357fe5b048201901c905060008185816109b557fe5b0490508082106109c557806109c7565b815b9350505050610824565b806001600160a01b0381168114610824576040805162461bcd60e51b815260206004820152601060248201526f75696e743136302d6f766572666c6f7760801b604482015290519081900360640190fd5b80820182811015610884576040805162461bcd60e51b815260206004820152600c60248201526b6164642d6f766572666c6f7760a01b604482015290519081900360640190fdfea26469706673582212207bc79256cf247d63ce1f8776b821905908ee9f2ad2ab1bd53bf9a10bc37d84a064736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d2eec91055f07fe24c9ccb25828ecfefd4be0c41000000000000000000000000986b5e1e1755e3c2440e960477f25201b0a8bbd4000000000000000000000000ee9f2375b4bdf6387aa8265dd4fb8f16512a1d46
-----Decoded View---------------
Arg [0] : _pool (address): 0xD2eeC91055F07fE24C9cCB25828ecfEFd4be0c41
Arg [1] : _feed0 (address): 0x986b5E1e1755e3C2440e960477f25201B0a8bbD4
Arg [2] : _feed1 (address): 0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000d2eec91055f07fe24c9ccb25828ecfefd4be0c41
Arg [1] : 000000000000000000000000986b5e1e1755e3c2440e960477f25201b0a8bbd4
Arg [2] : 000000000000000000000000ee9f2375b4bdf6387aa8265dd4fb8f16512a1d46
Deployed Bytecode Sourcemap
4459:5501:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4843:29;;;:::i;:::-;;;;-1:-1:-1;;;;;4843:29:0;;;;;;;;;;;;;;7060:91;;;:::i;7159:241::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7724:87;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4879:35;;;:::i;7408:150::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;5928:1124;;;:::i;:::-;;;;;;;;;;;;;;;;4921:35;;;:::i;7566:150::-;;;:::i;:::-;;;;;;;;;;;;4843:29;;;:::o;7060:91::-;7139:4;7060:91;:::o;7159:241::-;7267:16;;;7281:1;7267:16;;;7215;7267;;;;;7215;;;7267;7281:1;7267:16;;;;;;;;;;-1:-1:-1;7267:16:0;7244:39;;7313:4;-1:-1:-1;;;;;7303:22:0;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7303:24:0;7294:6;;:3;;7298:1;;7294:6;;;;;;;;;:33;-1:-1:-1;;;;;7294:33:0;;;-1:-1:-1;;;;;7294:33:0;;;;;7357:4;-1:-1:-1;;;;;7347:22:0;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7347:24:0;7338:6;;:3;;7342:1;;7338:6;;;;;;-1:-1:-1;;;;;7338:33:0;;;:6;;;;;;;;;;;:33;7389:3;-1:-1:-1;7159:241:0;:::o;7724:87::-;7801:2;7724:87;:::o;4879:35::-;;;:::o;7408:150::-;7515:35;7408:150;:::o;5928:1124::-;5984:6;6073:10;6086:18;6099:4;6086:12;:18::i;:::-;6073:31;;6156:10;6169:19;6182:5;6169:12;:19::i;:::-;6156:32;;6240:20;6276:79;6352:2;6287:61;6330:16;6335:2;6339:6;6330:4;:16::i;:::-;6293:33;6298:16;6303:2;6307:6;6298:4;:16::i;:::-;-1:-1:-1;;;6293:4:0;:33::i;:::-;:54;;;;;;6287:5;:61::i;:::-;-1:-1:-1;;;;;6287:67:0;;;-1:-1:-1;;;;;6276:79:0;:10;:79::i;:::-;6240:115;;6420:10;6432;6456:4;-1:-1:-1;;;;;6446:44:0;;6491:12;6446:58;;;;;;;;;;;;;-1:-1:-1;;;;;6446:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6446:58:0;;;;;;;;;-1:-1:-1;6446:58:0;-1:-1:-1;6523:6:0;;;;:16;;;6538:1;6533:2;:6;6523:16;6515:45;;;;;-1:-1:-1;;;6515:45:0;;;;;;;;;;;;-1:-1:-1;;;6515:45:0;;;;;;;;;;;;;;;6571:19;6603:4;-1:-1:-1;;;;;6593:27:0;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6593:29:0;;-1:-1:-1;6732:3:0;6717:18;;;6709:53;;;;;-1:-1:-1;;;6709:53:0;;;;;;;;;;;;-1:-1:-1;;;6709:53:0;;;;;;;;;;;;;;;6874:12;6993:11;6889:101;6908:28;6913:2;6917:18;6922:2;6926:8;6917:4;:18::i;:::-;6908:4;:28::i;:::-;6951;6956:2;6960:18;6965:2;6969:8;6960:4;:18::i;6951:28::-;6889:4;:101::i;:::-;:115;;;;;;;-1:-1:-1;;;;;;;;5928:1124:0;:::o;4921:35::-;;;:::o;7566:150::-;7671:37;7566:150;:::o;7819:336::-;7906:7;7931:12;7966:8;:34;;7990:10;7966:34;;;7977:10;7966:34;-1:-1:-1;;;;;7946:68:0;;:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7946:70:0;;-1:-1:-1;8043:1:0;8035:9;;8027:36;;;;;-1:-1:-1;;;8027:36:0;;;;;;;;;;;;-1:-1:-1;;;8027:36:0;;;;;;;;;;;;;;;8081:66;8094:5;8102:8;:44;;8131:15;8102:44;;;8113:15;8081:4;:66::i;:::-;8074:73;;;7819:336;;;;:::o;8446:151::-;8507:9;8537:7;;;:35;;-1:-1:-1;;8553:7:0;;;8570:2;8564;8553:7;8564:2;8548:18;;;;;:24;8537:35;8529:60;;;;;-1:-1:-1;;;8529:60:0;;;;;;;;;;;;-1:-1:-1;;;8529:60:0;;;;;;;;;;;;;;;8446:151;;;;:::o;8986:971::-;9035:7;9059;9055:895;;-1:-1:-1;9075:1:0;9068:8;;9055:895;9120:2;9149:1;-1:-1:-1;;;9169:41:0;;9165:72;;9221:3;9214:10;;;;;9232:2;9226:8;9165:72;9261:19;9255:2;:25;9251:55;;9291:2;9284:9;;;;;9301:2;9295:8;9251:55;9330:11;9324:2;:17;9320:47;;9352:2;9345:9;;;;;9362:2;9356:8;9320:47;9391:7;9385:2;:13;9381:42;;9409:2;9402:9;;;;;9419:1;9413:7;9381:42;9447:5;9441:2;:11;9437:39;;9463:1;9456:8;;;;;9472:1;9466:7;9437:39;9500:4;9494:2;:10;9490:38;;9515:1;9508:8;;;;;9524:1;9518:7;9490:38;9552:3;9546:2;:9;9542:27;;9565:1;9559:7;9542:27;9603:1;9597;9592:2;:6;;;;;;9588:1;:10;9587:17;;9583:21;;9639:1;9633;9628:2;:6;;;;;;9624:1;:10;9623:17;;9619:21;;9675:1;9669;9664:2;:6;;;;;;9660:1;:10;9659:17;;9655:21;;9711:1;9705;9700:2;:6;;;;;;9696:1;:10;9695:17;;9691:21;;9747:1;9741;9736:2;:6;;;;;;9732:1;:10;9731:17;;9727:21;;9783:1;9777;9772:2;:6;;;;;;9768:1;:10;9767:17;;9763:21;;9819:1;9813;9808:2;:6;;;;;;9804:1;:10;9803:17;;9799:21;;9872:10;9890:1;9885:2;:6;;;;;;9872:19;;9926:2;9922:1;:6;:15;;9935:2;9922:15;;;9931:1;9922:15;9906:32;;;;;;;8603:134;8707:1;-1:-1:-1;;;;;8687:21:0;;;;8679:50;;;;;-1:-1:-1;;;8679:50:0;;;;;;;;;;;;-1:-1:-1;;;8679:50:0;;;;;;;;;;;;;;8163:135;8259:7;;;8254:19;;;;8246:44;;;;;-1:-1:-1;;;8246:44:0;;;;;;;;;;;;-1:-1:-1;;;8246:44:0;;;;;;;;;;;;;
Swarm Source
ipfs://7bc79256cf247d63ce1f8776b821905908ee9f2ad2ab1bd53bf9a10bc37d84a0
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.
[ 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.