structRebaseHelperParams {address helper; // wrap helper address if address(0) then not wrapaddress tokenIn; // token to use in rebase helper}// NOTE: there is 3 types of deposit// 1. deposit native token use msg.value for native token// if amt > 0 mean user want to use wNative too// 2. wrap rebase token to non-rebase token and deposit (using rebase helper)// 3. deposit normal erc20 tokenstructDepositParams {address pool; // lending pool to deposituint amt; // token amount to deposit RebaseHelperParams rebaseHelperParams; // wrap params}structWithdrawParams {address pool; // lending pool to withdrawuint shares; // shares to withdraw RebaseHelperParams rebaseHelperParams; // wrap paramsaddress to; // receiver to receive withdraw tokens}structRepayParams {address pool; // lending pool to repayuint shares; // shares to repay}structBorrowParams {address pool; // lending pool to borrowuint amt; // token amount to borrowaddress to; // receiver to receive borrow tokens}structOperationParams {uint posId; // position id to execute (0 to create new position)address viewer; // address to view positionuint16 mode; // position mode to be used DepositParams[] depositParams; // deposit parameters WithdrawParams[] withdrawParams; // withdraw parameters BorrowParams[] borrowParams; // borrow parameters RepayParams[] repayParams; // repay parametersuint minHealth_e18; // minimum health to maintain after executebool returnNative; // return native token or not (using balanceOf(address(this)))}
Parameters:
Name
Type
Description
_params
OperationParams
parameters to execute the fucntion
Returns:
Name
Type
Description
posId
uint256
running position id (per each user) on money market hook