StaderLibrary

Git Source

A helper library for Stader-related conversions.

Functions

getEthAmountInForLstAmountOut

Returns the amount of ETH needed to mint the given amount of ETHx.

function getEthAmountInForLstAmountOut(
    IStaderStakePoolsManager staderDeposit,
    uint256 lstAmount
)
    internal
    view
    returns (uint256);

Parameters

Name
Type
Description

staderDeposit

IStaderStakePoolsManager

address.

lstAmount

uint256

Desired output amount. [WAD]

getLstAmountOutForEthAmountIn

Returns the amount of ETHx that can be minted with the given amount of ETH.

function getLstAmountOutForEthAmountIn(
    IStaderStakePoolsManager staderDeposit,
    uint256 ethAmount
)
    internal
    view
    returns (uint256);

Parameters

Name
Type
Description

staderDeposit

IStaderStakePoolsManager

address.

ethAmount

uint256

Amount of ETH to deposit. [WAD]

depositForLst

Deposits ETH into the stader deposit contract and returns the amount of ETHx received.

function depositForLst(IStaderStakePoolsManager staderDeposit, uint256 ethAmount) internal returns (uint256);

Parameters

Name
Type
Description

staderDeposit

IStaderStakePoolsManager

address.

ethAmount

uint256

Amount of ETH to deposit. [WAD]

depositForLst

Deposits ETH into the stader deposit contract and returns the amount of ETHx received. This function parameterizes the address to receive the ETHx.

function depositForLst(
    IStaderStakePoolsManager staderDeposit,
    uint256 ethAmount,
    address receiver
)
    internal
    returns (uint256);

Parameters

Name
Type
Description

staderDeposit

IStaderStakePoolsManager

address.

ethAmount

uint256

Amount of ETH to deposit. [WAD]

receiver

address

to receive the ETHx.