TokenAdapter

The TokenAdapter interface is used to specify adapters that interact with yield bearing tokens.

They currently serve 4 main purposes:

  1. Providing a reliable price oracle for the price of the yieldToken in units of underlyingTokens.

  2. Wrapping the supported underlyingToken into the supported yieldToken.

  3. Unwrapping the supported yieldToken into the supported underlyingToken.

Users can pass a maximumLoss parameter (denominated in basis-points) to the wrap() and unwrap() functions which will cause the transaction to revert if the amount of underlying tokens lost as a result of the action exceeds it.

Last updated