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
weth
Write Methods
borrow
Unwraps WETH from the floating pool and borrows to caller.
Parameters
assets
uint256
amount of assets to borrow.
Returns
borrowShares
uint256
number of borrowed shares.
borrowAtMaturity
Unwraps WETH from a maturity and borrows to caller.
Parameters
maturity
uint256
maturity date for repayment.
assets
uint256
amount to be sent to caller.
maxAssetsAllowed
uint256
maximum amount of debt that the caller is willing to accept.
Returns
assetsOwed
uint256
total amount of assets (principal + fee) to be repaid at maturity.
deposit
Wraps ETH and deposits WETH into the floating pool's market.
Returns
shares
uint256
number of minted shares.
depositAtMaturity
Wraps ETH and deposits to a maturity.
Parameters
maturity
uint256
maturity date where the assets will be deposited.
minAssetsRequired
uint256
minimum amount of assets required by the caller for the transaction to be accepted.
Returns
maturityAssets
uint256
total amount of assets (principal + fee) to be withdrawn at maturity.
redeem
Unwraps WETH from the floating pool and withdraws to caller.
Parameters
shares
uint256
amount of shares to be burned in exchange of assets.
Returns
assets
uint256
amount of assets withdrawn.
refund
Wraps ETH and repays to the floating pool.
Parameters
borrowShares
uint256
shares to be subtracted from the caller's debt.
Returns
repaidAssets
uint256
number of repaid assets.
actualShares
uint256
number of borrowed shares subtracted from the debt (can be lower than borrowShares
).
repay
Wraps ETH and repays to the floating pool.
Parameters
assets
uint256
amount of assets to repay.
Returns
repaidAssets
uint256
number of repaid assets (can be lower than assets
).
borrowShares
uint256
number of borrowed shares subtracted from the debt.
repayAtMaturity
Wraps ETH and repays to a maturity.
Parameters
maturity
uint256
maturity date where the assets will be repaid.
assets
uint256
amount to be paid for the caller's debt.
Returns
repaidAssets
uint256
the actual amount that was transferred into the Market.
withdraw
Unwraps WETH from the floating pool and withdraws to caller.
Parameters
assets
uint256
amount of assets to withdraw.
Returns
shares
uint256
number of burned shares.
withdrawAtMaturity
Unwraps WETH from a maturity and withdraws to caller.
Parameters
maturity
uint256
maturity date where the assets will be withdrawn.
assets
uint256
position size to be reduced.
minAssetsRequired
uint256
minimum amount required by the caller (if discount included for early withdrawal).
Returns
actualAssets
uint256
amount of assets withdrawn (can include a discount for early withdraw).
Last updated