Instapool

Inbuilt Flash Loan in DSA

An Inbuilt Flash Loan mechanism for Smart Accounts powered by Compound Finance.

Instapool connector triggers the methods like flashBorrow, flashPayback, and more. You can view details like source code, ABIs on Etherscan.

  • Use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee to indicate ETH.

Flash Borrow

Flash borrow tokens for a particular transaction.

spells.add({
  connector: "instapool",
  method: "flashBorrow",
  args: [token, amount, getId, setId]
});
ParameterTypeDescription
tokenaddressThe token address to borrow.
amountnumberThe amount of token to borrow.
getIdnumberID fetches the amount of token to borrow.
setIdnumberID stores the amount of token borrowed.

Flash Payback

Flash payback tokens for a particular transaction.

spells.add({
  connector: "instapool",
  method: "flashPayback",
  args: [token, getId, setId]
});
ParameterTypeDescription
tokenaddressThe token address to payback.
getIdnumberAlways keep it 0 because payback is always 100%.
setIdnumberID stores the amount of token payed back.

flashMultiBorrow

Flash borrow multiple tokens for a particular transaction.

spells.add({
  connector: "instapool",
  method: "flashMultiBorrow",
  args: [[token_array], [amount_array], [get_array], [set_array]]
});
ParameterTypeDescription
token_arrayaddress arrayThe token addresses to borrow.
amount_arraynumber arrayThe amount of tokens to borrow.
get_arraynumber arrayID fetches the amount of token to borrow.
setIdnumber arrayID stores the amount of token borrowed.

flashMultiPayback

Flash payback multiple tokens for a particular transaction.

spells.add({
  connector: "instapool",
  method: "flashMultiPayback",
  args: [[token_array], [get_array], [set_array]]
});
ParameterTypeDescription
token_arrayaddress arrayThe token addresses to payback.
get_arraynumber arrayAlways keep it 0 because payback is always 100%.
set_arraynumber arrayID stores the amount of token payed back.

flashPaybackOrigin

Return token liquidity from InstaPool and transfer 20% of collected fee to origin.

spells.add({
  connector: "instapool",
  method: "flashPaybackOrigin",
  args: [origin, token, getId, setId]
});
ParameterTypeDescription
originaddressThe address to transfer 20% of the collected fee.
tokenaddressThe token address.
getIdnumberGet token amount at this ID from `InstaMemory` Contract
setIdnumberSet token amount at this ID in `InstaMemory` Contract.

flashMultiPaybackOrigin

Return multiple token liquidity from InstaPool and tranfer 20% of the fee to origin.

spells.add({
  connector: "instapool",
  method: "flashMultiPaybackOrigin",
  args: [origin, tokens, getId, setId]
});
ParameterTypeDescription
originaddressThe address to transfer 20% of the collected fee.
tokensaddressAn array of token addresses.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
getIdnumberGet token amount at this ID from `InstaMemory` Contract
setIdnumberSet token amount at this ID in `InstaMemory` Contract.

addFeeAmount

Add fee amount to borrowed flashloan.

spells.add({
  connector: "instapool",
  method: "addFeeAmount",
  args: [token, amt, getId, setId]
});
ParameterTypeDescription
tokenaddressThe address of the token in which flashloan is borrowed.
amtnumberThe amount of flashloan fee to be added.
getIdnumberGet token amount at this ID from `InstaMemory` Contract
setIdnumberSet 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 Telegram, 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.

Best way to stay connected with our progress.