INSTAPOOL-C

Inbuilt Flash Loan in DSA

Instapool-v4 connector triggers methods like flashBorrowAndCast, flashPayback, flashMultiBorrowAndCast, flashMultiPayback. You can view details like source code, ABIs on Snowtrace.

  • Use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee to indicate AVAX.
  • 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-C",
  method: "flashBorrowAndCast",
  args: [token, amt, route, data, extraData]
});
Parameter Type Description
token address Token Address.
amt uint Token Amount.
route uint Flashloan source route.
data bytes targets & data for cast.
extraData bytes to be kept bytes(0) in most cases. Can be useful to decide data for some particular routes

FlashPayback

Return token to InstaPool.

spells.add({
  connector: "INSTAPOOL-C",
  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.

FlashMultiBorrowAndCast

Borrow multi-tokens Flashloan and Cast spells.

spells.add({
  connector: "INSTAPOOL-C",
  method: "flashMultiBorrowAndCast",
  args: [tokens_, amts_, route, data, extraData]
});
Parameter Type Description
tokens_ address[] Array of Token Addresses.
amts_ uint[] Array of Token Amounts.
route uint Flashloan source route.
data bytes targets & data for cast.
extraData bytes to be kept bytes(0) in most cases. Can be useful to decide data for some particular routes

FlashMultiPayback

Return multi-tokens to InstaPool.

spells.add({
  connector: "INSTAPOOL-C",
  method: "flashMultiPayback",
  args: [tokens_, amts_, getIds, setIds]
});
Parameter Type Description
tokens_ address[] Array of Token Addresses.
amts_ uint[] Array of Token Amounts.
getIds uint[] Array of getId token amounts.
setIds uint[] Array of setId token amounts.

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.