wstETHReferralStaker
What is wstETH Referral Staker
WstETHReferralStaker is an utility contract that allows users to stake ETH into the Lido protocol with referral address, then automatically wrap the received stETH into wstETH and transfer it back to the user in a single transaction.
Upgradability
This contract is non-upgradable, immutable and permissionless.
How to use this contract?
Do not send Ether or any tokens directly to this contract address. No funds can be rescued from this contract.
Call the stakeETH(address _referral)
method on the wstETHReferralStaker
contract with value
equal to the amount of ETH you want to stake with a _referral
address set to the preferred referral address(could be a zero address). For more information see stETH.submit(address _referral)
Methods
Stake ETH directly into wstETH with a referral
address.
To preview a total amount of wstETH tokens to be staked, the eth_call
RPC method can be used assuming the same msg.value
passed.
function stakeETH(address _referral) external payable returns (uint256)
Parameters
Parameter Name | Type | Description |
---|---|---|
msg.value | uint256 | ETH value attached to transaction |
_referral | address | Referral address |
Returns
Amount of wstETH caller receives after wrap.