ILido
Functions
getTotalShares
function getTotalShares() external returns (uint256)
getTotalPooledEther
function getTotalPooledEther() external returns (uint256)
sharesOf
function sharesOf(
address _account
) external returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
_account | address |
getSharesByPooledEth
function getSharesByPooledEth(
uint256 _ethAmount
) external returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
_ethAmount | uint256 |
getPooledEthByShares
function getPooledEthByShares(
uint256 _sharesAmount
) external returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
_sharesAmount | uint256 |
getFee
function getFee() external returns (uint256)
increaseAllowance
function increaseAllowance(
address _spender,
uint256 _addedValue
) external returns (bool)
Parameters
Name | Type | Description |
---|---|---|
_spender | address | |
_addedValue | uint256 |
decreaseAllowance
function decreaseAllowance(
address _spender,
uint256 _subtractedValue
) external returns (bool)
Parameters
Name | Type | Description |
---|---|---|
_spender | address | |
_subtractedValue | uint256 |
submit
function submit(
address referral
) external returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
referral | address |
IStableSwapSTETH
Functions
exchange
function exchange(
int128 i,
int128 j,
uint256 dx,
uint256 min_dy
) external returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
i | int128 | |
j | int128 | |
dx | uint256 | |
min_dy | uint256 |
get_dy
function get_dy(
int128 i,
int128 j,
uint256 dx
) external returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
i | int128 | |
j | int128 | |
dx | uint256 |
coins
function coins(
uint256 arg0
) external returns (address)
Parameters
Name | Type | Description |
---|---|---|
arg0 | uint256 |
EthLidoPCVDeposit
Functions
constructor
function constructor(
address _core,
address _steth,
address _stableswap,
uint256 _maximumSlippageBasisPoints
) public
Parameters
Name | Type | Description |
---|---|---|
_core | address | |
_steth | address | |
_stableswap | address | |
_maximumSlippageBasisPoints | uint256 |
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
Name | Type | Description |
---|---|---|
to | address | the destination of the withdrawn ETH |
amountIn | uint256 | the 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
Name | Type | Description |
---|---|---|
_maximumSlippageBasisPoints | uint256 | the 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
Name | Type | Description |
---|---|---|
maximumSlippageBasisPoints | uint256 |