ETH Price: $3,116.53 (-5.33%)
Gas: 4 Gwei

Contract

0xc7bE520a13dC023A1b34C03F4Abdab8A43653F7B
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Transfer167606222023-03-05 7:08:47487 days ago1678000127IN
0xc7bE520a...A43653F7B
0.00012 ETH0.0004477721.32259872
Transfer167606162023-03-05 7:07:35487 days ago1678000055IN
0xc7bE520a...A43653F7B
0.0012 ETH0.0004862123.15312393
Transfer167606162023-03-05 7:07:35487 days ago1678000055IN
0xc7bE520a...A43653F7B
0.001 ETH0.0004862123.15312393
Transfer167606122023-03-05 7:06:47487 days ago1678000007IN
0xc7bE520a...A43653F7B
0.00001223 ETH0.000479822.84807692
Transfer167606102023-03-05 7:06:23487 days ago1677999983IN
0xc7bE520a...A43653F7B
0.000123 ETH0.0004492621.39349884
Transfer167606102023-03-05 7:06:23487 days ago1677999983IN
0xc7bE520a...A43653F7B
0.00011 ETH0.0004492621.39349884
Deposit To Lido167099702023-02-26 4:15:59494 days ago1677384959IN
0xc7bE520a...A43653F7B
0.01048 ETH0.002374817.78669669
Deposit To Lido167099562023-02-26 4:13:11494 days ago1677384791IN
0xc7bE520a...A43653F7B
0.01107 ETH0.002099415.72397674
Deposit To Lido167099562023-02-26 4:13:11494 days ago1677384791IN
0xc7bE520a...A43653F7B
0.01068 ETH0.002099415.72397674
Deposit To Lido167099562023-02-26 4:13:11494 days ago1677384791IN
0xc7bE520a...A43653F7B
0.01019 ETH0.002099415.72397674
Deposit To Lido167099562023-02-26 4:13:11494 days ago1677384791IN
0xc7bE520a...A43653F7B
0.0103 ETH0.002099415.72397674
Deposit To Lido167099562023-02-26 4:13:11494 days ago1677384791IN
0xc7bE520a...A43653F7B
0.01011 ETH0.002099415.72397674
Deposit To Lido167099562023-02-26 4:13:11494 days ago1677384791IN
0xc7bE520a...A43653F7B
0.01083 ETH0.002099415.72397674
Deposit To Lido167099562023-02-26 4:13:11494 days ago1677384791IN
0xc7bE520a...A43653F7B
0.01069 ETH0.002099415.72397674
Deposit To Lido167099562023-02-26 4:13:11494 days ago1677384791IN
0xc7bE520a...A43653F7B
0.0103 ETH0.002099415.72397674
Deposit To Lido167098312023-02-26 3:47:59494 days ago1677383279IN
0xc7bE520a...A43653F7B
0.01016 ETH0.0020343415.23667976
Deposit To Lido167098312023-02-26 3:47:59494 days ago1677383279IN
0xc7bE520a...A43653F7B
0.0104 ETH0.0020343415.23667976
Deposit To Lido167098312023-02-26 3:47:59494 days ago1677383279IN
0xc7bE520a...A43653F7B
0.0106 ETH0.0020343415.23667976
Deposit To Lido167098312023-02-26 3:47:59494 days ago1677383279IN
0xc7bE520a...A43653F7B
0.0109 ETH0.0020343415.23667976
Deposit To Lido167097902023-02-26 3:39:47494 days ago1677382787IN
0xc7bE520a...A43653F7B
0.01084 ETH0.0021630216.20049903
Deposit To Lido167094752023-02-26 2:34:59494 days ago1677378899IN
0xc7bE520a...A43653F7B
0.0107 ETH0.0023076817.28392898
Deposit To Lido166696662023-02-20 12:10:35500 days ago1676895035IN
0xc7bE520a...A43653F7B
0.0102 ETH0.0034707725.97960636
Deposit To Lido166693762023-02-20 11:11:59500 days ago1676891519IN
0xc7bE520a...A43653F7B
0.0104 ETH0.0030615522.91650958
Deposit To Lido166693432023-02-20 11:05:11500 days ago1676891111IN
0xc7bE520a...A43653F7B
0.01101 ETH0.0029077521.76526006
Deposit To Lido166693032023-02-20 10:57:11500 days ago1676890631IN
0xc7bE520a...A43653F7B
0.01026 ETH0.0035894626.868051
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
167099702023-02-26 4:15:59494 days ago1677384959
0xc7bE520a...A43653F7B
0.01048 ETH
167099562023-02-26 4:13:11494 days ago1677384791
0xc7bE520a...A43653F7B
0.01107 ETH
167099562023-02-26 4:13:11494 days ago1677384791
0xc7bE520a...A43653F7B
0.01068 ETH
167099562023-02-26 4:13:11494 days ago1677384791
0xc7bE520a...A43653F7B
0.01019 ETH
167099562023-02-26 4:13:11494 days ago1677384791
0xc7bE520a...A43653F7B
0.0103 ETH
167099562023-02-26 4:13:11494 days ago1677384791
0xc7bE520a...A43653F7B
0.01011 ETH
167099562023-02-26 4:13:11494 days ago1677384791
0xc7bE520a...A43653F7B
0.01083 ETH
167099562023-02-26 4:13:11494 days ago1677384791
0xc7bE520a...A43653F7B
0.01069 ETH
167099562023-02-26 4:13:11494 days ago1677384791
0xc7bE520a...A43653F7B
0.0103 ETH
167098312023-02-26 3:47:59494 days ago1677383279
0xc7bE520a...A43653F7B
0.01016 ETH
167098312023-02-26 3:47:59494 days ago1677383279
0xc7bE520a...A43653F7B
0.0104 ETH
167098312023-02-26 3:47:59494 days ago1677383279
0xc7bE520a...A43653F7B
0.0106 ETH
167098312023-02-26 3:47:59494 days ago1677383279
0xc7bE520a...A43653F7B
0.0109 ETH
167097902023-02-26 3:39:47494 days ago1677382787
0xc7bE520a...A43653F7B
0.01084 ETH
167094752023-02-26 2:34:59494 days ago1677378899
0xc7bE520a...A43653F7B
0.0107 ETH
166696662023-02-20 12:10:35500 days ago1676895035
0xc7bE520a...A43653F7B
0.0102 ETH
166693762023-02-20 11:11:59500 days ago1676891519
0xc7bE520a...A43653F7B
0.0104 ETH
166693432023-02-20 11:05:11500 days ago1676891111
0xc7bE520a...A43653F7B
0.01101 ETH
166693032023-02-20 10:57:11500 days ago1676890631
0xc7bE520a...A43653F7B
0.01026 ETH
166692592023-02-20 10:48:11500 days ago1676890091
0xc7bE520a...A43653F7B
0.01034 ETH
166417742023-02-16 14:05:47504 days ago1676556347
0xc7bE520a...A43653F7B
0.015 ETH
166410212023-02-16 11:34:11504 days ago1676547251
0xc7bE520a...A43653F7B
0.00600567 ETH
166409362023-02-16 11:17:11504 days ago1676546231
0xc7bE520a...A43653F7B
0.01 ETH
166409142023-02-16 11:12:35504 days ago1676545955
0xc7bE520a...A43653F7B
0.11 ETH
166406672023-02-16 10:22:35504 days ago1676542955
0xc7bE520a...A43653F7B
0.000118 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingAggregator

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion
File 1 of 16 : StakingAggregator.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.17;
import "../interfaces/RocketStorage.sol";
import "../interfaces/RocketDepositPool.sol";
import "../interfaces/RocketTokenRETH.sol";
import "../interfaces/RocketDAOProtocolSettingsDepositInterface.sol";
import "../interfaces/RocketVault.sol";
import "../interfaces/ILido.sol";
import "@openzeppelin/contracts/access/Ownable2Step.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";

