Feature Request: Use Flashloans to Migrate Positions from Deprecated Cauldrons

The isolated nature of Abracadabra’s cauldrons is clearly a positive when it comes to risk mitigation. But one downside I’ve noticed is that it adds UX friction when cauldrons need to be updated, either due to necessary changes to the cauldron contracts themselves or changes implemented to the underlying collateral contracts upstream.

When changes occur, cauldrons are deprecated and users are no longer able to borrow $MIM using those cauldrons. Meanwhile, their deposited collateral remains in the cauldron unless they repay their existing $MIM loan. Doing this may not always be possible for users depending on the size of their outstanding debt obligation and their reasoning for taking out the debt position to begin with. And if the change originated with the upstream ibToken contracts (i.e. a yearn vault change), users may be left with deposits in cauldrons that no longer accrue in value over time the way they expected when they first made their deposit.

Consider a real world example:

As a solution for Bob’s woes, I am wondering if flashloans could be used to empower users to migrate capital from deprecated cauldrons into their like-kind active cauldrons instead? Abracadabra already uses flashloans to let users delever their positions using their deposited collateral to reduce their debt positions.

Would it not be possible to utilize the same strategy to simultaneously repay the $MIM loan in a deprecated cauldron, withdraw the underlying collateral, redeposit the collateral into a like-kind active cauldron, and then borrow against it to repay the flashloan debt owed?

How much of a dev lift would this require? Would it be a straightforward endeavor or brutally difficult?

DeFi is an ever evolving ecosystem. It’s likely that Abracadabra will continue to add to its graveyard of deprecated cauldrons in the future, if only due to the fact that the protocols backing the underlying ibToken collateral will continue to adapt to the changing demands of the market. To me, this feature seems like an obvious value-add for users and a way to eliminate what will certainly be a growing source of UX friction in the future.

What does everyone else think?

Disclaimer: I don’t know if this is feasible and will defer to those who are more technically informed than myself.

1 Like