RestakedSwellLibrary

Git Source

A helper library for restaked Swell-related conversions.

Functions

getEthAmountInForLstAmountOut

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

function getEthAmountInForLstAmountOut(IRswEth rswEth, uint256 lstAmount) internal view returns (uint256);

Parameters

NameTypeDescription

rswEth

IRswEth

address.

lstAmount

uint256

Desired output amount. [WAD]

getLstAmountOutForEthAmountIn

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

function getLstAmountOutForEthAmountIn(IRswEth rswEth, uint256 ethAmount) internal view returns (uint256);

Parameters

NameTypeDescription

rswEth

IRswEth

address.

ethAmount

uint256

Amount of ETH to deposit. [WAD]

depositForLrt

Deposits ETH into the rswETH contract and returns the amount of rswETH received.

function depositForLrt(IRswEth rswEth, uint256 ethAmount) internal returns (uint256);

Parameters

NameTypeDescription

rswEth

IRswEth

address.

ethAmount

uint256

Amount of ETH to deposit. [WAD]