Lending Bridge

Port lent DAI b/w Maker & Compound

Step 1

Installation or just use your browser console.

Step 2

Setup Account

Step 3

Trigger the following uniquely designed spells to fulfill this use case. Check this section for generic details around casting spells.

The DSA will cast the spells across the MakerDAO, Compound and Instapool connectors in the specified sequence.

Maker -> Compound

Benefits
  • When DAI Supply rate on Compound > Maker. Generally happens when DAI > $1.
  • Help make DAI stable.
Recipe
  1. MakerDAO: withdraw DAI
  2. Compound: deposit DAI
Requirements
  • User must have DAI deposited in Maker.
let withdrawAmount = 20; // 20 DAI
let withdrawAmtInWei = dsa.tokens.fromDecimal(withdrawAmount, "dai");
let dai_address = dsa.tokens.info.dai.address;

let spells = dsa.Spell();

spells.add({
  connector: "maker",
  method: "withdrawDai",
  args: [withdrawAmtInWei, 0, 0]
});

spells.add({
  connector: "compound",
  method: "deposit",
  args: [dai_address, 0, 0, 0]
});

dsa.cast(spells).then(console.log)

Compound -> Maker

Benefits
  • When DAI Supply rate on Maker > Compound. Generally happens when DAI < $1.
  • Help make DAI stable.
Recipe
  1. Compound: withdraw DAI
  2. MakerDAO: deposit DAI
Requirements
  • User must have DAI deposited in Compound.
let withdrawAmount = 20; // 20 DAI
let withdrawAmtInWei = dsa.tokens.fromDecimal(withdrawAmount, "dai");
let dai_address = dsa.tokens.info.dai.address;

let spells = dsa.Spell();

spells.add({
  connector: "compound",
  method: "withdraw",
  args: [eth_address, withdrawAmtInWei, 0, 0]
});

spells.add({
  connector: "maker",
  method: "depositDai",
  args: [withdrawAmtInWei, 0, 0]
});

dsa.cast(spells).then(console.log)

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.