/// @title A staking aggregation contract for RocketPool and Lido
/// @author Jack Clancy - Consensys
contract StakingAggregator is Ownable2Step, ReentrancyGuard, Pausable {
    RocketStorageInterface immutable rocketStorage;
    LidoInterface public immutable lidoProxyAddress;
    address public immutable lidoReferralAddress;
    uint256 public fee; // fee in 1/10th of bps
    uint256 public constant MAX_FEE = 2000; // maxFee in 1/10th of bps - 2% or 200bps
    uint256 public constant FEE_BASE = 100000;

    constructor(
        address _owner,
        address _lidoReferralAddress,
        RocketStorageInterface _rocketStorageAddress,
        LidoInterface _lidoProxyAddress,
        uint256 _fee
    ) {
        _transferOwnership(_owner);
        lidoReferralAddress = _lidoReferralAddress;
        rocketStorage = _rocketStorageAddress;
        lidoProxyAddress = _lidoProxyAddress;
        fee = _fee;
    }

    error InsufficientAmount();
    error TransferFailed(address recipient, uint256 amount);
    error NoTokensMinted(address recipient);
    error FeeTooHigh(uint256 fee);
    error ContractNotFound();

    event FeeUpdated(uint256 _newFee);
    event FeesWithdrawn(address recipient, uint256 _amountWithdrawn);

    /// @notice Deposits ETH to Lido and forwards minted stETH to caller
    function depositToLido() external payable nonReentrant whenNotPaused {
        // Check deposit amount
        if (msg.value == 0) revert InsufficientAmount();
        // Subtract fee
        uint256 depositAmount = msg.value - ((msg.value * fee) / FEE_BASE);
        // Forward deposit to Lido & get amount of stETH
        uint256 sharesMinted = lidoProxyAddress.submit{value: depositAmount}(
            lidoReferralAddress
        );
        if (sharesMinted <= 0) revert NoTokensMinted(msg.sender);
        // Forward minted stETH back to user
        if (lidoProxyAddress.transferShares(msg.sender, sharesMinted) == 0)
            revert TransferFailed(msg.sender, sharesMinted);
    }

    /// @notice Deposits ETH to RocketPool and forwards minted rETH to caller
    function depositToRP() external payable nonReentrant whenNotPaused {
        // Check deposit amount
        if (msg.value == 0) revert InsufficientAmount();
        // Load contracts
        address rocketDepositPoolAddress = getContractAddress(
            "rocketDepositPool"
        );
        RocketDepositPoolInterface rocketDepositPool = RocketDepositPoolInterface(
                rocketDepositPoolAddress
            );
        address rocketTokenRETHAddress = getContractAddress("rocketTokenRETH");
        RocketTokenRETHInterface rocketTokenRETH = RocketTokenRETHInterface(
            rocketTokenRETHAddress
        );
        // Subtract fee
        uint256 depositAmount = msg.value - ((msg.value * fee) / FEE_BASE);
        // Forward deposit to RP & get amount of rETH minted
        uint256 rethBalance1 = rocketTokenRETH.balanceOf(address(this));
        rocketDepositPool.deposit{value: depositAmount}();
        uint256 rethBalance2 = rocketTokenRETH.balanceOf(address(this));
        if (rethBalance2 <= rethBalance1) revert NoTokensMinted(msg.sender);
        uint256 rethMinted = rethBalance2 - rethBalance1;
        // Forward minted rETH back to user
        if (!rocketTokenRETH.transfer(msg.sender, rethMinted))
            revert TransferFailed(msg.sender, rethMinted);
    }

    /// @notice Updates the fee for staking transactions
    /// @dev Fee is in 0.1bp increments. i.e. fee = 10 is setting to 1bp
    /// @param _newFee The new fee for future transactions
    function updateFee(uint256 _newFee) external onlyOwner {
        if (_newFee > MAX_FEE) revert FeeTooHigh(_newFee);
        fee = _newFee;
        emit FeeUpdated(_newFee);
    }

    /// @notice Returns several RocketPool constants that the FE needs
    /// @dev Deposit fee in wei. Number needs to be divided by 1e18 to get in percentage
    function fetchRPConstants() external view returns (uint256[4] memory) {
        address rocketTokenRETHAddress = getContractAddress("rocketTokenRETH");
        address rocketDAOSettingsAddress = getContractAddress(
            "rocketDAOProtocolSettingsDeposit"
        );
        address rocketVaultAddress = getContractAddress("rocketVault");
        RocketDAOProtocolSettingsDepositInterface rocketDAOProtocolSettingsDeposit = RocketDAOProtocolSettingsDepositInterface(
                rocketDAOSettingsAddress
            );
        RocketVaultInterface rocketVault = RocketVaultInterface(
            rocketVaultAddress
        );
        RocketTokenRETHInterface rocketTokenRETH = RocketTokenRETHInterface(
            rocketTokenRETHAddress
        );
        uint256 currentDeposits = rocketVault.balanceOf("rocketDepositPool");
        uint256 depositFee = rocketDAOProtocolSettingsDeposit.getDepositFee();
        uint256 depositPoolCap = rocketDAOProtocolSettingsDeposit
            .getMaximumDepositPoolSize();
        uint256 exchangeRate = rocketTokenRETH.getExchangeRate();
        return [currentDeposits, depositFee, depositPoolCap, exchangeRate];
    }

    /// @notice Withdraws all accrued fees to specific address
    /// @param _recipient Address that will receive the fees
    function withdrawFees(address _recipient) external onlyOwner {
        uint256 amountToSend = address(this).balance;
        (bool sent, bytes memory data) = _recipient.call{value: amountToSend}(
            ""
        );
        if (sent != true) revert TransferFailed(_recipient, amountToSend);
        emit FeesWithdrawn(_recipient, amountToSend);
    }

    function pause() external onlyOwner {
        _pause();
    }

    function unpause() external onlyOwner {
        _unpause();
    }

    /// @dev Get the address of a RocketPool network contract by name
    function getContractAddress(string memory _contractName)
        internal
        view
        returns (address)
    {
        address contractAddress = rocketStorage.getAddress(
            keccak256(abi.encodePacked("contract.address", _contractName))
        );
        if (contractAddress == address(0x0)) revert ContractNotFound();
        return contractAddress;
    }
}

