KelpDaoLibrary

Git Source

A helper library for KelpDao-related conversions.

Functions

depositForLrt

Deposits a given amount of ETH into the rsETH Deposit Pool.

Care should be taken to handle slippage in the calling function since this function sets NO slippage controls.

function depositForLrt(IRsEth, uint256 ethAmount) internal returns (uint256 rsEthAmountToMint);

Parameters

NameTypeDescription

<none>

IRsEth

ethAmount

uint256

Amount of ETH to deposit. [WAD]

Returns

NameTypeDescription

rsEthAmountToMint

uint256

Amount of rsETH that was obtained. [WAD]

getEthAmountInForLstAmountOut

Returns the amount of ETH required to mint a given amount of rsETH.

function getEthAmountInForLstAmountOut(IRsEth, uint256 amountOut) internal view returns (uint256);

Parameters

NameTypeDescription

<none>

IRsEth

amountOut

uint256

Desired output amount of rsETH

getLstAmountOutForEthAmountIn

Calculates the amount of rsETH that will be minted for a given amount of ETH.

function getLstAmountOutForEthAmountIn(IRsEth, uint256 ethAmount) internal view returns (uint256);

Parameters

NameTypeDescription

<none>

IRsEth

ethAmount

uint256

Amount of ETH to use to mint rsETH

Returns

NameTypeDescription

<none>

uint256

Amount of outputted rsETH for a given amount of ETH