Skip to content

BaseLeverage

senamakel edited this page Sep 6, 2024 · 2 revisions

Solidity API

BaseLeverage

WNATIVE

address WNATIVE

constructor

constructor(address _wnative) internal

increasePos

function increasePos(struct ILoopingStrategy.IncreasePosParams params) external

flash loan to execute increase position size

increasePosNative

function increasePosNative(struct ILoopingStrategy.IncreasePosParams params) external payable

flash loan to execute increase position size with native token

decreasePos

function decreasePos(struct ILoopingStrategy.DecreasePosParams params) external

flash loan to execute decrease position size

decreasePosNative

function decreasePosNative(struct ILoopingStrategy.DecreasePosParams params) external

flash loan to execute decrease position size return native token

repayDebtWithCollateral

function repayDebtWithCollateral(struct ILoopingStrategy.RepayDebtWithCollateralParams params) external

flash loan to execute repay debt with collateral

_swapExactIn

function _swapExactIn(address swapper, address from, address to, uint256 amtIn, uint256 minAmtOut, bytes data) internal

_swapExactOut

function _swapExactOut(address swapper, address from, address to, uint256 amtOut, uint256 maxAmtIn, bytes data) internal

_ensureApprove

function _ensureApprove(address _token, address _to, uint256 _amt) internal

_increasePos

function _increasePos(struct ILoopingStrategy.IncreasePosParams params) internal virtual

_repayDebtWithCollateral

function _repayDebtWithCollateral(struct ILoopingStrategy.RepayDebtWithCollateralParams params) internal virtual

_decreasePos

function _decreasePos(struct ILoopingStrategy.DecreasePosParams params) internal virtual returns (uint256 amtOut)

_reducePos

function _reducePos(address collPool, uint256 collAmt, address borrToken, uint256 repayAmt, address onBehalfOf) internal virtual returns (uint256)

receive

receive() external payable

Clone this wiki locally