File 2 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 16 : Ownable2Step.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.0;

import "./Ownable.sol";

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

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

    /**
     * @dev Returns the address of the pending owner.
     */
    function pendingOwner() public view virtual returns (address) {
        return _pendingOwner;
    }

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() external {
        address sender = _msgSender();
        require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
        _transferOwnership(sender);
    }
}

File 4 of 16 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 5 of 16 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 6 of 16 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 7 of 16 : ERC20Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.0;

import "../ERC20.sol";
import "../../../utils/Context.sol";

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        _spendAllowance(account, _msgSender(), amount);
        _burn(account, amount);
    }
}

File 8 of 16 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
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);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 10 of 16 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

File 11 of 16 : ILido.sol
pragma solidity >0.4.24 <0.9.0;
// SPDX-License-Identifier: GPL-3.0

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

/**
 * @title Liquid staking pool
 *
 * For the high-level description of the pool operation please refer to the paper.
 * Pool manages withdrawal keys and fees. It receives ether submitted by users on the ETH 1 side
 * and stakes it via the deposit_contract.sol contract. It doesn't hold ether on it's balance,
 * only a small portion (buffer) of it.
 * It also mints new tokens for rewards generated at the ETH 2.0 side.
 *
 * At the moment withdrawals are not possible in the beacon chain and there's no workaround.
 * Pool will be upgraded to an actual implementation when withdrawals are enabled
 * (Phase 1.5 or 2 of Eth2 launch, likely late 2022 or 2023).
 */
interface LidoInterface is IERC20 {
    function totalSupply() external view returns (uint256);

    function getTotalShares() external view returns (uint256);

    /**
     * @notice Stop pool routine operations
     */
    function stop() external;

    /**
     * @notice Resume pool routine operations
     */
    function resume() external;

    /**
     * @notice Stops accepting new Ether to the protocol
     *
     * @dev While accepting new Ether is stopped, calls to the `submit` function,
     * as well as to the default payable function, will revert.
     *
     * Emits `StakingPaused` event.
     */
    function pauseStaking() external;

    /**
     * @notice Resumes accepting new Ether to the protocol (if `pauseStaking` was called previously)
     * NB: Staking could be rate-limited by imposing a limit on the stake amount
     * at each moment in time, see `setStakingLimit()` and `removeStakingLimit()`
     *
     * @dev Preserves staking limit if it was set previously
     *
     * Emits `StakingResumed` event
     */
    function resumeStaking() external;

    /**
     * @notice Sets the staking rate limit
     *
     * @dev Reverts if:
     * - `_maxStakeLimit` == 0
     * - `_maxStakeLimit` >= 2^96
     * - `_maxStakeLimit` < `_stakeLimitIncreasePerBlock`
     * - `_maxStakeLimit` / `_stakeLimitIncreasePerBlock` >= 2^32 (only if `_stakeLimitIncreasePerBlock` != 0)
     *
     * Emits `StakingLimitSet` event
     *
     * @param _maxStakeLimit max stake limit value
     * @param _stakeLimitIncreasePerBlock stake limit increase per single block
     */
    function setStakingLimit(
        uint256 _maxStakeLimit,
        uint256 _stakeLimitIncreasePerBlock
    ) external;

    /**
     * @notice Removes the staking rate limit
     *
     * Emits `StakingLimitRemoved` event
     */
    function removeStakingLimit() external;

    /**
     * @notice Check staking state: whether it's paused or not
     */
    function isStakingPaused() external view returns (bool);

    /**
     * @notice Returns how much Ether can be staked in the current block
     * @dev Special return values:
     * - 2^256 - 1 if staking is unlimited;
     * - 0 if staking is paused or if limit is exhausted.
     */
    function getCurrentStakeLimit() external view returns (uint256);

