Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 12946458 | 1079 days ago | IN | Create: VolmexProtocolWithPrecision | 0 ETH | 0.0850352 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
VolmexProtocolWithPrecision
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity =0.8.4; import "./VolmexProtocol.sol"; import "../library/VolmexSafeERC20.sol"; /** * @title Protocol Contract with Precision * @author volmex.finance [[email protected]] * * This protocol is used for decimal values less than 18. */ contract VolmexProtocolWithPrecision is VolmexProtocol { using VolmexSafeERC20 for IERC20Modified; // This is the ratio of standard ERC20 tokens decimals by custom token decimals // Calculation for USDC: 10^18 / 10^6 = 10^12 // Where 10^18 represent precision of volatility token decimals and 10^6 represent USDC (collateral) decimals uint256 public precisionRatio; /** * @dev Makes the protocol `active` at deployment * @dev Sets the `minimumCollateralQty` * @dev Makes the collateral token as `collateral` * @dev Assign position tokens * @dev Sets the `volatilityCapRatio` * * @param _collateralTokenAddress is address of collateral token typecasted to IERC20Modified * @param _volatilityToken is address of volatility index token typecasted to IERC20Modified * @param _inverseVolatilityToken is address of inverse volatility index token typecasted to IERC20Modified * @param _minimumCollateralQty is the minimum qty of tokens need to mint 0.1 volatility and inverse volatility tokens * @param _volatilityCapRatio is the cap for volatility * @param _ratio Ratio of standard ERC20 token decimals (18) by custom token */ function initializePrecision( IERC20Modified _collateralTokenAddress, IERC20Modified _volatilityToken, IERC20Modified _inverseVolatilityToken, uint256 _minimumCollateralQty, uint256 _volatilityCapRatio, uint256 _ratio ) external initializer { initialize( _collateralTokenAddress, _volatilityToken, _inverseVolatilityToken, _minimumCollateralQty, _volatilityCapRatio ); precisionRatio = _ratio; } /** * @notice Add collateral to the protocol and mint the position tokens * @param _collateralQty Quantity of the collateral being deposited * * @dev Added precision ratio to calculate the effective collateral qty * * NOTE: Collateral quantity should be at least required minimum collateral quantity * * Calculation: Get the quantity for position token * Mint the position token for `msg.sender` * */ function collateralize(uint256 _collateralQty) external virtual override onlyActive onlyNotSettled { require( _collateralQty >= minimumCollateralQty, "Volmex: CollateralQty > minimum qty required" ); // Mechanism to calculate the collateral qty using the increase in balance // of protocol contract to counter USDT's fee mechanism, which can be enabled in future uint256 initialProtocolBalance = collateral.balanceOf(address(this)); collateral.safeTransferFrom(msg.sender, address(this), _collateralQty); uint256 finalProtocolBalance = collateral.balanceOf(address(this)); _collateralQty = finalProtocolBalance - initialProtocolBalance; uint256 fee; if (issuanceFees > 0) { fee = (_collateralQty * issuanceFees) / 10000; _collateralQty = _collateralQty - fee; accumulatedFees = accumulatedFees + fee; } uint256 effectiveCollateralQty = _collateralQty * precisionRatio; uint256 qtyToBeMinted = effectiveCollateralQty / volatilityCapRatio; volatilityToken.mint(msg.sender, qtyToBeMinted); inverseVolatilityToken.mint(msg.sender, qtyToBeMinted); emit Collateralized(msg.sender, _collateralQty, qtyToBeMinted, fee); } function _redeem( uint256 _collateralQtyRedeemed, uint256 _volatilityIndexTokenQty, uint256 _inverseVolatilityIndexTokenQty ) internal virtual override { require( _collateralQtyRedeemed > precisionRatio, "Volmex: Collateral qty is less" ); uint256 effectiveCollateralQty = _collateralQtyRedeemed / precisionRatio; uint256 fee; if (redeemFees > 0) { fee = (_collateralQtyRedeemed * redeemFees) / (precisionRatio * 10000); effectiveCollateralQty = effectiveCollateralQty - fee; accumulatedFees = accumulatedFees + fee; } volatilityToken.burn(msg.sender, _volatilityIndexTokenQty); inverseVolatilityToken.burn( msg.sender, _inverseVolatilityIndexTokenQty ); collateral.safeTransfer(msg.sender, effectiveCollateralQty); emit Redeemed( msg.sender, effectiveCollateralQty, _volatilityIndexTokenQty, _inverseVolatilityIndexTokenQty, fee ); } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity =0.8.4; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "../interfaces/IERC20Modified.sol"; import "../library/VolmexSafeERC20.sol"; /** * @title Protocol Contract * @author volmex.finance [[email protected]] */ contract VolmexProtocol is Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable { using VolmexSafeERC20 for IERC20Modified; event ToggleActivated(bool isActive); event UpdatedVolatilityToken( address indexed positionToken, bool isVolatilityIndexToken ); event UpdatedFees(uint256 issuanceFees, uint256 redeemFees); event UpdatedMinimumCollateral(uint256 newMinimumCollateralQty); event ClaimedFees(uint256 fees); event ToggledVolatilityTokenPause(bool isPause); event Settled(uint256 settlementPrice); event Collateralized( address indexed sender, uint256 collateralLock, uint256 positionTokensMinted, uint256 fees ); event Redeemed( address indexed sender, uint256 collateralReleased, uint256 volatilityIndexTokenBurned, uint256 inverseVolatilityIndexTokenBurned, uint256 fees ); // Has the value of minimum collateral qty required uint256 public minimumCollateralQty; // Has the boolean state of protocol bool public active; // Has the boolean state of protocol settlement bool public isSettled; // Volatility tokens IERC20Modified public volatilityToken; IERC20Modified public inverseVolatilityToken; // Only ERC20 standard functions are used by the collateral defined here. // Address of the acceptable collateral token. IERC20Modified public collateral; // Used to calculate collateralize fee uint256 public issuanceFees; // Used to calculate redeem fee uint256 public redeemFees; // Total fee amount for call of collateralize and redeem uint256 public accumulatedFees; // Percentage value is upto two decimal places, so we're dividing it by 10000 // Set the max fee as 5%, i.e. 500/10000. uint256 constant MAX_FEE = 500; // No need to add 18 decimals, because they are already considered in respective token qty arguments. uint256 public volatilityCapRatio; // This is the price of volatility index, ranges from 0 to volatilityCapRatio, // and the inverse can be calculated by subtracting volatilityCapRatio by settlementPrice. uint256 public settlementPrice; /** * @notice Used to check contract is active */ modifier onlyActive() { require(active, "Volmex: Protocol not active"); _; } /** * @notice Used to check contract is not settled */ modifier onlyNotSettled() { require(!isSettled, "Volmex: Protocol settled"); _; } /** * @notice Used to check contract is settled */ modifier onlySettled() { require(isSettled, "Volmex: Protocol not settled"); _; } /** * @dev Makes the protocol `active` at deployment * @dev Sets the `minimumCollateralQty` * @dev Makes the collateral token as `collateral` * @dev Assign position tokens * @dev Sets the `volatilityCapRatio` * * @param _collateralTokenAddress is address of collateral token typecasted to IERC20Modified * @param _volatilityToken is address of volatility index token typecasted to IERC20Modified * @param _inverseVolatilityToken is address of inverse volatility index token typecasted to IERC20Modified * @param _minimumCollateralQty is the minimum qty of tokens need to mint 0.1 volatility and inverse volatility tokens * @param _volatilityCapRatio is the cap for volatility */ function initialize( IERC20Modified _collateralTokenAddress, IERC20Modified _volatilityToken, IERC20Modified _inverseVolatilityToken, uint256 _minimumCollateralQty, uint256 _volatilityCapRatio ) public initializer { __Ownable_init(); __ReentrancyGuard_init(); require( _minimumCollateralQty > 0, "Volmex: Minimum collateral quantity should be greater than 0" ); active = true; minimumCollateralQty = _minimumCollateralQty; collateral = _collateralTokenAddress; volatilityToken = _volatilityToken; inverseVolatilityToken = _inverseVolatilityToken; volatilityCapRatio = _volatilityCapRatio; } /** * @notice Toggles the active variable. Restricted to only the owner of the contract. */ function toggleActive() external virtual onlyOwner { active = !active; emit ToggleActivated(active); } /** * @notice Update the `minimumCollateralQty` * @param _newMinimumCollQty Provides the new minimum collateral quantity */ function updateMinimumCollQty(uint256 _newMinimumCollQty) external virtual onlyOwner { require( _newMinimumCollQty > 0, "Volmex: Minimum collateral quantity should be greater than 0" ); minimumCollateralQty = _newMinimumCollQty; emit UpdatedMinimumCollateral(_newMinimumCollQty); } /** * @notice Update the {Volatility Token} * @param _positionToken Address of the new position token * @param _isVolatilityIndexToken Type of the position token, { VolatilityIndexToken: true, InverseVolatilityIndexToken: false } */ function updateVolatilityToken( address _positionToken, bool _isVolatilityIndexToken ) external virtual onlyOwner { _isVolatilityIndexToken ? volatilityToken = IERC20Modified(_positionToken) : inverseVolatilityToken = IERC20Modified(_positionToken); emit UpdatedVolatilityToken(_positionToken, _isVolatilityIndexToken); } /** * @notice Add collateral to the protocol and mint the position tokens * @param _collateralQty Quantity of the collateral being deposited * * NOTE: Collateral quantity should be at least required minimum collateral quantity * * Calculation: Get the quantity for position token * Mint the position token for `msg.sender` * */ function collateralize(uint256 _collateralQty) external virtual onlyActive onlyNotSettled { require( _collateralQty >= minimumCollateralQty, "Volmex: CollateralQty > minimum qty required" ); // Mechanism to calculate the collateral qty using the increase in balance // of protocol contract to counter USDT's fee mechanism, which can be enabled in future uint256 initialProtocolBalance = collateral.balanceOf(address(this)); collateral.safeTransferFrom(msg.sender, address(this), _collateralQty); uint256 finalProtocolBalance = collateral.balanceOf(address(this)); _collateralQty = finalProtocolBalance - initialProtocolBalance; uint256 fee; if (issuanceFees > 0) { fee = (_collateralQty * issuanceFees) / 10000; _collateralQty = _collateralQty - fee; accumulatedFees = accumulatedFees + fee; } uint256 qtyToBeMinted = _collateralQty / volatilityCapRatio; volatilityToken.mint(msg.sender, qtyToBeMinted); inverseVolatilityToken.mint(msg.sender, qtyToBeMinted); emit Collateralized(msg.sender, _collateralQty, qtyToBeMinted, fee); } /** * @notice Redeem the collateral from the protocol by providing the position token * * @param _positionTokenQty Quantity of the position token that the user is surrendering * * Amount of collateral is `_positionTokenQty` by the volatilityCapRatio. * Burn the position token * * Safely transfer the collateral to `msg.sender` */ function redeem(uint256 _positionTokenQty) external virtual onlyActive onlyNotSettled { uint256 collQtyToBeRedeemed = _positionTokenQty * volatilityCapRatio; _redeem(collQtyToBeRedeemed, _positionTokenQty, _positionTokenQty); } /** * @notice Redeem the collateral from the protocol after settlement * * @param _volatilityIndexTokenQty Quantity of the volatility index token that the user is surrendering * @param _inverseVolatilityIndexTokenQty Quantity of the inverse volatility index token that the user is surrendering * * Amount of collateral is `_volatilityIndexTokenQty` by the settlementPrice and `_inverseVolatilityIndexTokenQty` * by volatilityCapRatio - settlementPrice * Burn the position token * * Safely transfer the collateral to `msg.sender` */ function redeemSettled( uint256 _volatilityIndexTokenQty, uint256 _inverseVolatilityIndexTokenQty ) external virtual onlyActive onlySettled { uint256 collQtyToBeRedeemed = (_volatilityIndexTokenQty * settlementPrice) + (_inverseVolatilityIndexTokenQty * (volatilityCapRatio - settlementPrice)); _redeem( collQtyToBeRedeemed, _volatilityIndexTokenQty, _inverseVolatilityIndexTokenQty ); } /** * @notice Settle the contract, preventing new minting and providing individual token redemption * * @param _settlementPrice The price of the volatility index after settlement * * The inverse volatility index token at settlement is worth volatilityCapRatio - volatility index settlement price */ function settle(uint256 _settlementPrice) external virtual onlyOwner onlyNotSettled { require( _settlementPrice <= volatilityCapRatio, "Volmex: _settlementPrice should be less than equal to volatilityCapRatio" ); settlementPrice = _settlementPrice; isSettled = true; emit Settled(settlementPrice); } /** * @notice Recover tokens accidentally sent to this contract */ function recoverTokens( address _token, address _toWhom, uint256 _howMuch ) external virtual nonReentrant onlyOwner { require( _token != address(collateral), "Volmex: Collateral token not allowed" ); IERC20Modified(_token).safeTransfer(_toWhom, _howMuch); } /** * @notice Update the percentage of `issuanceFees` and `redeemFees` * * @param _issuanceFees Percentage of fees required to collateralize the collateral * @param _redeemFees Percentage of fees required to redeem the collateral */ function updateFees(uint256 _issuanceFees, uint256 _redeemFees) external virtual onlyOwner { require( _issuanceFees <= MAX_FEE && _redeemFees <= MAX_FEE, "Volmex: issue/redeem fees should be less than MAX_FEE" ); issuanceFees = _issuanceFees; redeemFees = _redeemFees; emit UpdatedFees(_issuanceFees, _redeemFees); } /** * @notice Safely transfer the accumulated fees to owner */ function claimAccumulatedFees() external virtual onlyOwner { uint256 claimedAccumulatedFees = accumulatedFees; delete accumulatedFees; collateral.safeTransfer(owner(), claimedAccumulatedFees); emit ClaimedFees(claimedAccumulatedFees); } /** * @notice Pause/unpause volmex position token. * * @param _isPause Boolean value to pause or unpause the position token { true = pause, false = unpause } */ function togglePause(bool _isPause) external virtual onlyOwner { if (_isPause) { volatilityToken.pause(); inverseVolatilityToken.pause(); } else { volatilityToken.unpause(); inverseVolatilityToken.unpause(); } emit ToggledVolatilityTokenPause(_isPause); } function _redeem( uint256 _collateralQtyRedeemed, uint256 _volatilityIndexTokenQty, uint256 _inverseVolatilityIndexTokenQty ) internal virtual { uint256 fee; if (redeemFees > 0) { fee = (_collateralQtyRedeemed * redeemFees) / 10000; _collateralQtyRedeemed = _collateralQtyRedeemed - fee; accumulatedFees = accumulatedFees + fee; } volatilityToken.burn(msg.sender, _volatilityIndexTokenQty); inverseVolatilityToken.burn( msg.sender, _inverseVolatilityIndexTokenQty ); collateral.safeTransfer(msg.sender, _collateralQtyRedeemed); emit Redeemed( msg.sender, _collateralQtyRedeemed, _volatilityIndexTokenQty, _inverseVolatilityIndexTokenQty, fee ); } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity =0.8.4; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /** * @title VolmexSafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using VolmexSafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. * * NOTE: Inspired from Openzeppelin's SafeERC20 library. */ library VolmexSafeERC20 { function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "VolmexSafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = functionCall(address(token), data, "VolmexSafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "VolmexSafeERC20: ERC20 operation did not succeed"); } } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "VolmexSafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: 0 }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal initializer { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal initializer { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract 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 protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity =0.8.4; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /** * @dev Modified Interface of the OpenZeppelin's IERC20 extra functions to add features in position token. */ interface IERC20Modified is IERC20 { function symbol() external view returns (string memory); function mint(address _toWhom, uint256 amount) external; function burn(address _whose, uint256 amount) external; function grantRole(bytes32 role, address account) external; function renounceRole(bytes32 role, address account) external; function pause() external; function unpause() external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /* * @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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"ClaimedFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"collateralLock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"positionTokensMinted","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"Collateralized","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":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"collateralReleased","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"volatilityIndexTokenBurned","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"inverseVolatilityIndexTokenBurned","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"Redeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"settlementPrice","type":"uint256"}],"name":"Settled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"}],"name":"ToggleActivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPause","type":"bool"}],"name":"ToggledVolatilityTokenPause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"issuanceFees","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"redeemFees","type":"uint256"}],"name":"UpdatedFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMinimumCollateralQty","type":"uint256"}],"name":"UpdatedMinimumCollateral","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"positionToken","type":"address"},{"indexed":false,"internalType":"bool","name":"isVolatilityIndexToken","type":"bool"}],"name":"UpdatedVolatilityToken","type":"event"},{"inputs":[],"name":"accumulatedFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"active","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimAccumulatedFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collateral","outputs":[{"internalType":"contract IERC20Modified","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collateralQty","type":"uint256"}],"name":"collateralize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Modified","name":"_collateralTokenAddress","type":"address"},{"internalType":"contract IERC20Modified","name":"_volatilityToken","type":"address"},{"internalType":"contract IERC20Modified","name":"_inverseVolatilityToken","type":"address"},{"internalType":"uint256","name":"_minimumCollateralQty","type":"uint256"},{"internalType":"uint256","name":"_volatilityCapRatio","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Modified","name":"_collateralTokenAddress","type":"address"},{"internalType":"contract IERC20Modified","name":"_volatilityToken","type":"address"},{"internalType":"contract IERC20Modified","name":"_inverseVolatilityToken","type":"address"},{"internalType":"uint256","name":"_minimumCollateralQty","type":"uint256"},{"internalType":"uint256","name":"_volatilityCapRatio","type":"uint256"},{"internalType":"uint256","name":"_ratio","type":"uint256"}],"name":"initializePrecision","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"inverseVolatilityToken","outputs":[{"internalType":"contract IERC20Modified","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSettled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"issuanceFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumCollateralQty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"precisionRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_toWhom","type":"address"},{"internalType":"uint256","name":"_howMuch","type":"uint256"}],"name":"recoverTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_positionTokenQty","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_volatilityIndexTokenQty","type":"uint256"},{"internalType":"uint256","name":"_inverseVolatilityIndexTokenQty","type":"uint256"}],"name":"redeemSettled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_settlementPrice","type":"uint256"}],"name":"settle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"settlementPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPause","type":"bool"}],"name":"togglePause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_issuanceFees","type":"uint256"},{"internalType":"uint256","name":"_redeemFees","type":"uint256"}],"name":"updateFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMinimumCollQty","type":"uint256"}],"name":"updateMinimumCollQty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_positionToken","type":"address"},{"internalType":"bool","name":"_isVolatilityIndexToken","type":"bool"}],"name":"updateVolatilityToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"volatilityCapRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"volatilityToken","outputs":[{"internalType":"contract IERC20Modified","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50611dcf806100206000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80636db79437116100f9578063a6b63eb811610097578063db006a7511610071578063db006a7514610378578063dcc877b71461038b578063f2fde38b14610394578063f348e8b2146103a757600080fd5b8063a6b63eb81461033f578063bfab117514610352578063d8dfeb451461036557600080fd5b80638df82800116100d35780638df82800146102f7578063950641011461030a5780639d52c57c146103235780639f06aa081461032c57600080fd5b80636db79437146102cb578063715018a6146102de5780638da5cb5b146102e657600080fd5b80633a047bb311610166578063587f5ed711610140578063587f5ed7146102895780635d453323146102925780635f3e849f146102a5578063676c5b12146102b857600080fd5b80633a047bb3146102425780633a4a044a1461024b57806357d159c61461027657600080fd5b80630ed9a5ea116101a25780630ed9a5ea1461020b57806320f7c0c31461022057806329c68dc1146102285780633270bb5b1461023057600080fd5b806302fb0c5e146101c957806308694353146101eb5780630b68b03e14610202575b600080fd5b6098546101d69060ff1681565b60405190151581526020015b60405180910390f35b6101f460975481565b6040519081526020016101e2565b6101f4609b5481565b61021e610219366004611ab2565b6103b0565b005b61021e61043f565b61021e6104ca565b6098546101d690610100900460ff1681565b6101f4609c5481565b60995461025e906001600160a01b031681565b6040516001600160a01b0390911681526020016101e2565b61021e6102843660046119bc565b610541565b6101f4609d5481565b61021e6102a0366004611ae2565b610749565b61021e6102b3366004611944565b610807565b61021e6102c6366004611984565b610911565b61021e6102d9366004611ae2565b6109cf565b61021e610abe565b6033546001600160a01b031661025e565b61021e610305366004611ab2565b610b32565b60985461025e906201000090046001600160a01b031681565b6101f460a05481565b61021e61033a366004611ab2565b610c53565b61021e61034d3660046119f4565b610fa8565b61021e610360366004611a4e565b6110a5565b609a5461025e906001600160a01b031681565b61021e610386366004611ab2565b611129565b6101f4609e5481565b61021e6103a2366004611928565b611194565b6101f4609f5481565b6033546001600160a01b031633146103e35760405162461bcd60e51b81526004016103da90611bfd565b60405180910390fd5b600081116104035760405162461bcd60e51b81526004016103da90611b52565b60978190556040518181527f112ac64010c303ed5f329bd7ffe1ce684a49da147a09754cd7865178ec58646c906020015b60405180910390a150565b6033546001600160a01b031633146104695760405162461bcd60e51b81526004016103da90611bfd565b609d8054600090915561049a6104876033546001600160a01b031690565b609a546001600160a01b0316908361127f565b6040518181527f1eae7da9527d10df3df1fd29ae9bb3dc5028f6e7606970c9feefadfe7f97467390602001610434565b6033546001600160a01b031633146104f45760405162461bcd60e51b81526004016103da90611bfd565b6098805460ff8082161560ff1990921682179092556040519116151581527fbdc21188b3ab49ecd0d98ee961e5c829668092d39f6eeef0e8c1aeccb71047b29060200160405180910390a1565b6033546001600160a01b0316331461056b5760405162461bcd60e51b81526004016103da90611bfd565b801561064657609860029054906101000a90046001600160a01b03166001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156105c157600080fd5b505af11580156105d5573d6000803e3d6000fd5b50505050609960009054906101000a90046001600160a01b03166001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561062957600080fd5b505af115801561063d573d6000803e3d6000fd5b50505050610717565b609860029054906101000a90046001600160a01b03166001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561069657600080fd5b505af11580156106aa573d6000803e3d6000fd5b50505050609960009054906101000a90046001600160a01b03166001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156106fe57600080fd5b505af1158015610712573d6000803e3d6000fd5b505050505b60405181151581527f4a2cfe2e9fc456453dbc6a5b69f96631c56fb1d5a31235ecf33126dd999d6fc190602001610434565b60985460ff1661076b5760405162461bcd60e51b81526004016103da90611c69565b609854610100900460ff166107c25760405162461bcd60e51b815260206004820152601c60248201527f566f6c6d65783a2050726f746f636f6c206e6f7420736574746c65640000000060448201526064016103da565b6000609f54609e546107d49190611cf7565b6107de9083611cd8565b609f546107eb9085611cd8565b6107f59190611ca0565b90506108028184846112e2565b505050565b6002606554141561085a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103da565b60026065556033546001600160a01b031633146108895760405162461bcd60e51b81526004016103da90611bfd565b609a546001600160a01b03848116911614156108f35760405162461bcd60e51b8152602060048201526024808201527f566f6c6d65783a20436f6c6c61746572616c20746f6b656e206e6f7420616c6c6044820152631bddd95960e21b60648201526084016103da565b6109076001600160a01b038416838361127f565b5050600160655550565b6033546001600160a01b0316331461093b5760405162461bcd60e51b81526004016103da90611bfd565b8061096157609980546001600160a01b0319166001600160a01b03841617905581610985565b6098805462010000600160b01b031916620100006001600160a01b03851602179055815b50816001600160a01b03167fd48f6a650ca03aa1e694e00a29c084020cff36779bdc48342ef747327ef1bdfc826040516109c3911515815260200190565b60405180910390a25050565b6033546001600160a01b031633146109f95760405162461bcd60e51b81526004016103da90611bfd565b6101f48211158015610a0d57506101f48111155b610a775760405162461bcd60e51b815260206004820152603560248201527f566f6c6d65783a2069737375652f72656465656d20666565732073686f756c64604482015274206265206c657373207468616e204d41585f46454560581b60648201526084016103da565b609b829055609c81905560408051838152602081018390527f4d32f38862d5eb71edfefb7955873bd55920dc98159b6f53f8be62fbf0bebb4b910160405180910390a15050565b6033546001600160a01b03163314610ae85760405162461bcd60e51b81526004016103da90611bfd565b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b6033546001600160a01b03163314610b5c5760405162461bcd60e51b81526004016103da90611bfd565b609854610100900460ff1615610b845760405162461bcd60e51b81526004016103da90611c32565b609e54811115610c0d5760405162461bcd60e51b815260206004820152604860248201527f566f6c6d65783a205f736574746c656d656e7450726963652073686f756c642060448201527f6265206c657373207468616e20657175616c20746f20766f6c6174696c697479606482015267436170526174696f60c01b608482015260a4016103da565b609f8190556098805461ff0019166101001790556040517fcc3183593ff0e17b930d6f19f832ddcf865bf7ef55eb16754850c55ac447b2ad906104349083815260200190565b60985460ff16610c755760405162461bcd60e51b81526004016103da90611c69565b609854610100900460ff1615610c9d5760405162461bcd60e51b81526004016103da90611c32565b609754811015610d045760405162461bcd60e51b815260206004820152602c60248201527f566f6c6d65783a20436f6c6c61746572616c517479203e206d696e696d756d2060448201526b1c5d1e481c995c5d5a5c995960a21b60648201526084016103da565b609a546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610d4857600080fd5b505afa158015610d5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d809190611aca565b609a54909150610d9b906001600160a01b03163330856114cd565b609a546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610ddf57600080fd5b505afa158015610df3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e179190611aca565b9050610e238282611cf7565b9250600080609b541115610e6c57612710609b5485610e429190611cd8565b610e4c9190611cb8565b9050610e588185611cf7565b935080609d54610e689190611ca0565b609d555b600060a05485610e7c9190611cd8565b90506000609e5482610e8e9190611cb8565b6098546040516340c10f1960e01b8152336004820152602481018390529192506201000090046001600160a01b0316906340c10f1990604401600060405180830381600087803b158015610ee157600080fd5b505af1158015610ef5573d6000803e3d6000fd5b50506099546040516340c10f1960e01b8152336004820152602481018590526001600160a01b0390911692506340c10f199150604401600060405180830381600087803b158015610f4557600080fd5b505af1158015610f59573d6000803e3d6000fd5b505060408051898152602081018590529081018690523392507ffc1a27ba2e71ecf5bf55c2f34a7f2936b17824e4a0ed195057feb98a41d2eb05915060600160405180910390a2505050505050565b600054610100900460ff1680610fc1575060005460ff16155b610fdd5760405162461bcd60e51b81526004016103da90611baf565b600054610100900460ff16158015610fff576000805461ffff19166101011790555b61100761150b565b61100f611587565b6000831161102f5760405162461bcd60e51b81526004016103da90611b52565b609880546097859055609a80546001600160a01b03199081166001600160a01b038b81169190911790925561ff01600160b01b031990921662010000898316021760011790925560998054909116918616919091179055609e829055801561109d576000805461ff00191690555b505050505050565b600054610100900460ff16806110be575060005460ff16155b6110da5760405162461bcd60e51b81526004016103da90611baf565b600054610100900460ff161580156110fc576000805461ffff19166101011790555b6111098787878787610fa8565b60a08290558015611120576000805461ff00191690555b50505050505050565b60985460ff1661114b5760405162461bcd60e51b81526004016103da90611c69565b609854610100900460ff16156111735760405162461bcd60e51b81526004016103da90611c32565b6000609e54826111839190611cd8565b90506111908183846112e2565b5050565b6033546001600160a01b031633146111be5760405162461bcd60e51b81526004016103da90611bfd565b6001600160a01b0381166112235760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103da565b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b03831660248201526044810182905261080290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526115e6565b60a05483116113335760405162461bcd60e51b815260206004820152601e60248201527f566f6c6d65783a20436f6c6c61746572616c20717479206973206c657373000060448201526064016103da565b600060a054846113439190611cb8565b9050600080609c5411156113975760a05461136090612710611cd8565b609c5461136d9087611cd8565b6113779190611cb8565b90506113838183611cf7565b915080609d546113939190611ca0565b609d555b609854604051632770a7eb60e21b815233600482015260248101869052620100009091046001600160a01b031690639dc29fac90604401600060405180830381600087803b1580156113e857600080fd5b505af11580156113fc573d6000803e3d6000fd5b5050609954604051632770a7eb60e21b8152336004820152602481018790526001600160a01b039091169250639dc29fac9150604401600060405180830381600087803b15801561144c57600080fd5b505af1158015611460573d6000803e3d6000fd5b5050609a5461147c92506001600160a01b03169050338461127f565b60408051838152602081018690529081018490526060810182905233907f76cd0cedf979345ca241ce6de696a520a8efc860c6c10d9db2a7953307c237fc9060800160405180910390a25050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526115059085906323b872dd60e01b906084016112ab565b50505050565b600054610100900460ff1680611524575060005460ff16155b6115405760405162461bcd60e51b81526004016103da90611baf565b600054610100900460ff16158015611562576000805461ffff19166101011790555b61156a61168e565b6115726116f8565b8015611584576000805461ff00191690555b50565b600054610100900460ff16806115a0575060005460ff16155b6115bc5760405162461bcd60e51b81526004016103da90611baf565b600054610100900460ff161580156115de576000805461ffff19166101011790555b6115726117a6565b600061160b8383604051806060016040528060268152602001611d7460269139611816565b805190915015610802578080602001905181019061162991906119d8565b6108025760405162461bcd60e51b815260206004820152603060248201527f566f6c6d65785361666545524332303a204552433230206f7065726174696f6e60448201526f08191a59081b9bdd081cdd58d8d9595960821b60648201526084016103da565b600054610100900460ff16806116a7575060005460ff16155b6116c35760405162461bcd60e51b81526004016103da90611baf565b600054610100900460ff16158015611572576000805461ffff19166101011790558015611584576000805461ff001916905550565b600054610100900460ff1680611711575060005460ff16155b61172d5760405162461bcd60e51b81526004016103da90611baf565b600054610100900460ff1615801561174f576000805461ffff19166101011790555b603380546001600160a01b0319163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015611584576000805461ff001916905550565b600054610100900460ff16806117bf575060005460ff16155b6117db5760405162461bcd60e51b81526004016103da90611baf565b600054610100900460ff161580156117fd576000805461ffff19166101011790555b60016065558015611584576000805461ff001916905550565b6060833b6118745760405162461bcd60e51b815260206004820152602560248201527f566f6c6d65785361666545524332303a2063616c6c20746f206e6f6e2d636f6e6044820152641d1c9858dd60da1b60648201526084016103da565b600080856001600160a01b03166000866040516118919190611b03565b60006040518083038185875af1925050503d80600081146118ce576040519150601f19603f3d011682016040523d82523d6000602084013e6118d3565b606091505b50915091506118e38282866118ef565b925050505b9392505050565b606083156118fe5750816118e8565b82511561190e5782518084602001fd5b8160405162461bcd60e51b81526004016103da9190611b1f565b600060208284031215611939578081fd5b81356118e881611d50565b600080600060608486031215611958578182fd5b833561196381611d50565b9250602084013561197381611d50565b929592945050506040919091013590565b60008060408385031215611996578182fd5b82356119a181611d50565b915060208301356119b181611d65565b809150509250929050565b6000602082840312156119cd578081fd5b81356118e881611d65565b6000602082840312156119e9578081fd5b81516118e881611d65565b600080600080600060a08688031215611a0b578081fd5b8535611a1681611d50565b94506020860135611a2681611d50565b93506040860135611a3681611d50565b94979396509394606081013594506080013592915050565b60008060008060008060c08789031215611a66578081fd5b8635611a7181611d50565b95506020870135611a8181611d50565b94506040870135611a9181611d50565b959894975094956060810135955060808101359460a0909101359350915050565b600060208284031215611ac3578081fd5b5035919050565b600060208284031215611adb578081fd5b5051919050565b60008060408385031215611af4578182fd5b50508035926020909101359150565b60008251611b15818460208701611d0e565b9190910192915050565b6020815260008251806020840152611b3e816040850160208701611d0e565b601f01601f19169190910160400192915050565b6020808252603c908201527f566f6c6d65783a204d696e696d756d20636f6c6c61746572616c207175616e7460408201527f6974792073686f756c642062652067726561746572207468616e203000000000606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f566f6c6d65783a2050726f746f636f6c20736574746c65640000000000000000604082015260600190565b6020808252601b908201527f566f6c6d65783a2050726f746f636f6c206e6f74206163746976650000000000604082015260600190565b60008219821115611cb357611cb3611d3a565b500190565b600082611cd357634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611cf257611cf2611d3a565b500290565b600082821015611d0957611d09611d3a565b500390565b60005b83811015611d29578181015183820152602001611d11565b838111156115055750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461158457600080fd5b801515811461158457600080fdfe566f6c6d65785361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564a2646970667358221220e4c82b5fa181351b38decacb5d404b01bbb5c64789820ce154ab34555dbbf1a964736f6c63430008040033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80636db79437116100f9578063a6b63eb811610097578063db006a7511610071578063db006a7514610378578063dcc877b71461038b578063f2fde38b14610394578063f348e8b2146103a757600080fd5b8063a6b63eb81461033f578063bfab117514610352578063d8dfeb451461036557600080fd5b80638df82800116100d35780638df82800146102f7578063950641011461030a5780639d52c57c146103235780639f06aa081461032c57600080fd5b80636db79437146102cb578063715018a6146102de5780638da5cb5b146102e657600080fd5b80633a047bb311610166578063587f5ed711610140578063587f5ed7146102895780635d453323146102925780635f3e849f146102a5578063676c5b12146102b857600080fd5b80633a047bb3146102425780633a4a044a1461024b57806357d159c61461027657600080fd5b80630ed9a5ea116101a25780630ed9a5ea1461020b57806320f7c0c31461022057806329c68dc1146102285780633270bb5b1461023057600080fd5b806302fb0c5e146101c957806308694353146101eb5780630b68b03e14610202575b600080fd5b6098546101d69060ff1681565b60405190151581526020015b60405180910390f35b6101f460975481565b6040519081526020016101e2565b6101f4609b5481565b61021e610219366004611ab2565b6103b0565b005b61021e61043f565b61021e6104ca565b6098546101d690610100900460ff1681565b6101f4609c5481565b60995461025e906001600160a01b031681565b6040516001600160a01b0390911681526020016101e2565b61021e6102843660046119bc565b610541565b6101f4609d5481565b61021e6102a0366004611ae2565b610749565b61021e6102b3366004611944565b610807565b61021e6102c6366004611984565b610911565b61021e6102d9366004611ae2565b6109cf565b61021e610abe565b6033546001600160a01b031661025e565b61021e610305366004611ab2565b610b32565b60985461025e906201000090046001600160a01b031681565b6101f460a05481565b61021e61033a366004611ab2565b610c53565b61021e61034d3660046119f4565b610fa8565b61021e610360366004611a4e565b6110a5565b609a5461025e906001600160a01b031681565b61021e610386366004611ab2565b611129565b6101f4609e5481565b61021e6103a2366004611928565b611194565b6101f4609f5481565b6033546001600160a01b031633146103e35760405162461bcd60e51b81526004016103da90611bfd565b60405180910390fd5b600081116104035760405162461bcd60e51b81526004016103da90611b52565b60978190556040518181527f112ac64010c303ed5f329bd7ffe1ce684a49da147a09754cd7865178ec58646c906020015b60405180910390a150565b6033546001600160a01b031633146104695760405162461bcd60e51b81526004016103da90611bfd565b609d8054600090915561049a6104876033546001600160a01b031690565b609a546001600160a01b0316908361127f565b6040518181527f1eae7da9527d10df3df1fd29ae9bb3dc5028f6e7606970c9feefadfe7f97467390602001610434565b6033546001600160a01b031633146104f45760405162461bcd60e51b81526004016103da90611bfd565b6098805460ff8082161560ff1990921682179092556040519116151581527fbdc21188b3ab49ecd0d98ee961e5c829668092d39f6eeef0e8c1aeccb71047b29060200160405180910390a1565b6033546001600160a01b0316331461056b5760405162461bcd60e51b81526004016103da90611bfd565b801561064657609860029054906101000a90046001600160a01b03166001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156105c157600080fd5b505af11580156105d5573d6000803e3d6000fd5b50505050609960009054906101000a90046001600160a01b03166001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561062957600080fd5b505af115801561063d573d6000803e3d6000fd5b50505050610717565b609860029054906101000a90046001600160a01b03166001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561069657600080fd5b505af11580156106aa573d6000803e3d6000fd5b50505050609960009054906101000a90046001600160a01b03166001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156106fe57600080fd5b505af1158015610712573d6000803e3d6000fd5b505050505b60405181151581527f4a2cfe2e9fc456453dbc6a5b69f96631c56fb1d5a31235ecf33126dd999d6fc190602001610434565b60985460ff1661076b5760405162461bcd60e51b81526004016103da90611c69565b609854610100900460ff166107c25760405162461bcd60e51b815260206004820152601c60248201527f566f6c6d65783a2050726f746f636f6c206e6f7420736574746c65640000000060448201526064016103da565b6000609f54609e546107d49190611cf7565b6107de9083611cd8565b609f546107eb9085611cd8565b6107f59190611ca0565b90506108028184846112e2565b505050565b6002606554141561085a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103da565b60026065556033546001600160a01b031633146108895760405162461bcd60e51b81526004016103da90611bfd565b609a546001600160a01b03848116911614156108f35760405162461bcd60e51b8152602060048201526024808201527f566f6c6d65783a20436f6c6c61746572616c20746f6b656e206e6f7420616c6c6044820152631bddd95960e21b60648201526084016103da565b6109076001600160a01b038416838361127f565b5050600160655550565b6033546001600160a01b0316331461093b5760405162461bcd60e51b81526004016103da90611bfd565b8061096157609980546001600160a01b0319166001600160a01b03841617905581610985565b6098805462010000600160b01b031916620100006001600160a01b03851602179055815b50816001600160a01b03167fd48f6a650ca03aa1e694e00a29c084020cff36779bdc48342ef747327ef1bdfc826040516109c3911515815260200190565b60405180910390a25050565b6033546001600160a01b031633146109f95760405162461bcd60e51b81526004016103da90611bfd565b6101f48211158015610a0d57506101f48111155b610a775760405162461bcd60e51b815260206004820152603560248201527f566f6c6d65783a2069737375652f72656465656d20666565732073686f756c64604482015274206265206c657373207468616e204d41585f46454560581b60648201526084016103da565b609b829055609c81905560408051838152602081018390527f4d32f38862d5eb71edfefb7955873bd55920dc98159b6f53f8be62fbf0bebb4b910160405180910390a15050565b6033546001600160a01b03163314610ae85760405162461bcd60e51b81526004016103da90611bfd565b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b6033546001600160a01b03163314610b5c5760405162461bcd60e51b81526004016103da90611bfd565b609854610100900460ff1615610b845760405162461bcd60e51b81526004016103da90611c32565b609e54811115610c0d5760405162461bcd60e51b815260206004820152604860248201527f566f6c6d65783a205f736574746c656d656e7450726963652073686f756c642060448201527f6265206c657373207468616e20657175616c20746f20766f6c6174696c697479606482015267436170526174696f60c01b608482015260a4016103da565b609f8190556098805461ff0019166101001790556040517fcc3183593ff0e17b930d6f19f832ddcf865bf7ef55eb16754850c55ac447b2ad906104349083815260200190565b60985460ff16610c755760405162461bcd60e51b81526004016103da90611c69565b609854610100900460ff1615610c9d5760405162461bcd60e51b81526004016103da90611c32565b609754811015610d045760405162461bcd60e51b815260206004820152602c60248201527f566f6c6d65783a20436f6c6c61746572616c517479203e206d696e696d756d2060448201526b1c5d1e481c995c5d5a5c995960a21b60648201526084016103da565b609a546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610d4857600080fd5b505afa158015610d5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d809190611aca565b609a54909150610d9b906001600160a01b03163330856114cd565b609a546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610ddf57600080fd5b505afa158015610df3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e179190611aca565b9050610e238282611cf7565b9250600080609b541115610e6c57612710609b5485610e429190611cd8565b610e4c9190611cb8565b9050610e588185611cf7565b935080609d54610e689190611ca0565b609d555b600060a05485610e7c9190611cd8565b90506000609e5482610e8e9190611cb8565b6098546040516340c10f1960e01b8152336004820152602481018390529192506201000090046001600160a01b0316906340c10f1990604401600060405180830381600087803b158015610ee157600080fd5b505af1158015610ef5573d6000803e3d6000fd5b50506099546040516340c10f1960e01b8152336004820152602481018590526001600160a01b0390911692506340c10f199150604401600060405180830381600087803b158015610f4557600080fd5b505af1158015610f59573d6000803e3d6000fd5b505060408051898152602081018590529081018690523392507ffc1a27ba2e71ecf5bf55c2f34a7f2936b17824e4a0ed195057feb98a41d2eb05915060600160405180910390a2505050505050565b600054610100900460ff1680610fc1575060005460ff16155b610fdd5760405162461bcd60e51b81526004016103da90611baf565b600054610100900460ff16158015610fff576000805461ffff19166101011790555b61100761150b565b61100f611587565b6000831161102f5760405162461bcd60e51b81526004016103da90611b52565b609880546097859055609a80546001600160a01b03199081166001600160a01b038b81169190911790925561ff01600160b01b031990921662010000898316021760011790925560998054909116918616919091179055609e829055801561109d576000805461ff00191690555b505050505050565b600054610100900460ff16806110be575060005460ff16155b6110da5760405162461bcd60e51b81526004016103da90611baf565b600054610100900460ff161580156110fc576000805461ffff19166101011790555b6111098787878787610fa8565b60a08290558015611120576000805461ff00191690555b50505050505050565b60985460ff1661114b5760405162461bcd60e51b81526004016103da90611c69565b609854610100900460ff16156111735760405162461bcd60e51b81526004016103da90611c32565b6000609e54826111839190611cd8565b90506111908183846112e2565b5050565b6033546001600160a01b031633146111be5760405162461bcd60e51b81526004016103da90611bfd565b6001600160a01b0381166112235760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103da565b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b03831660248201526044810182905261080290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526115e6565b60a05483116113335760405162461bcd60e51b815260206004820152601e60248201527f566f6c6d65783a20436f6c6c61746572616c20717479206973206c657373000060448201526064016103da565b600060a054846113439190611cb8565b9050600080609c5411156113975760a05461136090612710611cd8565b609c5461136d9087611cd8565b6113779190611cb8565b90506113838183611cf7565b915080609d546113939190611ca0565b609d555b609854604051632770a7eb60e21b815233600482015260248101869052620100009091046001600160a01b031690639dc29fac90604401600060405180830381600087803b1580156113e857600080fd5b505af11580156113fc573d6000803e3d6000fd5b5050609954604051632770a7eb60e21b8152336004820152602481018790526001600160a01b039091169250639dc29fac9150604401600060405180830381600087803b15801561144c57600080fd5b505af1158015611460573d6000803e3d6000fd5b5050609a5461147c92506001600160a01b03169050338461127f565b60408051838152602081018690529081018490526060810182905233907f76cd0cedf979345ca241ce6de696a520a8efc860c6c10d9db2a7953307c237fc9060800160405180910390a25050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526115059085906323b872dd60e01b906084016112ab565b50505050565b600054610100900460ff1680611524575060005460ff16155b6115405760405162461bcd60e51b81526004016103da90611baf565b600054610100900460ff16158015611562576000805461ffff19166101011790555b61156a61168e565b6115726116f8565b8015611584576000805461ff00191690555b50565b600054610100900460ff16806115a0575060005460ff16155b6115bc5760405162461bcd60e51b81526004016103da90611baf565b600054610100900460ff161580156115de576000805461ffff19166101011790555b6115726117a6565b600061160b8383604051806060016040528060268152602001611d7460269139611816565b805190915015610802578080602001905181019061162991906119d8565b6108025760405162461bcd60e51b815260206004820152603060248201527f566f6c6d65785361666545524332303a204552433230206f7065726174696f6e60448201526f08191a59081b9bdd081cdd58d8d9595960821b60648201526084016103da565b600054610100900460ff16806116a7575060005460ff16155b6116c35760405162461bcd60e51b81526004016103da90611baf565b600054610100900460ff16158015611572576000805461ffff19166101011790558015611584576000805461ff001916905550565b600054610100900460ff1680611711575060005460ff16155b61172d5760405162461bcd60e51b81526004016103da90611baf565b600054610100900460ff1615801561174f576000805461ffff19166101011790555b603380546001600160a01b0319163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015611584576000805461ff001916905550565b600054610100900460ff16806117bf575060005460ff16155b6117db5760405162461bcd60e51b81526004016103da90611baf565b600054610100900460ff161580156117fd576000805461ffff19166101011790555b60016065558015611584576000805461ff001916905550565b6060833b6118745760405162461bcd60e51b815260206004820152602560248201527f566f6c6d65785361666545524332303a2063616c6c20746f206e6f6e2d636f6e6044820152641d1c9858dd60da1b60648201526084016103da565b600080856001600160a01b03166000866040516118919190611b03565b60006040518083038185875af1925050503d80600081146118ce576040519150601f19603f3d011682016040523d82523d6000602084013e6118d3565b606091505b50915091506118e38282866118ef565b925050505b9392505050565b606083156118fe5750816118e8565b82511561190e5782518084602001fd5b8160405162461bcd60e51b81526004016103da9190611b1f565b600060208284031215611939578081fd5b81356118e881611d50565b600080600060608486031215611958578182fd5b833561196381611d50565b9250602084013561197381611d50565b929592945050506040919091013590565b60008060408385031215611996578182fd5b82356119a181611d50565b915060208301356119b181611d65565b809150509250929050565b6000602082840312156119cd578081fd5b81356118e881611d65565b6000602082840312156119e9578081fd5b81516118e881611d65565b600080600080600060a08688031215611a0b578081fd5b8535611a1681611d50565b94506020860135611a2681611d50565b93506040860135611a3681611d50565b94979396509394606081013594506080013592915050565b60008060008060008060c08789031215611a66578081fd5b8635611a7181611d50565b95506020870135611a8181611d50565b94506040870135611a9181611d50565b959894975094956060810135955060808101359460a0909101359350915050565b600060208284031215611ac3578081fd5b5035919050565b600060208284031215611adb578081fd5b5051919050565b60008060408385031215611af4578182fd5b50508035926020909101359150565b60008251611b15818460208701611d0e565b9190910192915050565b6020815260008251806020840152611b3e816040850160208701611d0e565b601f01601f19169190910160400192915050565b6020808252603c908201527f566f6c6d65783a204d696e696d756d20636f6c6c61746572616c207175616e7460408201527f6974792073686f756c642062652067726561746572207468616e203000000000606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f566f6c6d65783a2050726f746f636f6c20736574746c65640000000000000000604082015260600190565b6020808252601b908201527f566f6c6d65783a2050726f746f636f6c206e6f74206163746976650000000000604082015260600190565b60008219821115611cb357611cb3611d3a565b500190565b600082611cd357634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611cf257611cf2611d3a565b500290565b600082821015611d0957611d09611d3a565b500390565b60005b83811015611d29578181015183820152602001611d11565b838111156115055750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461158457600080fd5b801515811461158457600080fdfe566f6c6d65785361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564a2646970667358221220e4c82b5fa181351b38decacb5d404b01bbb5c64789820ce154ab34555dbbf1a964736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ARB | 100.00% | $0.999412 | 80,285.2307 | $80,238.02 |
[ 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.