Lite-A

Supply, Withdraw & Deleverage

InstaLite-v1.1 connector triggers methods like supply, withdraw, deleverage, deleverageAndWithdraw. 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.

Supply

Supply a token into Instalite.

spells.add({
  connector: "LITE-A",
  method: "supply",
  args: [vaultAddr, token, amt, getId, setIds]
});
Parameter Type Description
vaultAddr address Address of instaLite Contract.
token address The address of the token to be supplied. (For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
amt uint256 The amount of token to be supplied. (For max: `uint256(-1)`)
getId uint256 ID to retrieve amt.
setIds uint256[] array of IDs to store the amount of tokens deposited.

Withdraw

Withdraw deposited tokens from Instalite.

spells.add({
  connector: "LITE-A",
  method: "withdraw",
  args: [vaultAddr, amt, getId, setIds]
});
Parameter Type Description
vaultAddr address Address of vaultAddress Contract.
amt uint256 The amount of the token to withdraw.
getId uint256 ID to retrieve amt.
setIds uint256[] array of IDs to stores the amount of tokens withdrawn.

Deleverage

Deleverage Instalite vault.

spells.add({
  connector: "LITE-A",
  method: "deleverage",
  args: [vaultAddr, amt, getId, setId]
});
Parameter Type Description
vaultAddr address Address of vaultAddress Contract.
amt uint256 The amount of the token to deleverage.
getId uint256 ID to retrieve amt.
setId uint256 ID to set amt.

DeleverageAndWithdraw

Deleverage Instalite vault.

spells.add({
  connector: "LITE-A",
  method: "deleverageAndWithdraw",
  args: [vaultAddr, deleverageAmt, withdrawAmt, getIds, setIds]
});
Parameter Type Description
vaultAddr address Address of vaultAddress Contract.
deleverageAmt uint256 The amount of the weth to deleverage.
withdrawAmt uint256 The amount of the token to withdraw.
getIds uint256[] IDs to retrieve amts.
setIds uint256[] IDs to set amts.

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.