    /**
     * @notice Returns full info about current stake limit params and state
     * @dev Might be used for the advanced integration requests.
     * @return isStakingPaused staking pause state (equivalent to return of isStakingPaused())
     * @return isStakingLimitSet whether the stake limit is set
     * @return currentStakeLimit current stake limit (equivalent to return of getCurrentStakeLimit())
     * @return maxStakeLimit max stake limit
     * @return maxStakeLimitGrowthBlocks blocks needed to restore max stake limit from the fully exhausted state
     * @return prevStakeLimit previously reached stake limit
     * @return prevStakeBlockNumber previously seen block number
     */
    function getStakeLimitFullInfo()
        external
        view
        returns (
            bool isStakingPaused,
            bool isStakingLimitSet,
            uint256 currentStakeLimit,
            uint256 maxStakeLimit,
            uint256 maxStakeLimitGrowthBlocks,
            uint256 prevStakeLimit,
            uint256 prevStakeBlockNumber
        );

    event Stopped();
    event Resumed();

    event StakingPaused();
    event StakingResumed();
    event StakingLimitSet(
        uint256 maxStakeLimit,
        uint256 stakeLimitIncreasePerBlock
    );
    event StakingLimitRemoved();

    /**
     * @notice Set Lido protocol contracts (oracle, treasury, insurance fund).
     * @param _oracle oracle contract
     * @param _treasury treasury contract
     * @param _insuranceFund insurance fund contract
     */
    function setProtocolContracts(
        address _oracle,
        address _treasury,
        address _insuranceFund
    ) external;

    event ProtocolContactsSet(
        address oracle,
        address treasury,
        address insuranceFund
    );

    /**
     * @notice Set fee rate to `_feeBasisPoints` basis points.
     * The fees are accrued when:
     * - oracles report staking results (beacon chain balance increase)
     * - validators gain execution layer rewards (priority fees and MEV)
     * @param _feeBasisPoints Fee rate, in basis points
     */
    function setFee(uint16 _feeBasisPoints) external;

    /**
     * @notice Set fee distribution
     * @param _treasuryFeeBasisPoints basis points go to the treasury,
     * @param _insuranceFeeBasisPoints basis points go to the insurance fund,
     * @param _operatorsFeeBasisPoints basis points go to node operators.
     * @dev The sum has to be 10 000.
     */
    function setFeeDistribution(
        uint16 _treasuryFeeBasisPoints,
        uint16 _insuranceFeeBasisPoints,
        uint16 _operatorsFeeBasisPoints
    ) external;

    /**
     * @notice Returns staking rewards fee rate
     */
    function getFee() external view returns (uint16 feeBasisPoints);

    /**
     * @notice Returns fee distribution proportion
     */
    function getFeeDistribution()
        external
        view
        returns (
            uint16 treasuryFeeBasisPoints,
            uint16 insuranceFeeBasisPoints,
            uint16 operatorsFeeBasisPoints
        );

    event FeeSet(uint16 feeBasisPoints);

    event FeeDistributionSet(
        uint16 treasuryFeeBasisPoints,
        uint16 insuranceFeeBasisPoints,
        uint16 operatorsFeeBasisPoints
    );

    /**
     * @notice A payable function supposed to be called only by LidoExecutionLayerRewardsVault contract
     * @dev We need a dedicated function because funds received by the default payable function
     * are treated as a user deposit
     */
    function receiveELRewards() external payable;

    // The amount of ETH withdrawn from LidoExecutionLayerRewardsVault contract to Lido contract
    event ELRewardsReceived(uint256 amount);

    /**
     * @dev Sets limit on amount of ETH to withdraw from execution layer rewards vault per LidoOracle report
     * @param _limitPoints limit in basis points to amount of ETH to withdraw per LidoOracle report
     */
    function setELRewardsWithdrawalLimit(uint16 _limitPoints) external;

    // Percent in basis points of total pooled ether allowed to withdraw from LidoExecutionLayerRewardsVault per LidoOracle report
    event ELRewardsWithdrawalLimitSet(uint256 limitPoints);

    /**
     * @notice Set credentials to withdraw ETH on ETH 2.0 side after the phase 2 is launched to `_withdrawalCredentials`
     * @dev Note that setWithdrawalCredentials discards all unused signing keys as the signatures are invalidated.
     * @param _withdrawalCredentials withdrawal credentials field as defined in the Ethereum PoS consensus specs
     */
    function setWithdrawalCredentials(bytes32 _withdrawalCredentials) external;

    /**
     * @notice Returns current credentials to withdraw ETH on ETH 2.0 side after the phase 2 is launched
     */
    function getWithdrawalCredentials() external view returns (bytes memory);

    event WithdrawalCredentialsSet(bytes32 withdrawalCredentials);

    /**
     * @dev Sets the address of LidoExecutionLayerRewardsVault contract
     * @param _executionLayerRewardsVault Execution layer rewards vault contract address
     */
    function setELRewardsVault(address _executionLayerRewardsVault) external;

    // The `executionLayerRewardsVault` was set as the execution layer rewards vault for Lido
    event ELRewardsVaultSet(address executionLayerRewardsVault);

    /**
     * @notice Ether on the ETH 2.0 side reported by the oracle
     * @param _epoch Epoch id
     * @param _eth2balance Balance in wei on the ETH 2.0 side
     */
    function handleOracleReport(uint256 _epoch, uint256 _eth2balance) external;

    // User functions

    /**
     * @notice Adds eth to the pool
     * @return StETH Amount of StETH generated
     */
    function submit(address _referral) external payable returns (uint256 StETH);

    // Records a deposit made by a user
    event Submitted(address indexed sender, uint256 amount, address referral);

    // The `amount` of ether was sent to the deposit_contract.deposit function
    event Unbuffered(uint256 amount);

    // Requested withdrawal of `etherAmount` to `pubkeyHash` on the ETH 2.0 side, `tokenAmount` burned by `sender`,
    // `sentFromBuffer` was sent on the current Ethereum side.
    event Withdrawal(
        address indexed sender,
        uint256 tokenAmount,
        uint256 sentFromBuffer,
        bytes32 indexed pubkeyHash,
        uint256 etherAmount
    );

