First-class Stablecoin Support (MUSD)
-
We introduce a new "Stablecoin Mode" setting. When in stablecoin mode, Selene will automatically convert incoming BCH into MUSD.
-
We have an additional option called "Include non-stablecoin balances." When enabled, the user will see their BCH balance (denominated in USD) alongside their MUSD balance.
-
Sending in Stablecoin mode required some thought because we need to handle both regular BCH addresses and Cashtoken addresses.
-
When sending to a regular BCH address, we ensure the receiver only gets BCH.
-
If the sender only has MUSD, it will automatically convert to BCH before sending. The user does not need to have any BCH to do this - dust and transaction fees are handled by the conversion.
-
-
With "include non-stablecoin balances" enabled:
-
If the sender has enough BCH to cover the transaction, we simply send the BCH.
-
If the sender has enough MUSD+BCH to cover the transaction, but not enough of one or the other, we swap MUSD into BCH until we have enough BCH, then send it.
-
-
Without "include non-stablecoin balances" enabled:
-
If the sender doesn't have enough MUSD to cover the transaction, show "insufficient funds"
-
Should we prompt/inform the user that they may have additional non-stablecoin funds available to them?
-
-
For CashToken addresses:
-
If the user manually selects sending a token (including MUSD) from the Assets page, we send that token as normal.
-
If the user is attempting a "normal" send to a token address, we will send MUSD directly. In this case, we assume the receiver is signalling to us that they would prefer to receive the MUSD token instead of raw BCH.
-
If "include non-stablecoin balances" is enabled, we will send MUSD+BCH without any conversion, prioritizing MUSD first. If the receiver is also in Stablecoin Mode, their wallet will automatically convert the BCH into MUSD for them.
-