INFINIT's ERC-20 wrapped version of ETH, WETH, or USDB
underlyingToken
Underlying token of the contract.
function underlyingToken() external view returns (address underlyingToken);
Total amount of underlying token, including claimable yield amount.
function totalAssets() external view returns (uint256 totalAssets);
Decimal of the wrapped token, currently equals to8 + underlyingToken.decimals().
function decimals() public view override returns (uint8 decimals);
Convert the underlying token amount to wrapped token amount (rounded down), including claimable yield amount.
function toShares(uint _amt) external view returns (uint256 shares);
Convert wrapped token amount to underlying token amount (rounded down), including claimable yield amount.
External Functions
Claim underlying yield and update the internal balance.
Accrue underlying token's yield and wrap underlying token to wrapped token (rounded down).
Parameters:
amount of underlying to wrap
Returns:
amount of wrapped token to receive
Accrue underlying token's yield and unwrap wrapped token to underlying token (rounded down).
Parameters:
amount of wrapped token to unwrap
Returns:
amount of underlying token to receive
Accrue ETH yield, wrap ETH to WETH, and wrap WETH to wWETH (rounded down).
Returns:
amount of wWETH to receive from wrapping msg.value ETH
Accrue ETH yield, unwrap wWETH to WETH, and unwrap WETH to ETH and send to msg.sender (rounded down).
Parameters:
amount of wWETH to unwrap
Returns: