Overview
ETH Balance
0 ETH
Eth Value
$0.00
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
There are no matching entriesUpdate your filters to view other transactions | |||||||||
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ezETHConversionStrategy
Compiler Version
v0.8.27+commit.40a35a09
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.27;
import "../../Errors/Errors.sol";
import { IWithdrawQueue, WithdrawRequest } from "../interfaces/IWithdrawQueue.sol";
import { IWeth } from "../interfaces/IWeth.sol";
import { IRestakeManager } from "../interfaces/IRestakeManager.sol";
import { ICachedRateProvider } from "../interfaces/ICachedRateProvider.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "../interfaces/IDelegateStrategy.sol";
/**
* @author Renzo Protocol
* @title ezETHConversionStrategy
* @dev This contract manages bidirectional conversions between ezETH and WETH.
* @notice Strategy for converting between ezETH and WETH through Renzo's deposit and withdrawal processes.
* Tracks pending withdrawals and returns their value in WETH terms using a cached rate provider.
*/
contract ezETHConversionStrategy is IDelegateStrategy {
using SafeERC20 for IERC20;
/// @dev Renzo Address constant for Native ETH
address public constant IS_NATIVE = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
/// @notice ezETH token
IERC20 public immutable ezEthToken;
/// @notice WETH token (underlying asset)
IERC20 public immutable wethToken;
/// @notice Renzo withdraw queue for ezETH to ETH conversions
IWithdrawQueue public immutable withdrawQueue;
/// @notice Renzo restake manager for ETH to ezETH deposits
IRestakeManager public immutable restakeManager;
/// @notice Cached rate provider for ezETH/ETH exchange rate
ICachedRateProvider public immutable cachedRateProvider;
/// @notice Cache duration in seconds (60 seconds = 1 minute)
uint256 public constant RATE_CACHE_DURATION = 60;
/// @notice Emitted when WETH to ezETH conversion is initiated
event WethToEzEthConversionStarted(uint256 wethAmount);
/// @notice Emitted when ezETH to WETH withdrawal is started
event EzEthToWethWithdrawalStarted(uint256 ezEthAmount);
/// @notice Emitted when ezETH to WETH withdrawal is completed
event EzEthToWethWithdrawalCompleted(uint256 withdrawIndex, uint256 wethAmount);
/**
* @notice Constructor
* @param _ezEthToken Address of the ezETH token
* @param _wethToken Address of the WETH token
* @param _withdrawQueue Address of Renzo's withdraw queue
* @param _restakeManager Address of Renzo's restake manager
* @param _cachedRateProvider Address of the cached rate provider
*/
constructor(
address _ezEthToken,
address _wethToken,
address _withdrawQueue,
address _restakeManager,
address _cachedRateProvider
) {
if (_ezEthToken == address(0)) revert InvalidZeroInput();
if (_wethToken == address(0)) revert InvalidZeroInput();
if (_withdrawQueue == address(0)) revert InvalidZeroInput();
if (_restakeManager == address(0)) revert InvalidZeroInput();
if (_cachedRateProvider == address(0)) revert InvalidZeroInput();
ezEthToken = IERC20(_ezEthToken);
wethToken = IERC20(_wethToken);
withdrawQueue = IWithdrawQueue(_withdrawQueue);
restakeManager = IRestakeManager(_restakeManager);
cachedRateProvider = ICachedRateProvider(_cachedRateProvider);
}
/**
* @notice Convert WETH to ezETH via Renzo deposit
* @dev Unwraps WETH to ETH and deposits to Renzo restake manager
* @param wethAmount Amount of WETH to convert to ezETH
*/
function convertWethToEzEth(uint256 wethAmount) external {
if (wethAmount == 0) revert InvalidZeroInput();
// Convert WETH to ETH and then deposit ETH to restakeManager
IWeth(address(wethToken)).withdraw(wethAmount);
restakeManager.depositETH{ value: wethAmount }();
emit WethToEzEthConversionStarted(wethAmount);
}
/**
* @notice Start converting ezETH to WETH via withdraw queue
* @dev Approves ezETH and initiates withdrawal for native ETH
* @param ezEthAmount Amount of ezETH to withdraw
*/
function startConvertEzEthToWeth(uint256 ezEthAmount) external {
if (ezEthAmount == 0) revert InvalidZeroInput();
// Start a withdrawal from the withdrawQueue
// Approve ezETH first then trigger withdraw
ezEthToken.forceApprove(address(withdrawQueue), ezEthAmount);
withdrawQueue.withdraw(ezEthAmount, IS_NATIVE);
emit EzEthToWethWithdrawalStarted(ezEthAmount);
}
/**
* @notice Complete a withdrawal and convert received ETH to WETH
* @dev Claims withdrawal from queue and wraps ETH to WETH
* @param withdrawIndex The index of the withdrawal request to claim
*/
function completeConvertEzEthToWeth(uint256 withdrawIndex) external {
// Complete a withdrawal from the withdrawQueue
withdrawQueue.claim(withdrawIndex, address(this));
// Convert received ETH to WETH
uint256 ethBalance = address(this).balance;
if (ethBalance > 0) {
IWeth(address(wethToken)).deposit{ value: ethBalance }();
}
emit EzEthToWethWithdrawalCompleted(withdrawIndex, ethBalance);
}
/**
* @notice Get the total WETH value of pending ETH withdrawals
* @dev Iterates through outstanding withdrawal requests and calculates their current value
* @param ezEthRate The current ezETH to ETH exchange rate (18 decimals)
* @return uint256 Total pending withdrawals value in WETH/ETH terms
*/
function getPendingEthWithdrawals(uint256 ezEthRate) public view returns (uint256) {
uint256 withdrawalCount = withdrawQueue.getOutstandingWithdrawRequests(address(this));
// Iterate and get the withdrawal amounts
uint256 totalPending = 0;
for (uint256 i = 0; i < withdrawalCount; i++) {
WithdrawRequest memory request = withdrawQueue.withdrawRequests(address(this), i);
// Sanity check - we only support native ETH withdrawals
if (request.collateralToken != IS_NATIVE) {
revert InvalidAsset();
}
// Check the current rate of ezETH - if it is lower than the withdraw request,
// then use that (handle slashing)
uint256 currentAmountToRedeem = (request.ezETHLocked * ezEthRate) / 1e18; // Convert to WETH value
if (currentAmountToRedeem < request.amountToRedeem) {
totalPending += currentAmountToRedeem;
} else {
totalPending += request.amountToRedeem;
}
}
return totalPending;
}
/**
* @notice Returns the WETH value of pending withdrawals
* @dev Calculates value of all outstanding withdrawal requests in WETH terms using cached rate
* @param _asset The underlying asset - must be WETH
* @return uint256 The value of pending withdrawals in WETH terms
*/
function underlyingValue(address _asset) external view returns (uint256) {
// Enforce asset must be WETH
if (_asset != address(wethToken)) {
revert InvalidAsset();
}
// Get the ezETH to ETH exchange rate with 60 second cache (rate is in 18 decimals)
uint256 ezEthRate = cachedRateProvider.getRateView(RATE_CACHE_DURATION);
// Get pending ETH withdrawals from withdrawQueue
uint256 pendingWeth = getPendingEthWithdrawals(ezEthRate);
return pendingWeth;
}
/**
* @notice Forces an update of the cached rate
* @dev Calls forceUpdate on the cached rate provider to refresh the cache immediately
* @return uint256 The newly fetched rate
*/
function forceRateUpdate() external returns (uint256) {
return cachedRateProvider.forceUpdate();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*
* CAUTION: See Security Considerations above.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @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 SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
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'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
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");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @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 {Address-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 = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @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).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// 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 cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @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
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// 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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.27; /** * @title Errors * @author Renzo Protocol * @notice This contract defines custom errors used throughout the LiquidVaults protocol * @dev All errors are defined as custom errors for gas efficiency */ /// @dev Error when Zero Input value error InvalidZeroInput(); /// @dev Error when caller is not Rebalance admin error NotRebalanceAdmin(); /// @dev Error when caller is not Exchange rate admin error NotExchangeRateAdmin(); /// @dev Error when array lengths do not match error MismatchedArrayLengths(); /// @dev Error when admin tries to execute Non whitelisted strategy error UnAuthorizedStrategy(address strategy); /// @dev Error when owner tries to remove non zero underlying delegate strategy error NonZeroUnderlyingDelegateStrategy(); /// @dev Error when Withdrawal is not claimable error WithdrawalNotClaimable(); /// @dev Error when caller try to claim invalidWithdrawIndex error InvalidWithdrawIndex(); /// @dev Error when called is not vault error NotUnderlyingVault(); /// @dev Error when caller is not Withdraw Queue error NotWithdrawQueue(); /// @dev Error when caller tries to create already existing vault error VaultAlreadyCreated(); /// @dev Error when caller is not whitelisted error NotWhitelisted(); /// @dev Error when fee bps out of range error InvalidFeeBps(); /// @dev Error when caller does not have pauser role error NotPauser(); /// @dev Error when eulerswap param is invalid error InvalidEquilibriumReserve(); /// @dev Error when pool is already installed for the euler account error PoolAlreadyInstalled(); /// @dev Error when unexpected asset address is passed in error InvalidAsset(); /// @dev Error when no pool is installed for the euler account when it is expected error NoPoolInstalled(); /// @dev Error when caller is not order admin error NotOrderAdmin(); /// @dev Error when market is not supported error MarketNotSupported(); /// @dev Error when order already exists error OrderAlreadyExists(); /// @dev Error when order does not exist error OrderDoesNotExist(); /// @dev Error when decimals are invalid error InvalidDecimals(); /// @dev Error when caller is not owner error NotOwner(); /// @dev Error when active withdrawal is in progress error ActiveWithdrawalInProgress(); /// @dev Error when no active withdrawal is in progress error NoActiveWithdrawalInProgress(); /// @dev Error when active deposit is in progress error ActiveDepositInProgress(); /// @dev Error when expected amount is invalid error InvalidExpectedAmount(); /// @dev Error when no active deposit is in progress error NoActiveDepositInProgress(); /// @dev Error when Oracle Price is invalid error InvalidOraclePrice(); /// @dev Error when superstate deposit address is already set error SuperstateAddressAlreadySet(); /// @dev Error when current tick has changed error InvalidTick(); /// @dev Error when debt value is greater than collateral value error InvalidDebtValue(); /// @dev Error when referral code is invalid error InvalidReferralCode(); /// @dev Error when interest rate mode is invalid error InvalidInterestRateMode(); /// @dev Error when market does not exist error MarketNotExists(); /// @dev Error when caller is not minter error NotMinter(); /// @dev Error when order has expired error OrderExpired(); /// @dev Error when order amount is less than minimum required error InvalidOrderAmount(); /// @dev Error when payment amount provided is not sufficient error InsufficientPaymentAmount(); /// @dev Error when invalid fee error InvalidFee(); /// @dev Error when market is not configured when try to remove error MarketNotConfigured(); /// @dev Error when market is already configured when try to add error MarketAlreadyConfigured(); /// @dev Error when new min order amount is less than processing fee error InvalidMinOrderAmount();
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.27;
import { IRateProvider } from "./IRateProvider.sol";
/**
* @title ICachedRateProvider
* @notice Interface for the CachedRateProvider contract
*/
interface ICachedRateProvider {
/**
* @notice Emitted when the rate is updated from the provider
* @param newRate The newly fetched rate
* @param timestamp The timestamp when the rate was updated
*/
event RateUpdated(uint256 newRate, uint256 timestamp);
/**
* @notice Get the rate with caching logic
* @param allowedCacheSeconds Maximum age of cache in seconds before refresh is needed
* @return The current rate
*/
function getRate(uint256 allowedCacheSeconds) external returns (uint256);
/**
* @notice Get the rate with caching logic (view-compatible version)
* @dev Returns cached rate if available, otherwise calls underlying provider without updating cache
* @param allowedCacheSeconds Maximum age of cache in seconds before considering stale
* @return The rate (cached if fresh, or from provider if stale/unavailable)
*/
function getRateView(uint256 allowedCacheSeconds) external view returns (uint256);
/**
* @notice Force an immediate rate update regardless of cache state
* @return The newly fetched rate
*/
function forceUpdate() external returns (uint256);
/**
* @notice Get the underlying rate provider
* @return The rate provider contract
*/
function rateProvider() external view returns (IRateProvider);
/**
* @notice Get the last cached rate value
* @return The cached rate
*/
function cachedRate() external view returns (uint256);
/**
* @notice Get the timestamp when the rate was last updated
* @return The last update timestamp
*/
function lastUpdateTimestamp() external view returns (uint256);
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.27;
/**
* @title IDelegateStrategy
* @author Renzo Protocol
* @notice Interface that all delegate strategies must implement
* @dev Delegate strategies are external contracts that manage vault assets in various DeFi protocols
*/
interface IDelegateStrategy {
/**
* @notice Returns the value of assets managed by this strategy
* @dev WARNING: Don't use balanceOf(this) to avoid double counting
* @param _asset The asset address to query the value for
* @return The total value of the specified asset managed by this strategy
*/
function underlyingValue(address _asset) external view returns (uint256);
}// SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.8.27;
interface IRateProvider {
function getRate() external view returns (uint256);
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.27;
interface IRestakeManager {
function depositQueue() external view returns (address);
function calculateTVLs() external view returns (uint256[][] memory, uint256[] memory, uint256);
function depositETH() external payable;
function deposit(address _collateralToken, uint256 _amount) external;
function getCollateralTokenIndex(address _collateralToken) external view returns (uint256);
function getCollateralTokensLength() external view returns (uint256);
function collateralTokens(uint256 index) external view returns (address);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
interface IWeth {
function deposit() external payable;
function withdraw(uint256 value) external;
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.27;
struct WithdrawRequest {
address collateralToken;
uint256 withdrawRequestID;
uint256 amountToRedeem;
uint256 ezETHLocked;
uint256 createdAt;
}
interface IWithdrawQueue {
/// @dev To get available value to withdraw from buffer
/// @param _asset address of token
function getAvailableToWithdraw(address _asset) external view returns (uint256);
/// @dev To get the withdraw buffer target of given asset
/// @param _asset address of token
function withdrawalBufferTarget(address _asset) external view returns (uint256);
/// @dev To get the current Target Buffer Deficit
/// @param _asset address of token
function getWithdrawDeficit(address _asset) external view returns (uint256);
/// @dev Fill ERC20 Withdraw Buffer
/// @param _asset the token address to fill the respective buffer
/// @param _amount amount of token to fill with
function fillERC20WithdrawBuffer(address _asset, uint256 _amount) external;
/// @dev to get the withdrawRequests for particular user
/// @param _user address of the user
function withdrawRequests(
address _user,
uint256 requestIndex
) external view returns (WithdrawRequest memory);
/// @dev Fill ETH Withdraw buffer
function fillEthWithdrawBuffer() external payable;
/// @dev Get the token tvls and redeem amount
function calculateAmountToRedeem(
uint256 _amount,
address _assetOut
)
external
view
returns (uint256[][] memory operatorDelegatorTokenTVLs, uint256 _amountToRedeem);
function withdraw(uint256 _amount, address _assetOut) external;
function getOutstandingWithdrawRequests(address user) external view returns (uint256);
function claim(uint256 withdrawRequestIndex, address user) external;
function stETHPendingWithdrawAmount() external view returns (uint256);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_ezEthToken","type":"address"},{"internalType":"address","name":"_wethToken","type":"address"},{"internalType":"address","name":"_withdrawQueue","type":"address"},{"internalType":"address","name":"_restakeManager","type":"address"},{"internalType":"address","name":"_cachedRateProvider","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidAsset","type":"error"},{"inputs":[],"name":"InvalidZeroInput","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"withdrawIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"wethAmount","type":"uint256"}],"name":"EzEthToWethWithdrawalCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"ezEthAmount","type":"uint256"}],"name":"EzEthToWethWithdrawalStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"wethAmount","type":"uint256"}],"name":"WethToEzEthConversionStarted","type":"event"},{"inputs":[],"name":"IS_NATIVE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RATE_CACHE_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cachedRateProvider","outputs":[{"internalType":"contract ICachedRateProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"withdrawIndex","type":"uint256"}],"name":"completeConvertEzEthToWeth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"wethAmount","type":"uint256"}],"name":"convertWethToEzEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ezEthToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forceRateUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ezEthRate","type":"uint256"}],"name":"getPendingEthWithdrawals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"restakeManager","outputs":[{"internalType":"contract IRestakeManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ezEthAmount","type":"uint256"}],"name":"startConvertEzEthToWeth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"underlyingValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wethToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawQueue","outputs":[{"internalType":"contract IWithdrawQueue","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
61012060405234801561001157600080fd5b5060405161112d38038061112d83398101604081905261003091610138565b6001600160a01b0385166100575760405163862a606760e01b815260040160405180910390fd5b6001600160a01b03841661007e5760405163862a606760e01b815260040160405180910390fd5b6001600160a01b0383166100a55760405163862a606760e01b815260040160405180910390fd5b6001600160a01b0382166100cc5760405163862a606760e01b815260040160405180910390fd5b6001600160a01b0381166100f35760405163862a606760e01b815260040160405180910390fd5b6001600160a01b0394851660805292841660a05290831660c052821660e052166101005261019d565b80516001600160a01b038116811461013357600080fd5b919050565b600080600080600060a0868803121561015057600080fd5b6101598661011c565b94506101676020870161011c565b93506101756040870161011c565b92506101836060870161011c565b91506101916080870161011c565b90509295509295909350565b60805160a05160c05160e05161010051610ef96102346000396000818160d901528181610406015261070501526000818161022c01526102eb0152600081816101cf015281816104de01528181610532015281816105e2015281816107ae01526108460152600081816101a8015281816102850152818161039d015261065101526000818161013201526104bc0152610ef96000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634b57b0be1161008c578063cb401f2611610066578063cb401f26146101f9578063cf5adee91461020c578063f510a4d014610214578063ff0996b51461022757600080fd5b80634b57b0be146101a357806351a2d6d1146101ca578063b95a1741146101f157600080fd5b8063044365a7146100d457806312578b2e146101185780631dca98e61461012d5780632f9ef01214610154578063445cc72d14610175578063479d397614610188575b600080fd5b6100fb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61012b610126366004610cc7565b61024e565b005b6100fb7f000000000000000000000000000000000000000000000000000000000000000081565b610167610162366004610cf8565b610399565b60405190815260200161010f565b61012b610183366004610cc7565b61048e565b6100fb73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b6100fb7f000000000000000000000000000000000000000000000000000000000000000081565b6100fb7f000000000000000000000000000000000000000000000000000000000000000081565b610167603c81565b61012b610207366004610cc7565b6105c6565b610167610701565b610167610222366004610cc7565b61078c565b6100fb7f000000000000000000000000000000000000000000000000000000000000000081565b8060000361026f5760405163862a606760e01b815260040160405180910390fd5b604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156102d157600080fd5b505af11580156102e5573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f6326fb3826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561034457600080fd5b505af1158015610358573d6000803e3d6000fd5b50505050507ff1e09533ff8dac0eeaa520238ad3f0fac260926db2c4619edb965672fadbfc578160405161038e91815260200190565b60405180910390a150565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146103ed57604051636448d6e960e11b815260040160405180910390fd5b6040516383c7a8a760e01b8152603c60048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906383c7a8a790602401602060405180830381865afa158015610455573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104799190610d1c565b905060006104868261078c565b949350505050565b806000036104af5760405163862a606760e01b815260040160405180910390fd5b6105036001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083610962565b604051627b8a6760e11b81526004810182905273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169062f714ce90604401600060405180830381600087803b15801561057d57600080fd5b505af1158015610591573d6000803e3d6000fd5b505050507f53b906892193d6405eb9b197ba1cd9195760b42126c0031658d0885d0f4574068160405161038e91815260200190565b604051636eeaf0d960e11b8152600481018290523060248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ddd5e1b290604401600060405180830381600087803b15801561062e57600080fd5b505af1158015610642573d6000803e3d6000fd5b5047925050811590506106c4577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156106aa57600080fd5b505af11580156106be573d6000803e3d6000fd5b50505050505b60408051838152602081018390527f61905920c2578bded6a788bdf36dcc0203741c2b4e4fd177598d5432a4975c0f910160405180910390a15050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633acaa0d76040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610763573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107879190610d1c565b905090565b604051631ce83f7960e11b815230600482015260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906339d07ef290602401602060405180830381865afa1580156107f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108199190610d1c565b90506000805b8281101561095a57604051636d6ca31960e01b8152306004820152602481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636d6ca3199060440160a060405180830381865afa158015610895573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b99190610d45565b80519091506001600160a01b031673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146108fa57604051636448d6e960e11b815260040160405180910390fd5b6000670de0b6b3a76400008783606001516109159190610de2565b61091f9190610df9565b9050816040015181101561093e576109378185610e1b565b9350610950565b604082015161094d9085610e1b565b93505b505060010161081f565b509392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526109b38482610a1c565b610a1657604080516001600160a01b038516602482015260006044808301919091528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610a0c908590610ac5565b610a168482610ac5565b50505050565b6000806000846001600160a01b031684604051610a399190610e52565b6000604051808303816000865af19150503d8060008114610a76576040519150601f19603f3d011682016040523d82523d6000602084013e610a7b565b606091505b5091509150818015610aa5575080511580610aa5575080806020019051810190610aa59190610e6e565b8015610aba57506001600160a01b0385163b15155b925050505b92915050565b6000610b1a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610ba49092919063ffffffff16565b9050805160001480610b3b575080806020019051810190610b3b9190610e6e565b610b9f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b505050565b6060610486848460008585600080866001600160a01b03168587604051610bcb9190610e52565b60006040518083038185875af1925050503d8060008114610c08576040519150601f19603f3d011682016040523d82523d6000602084013e610c0d565b606091505b5091509150610c1e87838387610c29565b979650505050505050565b60608315610c98578251600003610c91576001600160a01b0385163b610c915760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b96565b5081610486565b6104868383815115610cad5781518083602001fd5b8060405162461bcd60e51b8152600401610b969190610e90565b600060208284031215610cd957600080fd5b5035919050565b6001600160a01b0381168114610cf557600080fd5b50565b600060208284031215610d0a57600080fd5b8135610d1581610ce0565b9392505050565b600060208284031215610d2e57600080fd5b5051919050565b8051610d4081610ce0565b919050565b600060a0828403128015610d5857600080fd5b6000905060405160a0810181811067ffffffffffffffff82111715610d8b57634e487b7160e01b83526041600452602483fd5b604052610d9784610d35565b815260208481015190820152604080850151908201526060808501519082015260809384015193810193909352509092915050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610abf57610abf610dcc565b600082610e1657634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610abf57610abf610dcc565b60005b83811015610e49578181015183820152602001610e31565b50506000910152565b60008251610e64818460208701610e2e565b9190910192915050565b600060208284031215610e8057600080fd5b81518015158114610d1557600080fd5b6020815260008251806020840152610eaf816040850160208701610e2e565b601f01601f1916919091016040019291505056fea26469706673582212208a64a34165367dadae400e6e8b75ade06dc2ee4b87f084aab0eaad32ea0f6ebe64736f6c634300081b0033000000000000000000000000bf5495efe5db9ce00f80364c8b423567e58d2110000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000005efc9d10e42fb517456f4ac41eb5e2ebe42c891800000000000000000000000074a09653a083691711cf8215a6ab074bb4e99ef50000000000000000000000004709ab91123f7dbb4b6c4a02c94e855678404fc7
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80634b57b0be1161008c578063cb401f2611610066578063cb401f26146101f9578063cf5adee91461020c578063f510a4d014610214578063ff0996b51461022757600080fd5b80634b57b0be146101a357806351a2d6d1146101ca578063b95a1741146101f157600080fd5b8063044365a7146100d457806312578b2e146101185780631dca98e61461012d5780632f9ef01214610154578063445cc72d14610175578063479d397614610188575b600080fd5b6100fb7f0000000000000000000000004709ab91123f7dbb4b6c4a02c94e855678404fc781565b6040516001600160a01b0390911681526020015b60405180910390f35b61012b610126366004610cc7565b61024e565b005b6100fb7f000000000000000000000000bf5495efe5db9ce00f80364c8b423567e58d211081565b610167610162366004610cf8565b610399565b60405190815260200161010f565b61012b610183366004610cc7565b61048e565b6100fb73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b6100fb7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6100fb7f0000000000000000000000005efc9d10e42fb517456f4ac41eb5e2ebe42c891881565b610167603c81565b61012b610207366004610cc7565b6105c6565b610167610701565b610167610222366004610cc7565b61078c565b6100fb7f00000000000000000000000074a09653a083691711cf8215a6ab074bb4e99ef581565b8060000361026f5760405163862a606760e01b815260040160405180910390fd5b604051632e1a7d4d60e01b8152600481018290527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156102d157600080fd5b505af11580156102e5573d6000803e3d6000fd5b505050507f00000000000000000000000074a09653a083691711cf8215a6ab074bb4e99ef56001600160a01b031663f6326fb3826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561034457600080fd5b505af1158015610358573d6000803e3d6000fd5b50505050507ff1e09533ff8dac0eeaa520238ad3f0fac260926db2c4619edb965672fadbfc578160405161038e91815260200190565b60405180910390a150565b60007f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316826001600160a01b0316146103ed57604051636448d6e960e11b815260040160405180910390fd5b6040516383c7a8a760e01b8152603c60048201526000907f0000000000000000000000004709ab91123f7dbb4b6c4a02c94e855678404fc76001600160a01b0316906383c7a8a790602401602060405180830381865afa158015610455573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104799190610d1c565b905060006104868261078c565b949350505050565b806000036104af5760405163862a606760e01b815260040160405180910390fd5b6105036001600160a01b037f000000000000000000000000bf5495efe5db9ce00f80364c8b423567e58d2110167f0000000000000000000000005efc9d10e42fb517456f4ac41eb5e2ebe42c891883610962565b604051627b8a6760e11b81526004810182905273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60248201527f0000000000000000000000005efc9d10e42fb517456f4ac41eb5e2ebe42c89186001600160a01b03169062f714ce90604401600060405180830381600087803b15801561057d57600080fd5b505af1158015610591573d6000803e3d6000fd5b505050507f53b906892193d6405eb9b197ba1cd9195760b42126c0031658d0885d0f4574068160405161038e91815260200190565b604051636eeaf0d960e11b8152600481018290523060248201527f0000000000000000000000005efc9d10e42fb517456f4ac41eb5e2ebe42c89186001600160a01b03169063ddd5e1b290604401600060405180830381600087803b15801561062e57600080fd5b505af1158015610642573d6000803e3d6000fd5b5047925050811590506106c4577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156106aa57600080fd5b505af11580156106be573d6000803e3d6000fd5b50505050505b60408051838152602081018390527f61905920c2578bded6a788bdf36dcc0203741c2b4e4fd177598d5432a4975c0f910160405180910390a15050565b60007f0000000000000000000000004709ab91123f7dbb4b6c4a02c94e855678404fc76001600160a01b0316633acaa0d76040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610763573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107879190610d1c565b905090565b604051631ce83f7960e11b815230600482015260009081906001600160a01b037f0000000000000000000000005efc9d10e42fb517456f4ac41eb5e2ebe42c891816906339d07ef290602401602060405180830381865afa1580156107f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108199190610d1c565b90506000805b8281101561095a57604051636d6ca31960e01b8152306004820152602481018290526000907f0000000000000000000000005efc9d10e42fb517456f4ac41eb5e2ebe42c89186001600160a01b031690636d6ca3199060440160a060405180830381865afa158015610895573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b99190610d45565b80519091506001600160a01b031673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146108fa57604051636448d6e960e11b815260040160405180910390fd5b6000670de0b6b3a76400008783606001516109159190610de2565b61091f9190610df9565b9050816040015181101561093e576109378185610e1b565b9350610950565b604082015161094d9085610e1b565b93505b505060010161081f565b509392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526109b38482610a1c565b610a1657604080516001600160a01b038516602482015260006044808301919091528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610a0c908590610ac5565b610a168482610ac5565b50505050565b6000806000846001600160a01b031684604051610a399190610e52565b6000604051808303816000865af19150503d8060008114610a76576040519150601f19603f3d011682016040523d82523d6000602084013e610a7b565b606091505b5091509150818015610aa5575080511580610aa5575080806020019051810190610aa59190610e6e565b8015610aba57506001600160a01b0385163b15155b925050505b92915050565b6000610b1a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610ba49092919063ffffffff16565b9050805160001480610b3b575080806020019051810190610b3b9190610e6e565b610b9f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b505050565b6060610486848460008585600080866001600160a01b03168587604051610bcb9190610e52565b60006040518083038185875af1925050503d8060008114610c08576040519150601f19603f3d011682016040523d82523d6000602084013e610c0d565b606091505b5091509150610c1e87838387610c29565b979650505050505050565b60608315610c98578251600003610c91576001600160a01b0385163b610c915760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b96565b5081610486565b6104868383815115610cad5781518083602001fd5b8060405162461bcd60e51b8152600401610b969190610e90565b600060208284031215610cd957600080fd5b5035919050565b6001600160a01b0381168114610cf557600080fd5b50565b600060208284031215610d0a57600080fd5b8135610d1581610ce0565b9392505050565b600060208284031215610d2e57600080fd5b5051919050565b8051610d4081610ce0565b919050565b600060a0828403128015610d5857600080fd5b6000905060405160a0810181811067ffffffffffffffff82111715610d8b57634e487b7160e01b83526041600452602483fd5b604052610d9784610d35565b815260208481015190820152604080850151908201526060808501519082015260809384015193810193909352509092915050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610abf57610abf610dcc565b600082610e1657634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610abf57610abf610dcc565b60005b83811015610e49578181015183820152602001610e31565b50506000910152565b60008251610e64818460208701610e2e565b9190910192915050565b600060208284031215610e8057600080fd5b81518015158114610d1557600080fd5b6020815260008251806020840152610eaf816040850160208701610e2e565b601f01601f1916919091016040019291505056fea26469706673582212208a64a34165367dadae400e6e8b75ade06dc2ee4b87f084aab0eaad32ea0f6ebe64736f6c634300081b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000bf5495efe5db9ce00f80364c8b423567e58d2110000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000005efc9d10e42fb517456f4ac41eb5e2ebe42c891800000000000000000000000074a09653a083691711cf8215a6ab074bb4e99ef50000000000000000000000004709ab91123f7dbb4b6c4a02c94e855678404fc7
-----Decoded View---------------
Arg [0] : _ezEthToken (address): 0xbf5495Efe5DB9ce00f80364C8B423567e58d2110
Arg [1] : _wethToken (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [2] : _withdrawQueue (address): 0x5efc9D10E42FB517456f4ac41EB5e2eBe42C8918
Arg [3] : _restakeManager (address): 0x74a09653A083691711cF8215a6ab074BB4e99ef5
Arg [4] : _cachedRateProvider (address): 0x4709ab91123f7Dbb4B6C4a02C94E855678404Fc7
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000bf5495efe5db9ce00f80364c8b423567e58d2110
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [2] : 0000000000000000000000005efc9d10e42fb517456f4ac41eb5e2ebe42c8918
Arg [3] : 00000000000000000000000074a09653a083691711cf8215a6ab074bb4e99ef5
Arg [4] : 0000000000000000000000004709ab91123f7dbb4b6c4a02c94e855678404fc7
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 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.