Instapool V2 - Mainnet

Inbuilt Flash Loan in DSA Instapool-v1.1 connector on mainnet triggers methods like flashBorrowAndCast, flashPayback. You can view details like source code, ABIs on Etherscan.

  • Use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee to indicate ETH.
  • use -1 or dsa.maxValue for the maximum amount in function.
  • If not sure about the arguments getId and setId, pass 0.

FlashBorrowAndCast

Borrow Flashloan and Cast spells.

spells.add({  connector: "INSTAPOOL-A",  method: "flashBorrowAndCast",  args: [token, amt, route, data]});
Parameter Type Description
token address Token Address.
amt uint Token Amount.
route uint Flashloan source route. (0: dYdX(ETH,DAI,USDC only), 1: MakerDAO(DAI only), 2: Compound(All borrowable tokens in Compound), 3: AaveV2(All borrowable tokens in AaveV2))
data bytes targets & data for cast.

FlashPayback

Return token to InstaPool.

spells.add({  connector: "INSTAPOOL-A",  method: "flashPayback",  args: [token, amt, getId, setId]});
Parameter Type Description
token address Token Address.
amt uint Token Amount.
getId uint Get token amount at this ID from `InstaMemory` Contract.
setId uint Set token amount at this ID in `InstaMemory` Contract.

If you still can't find something you're looking for or have any questions, ask them at our developers community on Discord or simply send an Email.


Our team is excited about assisting you to build an application using Instadapp Developer Platform. Your questions and feedback help us make a better development environment for future developers.