-
Notifications
You must be signed in to change notification settings - Fork 24
LidoSplit can receive ETH, which will be locked in contract #76
Description
Each new LidoSplit is deployed as a clone, which comes with a receive() function for receiving ETH.
However, the only function on LidoSplit is distribute(), which converts stETH to wstETH and transfers it to the splitWallet.
While this contract should only be used for Lido to pay out rewards (which will come in stETH), it seems possible that users may accidentally use the same contract to receive other validator rewards (in ETH), or that Lido governance may introduce ETH payments in the future, which would cause the funds to be locked.
Proof of Concept
The following test can be dropped into LidoSplit.t.sol to confirm that the clones can currently receive ETH:
function testZach_CanReceiveEth() public {
uint before = address(lidoSplit).balance;
payable(address(lidoSplit)).transfer(1 ether);
assertEq(address(lidoSplit).balance, before + 1 ether);
}Recommendation
Introduce an additional function to LidoSplit.sol which wraps ETH into stETH before calling distribute(), in order to rescue any ETH accidentally sent to the contract.