ETH Price: $3,192.22 (-1.66%)

Contract

0x9403820EcE038E6ff0B0B0A28599F7231ED81C1D

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Update924872772023-05-20 4:24:19912 days ago1684556659IN
0x9403820E...31ED81C1D
0 ETH0.000036620.1

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
720866652023-03-21 10:18:47971 days ago1679393927
0x9403820E...31ED81C1D
0 ETH
720866652023-03-21 10:18:47971 days ago1679393927
0x9403820E...31ED81C1D
0 ETH
720866132023-03-21 10:18:34971 days ago1679393914
0x9403820E...31ED81C1D
0 ETH
720866132023-03-21 10:18:34971 days ago1679393914
0x9403820E...31ED81C1D
0 ETH
720866132023-03-21 10:18:34971 days ago1679393914
0x9403820E...31ED81C1D
0 ETH
720866132023-03-21 10:18:34971 days ago1679393914
0x9403820E...31ED81C1D
0 ETH
720866132023-03-21 10:18:34971 days ago1679393914
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
720865592023-03-21 10:18:20971 days ago1679393900
0x9403820E...31ED81C1D
0 ETH
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PriceProvider

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion, MIT license
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.12;
pragma abicoder v2;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";

import "../../interfaces/IBaseOracle.sol";
import "../../interfaces/IPoolHelper.sol";
import "../../interfaces/IChainlinkAggregator.sol";
import "../../interfaces/IEligibilityDataProvider.sol";
import "../../dependencies/openzeppelin/upgradeability/Initializable.sol";
import "../../dependencies/openzeppelin/upgradeability/OwnableUpgradeable.sol";

