⭕ [RFC] Save Unwrapper


Currently, users of the protocol need to perform two transactions to deposit or withdraw from the savings product. The proposed upgrade described in this RFC aims at reducing it to only one transaction in order to ease any interaction with the save product.


To create an Unwrapper smart contract to facilitate the unwrapping of any given credit or mAsset into any given bAsset.

To upgrade Savings smart contract to allow users to redeem credits and unwrap them into any bAsset and finally send it to a beneficiary.

In conjunction with these two changes proposed, it will possible to deposit and withdraw from ETH or any stablecoin on mStable into imUSD (which gives you the base USD yield) and the imUSD vault (which opts you into bonus MTA rewards as well) in one transaction.


Most of the users perform both transactions while withdrawing, first redeem from the imUSD Vault to imUSD, secondly a redeem from imUSD into mUSD. By giving the option to do it in one transaction makes it easier for users and other smart contracts to interact with mStable save product.

As an additional improvement over Savings Contract, it could be possible to add a referral while depositing savings, this would trigger a Referral event with the following details: referral address, the beneficiary and the underlying asset; therefore enabling to track deposits for the mStable Alliance program as described at [RFC] mStable Alliance Referral program


  • It makes it easier for users to deposit or withdraw into/from mStable save product.
  • It makes it easier for other smart contracts to interact with mStable protocol, making it more appealing for integrations.
  • it enables mStable Alliance Program.


  • Any upgrade to smart contracts could bring risks, although these risks can be mitigated with an exhaustive set of test

Seems reasonable. Is this happening in-project, or is this intended to go before the GrantsDAO?

1 Like

Yes, it will be an upgrade to the contracts of the SavingsContract. Mainly to allow unwrapping in one step. That is currently with the contracts not possible since withdrawal from a vault is limited to be executed by the sender itself. This upgrade would allow to easier integrate mstable and to deposit into the Vault. It’s being worked on already and we are in the process of extensive testing. The full specs will be release with the official MIP but this here is just a quick RFC to check if we are generally ok with such a move :slight_smile:

Highly in support of this, it will enable the mAlliance to be up & running from a contract perspective.
Thanks @doncesarts for the write-up

Amazing! The simpler the better!

100% supportive of this. This will be particularly valuable for interacting with mStable via Gnosis Safe as it adds a lot of friction having to get multiple transactions confirmed.

1 Like

Highly supportive of this at Abachi as a gnosis multi-sig treasury.