Source Code
Overview
S Balance
S Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
WrappedMetaVaultOracle
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import {IERC4626} from "@openzeppelin/contracts/interfaces/IERC4626.sol";
import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol";
import {VaultTypeLib} from "../core/libs/VaultTypeLib.sol";
import {IAggregatorInterfaceMinimal} from "../integrations/chainlink/IAggregatorInterfaceMinimal.sol";
import {IStabilityVault} from "../interfaces/IStabilityVault.sol";
import {IWrappedMetaVault} from "../interfaces/IWrappedMetaVault.sol";
import {IPriceReader} from "../interfaces/IPriceReader.sol";
import {IControllable} from "../interfaces/IControllable.sol";
import {IPlatform} from "../interfaces/IPlatform.sol";
/// @title Minimal Chainlink-compatible Wrapped MetaVault price feed
/// @author Alien Deployer (https://github.com/a17)
contract WrappedMetaVaultOracle is IAggregatorInterfaceMinimal {
address public immutable wrappedMetaVault;
error NotTrustedPrice(address asset);
//slither-disable-next-line missing-zero-check
constructor(address wrappedMetaVault_) {
wrappedMetaVault = wrappedMetaVault_;
}
/// @inheritdoc IAggregatorInterfaceMinimal
function latestAnswer() external view returns (int) {
address _wrappedMetaVault = wrappedMetaVault;
address metaVault = IWrappedMetaVault(_wrappedMetaVault).metaVault();
uint oneWrapperShare = 10 ** IERC20Metadata(_wrappedMetaVault).decimals();
uint wrapperSharePriceNotNormalized = IERC4626(_wrappedMetaVault).convertToAssets(oneWrapperShare);
bool isMultiVault = _eq(IStabilityVault(metaVault).vaultType(), VaultTypeLib.MULTIVAULT);
if (isMultiVault) {
address _asset = IERC4626(_wrappedMetaVault).asset();
IPlatform platform = IPlatform(IControllable(_wrappedMetaVault).platform());
(uint assetPrice, bool trusted) = IPriceReader(platform.priceReader()).getPrice(_asset);
require(trusted, NotTrustedPrice(_asset));
return int(wrapperSharePriceNotNormalized * assetPrice / oneWrapperShare / 1e10);
}
(uint metaVaultPrice, bool isMetaVaultPrice) = IStabilityVault(metaVault).price();
require(isMetaVaultPrice, NotTrustedPrice(metaVault));
return int(wrapperSharePriceNotNormalized * metaVaultPrice / oneWrapperShare / 1e10);
}
/// @inheritdoc IAggregatorInterfaceMinimal
function decimals() external pure returns (uint8) {
return 8;
}
function _eq(string memory a, string memory b) internal pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC4626.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../token/ERC20/IERC20.sol";
import {IERC20Metadata} from "../token/ERC20/extensions/IERC20Metadata.sol";
/**
* @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in
* https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].
*/
interface IERC4626 is IERC20, IERC20Metadata {
event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);
event Withdraw(
address indexed sender,
address indexed receiver,
address indexed owner,
uint256 assets,
uint256 shares
);
/**
* @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
*
* - MUST be an ERC-20 token contract.
* - MUST NOT revert.
*/
function asset() external view returns (address assetTokenAddress);
/**
* @dev Returns the total amount of the underlying asset that is “managed” by Vault.
*
* - SHOULD include any compounding that occurs from yield.
* - MUST be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT revert.
*/
function totalAssets() external view returns (uint256 totalManagedAssets);
/**
* @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
* scenario where all the conditions are met.
*
* - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT show any variations depending on the caller.
* - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
* - MUST NOT revert.
*
* NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
* “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
* from.
*/
function convertToShares(uint256 assets) external view returns (uint256 shares);
/**
* @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
* scenario where all the conditions are met.
*
* - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT show any variations depending on the caller.
* - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
* - MUST NOT revert.
*
* NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
* “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
* from.
*/
function convertToAssets(uint256 shares) external view returns (uint256 assets);
/**
* @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
* through a deposit call.
*
* - MUST return a limited value if receiver is subject to some deposit limit.
* - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
* - MUST NOT revert.
*/
function maxDeposit(address receiver) external view returns (uint256 maxAssets);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
* current on-chain conditions.
*
* - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
* call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
* in the same transaction.
* - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
* deposit would be accepted, regardless if the user has enough tokens approved, etc.
* - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by depositing.
*/
function previewDeposit(uint256 assets) external view returns (uint256 shares);
/**
* @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.
*
* - MUST emit the Deposit event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* deposit execution, and are accounted for during deposit.
* - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
* approving enough underlying tokens to the Vault contract, etc).
*
* NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
*/
function deposit(uint256 assets, address receiver) external returns (uint256 shares);
/**
* @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
* - MUST return a limited value if receiver is subject to some mint limit.
* - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
* - MUST NOT revert.
*/
function maxMint(address receiver) external view returns (uint256 maxShares);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
* current on-chain conditions.
*
* - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
* in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
* same transaction.
* - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
* would be accepted, regardless if the user has enough tokens approved, etc.
* - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by minting.
*/
function previewMint(uint256 shares) external view returns (uint256 assets);
/**
* @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.
*
* - MUST emit the Deposit event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
* execution, and are accounted for during mint.
* - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
* approving enough underlying tokens to the Vault contract, etc).
*
* NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
*/
function mint(uint256 shares, address receiver) external returns (uint256 assets);
/**
* @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
* Vault, through a withdraw call.
*
* - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
* - MUST NOT revert.
*/
function maxWithdraw(address owner) external view returns (uint256 maxAssets);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
* given current on-chain conditions.
*
* - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
* call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
* called
* in the same transaction.
* - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
* the withdrawal would be accepted, regardless if the user has enough shares, etc.
* - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by depositing.
*/
function previewWithdraw(uint256 assets) external view returns (uint256 shares);
/**
* @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.
*
* - MUST emit the Withdraw event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* withdraw execution, and are accounted for during withdraw.
* - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
* not having enough shares, etc).
*
* Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
* Those methods should be performed separately.
*/
function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);
/**
* @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
* through a redeem call.
*
* - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
* - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
* - MUST NOT revert.
*/
function maxRedeem(address owner) external view returns (uint256 maxShares);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,
* given current on-chain conditions.
*
* - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
* in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
* same transaction.
* - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
* redemption would be accepted, regardless if the user has enough shares, etc.
* - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by redeeming.
*/
function previewRedeem(uint256 shares) external view returns (uint256 assets);
/**
* @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.
*
* - MUST emit the Withdraw event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* redeem execution, and are accounted for during redeem.
* - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
* not having enough shares, etc).
*
* NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
* Those methods should be performed separately.
*/
function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../token/ERC20/IERC20.sol";// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
library VaultTypeLib {
string internal constant COMPOUNDING = "Compounding";
string internal constant REWARDING = "Rewarding";
string internal constant REWARDING_MANAGED = "Rewarding Managed";
string internal constant MULTIVAULT = "MultiVault";
string internal constant METAVAULT = "MetaVault";
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
interface IAggregatorInterfaceMinimal {
/// @notice Latest USD price with 8 decimals
function latestAnswer() external view returns (int);
/// @notice Decimals in price
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
/// @notice Base interface of Stability Vault
interface IStabilityVault is IERC20, IERC20Metadata {
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* CUSTOM ERRORS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
error WaitAFewBlocks();
error ExceedSlippage(uint mintToUser, uint minToMint);
error ExceedMaxSupply(uint maxSupply);
error NotSupported();
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* EVENTS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
event DepositAssets(address indexed account, address[] assets, uint[] amounts, uint mintAmount);
event WithdrawAssets(
address indexed sender, address indexed owner, address[] assets, uint sharesAmount, uint[] amountsOut
);
event MaxSupply(uint maxShares);
event VaultName(string newName);
event VaultSymbol(string newSymbol);
event LastBlockDefenseDisabled(bool isDisabled);
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* VIEW FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @notice Underlying assets
function assets() external view returns (address[] memory);
/// @notice Immutable vault type ID
function vaultType() external view returns (string memory);
/// @dev Calculation of consumed amounts, shares amount and liquidity/underlying value for provided available amounts of strategy assets
/// @param assets_ Assets suitable for vault strategy. Can be strategy assets, underlying asset or specific set of assets depending on strategy logic.
/// @param amountsMax Available amounts of assets_ that user wants to invest in vault
/// @return amountsConsumed Amounts of strategy assets that can be deposited by providing amountsMax
/// @return sharesOut Amount of vault shares that will be minted
/// @return valueOut Liquidity value or underlying token amount that will be received by the strategy
function previewDepositAssets(
address[] memory assets_,
uint[] memory amountsMax
) external view returns (uint[] memory amountsConsumed, uint sharesOut, uint valueOut);
/// @dev USD price of share with 18 decimals.
/// Not trusted vault share price can be manipulated, used only OFF-CHAIN.
/// @return price_ Price of 1e18 shares with 18 decimals precision
/// @return trusted True means oracle price, false means AMM spot price
function price() external view returns (uint price_, bool trusted);
/// @dev USD price of assets managed by strategy with 18 decimals
/// Not trusted vault share price can be manipulated, used only OFF-CHAIN.
/// @return tvl_ Total USD value of final assets in vault
/// @return trusted True means TVL calculated based only on oracle prices, false means AMM spot price was used.
function tvl() external view returns (uint tvl_, bool trusted);
/// @dev Minimum 6 blocks between deposit and withdraw check disabled
function lastBlockDefenseDisabled() external view returns (bool);
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* WRITE FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @dev Deposit final assets (pool assets) to the strategy and minting of vault shares.
/// If the strategy interacts with a pool or farms through an underlying token, then it will be minted.
/// Emits a {DepositAssets} event with consumed amounts.
/// @param assets_ Assets suitable for the strategy. Can be strategy assets, underlying asset or specific set of assets depending on strategy logic.
/// @param amountsMax Available amounts of assets_ that user wants to invest in vault
/// @param minSharesOut Slippage tolerance. Minimal shares amount which must be received by user.
/// @param receiver Receiver of deposit. If receiver is zero address, receiver is msg.sender.
function depositAssets(
address[] memory assets_,
uint[] memory amountsMax,
uint minSharesOut,
address receiver
) external;
/// @dev Burning shares of vault and obtaining strategy assets.
/// @param assets_ Assets suitable for the strategy. Can be strategy assets, underlying asset or specific set of assets depending on strategy logic.
/// @param amountShares Shares amount for burning
/// @param minAssetAmountsOut Slippage tolerance. Minimal amounts of strategy assets that user must receive.
/// @return Amount of assets for withdraw. It's related to assets_ one-by-one.
function withdrawAssets(
address[] memory assets_,
uint amountShares,
uint[] memory minAssetAmountsOut
) external returns (uint[] memory);
/// @dev Burning shares of vault and obtaining strategy assets.
/// @param assets_ Assets suitable for the strategy. Can be strategy assets, underlying asset or specific set of assets depending on strategy logic.
/// @param amountShares Shares amount for burning
/// @param minAssetAmountsOut Slippage tolerance. Minimal amounts of strategy assets that user must receive.
/// @param receiver Receiver of assets
/// @param owner Owner of vault shares
/// @return Amount of assets for withdraw. It's related to assets_ one-by-one.
function withdrawAssets(
address[] memory assets_,
uint amountShares,
uint[] memory minAssetAmountsOut,
address receiver,
address owner
) external returns (uint[] memory);
/// @dev Changing ERC20 name of vault
function setName(string calldata newName) external;
/// @dev Changing ERC20 symbol of vault
function setSymbol(string calldata newSymbol) external;
/// @dev Enable or disable last block check
function setLastBlockDefenseDisabled(bool isDisabled) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
import {IERC4626} from "@openzeppelin/contracts/interfaces/IERC4626.sol";
interface IWrappedMetaVault is IERC4626 {
/// @custom:storage-location erc7201:stability.WrappedMetaVault
struct WrappedMetaVaultStorage {
address metaVault;
bool isMulti;
}
/// @dev Init
function initialize(address platform_, address metaVault) external;
/// @notice Address of MetaVault wrapped by this contract
function metaVault() external view returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
/// @dev Combining oracle and DeX spot prices
/// @author Alien Deployer (https://github.com/a17)
/// @author Jude (https://github.com/iammrjude)
/// @author JodsMigel (https://github.com/JodsMigel)
interface IPriceReader {
//region ----- Events -----
event AdapterAdded(address adapter);
event AdapterRemoved(address adapter);
event VaultWithSafeSharePriceAdded(address vault);
event VaultWithSafeSharePriceRemoved(address vault);
//endregion -- Events -----
/// @notice Price of asset
/// @dev Price of 1.0 amount of asset in USD
/// @param asset Address of asset
/// @return price USD price with 18 decimals
/// @return trusted Price from oracle
function getPrice(address asset) external view returns (uint price, bool trusted);
/// @notice Price of vault share
/// @dev Price of 1.0 amount of vault token
/// @param vault Address of vault
/// @return price USD price with 18 decimals
/// @return safe Safe to use this price on-chain
function getVaultPrice(address vault) external view returns (uint price, bool safe);
/// @notice Get USD price of specified assets and amounts
/// @param assets_ Addresses of assets
/// @param amounts_ Amount of asset. Index of asset same as in previous parameter.
/// @return total Total USD value with 18 decimals
/// @return assetAmountPrice USD price of asset amount. Index of assetAmountPrice same as in assets_ parameters.
/// @return assetPrice USD price of asset. Index of assetAmountPrice same as in assets_ parameters.
/// @return trusted True if only oracle prices was used for calculation.
function getAssetsPrice(
address[] memory assets_,
uint[] memory amounts_
) external view returns (uint total, uint[] memory assetAmountPrice, uint[] memory assetPrice, bool trusted);
/// @notice Get vaults that have organic safe share price that can be used on-chain
function vaultsWithSafeSharePrice() external view returns (address[] memory vaults);
/// @notice Add oracle adapter to PriceReader
/// Only operator (multisig is operator too) can add adapter
/// @param adapter_ Address of price oracle proxy
function addAdapter(address adapter_) external;
/// @notice Remove oracle adapter from PriceReader
/// Only operator (multisig is operator too) can add adapter
/// @param adapter_ Address of price oracle proxy
function removeAdapter(address adapter_) external;
/// @notice Add vaults that have organic safe share price that can be used on-chain
/// Only operator (multisig is operator too) can add adapter
/// @param vaults Addresses of vaults
function addSafeSharePrices(address[] memory vaults) external;
/// @notice Remove vaults that have organic safe share price that can be used on-chain
/// Only operator (multisig is operator too) can add adapter
/// @param vaults Addresses of vaults
function removeSafeSharePrices(address[] memory vaults) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
/// @dev Base core interface implemented by most platform contracts.
/// Inherited contracts store an immutable Platform proxy address in the storage,
/// which provides authorization capabilities and infrastructure contract addresses.
/// @author Alien Deployer (https://github.com/a17)
/// @author JodsMigel (https://github.com/JodsMigel)
interface IControllable {
//region ----- Custom Errors -----
error IncorrectZeroArgument();
error IncorrectMsgSender();
error NotGovernance();
error NotMultisig();
error NotGovernanceAndNotMultisig();
error NotOperator();
error NotFactory();
error NotPlatform();
error NotVault();
error IncorrectArrayLength();
error AlreadyExist();
error NotExist();
error NotTheOwner();
error ETHTransferFailed();
error IncorrectInitParams();
error InsufficientBalance();
error IncorrectLtv(uint ltv);
error TooLowValue(uint value);
//endregion -- Custom Errors -----
event ContractInitialized(address platform, uint ts, uint block);
/// @notice Stability Platform main contract address
function platform() external view returns (address);
/// @notice Version of contract implementation
/// @dev SemVer scheme MAJOR.MINOR.PATCH
//slither-disable-next-line naming-convention
function VERSION() external view returns (string memory);
/// @notice Block number when contract was initialized
function createdBlock() external view returns (uint);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
/// @notice Interface of the main contract and entry point to the platform.
/// @author Alien Deployer (https://github.com/a17)
/// @author Jude (https://github.com/iammrjude)
/// @author JodsMigel (https://github.com/JodsMigel)
interface IPlatform {
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* CUSTOM ERRORS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
error AlreadyAnnounced();
error SameVersion();
error NoNewVersion();
error UpgradeTimerIsNotOver(uint TimerTimestamp);
error IncorrectFee(uint minFee, uint maxFee);
error NotEnoughAllowedBBToken();
error TokenAlreadyExistsInSet(address token);
error AggregatorNotExists(address dexAggRouter);
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* EVENTS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
event PlatformVersion(string version);
event UpgradeAnnounce(
string oldVersion, string newVersion, address[] proxies, address[] newImplementations, uint timelock
);
event CancelUpgrade(string oldVersion, string newVersion);
event ProxyUpgraded(
address indexed proxy, address implementation, string oldContractVersion, string newContractVersion
);
event Addresses(
address multisig_,
address factory_,
address priceReader_,
address swapper_,
address buildingPermitToken_,
address vaultManager_,
address strategyLogic_,
address aprOracle_,
address hardWorker,
address rebalancer,
address zap,
address bridge
);
event OperatorAdded(address operator);
event OperatorRemoved(address operator);
event FeesChanged(uint fee, uint feeShareVaultManager, uint feeShareStrategyLogic, uint feeShareEcosystem);
event MinInitialBoostChanged(uint minInitialBoostPerDay, uint minInitialBoostDuration);
event NewAmmAdapter(string id, address proxy);
event EcosystemRevenueReceiver(address receiver);
event SetAllowedBBTokenVaults(address bbToken, uint vaultsToBuild, bool firstSet);
event RemoveAllowedBBToken(address bbToken);
event AddAllowedBoostRewardToken(address token);
event RemoveAllowedBoostRewardToken(address token);
event AddDefaultBoostRewardToken(address token);
event RemoveDefaultBoostRewardToken(address token);
event AddBoostTokens(address[] allowedBoostRewardToken, address[] defaultBoostRewardToken);
event AllowedBBTokenVaultUsed(address bbToken, uint vaultToUse);
event AddDexAggregator(address router);
event RemoveDexAggregator(address router);
event MinTvlForFreeHardWorkChanged(uint oldValue, uint newValue);
event CustomVaultFee(address vault, uint platformFee);
event Rebalancer(address rebalancer_);
event Bridge(address bridge_);
event RevenueRouter(address revenueRouter_);
event MetaVaultFactory(address metaVaultFactory);
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* DATA TYPES */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
struct PlatformUpgrade {
string newVersion;
address[] proxies;
address[] newImplementations;
}
struct PlatformSettings {
string networkName;
bytes32 networkExtra;
uint fee;
uint feeShareVaultManager;
uint feeShareStrategyLogic;
uint feeShareEcosystem;
uint minInitialBoostPerDay;
uint minInitialBoostDuration;
}
struct AmmAdapter {
string id;
address proxy;
}
struct SetupAddresses {
address factory;
address priceReader;
address swapper;
address buildingPermitToken;
address buildingPayPerVaultToken;
address vaultManager;
address strategyLogic;
address aprOracle;
address targetExchangeAsset;
address hardWorker;
address zap;
address revenueRouter;
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* VIEW FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @notice Platform version in CalVer scheme: YY.MM.MINOR-tag. Updates on core contract upgrades.
function platformVersion() external view returns (string memory);
/// @notice Time delay for proxy upgrades of core contracts and changing important platform settings by multisig
//slither-disable-next-line naming-convention
function TIME_LOCK() external view returns (uint);
/// @notice DAO governance
function governance() external view returns (address);
/// @notice Core team multi signature wallet. Development and operations fund
function multisig() external view returns (address);
/// @notice This NFT allow user to build limited number of vaults per week
function buildingPermitToken() external view returns (address);
/// @notice This ERC20 token is used as payment token for vault building
function buildingPayPerVaultToken() external view returns (address);
/// @notice Receiver of ecosystem revenue
function ecosystemRevenueReceiver() external view returns (address);
/// @dev The best asset in a network for swaps between strategy assets and farms rewards assets
/// The target exchange asset is used for finding the best strategy's exchange asset.
/// Rhe fewer routes needed to swap to the target exchange asset, the better.
function targetExchangeAsset() external view returns (address);
/// @notice Platform factory assembling vaults. Stores settings, strategy logic, farms.
/// Provides the opportunity to upgrade vaults and strategies.
/// @return Address of Factory proxy
function factory() external view returns (address);
/// @notice The holders of these NFT receive a share of the vault revenue
/// @return Address of VaultManager proxy
function vaultManager() external view returns (address);
/// @notice The holders of these tokens receive a share of the revenue received in all vaults using this strategy logic.
function strategyLogic() external view returns (address);
/// @notice Combining oracle and DeX spot prices
/// @return Address of PriceReader proxy
function priceReader() external view returns (address);
/// @notice Providing underlying assets APRs on-chain
/// @return Address of AprOracle proxy
function aprOracle() external view returns (address);
/// @notice On-chain price quoter and swapper
/// @return Address of Swapper proxy
function swapper() external view returns (address);
/// @notice HardWork resolver and caller
/// @return Address of HardWorker proxy
function hardWorker() external view returns (address);
/// @notice Rebalance resolver
/// @return Address of Rebalancer proxy
function rebalancer() external view returns (address);
/// @notice ZAP feature
/// @return Address of Zap proxy
function zap() external view returns (address);
/// @notice Platform revenue distributor
/// @return Address of the revenue distributor proxy
function revenueRouter() external view returns (address);
/// @notice Factory of MetaVaults
/// @return Address of the MetaVault factory
function metaVaultFactory() external view returns (address);
/// @notice Name of current EVM network
function networkName() external view returns (string memory);
/// @notice Minimal initial boost rewards per day USD amount which needs to create rewarding vault
function minInitialBoostPerDay() external view returns (uint);
/// @notice Minimal boost rewards vesting duration for initial boost
function minInitialBoostDuration() external view returns (uint);
/// @notice This function provides the timestamp of the platform upgrade timelock.
/// @dev This function is an external view function, meaning it doesn't modify the state.
/// @return uint representing the timestamp of the platform upgrade timelock.
function platformUpgradeTimelock() external view returns (uint);
/// @dev Extra network data
/// @return 0-2 bytes - color
/// 3-5 bytes - background color
/// 6-31 bytes - free
function networkExtra() external view returns (bytes32);
/// @notice Pending platform upgrade data
function pendingPlatformUpgrade() external view returns (PlatformUpgrade memory);
/// @notice Get platform revenue fee settings
/// @return fee Revenue fee % (between MIN_FEE - MAX_FEE) with DENOMINATOR precision.
/// @return feeShareVaultManager Revenue fee share % of VaultManager tokenId owner
/// @return feeShareStrategyLogic Revenue fee share % of StrategyLogic tokenId owner
/// @return feeShareEcosystem Revenue fee share % of ecosystemFeeReceiver
function getFees()
external
view
returns (uint fee, uint feeShareVaultManager, uint feeShareStrategyLogic, uint feeShareEcosystem);
/// @notice Get custom vault platform fee
/// @return fee revenue fee % with DENOMINATOR precision
function getCustomVaultFee(address vault) external view returns (uint fee);
/// @notice Platform settings
function getPlatformSettings() external view returns (PlatformSettings memory);
/// @notice AMM adapters of the platform
function getAmmAdapters() external view returns (string[] memory id, address[] memory proxy);
/// @notice Get AMM adapter data by hash
/// @param ammAdapterIdHash Keccak256 hash of adapter ID string
/// @return ID string and proxy address of AMM adapter
function ammAdapter(bytes32 ammAdapterIdHash) external view returns (AmmAdapter memory);
/// @notice Allowed buy-back tokens for rewarding vaults
function allowedBBTokens() external view returns (address[] memory);
/// @notice Vaults building limit for buy-back token.
/// This limit decrements when a vault for BB-token is built.
/// @param token Allowed buy-back token
/// @return vaultsLimit Number of vaults that can be built for BB-token
function allowedBBTokenVaults(address token) external view returns (uint vaultsLimit);
/// @notice Vaults building limits for allowed buy-back tokens.
/// @return bbToken Allowed buy-back tokens
/// @return vaultsLimit Number of vaults that can be built for BB-tokens
function allowedBBTokenVaults() external view returns (address[] memory bbToken, uint[] memory vaultsLimit);
/// @notice Non-zero vaults building limits for allowed buy-back tokens.
/// @return bbToken Allowed buy-back tokens
/// @return vaultsLimit Number of vaults that can be built for BB-tokens
function allowedBBTokenVaultsFiltered()
external
view
returns (address[] memory bbToken, uint[] memory vaultsLimit);
/// @notice Check address for existance in operators list
/// @param operator Address
/// @return True if this address is Stability Operator
function isOperator(address operator) external view returns (bool);
/// @notice Tokens that can be used for boost rewards of rewarding vaults
/// @return Addresses of tokens
function allowedBoostRewardTokens() external view returns (address[] memory);
/// @notice Allowed boost reward tokens that used for unmanaged rewarding vaults creation
/// @return Addresses of tokens
function defaultBoostRewardTokens() external view returns (address[] memory);
/// @notice Allowed boost reward tokens that used for unmanaged rewarding vaults creation
/// @param addressToRemove This address will be removed from default boost reward tokens
/// @return Addresses of tokens
function defaultBoostRewardTokensFiltered(address addressToRemove) external view returns (address[] memory);
/// @notice Allowed DeX aggregators
/// @return Addresses of DeX aggregator rounters
function dexAggregators() external view returns (address[] memory);
/// @notice DeX aggregator router address is allowed to be used in the platform
/// @param dexAggRouter Address of DeX aggreagator router
/// @return Can be used
function isAllowedDexAggregatorRouter(address dexAggRouter) external view returns (bool);
/// @notice Show minimum TVL for compensate if vault has not enough ETH
/// @return Minimum TVL for compensate.
function minTvlForFreeHardWork() external view returns (uint);
/// @notice Front-end platform viewer
/// @return platformAddresses Platform core addresses
/// platformAddresses[0] factory
/// platformAddresses[1] vaultManager
/// platformAddresses[2] strategyLogic
/// platformAddresses[3] buildingPermitToken
/// platformAddresses[4] buildingPayPerVaultToken
/// platformAddresses[5] governance
/// platformAddresses[6] multisig
/// platformAddresses[7] zap
/// platformAddresses[8] bridge
/// @return bcAssets Blue chip token addresses
/// @return dexAggregators_ DeX aggregators allowed to be used entire the platform
/// @return vaultType Vault type ID strings
/// @return vaultExtra Vault color, background color and other extra data. Index of vault same as in previous array.
/// @return vaultBulldingPrice Price of creating new vault in buildingPayPerVaultToken. Index of vault same as in previous array.
/// @return strategyId Strategy logic ID strings
/// @return isFarmingStrategy True if strategy is farming strategy. Index of strategy same as in previous array.
/// @return strategyTokenURI StrategyLogic NFT tokenId metadata and on-chain image. Index of strategy same as in previous array.
/// @return strategyExtra Strategy color, background color and other extra data. Index of strategy same as in previous array.
function getData()
external
view
returns (
address[] memory platformAddresses,
address[] memory bcAssets,
address[] memory dexAggregators_,
string[] memory vaultType,
bytes32[] memory vaultExtra,
uint[] memory vaultBulldingPrice,
string[] memory strategyId,
bool[] memory isFarmingStrategy,
string[] memory strategyTokenURI,
bytes32[] memory strategyExtra
);
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* WRITE FUNCTIONS */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/// @notice Add platform operator.
/// Only governance and multisig can add operator.
/// @param operator Address of new operator
function addOperator(address operator) external;
/// @notice Remove platform operator.
/// Only governance and multisig can remove operator.
/// @param operator Address of operator to remove
function removeOperator(address operator) external;
/// @notice Announce upgrade of platform proxies implementations
/// Only governance and multisig can announce platform upgrades.
/// @param newVersion New platform version. Version must be changed when upgrading.
/// @param proxies Addresses of core contract proxies
/// @param newImplementations New implementation for proxy. Index of proxy same as in previous array.
function announcePlatformUpgrade(
string memory newVersion,
address[] memory proxies,
address[] memory newImplementations
) external;
/// @notice Upgrade platform
/// Only operator (multisig is operator too) can ececute pending platform upgrade
function upgrade() external;
/// @notice Cancel pending platform upgrade
/// Only operator (multisig is operator too) can ececute pending platform upgrade
function cancelUpgrade() external;
/// @notice Register AMM adapter in platform
/// @param id AMM adapter ID string from AmmAdapterIdLib
/// @param proxy Address of AMM adapter proxy
function addAmmAdapter(string memory id, address proxy) external;
// todo Only governance and multisig can set allowed bb-token vaults building limit
/// @notice Set new vaults building limit for buy-back token
/// @param bbToken Address of allowed buy-back token
/// @param vaultsToBuild Number of vaults that can be built for BB-token
function setAllowedBBTokenVaults(address bbToken, uint vaultsToBuild) external;
// todo Only governance and multisig can add allowed boost reward token
/// @notice Add new allowed boost reward token
/// @param token Address of token
function addAllowedBoostRewardToken(address token) external;
// todo Only governance and multisig can remove allowed boost reward token
/// @notice Remove allowed boost reward token
/// @param token Address of allowed boost reward token
function removeAllowedBoostRewardToken(address token) external;
// todo Only governance and multisig can add default boost reward token
/// @notice Add default boost reward token
/// @param token Address of default boost reward token
function addDefaultBoostRewardToken(address token) external;
// todo Only governance and multisig can remove default boost reward token
/// @notice Remove default boost reward token
/// @param token Address of allowed boost reward token
function removeDefaultBoostRewardToken(address token) external;
// todo Only governance and multisig can add allowed boost reward token
// todo Only governance and multisig can add default boost reward token
/// @notice Add new allowed boost reward token
/// @notice Add default boost reward token
/// @param allowedBoostRewardToken Address of allowed boost reward token
/// @param defaultBoostRewardToken Address of default boost reward token
function addBoostTokens(
address[] memory allowedBoostRewardToken,
address[] memory defaultBoostRewardToken
) external;
/// @notice Decrease allowed BB-token vault building limit when vault is built
/// Only Factory can do it.
/// @param bbToken Address of allowed buy-back token
function useAllowedBBTokenVault(address bbToken) external;
/// @notice Allow DeX aggregator routers to be used in the platform
/// @param dexAggRouter Addresses of DeX aggreagator routers
function addDexAggregators(address[] memory dexAggRouter) external;
/// @notice Remove allowed DeX aggregator router from the platform
/// @param dexAggRouter Address of DeX aggreagator router
function removeDexAggregator(address dexAggRouter) external;
/// @notice Change initial boost rewards settings
/// @param minInitialBoostPerDay_ Minimal initial boost rewards per day USD amount which needs to create rewarding vault
/// @param minInitialBoostDuration_ Minimal boost rewards vesting duration for initial boost
function setInitialBoost(uint minInitialBoostPerDay_, uint minInitialBoostDuration_) external;
/// @notice Update new minimum TVL for compensate.
/// @param value New minimum TVL for compensate.
function setMinTvlForFreeHardWork(uint value) external;
/// @notice Set custom platform fee for vault
/// @param vault Vault address
/// @param platformFee Custom platform fee
function setCustomVaultFee(address vault, uint platformFee) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @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 value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` 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 value) external returns (bool);
}{
"remappings": [
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@solady/=lib/solady/src/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/",
"solady/=lib/solady/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "cancun",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"wrappedMetaVault_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"NotTrustedPrice","type":"error"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wrappedMetaVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60a0604052348015600e575f5ffd5b506040516108ce3803806108ce833981016040819052602b91603b565b6001600160a01b03166080526066565b5f60208284031215604a575f5ffd5b81516001600160a01b0381168114605f575f5ffd5b9392505050565b60805161084b6100835f395f8181605c015260b0015261084b5ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c8063313ce567146100435780633b4b88be1461005757806350d25bcd14610096575b5f5ffd5b604051600881526020015b60405180910390f35b61007e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161004e565b61009e6100ac565b60405190815260200161004e565b5f5f7f000000000000000000000000000000000000000000000000000000000000000090505f816001600160a01b03166378df8e706040518163ffffffff1660e01b8152600401602060405180830381865afa15801561010e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610132919061057c565b90505f826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610171573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061019591906105a9565b6101a090600a6106c0565b6040516303d1689d60e11b8152600481018290529091505f906001600160a01b038516906307a2d13a90602401602060405180830381865afa1580156101e8573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061020c91906106ce565b90505f61029c846001600160a01b0316634ac032be6040518163ffffffff1660e01b81526004015f60405180830381865afa15801561024d573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261027491908101906106f9565b6040518060400160405280600a815260200169135d5b1d1a55985d5b1d60b21b815250610561565b9050801561049e575f856001600160a01b03166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102e1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610305919061057c565b90505f866001600160a01b0316634bde38c86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610344573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610368919061057c565b90505f5f826001600160a01b03166349b5fdb46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103a8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103cc919061057c565b6040516341976e0960e01b81526001600160a01b03868116600483015291909116906341976e09906024016040805180830381865afa158015610411573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043591906107ac565b9150915080849061046a5760405163715293cf60e11b81526001600160a01b0390911660048201526024015b60405180910390fd5b506402540be4008761047c84896107df565b61048691906107f6565b61049091906107f6565b995050505050505050505090565b5f5f856001600160a01b031663a035b1fe6040518163ffffffff1660e01b81526004016040805180830381865afa1580156104db573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104ff91906107ac565b9150915080869061052f5760405163715293cf60e11b81526001600160a01b039091166004820152602401610461565b506402540be4008561054184876107df565b61054b91906107f6565b61055591906107f6565b97505050505050505090565b5f818051906020012083805190602001201490505b92915050565b5f6020828403121561058c575f5ffd5b81516001600160a01b03811681146105a2575f5ffd5b9392505050565b5f602082840312156105b9575f5ffd5b815160ff811681146105a2575f5ffd5b634e487b7160e01b5f52601160045260245ffd5b6001815b6001841115610618578085048111156105fc576105fc6105c9565b600184161561060a57908102905b60019390931c9280026105e1565b935093915050565b5f8261062e57506001610576565b8161063a57505f610576565b8160018114610650576002811461065a57610676565b6001915050610576565b60ff84111561066b5761066b6105c9565b50506001821b610576565b5060208310610133831016604e8410600b8410161715610699575081810a610576565b6106a55f1984846105dd565b805f19048211156106b8576106b86105c9565b029392505050565b5f6105a260ff841683610620565b5f602082840312156106de575f5ffd5b5051919050565b634e487b7160e01b5f52604160045260245ffd5b5f60208284031215610709575f5ffd5b815167ffffffffffffffff81111561071f575f5ffd5b8201601f8101841361072f575f5ffd5b805167ffffffffffffffff811115610749576107496106e5565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715610778576107786106e5565b60405281815282820160200186101561078f575f5ffd5b8160208401602083015e5f91810160200191909152949350505050565b5f5f604083850312156107bd575f5ffd5b8251602084015190925080151581146107d4575f5ffd5b809150509250929050565b8082028115828204841417610576576105766105c9565b5f8261081057634e487b7160e01b5f52601260045260245ffd5b50049056fea2646970667358221220179f2849ae9305c412a0eecacd939ba881795b1995647841da5ae3b8e54ecff164736f6c634300081c0033000000000000000000000000aaaaaaaac311d0572bffb4772fe985a750e88805
Deployed Bytecode
0x608060405234801561000f575f5ffd5b506004361061003f575f3560e01c8063313ce567146100435780633b4b88be1461005757806350d25bcd14610096575b5f5ffd5b604051600881526020015b60405180910390f35b61007e7f000000000000000000000000aaaaaaaac311d0572bffb4772fe985a750e8880581565b6040516001600160a01b03909116815260200161004e565b61009e6100ac565b60405190815260200161004e565b5f5f7f000000000000000000000000aaaaaaaac311d0572bffb4772fe985a750e8880590505f816001600160a01b03166378df8e706040518163ffffffff1660e01b8152600401602060405180830381865afa15801561010e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610132919061057c565b90505f826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610171573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061019591906105a9565b6101a090600a6106c0565b6040516303d1689d60e11b8152600481018290529091505f906001600160a01b038516906307a2d13a90602401602060405180830381865afa1580156101e8573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061020c91906106ce565b90505f61029c846001600160a01b0316634ac032be6040518163ffffffff1660e01b81526004015f60405180830381865afa15801561024d573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261027491908101906106f9565b6040518060400160405280600a815260200169135d5b1d1a55985d5b1d60b21b815250610561565b9050801561049e575f856001600160a01b03166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102e1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610305919061057c565b90505f866001600160a01b0316634bde38c86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610344573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610368919061057c565b90505f5f826001600160a01b03166349b5fdb46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103a8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103cc919061057c565b6040516341976e0960e01b81526001600160a01b03868116600483015291909116906341976e09906024016040805180830381865afa158015610411573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043591906107ac565b9150915080849061046a5760405163715293cf60e11b81526001600160a01b0390911660048201526024015b60405180910390fd5b506402540be4008761047c84896107df565b61048691906107f6565b61049091906107f6565b995050505050505050505090565b5f5f856001600160a01b031663a035b1fe6040518163ffffffff1660e01b81526004016040805180830381865afa1580156104db573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104ff91906107ac565b9150915080869061052f5760405163715293cf60e11b81526001600160a01b039091166004820152602401610461565b506402540be4008561054184876107df565b61054b91906107f6565b61055591906107f6565b97505050505050505090565b5f818051906020012083805190602001201490505b92915050565b5f6020828403121561058c575f5ffd5b81516001600160a01b03811681146105a2575f5ffd5b9392505050565b5f602082840312156105b9575f5ffd5b815160ff811681146105a2575f5ffd5b634e487b7160e01b5f52601160045260245ffd5b6001815b6001841115610618578085048111156105fc576105fc6105c9565b600184161561060a57908102905b60019390931c9280026105e1565b935093915050565b5f8261062e57506001610576565b8161063a57505f610576565b8160018114610650576002811461065a57610676565b6001915050610576565b60ff84111561066b5761066b6105c9565b50506001821b610576565b5060208310610133831016604e8410600b8410161715610699575081810a610576565b6106a55f1984846105dd565b805f19048211156106b8576106b86105c9565b029392505050565b5f6105a260ff841683610620565b5f602082840312156106de575f5ffd5b5051919050565b634e487b7160e01b5f52604160045260245ffd5b5f60208284031215610709575f5ffd5b815167ffffffffffffffff81111561071f575f5ffd5b8201601f8101841361072f575f5ffd5b805167ffffffffffffffff811115610749576107496106e5565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715610778576107786106e5565b60405281815282820160200186101561078f575f5ffd5b8160208401602083015e5f91810160200191909152949350505050565b5f5f604083850312156107bd575f5ffd5b8251602084015190925080151581146107d4575f5ffd5b809150509250929050565b8082028115828204841417610576576105766105c9565b5f8261081057634e487b7160e01b5f52601260045260245ffd5b50049056fea2646970667358221220179f2849ae9305c412a0eecacd939ba881795b1995647841da5ae3b8e54ecff164736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000aaaaaaaac311d0572bffb4772fe985a750e88805
-----Decoded View---------------
Arg [0] : wrappedMetaVault_ (address): 0xAaAaaAAac311D0572Bffb4772fe985A750E88805
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000aaaaaaaac311d0572bffb4772fe985a750e88805
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in S
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.