LybraWstETHVault

This contract inherits from the LybraPeUSDVaultBase contract and supports collateralizing WstETH to borrow peUSD. When users deposit ETH, the contract will deposit the ETH into the Lido contract and convert it to WstETH.

Function

depositEtherToMint(uint256 mintAmount)

Allows users to deposit ETH to mint peUSD. ETH is directly deposited into Lido and converted to WstETH.

function depositEtherToMint(uint256 mintAmount) external payable override
Parameter
Type
Description

mintAmount

uint256

The amount of peUSD to mint.

Requirements:

  • The deposited amount of ETH must be greater than or equal to 1 ETH.

getAssetPrice()

Returns the price of the collateral asset (WstETH) in USD.

function getAssetPrice() public override returns (uint256)

Returns:

  • The price of the collateral asset (WstETH) in USD.

Last updated