Leverager
Leverager
The Ryder Protocol has one type of Leverage contract for Aave. Leverage contracts deployed for Aave forks inherit this contract
AaveLeverager
Structs
WindArgs
lendingPool
ILendingPool
Aave lending pool
priceOracle
IPriceOracle
Aave price oracle
collateral
address
address of token to be leveraged
debt
address
address of debt token to be incured
collateralAmount
address
initial amount of collateral token
estimatedLeveragedCollateralAmount
uint
estimated leveraged collateral amount
cRatio
uint
collateralization ratio scaled by 10**6
collateralDecimals
uint
decimals of collateral token
debtDecimals
uint
decimals of debt token
interestRateMode
uint
interest rate mode, 1 for Stable debt or 2 for Variable debt
loops
uint
specifies the number of collateral deposits, borrows and swaps to be carried out
swapData
bytes
encoded data for swap of debt to collateral
Write Methods
wind
function wind(WindArgs memory args)
deposits collateral and borrows debt in a series of loops
Caller must have approved Leverage contract to spend collateral
args
WindArgs
Contains all arguments required for leverage
setSwapper
function setSwapper(address payable _swapper)
Sets a new swapper contract
Only callable by Admin
_swapper
address payable
address of the new Leverage Swapper
setAdmin
function setAdmin(address _admin)
Sets a new admin
Only callable by Admin
_admin
address
address of the new admin
approveLendingPool
function approveLendingPool(address pool)
approves an Aave (or fork) lending pool
Only callable by Admin
pool
address
lending pool address
disapproveLendingPool
function disapproveLendingPool(address pool)
disapproves an Aave (or fork) lending pool
Only callable by Admin
pool
address
lending pool address
getCash
function getCash(address _token)
withdraws stray token amounts to admin
Only callable by Admin
_token
address
address of an ERC20 token
Last updated