Reflexer - Mainnet

Collateralized Borrowing. Reflexer-v1 connector on mainnet triggers methods like open, close, deposit, withdraw, borrow, payback, withdrawLiquidated, depositAndBorrow, exit. 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.

Open

Open a Reflexer Safe.

spells.add({  connector: "REFLEXER-A",  method: "open",  args: [colType]});
Parameter Type Description
colType string Type of Collateral.(eg: 'ETH-A')

Close

Close a Reflexer Safe.

spells.add({  connector: "REFLEXER-A",  method: "close",  args: [safe]});
Parameter Type Description
safe uint256 Safe ID to close.

Deposit

Deposit collateral to a Reflexer safe

spells.add({  connector: "REFLEXER-A",  method: "deposit",  args: [safe, amt, getId, setId]});
Parameter Type Description
safe uint256 Safe ID.
amt uint256 token amount to deposit.
getId uint256 Get token amount at this ID from `InstaMemory` Contract.
setId uint256 Set token amount at this ID in `InstaMemory` Contract.

Withdraw

Withdraw collateral from a Reflexer Safe

spells.add({  connector: "REFLEXER-A",  method: "withdraw",  args: [safe, amt, getId, setId]});
Parameter Type Description
safe uint256 Safe ID.
amt uint256 token amount to withdraw.
getId uint256 Get token amount at this ID from `InstaMemory` Contract.
setId uint256 Set token amount at this ID in `InstaMemory` Contract.

Borrow

Borrow Coin using a Reflexer safe

spells.add({  connector: "REFLEXER-A",  method: "borrow",  args: [safe, amt, getId, setId]});
Parameter Type Description
safe uint256 Safe ID.
amt uint256 token amount to borrow.
getId uint256 Get token amount at this ID from `InstaMemory` Contract.
setId uint256 Set token amount at this ID in `InstaMemory` Contract.

Payback

Payback Coin debt owed by a Reflexer safe

spells.add({  connector: "REFLEXER-A",  method: "payback",  args: [safe, amt, getId, setId]});
Parameter Type Description
safe uint256 Safe ID.
amt uint256 token amount to payback.
getId uint256 Get token amount at this ID from `InstaMemory` Contract.
setId uint256 Set token amount at this ID in `InstaMemory` Contract.

WithdrawLiquidated

Withdraw leftover collateral after Liquidation.

spells.add({  connector: "REFLEXER-A",  method: "withdrawLiquidated",  args: [safe, amt, getId, setId]});
Parameter Type Description
safe uint256 Safe ID.
amt uint256 token amount to Withdraw.
getId uint256 Get token amount at this ID from `InstaMemory` Contract.
setId uint256 Set token amount at this ID in `InstaMemory` Contract.

DepositAndBorrow

Deposit collateral and borrow Coin.

spells.add({  connector: "REFLEXER-A",  method: "depositAndBorrow",  args: [safe, depositAmt, borrowAmt, getIdDeposit, getIdBorrow, setIdDeposit, setIdBorrow]});
Parameter Type Description
safe uint256 Safe ID.
depositAmt uint256 token deposit amount to Withdraw.
borrowAmt uint256 token borrow amount to Withdraw.
getIdDeposit uint256 Get deposit token amount at this ID from `InstaMemory` Contract.
getIdBorrow uint256 Get borrow token amount at this ID from `InstaMemory` Contract.
setIdDeposit uint256 Set deposit token amount at this ID in `InstaMemory` Contract.
setIdBorrow uint256 Set borrow token amount at this ID in `InstaMemory` Contract.

Exit

Exit Coin from handler.

spells.add({  connector: "REFLEXER-A",  method: "exit",  args: [safe, amt, getId, setId]});
Parameter Type Description
safe uint256 Safe ID.
amt uint256 token amount to exit.
getId uint256 Get token amount at this ID from `InstaMemory` Contract.
setId uint256 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.