WrapModule

The Wrap Module is a module that that enables the wrapping of ERC20 and Ether positions via third party protocols. The WrapModule works in conjunction with WrapAdapters, in which the wrapAdapterID / integrationNames are stored on the integration registry.

Some examples of wrap actions include wrapping, DAI to cDAI (Compound) or Dai to aDai (AAVE).

Select Methods

wrap()

function wrap(ISetToken _setToken, address _underlyingToken, address _wrappedToken, uint256 _underlyingUnits, string calldata _integrationName)

Manager only. Instructs the SetToken to wrap an underlying asset into a wrappedToken via a specified adapter.

wrapWithEther()

function wrapWithEther(ISetToken _setToken, address _wrappedToken, uint256 _underlyingUnits, string calldata _integrationName)

Manager only. Instructs the SetToken to wrap Ether into a wrappedToken via a specified adapter. Since SetTokens only hold WETH, in order to support protocols that collateralize with Ether the SetToken's WETH must be unwrapped first before sending to the external protocol.

unwrap()

function unwrap(ISetToken _setToken, address _underlyingToken, address _wrappedToken, uint256 _wrappedUnits, string calldata _integrationName)

Manager only. Instructs the SetToken to wrap an underlying asset into a wrappedToken via a specified adapter.

unwrapWithEther()

function unwrapWithEther(ISetToken _setToken, address _wrappedToken, uint256 _wrappedUnits, string calldata _integrationName)

Manager only. Instructs the SetToken to wrap an underlying asset into a wrappedToken via a specified adapter.

initialize()

function initialize(ISetToken _setToken)

Manager only. Initializes this module to the SetToken.

Last updated