    // Info functions

    /**
     * @notice Gets the amount of Ether controlled by the system
     */
    function getTotalPooledEther() external view returns (uint256);

    /**
     * @notice Moves `_sharesAmount` token shares from the caller's account to the `_recipient` account.
     *
     * @return amount of transferred tokens.
     * Emits a `TransferShares` event.
     * Emits a `Transfer` event.
     *
     * Requirements:
     *
     * - `_recipient` cannot be the zero address.
     * - the caller must have at least `_sharesAmount` shares.
     * - the contract must not be paused.
     *
     * @dev The `_sharesAmount` argument is the amount of shares, not tokens.
     */
    function transferShares(address _recipient, uint256 _sharesAmount)
        external
        returns (uint256);

    /**
     * @return the amount of Ether that corresponds to `_sharesAmount` token shares.
     */
    function getPooledEthByShares(uint256 _sharesAmount)
        external
        view
        returns (uint256);

    /**
     * @notice Gets the amount of Ether temporary buffered on this contract balance
     */
    function getBufferedEther() external view returns (uint256);

    /**
     * @notice Returns the key values related to Beacon-side
     * @return depositedValidators - number of deposited validators
     * @return beaconValidators - number of Lido's validators visible in the Beacon state, reported by oracles
     * @return beaconBalance - total amount of Beacon-side Ether (sum of all the balances of Lido validators)
     */
    function getBeaconStat()
        external
        view
        returns (
            uint256 depositedValidators,
            uint256 beaconValidators,
            uint256 beaconBalance
        );
}

File 12 of 16 : RocketDAOProtocolSettingsDepositInterface.sol
pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only

interface RocketDAOProtocolSettingsDepositInterface {
    function getDepositEnabled() external view returns (bool);

    function getAssignDepositsEnabled() external view returns (bool);

    function getMinimumDeposit() external view returns (uint256);

    function getMaximumDepositPoolSize() external view returns (uint256);

    function getMaximumDepositAssignments() external view returns (uint256);

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

File 13 of 16 : RocketDepositPool.sol
pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only

interface RocketDepositPoolInterface {
    function getBalance() external view returns (uint256);

    function getExcessBalance() external view returns (uint256);

    function deposit() external payable;

    function recycleDissolvedDeposit() external payable;

    function recycleExcessCollateral() external payable;

    function recycleLiquidatedStake() external payable;

    function assignDeposits() external;

    function withdrawExcessBalance(uint256 _amount) external;
}

File 14 of 16 : RocketStorage.sol
pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only

interface RocketStorageInterface {
    // Deploy status
    function getDeployedStatus() external view returns (bool);

    // Guardian
    function getGuardian() external view returns (address);

    function setGuardian(address _newAddress) external;

    function confirmGuardian() external;

    // Getters
    function getAddress(bytes32 _key) external view returns (address);

    function getUint(bytes32 _key) external view returns (uint256);

    function getString(bytes32 _key) external view returns (string memory);

    function getBytes(bytes32 _key) external view returns (bytes memory);

    function getBool(bytes32 _key) external view returns (bool);

    function getInt(bytes32 _key) external view returns (int256);

    function getBytes32(bytes32 _key) external view returns (bytes32);

    // Setters
    function setAddress(bytes32 _key, address _value) external;

    function setUint(bytes32 _key, uint256 _value) external;

    function setString(bytes32 _key, string calldata _value) external;

    function setBytes(bytes32 _key, bytes calldata _value) external;

    function setBool(bytes32 _key, bool _value) external;

    function setInt(bytes32 _key, int256 _value) external;

    function setBytes32(bytes32 _key, bytes32 _value) external;

    // Deleters
    function deleteAddress(bytes32 _key) external;

    function deleteUint(bytes32 _key) external;

    function deleteString(bytes32 _key) external;

    function deleteBytes(bytes32 _key) external;

    function deleteBool(bytes32 _key) external;

    function deleteInt(bytes32 _key) external;

    function deleteBytes32(bytes32 _key) external;

    // Arithmetic
    function addUint(bytes32 _key, uint256 _amount) external;

    function subUint(bytes32 _key, uint256 _amount) external;

    // Protected storage
    function getNodeWithdrawalAddress(address _nodeAddress)
        external
        view
        returns (address);

    function getNodePendingWithdrawalAddress(address _nodeAddress)
        external
        view
        returns (address);

    function setWithdrawalAddress(
        address _nodeAddress,
        address _newWithdrawalAddress,
        bool _confirm
    ) external;

    function confirmWithdrawalAddress(address _nodeAddress) external;
}

File 15 of 16 : RocketTokenRETH.sol
pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only

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

interface RocketTokenRETHInterface is IERC20 {
    function getEthValue(uint256 _rethAmount) external view returns (uint256);

    function getRethValue(uint256 _ethAmount) external view returns (uint256);

    function getExchangeRate() external view returns (uint256);

    function getTotalCollateral() external view returns (uint256);

    function getCollateralRate() external view returns (uint256);

    function depositExcess() external payable;

    function depositExcessCollateral() external;

    function mint(uint256 _ethAmount, address _to) external;

    function burn(uint256 _rethAmount) external;
}

File 16 of 16 : RocketVault.sol
pragma solidity >0.5.0 <0.9.0;

// SPDX-License-Identifier: GPL-3.0-only
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";

interface RocketVaultInterface {
    function balanceOf(string memory _networkContractName)
        external
        view
        returns (uint256);

    function depositEther() external payable;

    function withdrawEther(uint256 _amount) external;

    function depositToken(
        string memory _networkContractName,
        IERC20 _tokenAddress,
        uint256 _amount
    ) external;

    function withdrawToken(
        address _withdrawalAddress,
        IERC20 _tokenAddress,
        uint256 _amount
    ) external;

    function balanceOfToken(
        string memory _networkContractName,
        IERC20 _tokenAddress
    ) external view returns (uint256);

    function transferToken(
        string memory _networkContractName,
        IERC20 _tokenAddress,
        uint256 _amount
    ) external;

