Summary
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.
Abstract
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.
Motivation
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
Pros
- 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.
Cons
- Any upgrade to smart contracts could bring risks, although these risks can be mitigated with an exhaustive set of test