Skip to main content

IBLVaultLido

Git Source

Functions

deposit

Mints OHM against a wstETH deposit and uses the OHM and wstETH to add liquidity to a Balancer pool

Can only be called by the owner of the vault

function deposit(uint256 amount_, uint256 minLpAmount_) external returns (uint256 lpAmountOut);

Parameters

NameTypeDescription
amount_uint256The amount of wstETH to deposit
minLpAmount_uint256The minimum acceptable amount of LP tokens to receive back

Returns

NameTypeDescription
lpAmountOutuint256The amount of LP tokens received by the transaction

withdraw

Withdraws LP tokens from Aura and Balancer, burns the OHM side, and returns the wstETH side to the user

Can only be called by the owner of the vault

function withdraw(
uint256 lpAmount_,
uint256[] calldata minTokenAmountsBalancer_,
uint256 minTokenAmountUser_,
bool claim_
) external returns (uint256, uint256);

Parameters

NameTypeDescription
lpAmount_uint256The amount of LP tokens to withdraw from Balancer
minTokenAmountsBalancer_uint256[]The minimum acceptable amounts of OHM (first entry), and wstETH (second entry) to receive back from Balancer
minTokenAmountUser_uint256The minimum acceptable amount of wstETH to receive back from the vault
claim_boolWhether to claim outstanding rewards from Aura

Returns

NameTypeDescription
<none>uint256uint256 The amount of OHM received
<none>uint256uint256 The amount of wstETH received

emergencyWithdraw

Withdraws LP tokens from Aura and Balancer, returns the wstETH to the user

Can only be called by the owner of the vault. Can only be called when the vault is paused

function emergencyWithdraw(uint256 lpAmount_, uint256[] calldata minTokenAmounts_)
external
returns (uint256, uint256);

Parameters

NameTypeDescription
lpAmount_uint256The amount of LP tokens to withdraw from Balancer
minTokenAmounts_uint256[]The minimum acceptable amounts of OHM (first entry), and wstETH (second entry) to receive back from Balancer

Returns

NameTypeDescription
<none>uint256uint256 The amount of OHM received
<none>uint256uint256 The amount of wstETH received

claimRewards

Claims outstanding rewards from Aura

Can only be called by the owner of the vault

function claimRewards() external;

canWithdraw

Gets whether enough time has passed since the last deposit for the user to be ale to withdraw

function canWithdraw() external view returns (bool);

Returns

NameTypeDescription
<none>boolbool Whether enough time has passed since the last deposit for the user to be ale to withdraw

getLpBalance

Gets the LP balance of the contract based on its deposits to Aura

function getLpBalance() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256uint256 LP balance deposited into Aura

getUserPairShare

Gets the contract's claim on wstETH based on its LP balance deposited into Aura

function getUserPairShare() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256uint256 Claim on wstETH

getOutstandingRewards

Returns the vault's unclaimed rewards in Aura

function getOutstandingRewards() external view returns (RewardsData[] memory);

Returns

NameTypeDescription
<none>RewardsData[]RewardsData[] The vault's unclaimed rewards in Aura