ETH Price: $3,394.24 (-1.22%)
Gas: 2 Gwei

Contract

0x8775c8977b03998b4B140ce71BcaBcF5cD9BBAA6
 

Overview

ETH Balance

0.1112032 ETH

Eth Value

$377.45 (@ $3,394.24/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value

There are no matching entries

Please try again later

Latest 9 internal transactions

Advanced mode:
Parent Transaction Hash Block From To Value
198199132024-05-07 18:15:2352 days ago1715105723
0x8775c897...5cD9BBAA6
0.12759621 ETH
193541962024-03-03 10:57:59118 days ago1709463479
0x8775c897...5cD9BBAA6
0.0536943 ETH
191995942024-02-10 18:50:47139 days ago1707591047
0x8775c897...5cD9BBAA6
0.06996975 ETH
189503592024-01-06 19:58:11174 days ago1704571091
0x8775c897...5cD9BBAA6
0.01734503 ETH
189503452024-01-06 19:55:23174 days ago1704570923
0x8775c897...5cD9BBAA6
0.01734503 ETH
189131562024-01-01 14:25:23179 days ago1704119123
0x8775c897...5cD9BBAA6
0.06931436 ETH
186857242023-11-30 16:51:35211 days ago1701363095
0x8775c897...5cD9BBAA6
0.0514547 ETH
185437872023-11-10 19:59:47231 days ago1699646387
0x8775c897...5cD9BBAA6
0.11162264 ETH
185437872023-11-10 19:59:47231 days ago1699646387  Contract Creation0 ETH
Loading...
Loading

Minimal Proxy Contract for 0x933fbfeb4ed1f111d12a39c2ab48657e6fc875c6

Contract Name:
FeeRecipient

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, BSL 1.1 license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 6 : FeeRecipient.sol
//SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.8.10;

import "./interfaces/IFeeDispatcher.sol";

contract FeeRecipient {
    /// @notice Constructor replay prevention
    bool internal initialized;
    /// @notice Address where funds are sent to be dispatched
    IFeeDispatcher internal dispatcher;
    /// @notice Public Key root assigned to this receiver
    bytes32 internal publicKeyRoot;

    error AlreadyInitialized();

    /// @notice Initializes the receiver
    /// @param _dispatcher Address that will handle the fee dispatching
    /// @param _publicKeyRoot Public Key root assigned to this receiver
    function init(address _dispatcher, bytes32 _publicKeyRoot) external {
        if (initialized) {
            revert AlreadyInitialized();
        }
        initialized = true;
        dispatcher = IFeeDispatcher(_dispatcher);
        publicKeyRoot = _publicKeyRoot;
    }

    /// @notice Empty calldata fallback
    receive() external payable {}

    /// @notice Non-empty calldata fallback
    fallback() external payable {}

    /// @notice Triggers a withdrawal by sending its funds + its public key root to the dispatcher
    /// @dev Can be called by any wallet as recipients are not parameters
    function withdraw() external {
        dispatcher.dispatch{value: address(this).balance}(publicKeyRoot);
    }

    /// @notice Retrieve the assigned public key root
    function getPublicKeyRoot() external view returns (bytes32) {
        return publicKeyRoot;
    }

    /// @notice retrieve the assigned withdrawer
    function getWithdrawer() external view returns (address) {
        return dispatcher.getWithdrawer(publicKeyRoot);
    }
}

File 2 of 6 : ConsensusLayerFeeDispatcher.sol
//SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.8.10;

import "./libs/DispatchersStorageLib.sol";
import "./interfaces/IStakingContractFeeDetails.sol";
import "./interfaces/IFeeDispatcher.sol";

/// @title Consensus Layer Fee Recipient
/// @author Kiln
/// @notice This contract can be used to receive fees from a validator and split them with a node operator
contract ConsensusLayerFeeDispatcher is IFeeDispatcher {
    using DispatchersStorageLib for bytes32;

    event Withdrawal(
        address indexed withdrawer,
        address indexed feeRecipient,
        bytes32 pubKeyRoot,
        uint256 rewards,
        uint256 nodeOperatorFee,
        uint256 treasuryFee
    );

    error TreasuryReceiveError(bytes errorData);
    error FeeRecipientReceiveError(bytes errorData);
    error WithdrawerReceiveError(bytes errorData);
    error ZeroBalanceWithdrawal();
    error AlreadyInitialized();
    error InvalidCall();
    error NotImplemented();

    bytes32 internal constant STAKING_CONTRACT_ADDRESS_SLOT =
        keccak256("ConsensusLayerFeeRecipient.stakingContractAddress");
    uint256 internal constant BASIS_POINTS = 10_000;
    bytes32 internal constant VERSION_SLOT = keccak256("ConsensusLayerFeeRecipient.version");

    /// @notice Ensures an initialisation call has been called only once per _version value
    /// @param _version The current initialisation value
    modifier init(uint256 _version) {
        if (_version != VERSION_SLOT.getUint256() + 1) {
            revert AlreadyInitialized();
        }

        VERSION_SLOT.setUint256(_version);

        _;
    }

    /// @notice Constructor method allowing us to prevent calls to initCLFR by setting the appropriate version
    constructor(uint256 _version) {
        VERSION_SLOT.setUint256(_version);
    }

    /// @notice Initialize the contract by storing the staking contract
    /// @param _stakingContract Address of the Staking Contract
    function initCLD(address _stakingContract) external init(1) {
        STAKING_CONTRACT_ADDRESS_SLOT.setAddress(_stakingContract);
    }

    /// @notice Performs a withdrawal on this contract's balance
    function dispatch(bytes32) external payable {
        revert NotImplemented();
        /*
        uint256 balance = address(this).balance; // this has taken into account msg.value
        if (balance == 0) {
            revert ZeroBalanceWithdrawal();
        }
        IStakingContractFeeDetails stakingContract = IStakingContractFeeDetails(
            STAKING_CONTRACT_ADDRESS_SLOT.getAddress()
        );
        address withdrawer = stakingContract.getWithdrawerFromPublicKeyRoot(_publicKeyRoot);
        address operator = stakingContract.getOperatorFeeRecipient(_publicKeyRoot);
        address treasury = stakingContract.getTreasury();
        uint256 globalFee;

        if (balance >= 32 ether) {
            // withdrawing a healthy & exited validator
            globalFee = ((balance - 32 ether) * stakingContract.getGlobalFee()) / BASIS_POINTS;
        } else if (balance <= 16 ether) {
            // withdrawing from what looks like skimming
            globalFee = (balance * stakingContract.getGlobalFee()) / BASIS_POINTS;
        }

        uint256 operatorFee = (globalFee * stakingContract.getOperatorFee()) / BASIS_POINTS;

        (bool status, bytes memory data) = withdrawer.call{value: balance - globalFee}("");
        if (status == false) {
            revert WithdrawerReceiveError(data);
        }
        if (globalFee > 0) {
            (status, data) = treasury.call{value: globalFee - operatorFee}("");
            if (status == false) {
                revert FeeRecipientReceiveError(data);
            }
        }
        if (operatorFee > 0) {
            (status, data) = operator.call{value: operatorFee}("");
            if (status == false) {
                revert TreasuryReceiveError(data);
            }
        }
        emit Withdrawal(withdrawer, operator, balance - globalFee, operatorFee, globalFee - operatorFee);
        */
    }

    /// @notice Retrieve the staking contract address
    function getStakingContract() external view returns (address) {
        return STAKING_CONTRACT_ADDRESS_SLOT.getAddress();
    }

    /// @notice Retrieve the assigned withdrawer for the given public key root
    /// @param _publicKeyRoot Public key root to get the owner
    function getWithdrawer(bytes32 _publicKeyRoot) external view returns (address) {
        IStakingContractFeeDetails stakingContract = IStakingContractFeeDetails(
            STAKING_CONTRACT_ADDRESS_SLOT.getAddress()
        );
        return stakingContract.getWithdrawerFromPublicKeyRoot(_publicKeyRoot);
    }

    receive() external payable {
        revert InvalidCall();
    }

    fallback() external payable {
        revert InvalidCall();
    }
}

File 3 of 6 : DispatchersStorageLib.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.10;

library DispatchersStorageLib {
    function getUint256(bytes32 position) internal view returns (uint256 data) {
        assembly {
            data := sload(position)
        }
    }

    function setUint256(bytes32 position, uint256 data) internal {
        assembly {
            sstore(position, data)
        }
    }

    function getAddress(bytes32 position) internal view returns (address data) {
        assembly {
            data := sload(position)
        }
    }

    function setAddress(bytes32 position, address data) internal {
        assembly {
            sstore(position, data)
        }
    }
}

File 4 of 6 : IStakingContractFeeDetails.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.10;

interface IStakingContractFeeDetails {
    function getWithdrawerFromPublicKeyRoot(bytes32 _publicKeyRoot) external view returns (address);

    function getTreasury() external view returns (address);

    function getOperatorFeeRecipient(bytes32 pubKeyRoot) external view returns (address);

    function getGlobalFee() external view returns (uint256);

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

File 5 of 6 : IFeeDispatcher.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.10;

interface IFeeDispatcher {
    function dispatch(bytes32 _publicKeyRoot) external payable;

    function getWithdrawer(bytes32 _publicKeyRoot) external view returns (address);
}

File 6 of 6 : ExecutionLayerFeeDispatcher.sol
//SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.8.10;

import "./libs/DispatchersStorageLib.sol";
import "./interfaces/IStakingContractFeeDetails.sol";
import "./interfaces/IFeeDispatcher.sol";

/// @title Execution Layer Fee Recipient
/// @author Kiln
/// @notice This contract can be used to receive fees from a validator and split them with a node operator
contract ExecutionLayerFeeDispatcher is IFeeDispatcher {
    using DispatchersStorageLib for bytes32;

    event Withdrawal(
        address indexed withdrawer,
        address indexed feeRecipient,
        bytes32 pubKeyRoot,
        uint256 rewards,
        uint256 nodeOperatorFee,
        uint256 treasuryFee
    );

    error TreasuryReceiveError(bytes errorData);
    error FeeRecipientReceiveError(bytes errorData);
    error WithdrawerReceiveError(bytes errorData);
    error ZeroBalanceWithdrawal();
    error AlreadyInitialized();
    error InvalidCall();

    bytes32 internal constant STAKING_CONTRACT_ADDRESS_SLOT =
        keccak256("ExecutionLayerFeeRecipient.stakingContractAddress");
    uint256 internal constant BASIS_POINTS = 10_000;
    bytes32 internal constant VERSION_SLOT = keccak256("ExecutionLayerFeeRecipient.version");

    /// @notice Ensures an initialisation call has been called only once per _version value
    /// @param _version The current initialisation value
    modifier init(uint256 _version) {
        if (_version != VERSION_SLOT.getUint256() + 1) {
            revert AlreadyInitialized();
        }

        VERSION_SLOT.setUint256(_version);

        _;
    }

    /// @notice Constructor method allowing us to prevent calls to initCLFR by setting the appropriate version
    constructor(uint256 _version) {
        VERSION_SLOT.setUint256(_version);
    }

    /// @notice Initialize the contract by storing the staking contract and the public key in storage
    /// @param _stakingContract Address of the Staking Contract
    function initELD(address _stakingContract) external init(1) {
        STAKING_CONTRACT_ADDRESS_SLOT.setAddress(_stakingContract);
    }

    /// @notice Performs a withdrawal on this contract's balance
    function dispatch(bytes32 _publicKeyRoot) external payable {
        uint256 balance = address(this).balance;
        if (balance == 0) {
            revert ZeroBalanceWithdrawal();
        }
        IStakingContractFeeDetails stakingContract = IStakingContractFeeDetails(
            STAKING_CONTRACT_ADDRESS_SLOT.getAddress()
        );
        address withdrawer = stakingContract.getWithdrawerFromPublicKeyRoot(_publicKeyRoot);
        address operator = stakingContract.getOperatorFeeRecipient(_publicKeyRoot);
        address treasury = stakingContract.getTreasury();
        uint256 globalFee = (balance * stakingContract.getGlobalFee()) / BASIS_POINTS;
        uint256 operatorFee = (globalFee * stakingContract.getOperatorFee()) / BASIS_POINTS;

        (bool status, bytes memory data) = withdrawer.call{value: balance - globalFee}("");
        if (status == false) {
            revert WithdrawerReceiveError(data);
        }
        if (globalFee > 0) {
            (status, data) = treasury.call{value: globalFee - operatorFee}("");
            if (status == false) {
                revert FeeRecipientReceiveError(data);
            }
        }
        if (operatorFee > 0) {
            (status, data) = operator.call{value: operatorFee}("");
            if (status == false) {
                revert TreasuryReceiveError(data);
            }
        }
        emit Withdrawal(
            withdrawer,
            operator,
            _publicKeyRoot,
            balance - globalFee,
            operatorFee,
            globalFee - operatorFee
        );
    }

    /// @notice Retrieve the staking contract address
    function getStakingContract() external view returns (address) {
        return STAKING_CONTRACT_ADDRESS_SLOT.getAddress();
    }

    /// @notice Retrieve the assigned withdrawer for the given public key root
    /// @param _publicKeyRoot Public key root to get the owner
    function getWithdrawer(bytes32 _publicKeyRoot) external view returns (address) {
        IStakingContractFeeDetails stakingContract = IStakingContractFeeDetails(
            STAKING_CONTRACT_ADDRESS_SLOT.getAddress()
        );
        return stakingContract.getWithdrawerFromPublicKeyRoot(_publicKeyRoot);
    }

    receive() external payable {
        revert InvalidCall();
    }

    fallback() external payable {
        revert InvalidCall();
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  }
}

Contract ABI

[{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"getPublicKeyRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWithdrawer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_dispatcher","type":"address"},{"internalType":"bytes32","name":"_publicKeyRoot","type":"bytes32"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Latest 25 from a total of 35 withdrawals (0.612200218 ETH withdrawn)

Validator Index Block Amount
904007201490692024-06-22 18:35:596 days ago17190813590.018779148 ETH
904007200853712024-06-13 20:46:2315 days ago17183115830.018503291 ETH
904007200222692024-06-05 1:14:1124 days ago17175500510.018609104 ETH
904007199596072024-05-27 7:06:3533 days ago17167935950.018507365 ETH
904007198966922024-05-18 12:01:1142 days ago17160336710.018366077 ETH
904007198340002024-05-09 17:32:3550 days ago17152759550.018438215 ETH
904007197717722024-05-01 0:42:4759 days ago17145241670.018254429 ETH
904007197102092024-04-22 10:02:1168 days ago17137801310.018219776 ETH
904007196490262024-04-13 20:29:4776 days ago17130401870.018123272 ETH
904007195880772024-04-05 7:32:3585 days ago17123023550.01821367 ETH
904007195269312024-03-27 16:51:5993 days ago17115583190.018207765 ETH
904007194659622024-03-19 2:56:11102 days ago17108169710.018311975 ETH
904007194049592024-03-10 13:21:47110 days ago17100769070.018265324 ETH
904007193443252024-03-02 1:52:23119 days ago17093443430.018205551 ETH
904007192846772024-02-22 17:37:35127 days ago17086234550.017766571 ETH
904007192262082024-02-14 12:28:11135 days ago17079136910.017722183 ETH
904007191688222024-02-06 11:11:23144 days ago17072178830.017587306 ETH
904007191124682024-01-29 13:25:59151 days ago17065347590.017462271 ETH
904007190567882024-01-21 17:39:35159 days ago17058587750.017394846 ETH
904007190015002024-01-14 0:18:47167 days ago17051915270.017525331 ETH
904007189457382024-01-06 4:14:35175 days ago17045144750.017345033 ETH
904007188904952023-12-29 9:58:59183 days ago17038439390.017392644 ETH
904007188354352023-12-21 16:28:59190 days ago17031761390.017390128 ETH
904007187805852023-12-13 23:41:47198 days ago17025109070.017321004 ETH
904007187259102023-12-06 7:51:47206 days ago17018491070.017210588 ETH
View All Withdrawals

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