Contract Migration to support LunaX and fix Collector Contract

Overview

  1. Adding LunaX as a collateral on Mirror
  2. Minor fix on Collector Contract

Migration Time: Feb 17th 2022, 05:00AM UTC

Adding LunaX as a collateral on Mirror

Currently, the collateral supported on Mirror Protocol are mAssets, UST, LUNA and aUST.

Recently a poll to support LunaX as a new collateral type passed:

Although passed, the poll was a text poll which does not execute any changes to the Mirror Protocol, or its contracts. To support LunaX, the following contract needs a migration:

Minor fix on Collector Contract

Mirror Collector contract is responsible for gathering all the 1.5% protocol fee generated from all the burn transactions from Mirror’s borrow and short positions, swapping them to MIR tokens and distributing those MIR tokens to MIR stakers.

After recent update to Redirect MIR-UST rewards to Astroport, the operation to convert all UST to MIR failed due to default slippage set on Astroport’s MIR-UST pair contract (0.5%).

Approximately 251,626 UST is stuck in Mirror Collector contract at the time of this writing, and in order to execute the swap from UST to MIR, maximum slippage should be set to a number higher than 0.5%:

  • Add maximum slippage as 5% when convert execute message occurs from Mirror Collector contract.

In order to increase the tolerated slippage for Mirror Collector operation to swap into MIR tokens, the following contract needs a migration:

Conclusion

If the poll passes by majority YES votes, members of the Mirror community will migrate these contracts in order to add LunaX as collateral type and to increase the maximum slippage from the Collector contract to 5% when swapping UST into MIR tokens.

No additional user action is required to prepare for this migration process.

4 Likes

Thank
@thisisjoe
Glad to see the update on this on
good work sir

1 Like

is it necessary to move as high as 5% max slippage?

Collector swaps all available protocol fee into UST first and then all the UST into MIR.

The current amount accumulated in the Collector as UST requires approximately 2% slippage tolerance.

Assume that the protocol becomes more active and more UST is used for the swap. Then the slippage tolerance required to execute the UST to MIR would need to be higher.

1 Like

Added the migration time to be 05:00AM UTC, Feb 17th

This update has been executed and all features detailed from the post went live on Mainnet.

2 Likes

Still missing votes for Polls 233-242.

Migration took place after poll 242.
The Collector contract isn’t designed to target specific polls to distribute rewards to, but instead all the rewards that was piled up were all distributed to the next polls (from 243). If you voted on poll 243 and any ones after that, you could see that much more rewards were given than any other previous polls.

1 Like

Ah okay, thank you for the explanation.

1 Like