    function burnToken(ERC20Burnable _tokenAddress, uint256 _amount) external;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_lidoReferralAddress","type":"address"},{"internalType":"contract RocketStorageInterface","name":"_rocketStorageAddress","type":"address"},{"internalType":"contract LidoInterface","name":"_lidoProxyAddress","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ContractNotFound","type":"error"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"FeeTooHigh","type":"error"},{"inputs":[],"name":"InsufficientAmount","type":"error"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"NoTokensMinted","type":"error"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_newFee","type":"uint256"}],"name":"FeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amountWithdrawn","type":"uint256"}],"name":"FeesWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"FEE_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositToLido","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"depositToRP","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fetchRPConstants","outputs":[{"internalType":"uint256[4]","name":"","type":"uint256[4]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lidoProxyAddress","outputs":[{"internalType":"contract LidoInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lidoReferralAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newFee","type":"uint256"}],"name":"updateFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040523480156200001157600080fd5b506040516200186b3803806200186b83398101604081905262000034916200010d565b6200003f336200007d565b60016002556003805460ff1916905562000059856200007d565b6001600160a01b0393841660c05291831660805290911660a0526004555062000181565b600180546001600160a01b0319169055620000a481620000a7602090811b6200101a17901c565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620000a457600080fd5b600080600080600060a086880312156200012657600080fd5b85516200013381620000f7565b60208701519095506200014681620000f7565b60408701519094506200015981620000f7565b60608701519093506200016c81620000f7565b80925050608086015190509295509295909350565b60805160a05160c0516116a5620001c66000396000818161020401526109ce0152600081816102a8015281816109fc0152610ade0152600061111501526116a56000f3fe6080604052600436106101295760003560e01c80639012c4a8116100a5578063e10cb88911610074578063ecefc70511610059578063ecefc70514610337578063f2fde38b1461034e578063fa99e60b1461036e57600080fd5b8063e10cb88914610304578063e30c39781461030c57600080fd5b80639012c4a814610276578063b3d71c1d14610296578063bc063e1a146102ca578063ddca3f43146102ee57600080fd5b8063715018a6116100fc5780638456cb59116100e15780638456cb59146101dd578063897c10fc146101f25780638da5cb5b1461024b57600080fd5b8063715018a6146101b357806379ba5097146101c857600080fd5b8063164e68de1461012e57806317532c3a146101505780633f4ba83a1461017b5780635c975abb14610190575b600080fd5b34801561013a57600080fd5b5061014e6101493660046114bd565b610376565b005b34801561015c57600080fd5b5061016561049a565b60405161017291906114e1565b60405180910390f35b34801561018757600080fd5b5061014e6107b4565b34801561019c57600080fd5b5060035460ff166040519015158152602001610172565b3480156101bf57600080fd5b5061014e6107c6565b3480156101d457600080fd5b5061014e6107d8565b3480156101e957600080fd5b5061014e61088d565b3480156101fe57600080fd5b506102267f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610172565b34801561025757600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610226565b34801561028257600080fd5b5061014e610291366004611512565b61089d565b3480156102a257600080fd5b506102267f000000000000000000000000000000000000000000000000000000000000000081565b3480156102d657600080fd5b506102e06107d081565b604051908152602001610172565b3480156102fa57600080fd5b506102e060045481565b61014e61091f565b34801561031857600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff16610226565b34801561034357600080fd5b506102e0620186a081565b34801561035a57600080fd5b5061014e6103693660046114bd565b610bae565b61014e610c5e565b61037e61108f565b6040514790600090819073ffffffffffffffffffffffffffffffffffffffff85169084908381818185875af1925050503d80600081146103da576040519150601f19603f3d011682016040523d82523d6000602084013e6103df565b606091505b509092509050600182151514610445576040517f1c43b97600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602481018490526044015b60405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff86168152602081018590527fc0819c13be868895eb93e40eaceb96de976442fa1d404e5c55f14bb65a8c489a910160405180910390a150505050565b6104a261147d565b60006104e26040518060400160405280600f81526020017f726f636b6574546f6b656e524554480000000000000000000000000000000000815250611110565b905060006105246040518060400160405280602081526020017f726f636b657444414f50726f746f636f6c53657474696e67734465706f736974815250611110565b905060006105666040518060400160405280600b81526020017f726f636b65745661756c74000000000000000000000000000000000000000000815250611110565b6040517f35ee5f8700000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f726f636b65744465706f736974506f6f6c000000000000000000000000000000604482015290915082908290859060009073ffffffffffffffffffffffffffffffffffffffff8416906335ee5f8790606401602060405180830381865afa15801561060a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062e919061152b565b905060008473ffffffffffffffffffffffffffffffffffffffff16630de705b56040518163ffffffff1660e01b8152600401602060405180830381865afa15801561067d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a1919061152b565b905060008573ffffffffffffffffffffffffffffffffffffffff1663fd6ce89e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610714919061152b565b905060008473ffffffffffffffffffffffffffffffffffffffff1663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610763573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610787919061152b565b60408051608081018252958652602086019490945292840191909152506060820152979650505050505050565b6107bc61108f565b6107c461122a565b565b6107ce61108f565b6107c460006112a7565b600154339073ffffffffffffffffffffffffffffffffffffffff168114610881576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e65720000000000000000000000000000000000000000000000606482015260840161043c565b61088a816112a7565b50565b61089561108f565b6107c46112d8565b6108a561108f565b6107d08111156108e4576040517f7b9314200000000000000000000000000000000000000000000000000000000081526004810182905260240161043c565b60048190556040518181527f8c4d35e54a3f2ef1134138fd8ea3daee6a3c89e10d2665996babdf70261e2c769060200160405180910390a150565b610927611333565b61092f6113a4565b34600003610969576040517f5945ea5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000620186a06004543461097d9190611573565b610987919061158a565b61099190346115c5565b6040517fa1903eab00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063a1903eab90849060240160206040518083038185885af1158015610a46573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a6b919061152b565b905060008111610aa9576040517fbea5976400000000000000000000000000000000000000000000000000000000815233600482015260240161043c565b6040517f8fcb4e5b000000000000000000000000000000000000000000000000000000008152336004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690638fcb4e5b906044016020604051808303816000875af1158015610b3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b60919061152b565b600003610ba2576040517f1c43b9760000000000000000000000000000000000000000000000000000000081523360048201526024810182905260440161043c565b50506107c46001600255565b610bb661108f565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155610c1960005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b610c66611333565b610c6e6113a4565b34600003610ca8576040517f5945ea5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610ce86040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250611110565b905060008190506000610d2f6040518060400160405280600f81526020017f726f636b6574546f6b656e524554480000000000000000000000000000000000815250611110565b905060008190506000620186a060045434610d4a9190611573565b610d54919061158a565b610d5e90346115c5565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009073ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa158015610dce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df2919061152b565b90508473ffffffffffffffffffffffffffffffffffffffff1663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015610e3c57600080fd5b505af1158015610e50573d6000803e3d6000fd5b50506040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000935073ffffffffffffffffffffffffffffffffffffffff871692506370a082319150602401602060405180830381865afa158015610ec2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee6919061152b565b9050818111610f23576040517fbea5976400000000000000000000000000000000000000000000000000000000815233600482015260240161043c565b6000610f2f83836115c5565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810182905290915073ffffffffffffffffffffffffffffffffffffffff86169063a9059cbb906044016020604051808303816000875af1158015610fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc991906115d8565b611008576040517f1c43b9760000000000000000000000000000000000000000000000000000000081523360048201526024810182905260440161043c565b50505050505050506107c46001600255565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146107c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161043c565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166321f8a7218460405160200161116091906115fa565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161119491815260200190565b602060405180830381865afa1580156111b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d59190611652565b905073ffffffffffffffffffffffffffffffffffffffff8116611224576040517fed59262400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b92915050565b611232611411565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b600180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905561088a8161101a565b6112e06113a4565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861127d3390565b600280540361139e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161043c565b60028055565b60035460ff16156107c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161043c565b60035460ff166107c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161043c565b60405180608001604052806004906020820280368337509192915050565b73ffffffffffffffffffffffffffffffffffffffff8116811461088a57600080fd5b6000602082840312156114cf57600080fd5b81356114da8161149b565b9392505050565b60808101818360005b60048110156115095781518352602092830192909101906001016114ea565b50505092915050565b60006020828403121561152457600080fd5b5035919050565b60006020828403121561153d57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761122457611224611544565b6000826115c0577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8181038181111561122457611224611544565b6000602082840312156115ea57600080fd5b815180151581146114da57600080fd5b7f636f6e74726163742e616464726573730000000000000000000000000000000081526000825160005b818110156116415760208186018101516010868401015201611624565b506000920160100191825250919050565b60006020828403121561166457600080fd5b81516114da8161149b56fea2646970667358221220ed86842102c3f34b8e7af854feb52b9d4d2c91b790cb23b32472de619070885964736f6c6343000811003300000000000000000000000027c5706cc6deed9e0cb86f1238cc2fb5c7eb0bb4000000000000000000000000fe2da24c0d0ecdcc4753ef7d1ed637b75b7b6c470000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe840000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106101295760003560e01c80639012c4a8116100a5578063e10cb88911610074578063ecefc70511610059578063ecefc70514610337578063f2fde38b1461034e578063fa99e60b1461036e57600080fd5b8063e10cb88914610304578063e30c39781461030c57600080fd5b80639012c4a814610276578063b3d71c1d14610296578063bc063e1a146102ca578063ddca3f43146102ee57600080fd5b8063715018a6116100fc5780638456cb59116100e15780638456cb59146101dd578063897c10fc146101f25780638da5cb5b1461024b57600080fd5b8063715018a6146101b357806379ba5097146101c857600080fd5b8063164e68de1461012e57806317532c3a146101505780633f4ba83a1461017b5780635c975abb14610190575b600080fd5b34801561013a57600080fd5b5061014e6101493660046114bd565b610376565b005b34801561015c57600080fd5b5061016561049a565b60405161017291906114e1565b60405180910390f35b34801561018757600080fd5b5061014e6107b4565b34801561019c57600080fd5b5060035460ff166040519015158152602001610172565b3480156101bf57600080fd5b5061014e6107c6565b3480156101d457600080fd5b5061014e6107d8565b3480156101e957600080fd5b5061014e61088d565b3480156101fe57600080fd5b506102267f000000000000000000000000fe2da24c0d0ecdcc4753ef7d1ed637b75b7b6c4781565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610172565b34801561025757600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610226565b34801561028257600080fd5b5061014e610291366004611512565b61089d565b3480156102a257600080fd5b506102267f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe8481565b3480156102d657600080fd5b506102e06107d081565b604051908152602001610172565b3480156102fa57600080fd5b506102e060045481565b61014e61091f565b34801561031857600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff16610226565b34801561034357600080fd5b506102e0620186a081565b34801561035a57600080fd5b5061014e6103693660046114bd565b610bae565b61014e610c5e565b61037e61108f565b6040514790600090819073ffffffffffffffffffffffffffffffffffffffff85169084908381818185875af1925050503d80600081146103da576040519150601f19603f3d011682016040523d82523d6000602084013e6103df565b606091505b509092509050600182151514610445576040517f1c43b97600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602481018490526044015b60405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff86168152602081018590527fc0819c13be868895eb93e40eaceb96de976442fa1d404e5c55f14bb65a8c489a910160405180910390a150505050565b6104a261147d565b60006104e26040518060400160405280600f81526020017f726f636b6574546f6b656e524554480000000000000000000000000000000000815250611110565b905060006105246040518060400160405280602081526020017f726f636b657444414f50726f746f636f6c53657474696e67734465706f736974815250611110565b905060006105666040518060400160405280600b81526020017f726f636b65745661756c74000000000000000000000000000000000000000000815250611110565b6040517f35ee5f8700000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f726f636b65744465706f736974506f6f6c000000000000000000000000000000604482015290915082908290859060009073ffffffffffffffffffffffffffffffffffffffff8416906335ee5f8790606401602060405180830381865afa15801561060a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062e919061152b565b905060008473ffffffffffffffffffffffffffffffffffffffff16630de705b56040518163ffffffff1660e01b8152600401602060405180830381865afa15801561067d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a1919061152b565b905060008573ffffffffffffffffffffffffffffffffffffffff1663fd6ce89e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610714919061152b565b905060008473ffffffffffffffffffffffffffffffffffffffff1663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610763573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610787919061152b565b60408051608081018252958652602086019490945292840191909152506060820152979650505050505050565b6107bc61108f565b6107c461122a565b565b6107ce61108f565b6107c460006112a7565b600154339073ffffffffffffffffffffffffffffffffffffffff168114610881576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e65720000000000000000000000000000000000000000000000606482015260840161043c565b61088a816112a7565b50565b61089561108f565b6107c46112d8565b6108a561108f565b6107d08111156108e4576040517f7b9314200000000000000000000000000000000000000000000000000000000081526004810182905260240161043c565b60048190556040518181527f8c4d35e54a3f2ef1134138fd8ea3daee6a3c89e10d2665996babdf70261e2c769060200160405180910390a150565b610927611333565b61092f6113a4565b34600003610969576040517f5945ea5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000620186a06004543461097d9190611573565b610987919061158a565b61099190346115c5565b6040517fa1903eab00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000fe2da24c0d0ecdcc4753ef7d1ed637b75b7b6c47811660048301529192506000917f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe84169063a1903eab90849060240160206040518083038185885af1158015610a46573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a6b919061152b565b905060008111610aa9576040517fbea5976400000000000000000000000000000000000000000000000000000000815233600482015260240161043c565b6040517f8fcb4e5b000000000000000000000000000000000000000000000000000000008152336004820152602481018290527f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe8473ffffffffffffffffffffffffffffffffffffffff1690638fcb4e5b906044016020604051808303816000875af1158015610b3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b60919061152b565b600003610ba2576040517f1c43b9760000000000000000000000000000000000000000000000000000000081523360048201526024810182905260440161043c565b50506107c46001600255565b610bb661108f565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155610c1960005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b610c66611333565b610c6e6113a4565b34600003610ca8576040517f5945ea5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610ce86040518060400160405280601181526020017f726f636b65744465706f736974506f6f6c000000000000000000000000000000815250611110565b905060008190506000610d2f6040518060400160405280600f81526020017f726f636b6574546f6b656e524554480000000000000000000000000000000000815250611110565b905060008190506000620186a060045434610d4a9190611573565b610d54919061158a565b610d5e90346115c5565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009073ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa158015610dce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df2919061152b565b90508473ffffffffffffffffffffffffffffffffffffffff1663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015610e3c57600080fd5b505af1158015610e50573d6000803e3d6000fd5b50506040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000935073ffffffffffffffffffffffffffffffffffffffff871692506370a082319150602401602060405180830381865afa158015610ec2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee6919061152b565b9050818111610f23576040517fbea5976400000000000000000000000000000000000000000000000000000000815233600482015260240161043c565b6000610f2f83836115c5565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810182905290915073ffffffffffffffffffffffffffffffffffffffff86169063a9059cbb906044016020604051808303816000875af1158015610fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc991906115d8565b611008576040517f1c43b9760000000000000000000000000000000000000000000000000000000081523360048201526024810182905260440161043c565b50505050505050506107c46001600255565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146107c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161043c565b6000807f0000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa4673ffffffffffffffffffffffffffffffffffffffff166321f8a7218460405160200161116091906115fa565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161119491815260200190565b602060405180830381865afa1580156111b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d59190611652565b905073ffffffffffffffffffffffffffffffffffffffff8116611224576040517fed59262400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b92915050565b611232611411565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b600180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905561088a8161101a565b6112e06113a4565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861127d3390565b600280540361139e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161043c565b60028055565b60035460ff16156107c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161043c565b60035460ff166107c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161043c565b60405180608001604052806004906020820280368337509192915050565b73ffffffffffffffffffffffffffffffffffffffff8116811461088a57600080fd5b6000602082840312156114cf57600080fd5b81356114da8161149b565b9392505050565b60808101818360005b60048110156115095781518352602092830192909101906001016114ea565b50505092915050565b60006020828403121561152457600080fd5b5035919050565b60006020828403121561153d57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761122457611224611544565b6000826115c0577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b8181038181111561122457611224611544565b6000602082840312156115ea57600080fd5b815180151581146114da57600080fd5b7f636f6e74726163742e616464726573730000000000000000000000000000000081526000825160005b818110156116415760208186018101516010868401015201611624565b506000920160100191825250919050565b60006020828403121561166457600080fd5b81516114da8161149b56fea2646970667358221220ed86842102c3f34b8e7af854feb52b9d4d2c91b790cb23b32472de619070885964736f6c63430008110033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000027c5706cc6deed9e0cb86f1238cc2fb5c7eb0bb4000000000000000000000000fe2da24c0d0ecdcc4753ef7d1ed637b75b7b6c470000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe840000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _owner (address): 0x27c5706cC6DEED9E0Cb86f1238Cc2FB5C7eb0Bb4
Arg [1] : _lidoReferralAddress (address): 0xfe2da24c0D0ECdcC4753ef7D1eD637b75B7B6C47
Arg [2] : _rocketStorageAddress (address): 0x1d8f8f00cfa6758d7bE78336684788Fb0ee0Fa46
Arg [3] : _lidoProxyAddress (address): 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84
Arg [4] : _fee (uint256): 0

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000027c5706cc6deed9e0cb86f1238cc2fb5c7eb0bb4
Arg [1] : 000000000000000000000000fe2da24c0d0ecdcc4753ef7d1ed637b75b7b6c47
Arg [2] : 0000000000000000000000001d8f8f00cfa6758d7be78336684788fb0ee0fa46
Arg [3] : 000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe84
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.