/// @title PriceProvider Contract
/// @author Radiant
/// @dev All function calls are currently implemented without side effects
contract PriceProvider is Initializable, OwnableUpgradeable {
	using SafeMath for uint256;

	/// @notice Chainlink aggregator for USD price of base token
	IChainlinkAggregator public baseTokenPriceInUsdProxyAggregator;

	/// @notice Pool helper contract - Uniswap/Balancer
	IPoolHelper public poolHelper;

	/// @notice Eligibility data provider contract
	IEligibilityDataProvider public eligibilityProvider;

	/// @notice Base oracle contract
	IBaseOracle public oracle;

	bool private usePool;

	/**
	 * @notice Initializer
	 * @param _baseTokenPriceInUsdProxyAggregator Chainlink aggregator for USD price of base token
	 * @param _poolHelper Pool helper contract - Uniswap/Balancer
	 */
	function initialize(
		IChainlinkAggregator _baseTokenPriceInUsdProxyAggregator,
		IPoolHelper _poolHelper
	) public initializer {
		require(address(_baseTokenPriceInUsdProxyAggregator) != (address(0)), "Not a valid address");
		require(address(_poolHelper) != (address(0)), "Not a valid address");
		__Ownable_init();

		poolHelper = _poolHelper;
		baseTokenPriceInUsdProxyAggregator = _baseTokenPriceInUsdProxyAggregator;
		usePool = true;
	}

	/**
	 * @notice Update oracles.
	 */
	function update() public {
		if (address(oracle) != address(0) && oracle.canUpdate()) {
			oracle.update();
		}
	}

	/**
	 * @notice Returns the latest price in eth.
	 */
	function getTokenPrice() public view returns (uint256 priceInEth) {
		if (usePool) {
			// use sparingly, TWAP/CL otherwise
			priceInEth = poolHelper.getPrice();
		} else {
			priceInEth = oracle.latestAnswerInEth();
		}
	}

	/**
	 * @notice Returns the latest price in USD.
	 */
	function getTokenPriceUsd() public view returns (uint256 price) {
		if (usePool) {
			// use sparingly, TWAP/CL otherwise
			uint256 ethPrice = uint256(IChainlinkAggregator(baseTokenPriceInUsdProxyAggregator).latestAnswer());
			uint256 priceInEth = poolHelper.getPrice();
			price = priceInEth.mul(ethPrice).div(10 ** 8);
		} else {
			price = oracle.latestAnswer();
		}
	}

	/**
	 * @notice Returns lp token price in ETH.
	 */
	function getLpTokenPrice() public view returns (uint) {
		// decis 8
		uint rdntPriceInEth = getTokenPrice();
		return poolHelper.getLpPrice(rdntPriceInEth);
	}

	/**
	 * @notice Returns lp token price in USD.
	 */
	function getLpTokenPriceUsd() public view returns (uint256 price) {
		// decimals 8
		uint256 lpPriceInEth = getLpTokenPrice();
		// decimals 8
		uint256 ethPrice = uint256(baseTokenPriceInUsdProxyAggregator.latestAnswer());
		price = lpPriceInEth.mul(ethPrice).div(10 ** 8);
	}

	/**
	 * @notice Returns lp token address.
	 */
	function getLpTokenAddress() public view returns (address) {
		return poolHelper.lpTokenAddr();
	}

	function setOracle(address _newOracle) external onlyOwner {
		oracle = IBaseOracle(_newOracle);
		require(getTokenPrice() != 0 && getTokenPriceUsd() != 0, "invalid oracle");
	}

	function setPoolHelper(address _poolHelper) external onlyOwner {
		poolHelper = IPoolHelper(_poolHelper);
		require(getLpTokenPrice() != 0, "invalid oracle");
	}

	function setAggregator(address _baseTokenPriceInUsdProxyAggregator) external onlyOwner {
		baseTokenPriceInUsdProxyAggregator = IChainlinkAggregator(_baseTokenPriceInUsdProxyAggregator);
		require(getLpTokenPriceUsd() != 0, "invalid oracle");
	}

	function setUsePool(bool _usePool) external onlyOwner {
		usePool = _usePool;
	}

	/**
	 * @notice Returns decimals of price.
	 */
	function decimals() public pure returns (uint256) {
		return 8;
	}
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.12;

import "./Initializable.sol";

contract ContextUpgradeable is Initializable {
	function __Context_init() internal onlyInitializing {}

	function __Context_init_unchained() internal onlyInitializing {}

	function _msgSender() internal view virtual returns (address payable) {
		return payable(msg.sender);
	}

	function _msgData() internal view virtual returns (bytes memory) {
		this;
		return msg.data;
	}

	uint256[50] private __gap;
}

File 5 of 12 : Initializable.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.12;

/**
 * @title Initializable
 *
 * @dev Helper contract to support initializer functions. To use it, replace
 * the constructor with a function that has the `initializer` modifier.
 * WARNING: Unlike constructors, initializer functions must be manually
 * invoked. This applies both to deploying an Initializable contract, as well
 * as extending an Initializable contract via inheritance.
 * WARNING: When used with inheritance, manual care must be taken to not invoke
 * a parent initializer twice, or ensure that all initializers are idempotent,
 * because this is not dealt with automatically as with constructors.
 */
contract Initializable {
	/**
	 * @dev Indicates that the contract has been initialized.
	 */
	bool private initialized;

	/**
	 * @dev Indicates that the contract is in the process of being initialized.
	 */
	bool private initializing;

	/**
	 * @dev Modifier to use in the initializer function of a contract.
	 */
	modifier initializer() {
		require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized");

		bool isTopLevelCall = !initializing;
		if (isTopLevelCall) {
			initializing = true;
			initialized = true;
		}

		_;

		if (isTopLevelCall) {
			initializing = false;
		}
	}

	/// @dev Returns true if and only if the function is running in the constructor
	function isConstructor() private view returns (bool) {
		// extcodesize checks the size of the code stored in an address, and
		// address returns the current address. Since the code is still not
		// deployed when running a constructor, any checks on its code size will
		// yield zero, making it an effective way to detect if a contract is
		// under construction or not.
		uint256 cs;
		//solium-disable-next-line
		assembly {
			cs := extcodesize(address())
		}
		return cs == 0;
	}

	modifier onlyInitializing() {
		require(initializing, "Initializable: contract is not initializing");
		_;
	}

	// Reserved storage space to allow for layout changes in the future.
	uint256[50] private ______gap;
}

// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.12;

import "./Initializable.sol";
import "./ContextUpgradeable.sol";

contract OwnableUpgradeable is Initializable, ContextUpgradeable {
	address private _owner;

	event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

	function __Ownable_init() internal onlyInitializing {
		__Ownable_init_unchained();
	}

	function __Ownable_init_unchained() internal onlyInitializing {
		_transferOwnership(_msgSender());
	}

	function owner() public view virtual returns (address) {
		return _owner;
	}

	modifier onlyOwner() {
		require(owner() == _msgSender(), "Ownable: caller is not the owner");
		_;
	}

	function renounceOwnership() public virtual onlyOwner {
		_transferOwnership(address(0));
	}

	function transferOwnership(address newOwner) public virtual onlyOwner {
		require(newOwner != address(0), "Ownable: new owner is the zero address");
		_transferOwnership(newOwner);
	}

	function _transferOwnership(address newOwner) internal virtual {
		address oldOwner = _owner;
		_owner = newOwner;
		emit OwnershipTransferred(oldOwner, newOwner);
	}

	uint256[49] private __gap;
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.12;

interface AggregatorInterface {
	function latestAnswer() external view returns (int256);

	function latestTimestamp() external view returns (uint256);

	function latestRound() external view returns (uint256);

	function getAnswer(uint256 roundId) external view returns (int256);

	function getTimestamp(uint256 roundId) external view returns (uint256);

	event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt);

	event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.12;

interface AggregatorV3Interface {
	function decimals() external view returns (uint8);

	function description() external view returns (string memory);

	function version() external view returns (uint256);

	// getRoundData and latestRoundData should both raise "No data present"
	// if they do not have data to report, instead of returning unset values
	// which could be misinterpreted as actual reported values.
	function getRoundData(
		uint80 _roundId
	)
		external
		view
		returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

	function latestRoundData()
		external
		view
		returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.12;

interface IBaseOracle {
	function latestAnswer() external view returns (uint256 price);

	function latestAnswerInEth() external view returns (uint256 price);

	function update() external;

	function canUpdate() external view returns (bool);

	function consult() external view returns (uint256 price);
}

File 10 of 12 : IChainlinkAggregator.sol
// SPDX-License-Identifier: MIT
// Code from https://github.com/smartcontractkit/chainlink/blob/master/evm-contracts/src/v0.6/interfaces/AggregatorV3Interface.sol

pragma solidity 0.8.12;

import "./AggregatorInterface.sol";
import "./AggregatorV3Interface.sol";

interface IChainlinkAggregator is AggregatorInterface, AggregatorV3Interface {}

// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.12;
pragma experimental ABIEncoderV2;

interface IEligibilityDataProvider {
	function refresh(address user) external;

	function updatePrice() external;

	function requiredEthValue(address user) external view returns (uint256 required);

	function isEligibleForRewards(address _user) external view returns (bool isEligible);

	function lastEligibleTime(address user) external view returns (uint256 lastEligibleTimestamp);

	function lockedUsdValue(address user) external view returns (uint256);

	function requiredUsdValue(address user) external view returns (uint256 required);

	function lastEligibleStatus(address user) external view returns (bool);

	function isMarketDisqualified(address user) external view returns (bool);

	function rewardEligibleAmount(address token) external view returns (uint256);

	function setDqTime(address _user, uint256 _time) external;

	function getDqTime(address _user) external view returns (uint256);

	function autoprune() external returns (uint256 processed);

	function requiredDepositRatio() external view returns (uint256);

	function RATIO_DIVISOR() external view returns (uint256);
}

// SPDX-License-Identifier: MIT

pragma solidity 0.8.12;
pragma abicoder v2;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IPoolHelper {
	function lpTokenAddr() external view returns (address);

	function zapWETH(uint256 amount) external returns (uint256);

	function zapTokens(uint256 _wethAmt, uint256 _rdntAmt) external returns (uint256);

	function quoteFromToken(uint256 tokenAmount) external view returns (uint256 optimalWETHAmount);

	function getLpPrice(uint rdntPriceInEth) external view returns (uint256 priceInEth);

	function getReserves() external view returns (uint256 rdnt, uint256 weth, uint256 lpTokenSupply);

	function getPrice() external view returns (uint256 priceInEth);
}

interface IBalancerPoolHelper is IPoolHelper {
	function initializePool(string calldata _tokenName, string calldata _tokenSymbol) external;
}

interface IUniswapPoolHelper is IPoolHelper {
	function initializePool() external;
}

interface ITestPoolHelper is IPoolHelper {
	function sell(uint256 _amount) external returns (uint256 amountOut);
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"baseTokenPriceInUsdProxyAggregator","outputs":[{"internalType":"contract IChainlinkAggregator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"eligibilityProvider","outputs":[{"internalType":"contract IEligibilityDataProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLpTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLpTokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLpTokenPriceUsd","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenPrice","outputs":[{"internalType":"uint256","name":"priceInEth","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenPriceUsd","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IChainlinkAggregator","name":"_baseTokenPriceInUsdProxyAggregator","type":"address"},{"internalType":"contract IPoolHelper","name":"_poolHelper","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"contract IBaseOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolHelper","outputs":[{"internalType":"contract IPoolHelper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_baseTokenPriceInUsdProxyAggregator","type":"address"}],"name":"setAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOracle","type":"address"}],"name":"setOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_poolHelper","type":"address"}],"name":"setPoolHelper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_usePool","type":"bool"}],"name":"setUsePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"update","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50610fd4806100206000396000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c80637adbf973116100cd578063ad8cb7f511610081578063f2fde38b11610066578063f2fde38b14610254578063f857da9d14610267578063f9120af61461027a57600080fd5b8063ad8cb7f51461022e578063cf811d2a1461024157600080fd5b80638c237c69116100b25780638c237c691461020d5780638da5cb5b14610215578063a2e620451461022657600080fd5b80637adbf973146101e75780637dc0d1d0146101fa57600080fd5b806355ac8d30116101245780636e9a05c5116101095780636e9a05c5146101cf5780636f5cdb6c146101d7578063715018a6146101df57600080fd5b806355ac8d301461019c5780636d2ed184146101c757600080fd5b80632cd3547514610156578063313ce5671461016b578063485cc955146101815780634b94f50e14610194575b600080fd5b610169610164366004610e7b565b61028d565b005b60085b6040519081526020015b60405180910390f35b61016961018f366004610e98565b61035e565b61016e610523565b6098546101af906001600160a01b031681565b6040516001600160a01b039091168152602001610178565b61016e610607565b61016e610792565b61016e61082c565b6101696108c4565b6101696101f5366004610e7b565b61092a565b609a546101af906001600160a01b031681565b6101af6109b8565b6065546001600160a01b03166101af565b610169610a3f565b61016961023c366004610edf565b610b3a565b6097546101af906001600160a01b031681565b610169610262366004610e7b565b610bb2565b6099546101af906001600160a01b031681565b610169610288366004610e7b565b610c91565b6065546001600160a01b031633146102ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b609880546001600160a01b0319166001600160a01b03831617905561030f61082c565b61035b5760405162461bcd60e51b815260206004820152600e60248201527f696e76616c6964206f7261636c6500000000000000000000000000000000000060448201526064016102e3565b50565b600054610100900460ff16806103735750303b155b80610381575060005460ff16155b6103f35760405162461bcd60e51b815260206004820152602e60248201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560448201527f656e20696e697469616c697a656400000000000000000000000000000000000060648201526084016102e3565b600054610100900460ff16158015610415576000805461ffff19166101011790555b6001600160a01b03831661046b5760405162461bcd60e51b815260206004820152601360248201527f4e6f7420612076616c696420616464726573730000000000000000000000000060448201526064016102e3565b6001600160a01b0382166104c15760405162461bcd60e51b815260206004820152601360248201527f4e6f7420612076616c696420616464726573730000000000000000000000000060448201526064016102e3565b6104c9610d0e565b609880546001600160a01b038085166001600160a01b0319928316179092556097805492861692909116919091179055609a805460ff60a01b1916600160a01b179055801561051e576000805461ff00191690555b505050565b609a54600090600160a01b900460ff16156105b457609860009054906101000a90046001600160a01b03166001600160a01b03166398d5fdca6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561058b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105af9190610efc565b905090565b609a60009054906101000a90046001600160a01b03166001600160a01b031663251cdcd86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561058b573d6000803e3d6000fd5b609a54600090600160a01b900460ff161561073f57609754604080517f50d25bcd00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b0316916350d25bcd9160048083019260209291908290030181865afa15801561067f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a39190610efc565b90506000609860009054906101000a90046001600160a01b03166001600160a01b03166398d5fdca6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071e9190610efc565b90506107386305f5e1006107328385610d81565b90610d94565b9250505090565b609a60009054906101000a90046001600160a01b03166001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561058b573d6000803e3d6000fd5b60008061079d61082c565b90506000609760009054906101000a90046001600160a01b03166001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108189190610efc565b90506107386305f5e1006107328484610d81565b600080610837610523565b6098546040517fe28861fa000000000000000000000000000000000000000000000000000000008152600481018390529192506001600160a01b03169063e28861fa90602401602060405180830381865afa15801561089a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108be9190610efc565b91505090565b6065546001600160a01b0316331461091e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e3565b6109286000610da0565b565b6065546001600160a01b031633146109845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e3565b609a80546001600160a01b0319166001600160a01b0383161790556109a7610523565b1580159061030f575061030f610607565b609854604080517f439e501600000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163439e50169160048083019260209291908290030181865afa158015610a1b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105af9190610f15565b609a546001600160a01b031615801590610acb5750609a60009054906101000a90046001600160a01b03166001600160a01b031663a17a26856040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190610f32565b1561092857609a60009054906101000a90046001600160a01b03166001600160a01b031663a2e620456040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b2057600080fd5b505af1158015610b34573d6000803e3d6000fd5b50505050565b6065546001600160a01b03163314610b945760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e3565b609a8054911515600160a01b0260ff60a01b19909216919091179055565b6065546001600160a01b03163314610c0c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e3565b6001600160a01b038116610c885760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102e3565b61035b81610da0565b6065546001600160a01b03163314610ceb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e3565b609780546001600160a01b0319166001600160a01b03831617905561030f610792565b600054610100900460ff16610d795760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016102e3565b610928610df2565b6000610d8d8284610f4f565b9392505050565b6000610d8d8284610f7c565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610e5d5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016102e3565b61092833610da0565b6001600160a01b038116811461035b57600080fd5b600060208284031215610e8d57600080fd5b8135610d8d81610e66565b60008060408385031215610eab57600080fd5b8235610eb681610e66565b91506020830135610ec681610e66565b809150509250929050565b801515811461035b57600080fd5b600060208284031215610ef157600080fd5b8135610d8d81610ed1565b600060208284031215610f0e57600080fd5b5051919050565b600060208284031215610f2757600080fd5b8151610d8d81610e66565b600060208284031215610f4457600080fd5b8151610d8d81610ed1565b6000816000190483118215151615610f7757634e487b7160e01b600052601160045260246000fd5b500290565b600082610f9957634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220ae4581e68648926988103a5fd71191f41a29492cb67c2e8b41b54b687bdf83fd64736f6c634300080c0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101515760003560e01c80637adbf973116100cd578063ad8cb7f511610081578063f2fde38b11610066578063f2fde38b14610254578063f857da9d14610267578063f9120af61461027a57600080fd5b8063ad8cb7f51461022e578063cf811d2a1461024157600080fd5b80638c237c69116100b25780638c237c691461020d5780638da5cb5b14610215578063a2e620451461022657600080fd5b80637adbf973146101e75780637dc0d1d0146101fa57600080fd5b806355ac8d30116101245780636e9a05c5116101095780636e9a05c5146101cf5780636f5cdb6c146101d7578063715018a6146101df57600080fd5b806355ac8d301461019c5780636d2ed184146101c757600080fd5b80632cd3547514610156578063313ce5671461016b578063485cc955146101815780634b94f50e14610194575b600080fd5b610169610164366004610e7b565b61028d565b005b60085b6040519081526020015b60405180910390f35b61016961018f366004610e98565b61035e565b61016e610523565b6098546101af906001600160a01b031681565b6040516001600160a01b039091168152602001610178565b61016e610607565b61016e610792565b61016e61082c565b6101696108c4565b6101696101f5366004610e7b565b61092a565b609a546101af906001600160a01b031681565b6101af6109b8565b6065546001600160a01b03166101af565b610169610a3f565b61016961023c366004610edf565b610b3a565b6097546101af906001600160a01b031681565b610169610262366004610e7b565b610bb2565b6099546101af906001600160a01b031681565b610169610288366004610e7b565b610c91565b6065546001600160a01b031633146102ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b609880546001600160a01b0319166001600160a01b03831617905561030f61082c565b61035b5760405162461bcd60e51b815260206004820152600e60248201527f696e76616c6964206f7261636c6500000000000000000000000000000000000060448201526064016102e3565b50565b600054610100900460ff16806103735750303b155b80610381575060005460ff16155b6103f35760405162461bcd60e51b815260206004820152602e60248201527f436f6e747261637420696e7374616e63652068617320616c726561647920626560448201527f656e20696e697469616c697a656400000000000000000000000000000000000060648201526084016102e3565b600054610100900460ff16158015610415576000805461ffff19166101011790555b6001600160a01b03831661046b5760405162461bcd60e51b815260206004820152601360248201527f4e6f7420612076616c696420616464726573730000000000000000000000000060448201526064016102e3565b6001600160a01b0382166104c15760405162461bcd60e51b815260206004820152601360248201527f4e6f7420612076616c696420616464726573730000000000000000000000000060448201526064016102e3565b6104c9610d0e565b609880546001600160a01b038085166001600160a01b0319928316179092556097805492861692909116919091179055609a805460ff60a01b1916600160a01b179055801561051e576000805461ff00191690555b505050565b609a54600090600160a01b900460ff16156105b457609860009054906101000a90046001600160a01b03166001600160a01b03166398d5fdca6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561058b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105af9190610efc565b905090565b609a60009054906101000a90046001600160a01b03166001600160a01b031663251cdcd86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561058b573d6000803e3d6000fd5b609a54600090600160a01b900460ff161561073f57609754604080517f50d25bcd00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b0316916350d25bcd9160048083019260209291908290030181865afa15801561067f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a39190610efc565b90506000609860009054906101000a90046001600160a01b03166001600160a01b03166398d5fdca6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071e9190610efc565b90506107386305f5e1006107328385610d81565b90610d94565b9250505090565b609a60009054906101000a90046001600160a01b03166001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561058b573d6000803e3d6000fd5b60008061079d61082c565b90506000609760009054906101000a90046001600160a01b03166001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108189190610efc565b90506107386305f5e1006107328484610d81565b600080610837610523565b6098546040517fe28861fa000000000000000000000000000000000000000000000000000000008152600481018390529192506001600160a01b03169063e28861fa90602401602060405180830381865afa15801561089a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108be9190610efc565b91505090565b6065546001600160a01b0316331461091e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e3565b6109286000610da0565b565b6065546001600160a01b031633146109845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e3565b609a80546001600160a01b0319166001600160a01b0383161790556109a7610523565b1580159061030f575061030f610607565b609854604080517f439e501600000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163439e50169160048083019260209291908290030181865afa158015610a1b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105af9190610f15565b609a546001600160a01b031615801590610acb5750609a60009054906101000a90046001600160a01b03166001600160a01b031663a17a26856040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190610f32565b1561092857609a60009054906101000a90046001600160a01b03166001600160a01b031663a2e620456040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b2057600080fd5b505af1158015610b34573d6000803e3d6000fd5b50505050565b6065546001600160a01b03163314610b945760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e3565b609a8054911515600160a01b0260ff60a01b19909216919091179055565b6065546001600160a01b03163314610c0c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e3565b6001600160a01b038116610c885760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102e3565b61035b81610da0565b6065546001600160a01b03163314610ceb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e3565b609780546001600160a01b0319166001600160a01b03831617905561030f610792565b600054610100900460ff16610d795760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016102e3565b610928610df2565b6000610d8d8284610f4f565b9392505050565b6000610d8d8284610f7c565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610e5d5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016102e3565b61092833610da0565b6001600160a01b038116811461035b57600080fd5b600060208284031215610e8d57600080fd5b8135610d8d81610e66565b60008060408385031215610eab57600080fd5b8235610eb681610e66565b91506020830135610ec681610e66565b809150509250929050565b801515811461035b57600080fd5b600060208284031215610ef157600080fd5b8135610d8d81610ed1565b600060208284031215610f0e57600080fd5b5051919050565b600060208284031215610f2757600080fd5b8151610d8d81610e66565b600060208284031215610f4457600080fd5b8151610d8d81610ed1565b6000816000190483118215151615610f7757634e487b7160e01b600052601160045260246000fd5b500290565b600082610f9957634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220ae4581e68648926988103a5fd71191f41a29492cb67c2e8b41b54b687bdf83fd64736f6c634300080c0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ 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.