MarketETHRouter

To be used by Exactlyโ€™s web-app, so accounts can operate with ETH on MarketWETH. Wraps ETH or unwraps WETH before and after interacting with MarketWETH. It saves one step for the user.

Public State Variables

market

function market() external view returns (contract Market)

weth

function weth() external view returns (contract WETH

Write Methods

borrow

function borrow(uint256 assets) external nonpayable returns (uint256 borrowShares)

Unwraps WETH from the floating pool and borrows to caller.

Parameters

Returns

borrowAtMaturity

function borrowAtMaturity(uint256 maturity, uint256 assets, uint256 maxAssetsAllowed) external nonpayable returns (uint256 assetsOwed)

Unwraps WETH from a maturity and borrows to caller.

Parameters

Returns

deposit

function deposit() external payable returns (uint256 shares)

Wraps ETH and deposits WETH into the floating pool's market.

Returns

depositAtMaturity

function depositAtMaturity(uint256 maturity, uint256 minAssetsRequired) external payable returns (uint256 maturityAssets)

Wraps ETH and deposits to a maturity.

Parameters

Returns

redeem

function redeem(uint256 shares) external nonpayable returns (uint256 assets)

Unwraps WETH from the floating pool and withdraws to caller.

Parameters

Returns

refund

function refund(uint256 borrowShares) external payable returns (uint256 repaidAssets, uint256 actualShares)

Wraps ETH and repays to the floating pool.

Parameters

Returns

repay

function repay(uint256 assets) external payable returns (uint256 repaidAssets, uint256 borrowShares)

Wraps ETH and repays to the floating pool.

Parameters

Returns

repayAtMaturity

function repayAtMaturity(uint256 maturity, uint256 assets) external payable returns (uint256 repaidAssets)

Wraps ETH and repays to a maturity.

Parameters

Returns

withdraw

function withdraw(uint256 assets) external nonpayable returns (uint256 shares)

Unwraps WETH from the floating pool and withdraws to caller.

Parameters

Returns

withdrawAtMaturity

function withdrawAtMaturity(uint256 maturity, uint256 assets, uint256 minAssetsRequired) external nonpayable returns (uint256 actualAssets)

Unwraps WETH from a maturity and withdraws to caller.

Parameters

Returns

Last updated