The Bridge between MakerDAO and Compound

The Bridge between MakerDAO and Compound

With the rise in Maker’s stability fees, we’ve seen CDP users shifting to different lending protocols like Compound, Nuo, dydx, Dharma, etc. This showed us how the change in one good DeFi protocol can affect every other protocol.

When the stability fees raised I didn’t pay my DAI debt because I don’t have any DAI to pay. So the other option was to shift to other protocol but then I realized that I’ve to pay my Maker’s debt first in order to take my collateral out but again I don’t have DAI. So I came to a conclusion — “Let’s leave it how it is”. Two days later, I read another proposal on MakerDAO that the stability fee is being increased by an additional 2%. Now that’s enough, I decided to shift to Compound. I took some collateral out -> Deposited it on Compound -> took DAI debt from Compound -> paid the DAI debt on Maker. Repeated this process 3 times and bam! I was finally using the Compound. Easy! Huh! It only took just 12 transactions. So now that I shifted what if MakerDAO decreased the stability fees and then I want to shift back?!

At the time of writing this article interest of DAI on different DeFi protocols: 16.5% on Maker, 12.35% on Compound, 10.48% on Nuo, and 14.25% on dYdX

There’s a lot of difference between different protocols and it’s because there’s no connectivity between protocols.

Decentralized Bridge between DeFi protocols

Borrowing is the heart of the banking industry for decades and it’s just started on blockchain about a year ago. Still, a long way to go. We will see a good surge of protocols supporting crypto-backed borrowings in the coming years. Starting with making a bridge between MakerDAO and Compound, our aim is to create efficiency in the whole DeFi industry.

How does it work under the hood?

1. User will call a function on their smart contract wallet.

2. Contract wallet will transfer the ownership of CDP to bridge contract.

3. “Bridging Contract” will pay the debt for the CDP. (Bridge contract will always have around 100K DAI balance to cover user’s debt)

4. Bridge contract will take out the ETH collateral from Maker’s contract and lend them up in compound’s contract. (contract will receive CETH tokens)

5. Bridge contract will transfer CETH to user’s contract wallet.

6. Contract wallet will take equivalent DAI debt from the compound and send it to Bridge contract.

And vice-versa goes when the user has to switch from Compound to Maker.

What are the benefits it’s providing to the whole DeFi ecosystem?

1. For users — Best rates on lending, borrowing and margin trading.

2. For Maker — Solves the DAI peg problem.

3. For Compound — Great use case and shows how it’s helping to keep DeFi stable.

A win-win situation for everyone!!

At InstaDApp, we are committed to growing Decentralised Finance ecosystem and building innovative products around protocols to bring the mainstream adoption of the overall #DEFI industry. If you have any questions, we can get in touch on Twitter. Would love to have your feedback & suggestions.

Written by Samyak Jain