Interface

version

    function version() external returns (string);

Gets the current version.

token

    function token() external returns (address);

Gets the address of the yield token that this adapter supports.

underlyingToken

    function underlyingToken() external returns (address);

Gets the address of the underlying token that the yield token wraps.

price

    function price() external returns (uint256);

Gets the number of underlying tokens that a single whole yield token is redeemable for.

wrap

    function wrap(
        uint256 amount,
        address recipient
    ) external returns (uint256 amountYieldTokens);

Wraps amount underlying tokens into the yield token.

Parameters:

NameTypeDescription

amount

uint256

The amount of the underlying token to wrap.

recipient

address

The address which will receive the yield tokens.

Return Values:

NameTypeDescription

amountYieldTokens

uint256

The amount of yield tokens minted to recipient.

unwrap

    function unwrap(
        uint256 amount,
        address recipient
    ) external returns (uint256 amountUnderlyingTokens);

Unwraps amount yield tokens into the underlying token.

Parameters:

NameTypeDescription

amount

uint256

The amount of yield-tokens to redeem.

recipient

address

The recipient of the resulting underlying-tokens.

Return Values:

NameTypeDescription

amountUnderlyingTokens

uint256

The amount of underlying tokens unwrapped to recipient.

Last updated