Skip to main content

ILido

Functions

getTotalShares

function getTotalShares() external returns (uint256)

getTotalPooledEther

function getTotalPooledEther() external returns (uint256)

sharesOf

function sharesOf(
address _account
) external returns (uint256)

Parameters

NameTypeDescription
_accountaddress

getSharesByPooledEth

function getSharesByPooledEth(
uint256 _ethAmount
) external returns (uint256)

Parameters

NameTypeDescription
_ethAmountuint256

getPooledEthByShares

function getPooledEthByShares(
uint256 _sharesAmount
) external returns (uint256)

Parameters

NameTypeDescription
_sharesAmountuint256

getFee

function getFee() external returns (uint256)

increaseAllowance

function increaseAllowance(
address _spender,
uint256 _addedValue
) external returns (bool)

Parameters

NameTypeDescription
_spenderaddress
_addedValueuint256

decreaseAllowance

function decreaseAllowance(
address _spender,
uint256 _subtractedValue
) external returns (bool)

Parameters

NameTypeDescription
_spenderaddress
_subtractedValueuint256

submit

function submit(
address referral
) external returns (uint256)

Parameters

NameTypeDescription
referraladdress

IStableSwapSTETH

Functions

exchange

function exchange(
int128 i,
int128 j,
uint256 dx,
uint256 min_dy
) external returns (uint256)

Parameters

NameTypeDescription
iint128
jint128
dxuint256
min_dyuint256

get_dy

function get_dy(
int128 i,
int128 j,
uint256 dx
) external returns (uint256)

Parameters

NameTypeDescription
iint128
jint128
dxuint256

coins

function coins(
uint256 arg0
) external returns (address)

Parameters

NameTypeDescription
arg0uint256

EthLidoPCVDeposit

Functions

constructor

function constructor(
address _core,
address _steth,
address _stableswap,
uint256 _maximumSlippageBasisPoints
) public

Parameters

NameTypeDescription
_coreaddress
_stethaddress
_stableswapaddress
_maximumSlippageBasisPointsuint256

receive

function receive() external

deposit

function deposit() external

deposit ETH held by the contract to get stETH.

everyone can call deposit(), it is not protected by PCVController rights, because all ETH held by the contract is destined to be changed to stETH anyway.

withdraw

function withdraw(
address to,
uint256 amountIn
) external

withdraw stETH held by the contract to get ETH. This function with swap stETH held by the contract to ETH, and transfer it to the target address. Note: the withdraw could revert if the Curve pool is imbalanced with too many stETH and the amount of ETH out of the trade is less than the tolerated slippage.

Parameters

NameTypeDescription
toaddressthe destination of the withdrawn ETH
amountInuint256the number of stETH to withdraw.

balance

function balance() public returns (uint256 amount)

Returns the current balance of stETH held by the contract

setMaximumSlippage

function setMaximumSlippage(
uint256 _maximumSlippageBasisPoints
) external

Sets the maximum slippage vs 1:1 price accepted during withdraw.

Parameters

NameTypeDescription
_maximumSlippageBasisPointsuint256the maximum slippage expressed in basis points (1/10_000)

balanceReportedIn

function balanceReportedIn() public returns (address)

display the related token of the balance reported

Events

UpdateMaximumSlippage

event UpdateMaximumSlippage(
uint256 maximumSlippageBasisPoints
)

Parameters

NameTypeDescription
maximumSlippageBasisPointsuint256