Stablecoins on Miden using Asset Accounts #30
Dominik1999
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
I think I'd separate these into several categories. Specifically, I think there is a difference between bridged stable coins and native ones. Supporting bridged coins might be much easier than native ones. Similarly, I think there is a difference between centralized and algorithmic stable coins. For example, supporting DAI might be easier than USDC. So, I think we should evaluate each of these separately. If we are talking about bridged USDC, would be great to learn more about how current implementations work. For example, how is it ensured that blacklists are updated on all bridged assets. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
On Miden we need to provide stablecoins. We cannot deploy ERC20 contracts on Miden. We can mimic most of the features also in Miden Token Accounts. The main problem might be how to handle the case if an address is being blacklisted on Ethereum but has already bridged stablecoins to Miden.
Miden needs stablecoins for DeFi
DeFi is one of the most widespread use case categories on blockchains, especially on Ethereum. Stablecoins drive DeFi. If Miden wants to become a relevant smart contract blockchain, it should provide the ability for stablecoins.
In theory, Miden enables all existing stablecoin projects to launch their stablecoin on the platform. The projects have already gained the user's trust and have ways to deal with the regulators. But it is also possible for Polygon to launch its stablecoin on Miden.
Existing stablecoins use ERC-20 (or similar) token contracts
The most used stablecoins are smart contracts following the ERC-20 token contract standard (or the BEP-20 on Binance), see USDC, USDT, DAI, WeTH, BUSD. Those token contracts can be transferred onto other EVM-like blockchains, but not so easy to systems like Miden.
Stablecoins differ in the way how they keep a stable value. Fiat or Collateral backed stable coins like USDT or USDC might be easier to rebuild on Miden than stablecoins with more complex stability mechanisms like DAI.
In Miden, there are no token contracts but token accounts
In Miden, there are Asset accounts that issue assets; see 0xPolygonMiden/miden-vm#339.
EXAMPLE: Ways to rebuild (fiat-backed, centralized stablecoins) USDC on Miden
Let's collect some ideas on how to provide USDC on Miden to Miden users.
There are other stablecoins and projects. I picked USDC as an example because it is the most used stablecoin by far - https://dune.com/hagaetc/stablecoins.
Some background on USDC:
Some ideas on how to rebuild the features
There are two ways for USDC to be deployed on Miden:
Mint and release
Other rollups, optimistic or zk, mint tokens on the rollup when those tokens are deposited on the Ethereum side of the token bridge. Those tokens get burnt whenever a user wants to bridge the tokens back.
In theory, there can be a USDC Asset account issuing as many USDC as there are in the rollup token bridge on Ethereum. On Asset accounts, one can set and change the admin, who can have the ability to mint more. Also, the query of the total supply should be an easy thing to do.
Native USDC
Circle wants to release native implementations of their tokens also on Rollups. The difference might be (it is not clear yet) that Circle has control of the token contract and can blacklist users and issue tokens.
Let's try to continue with the easier Mint and release approach. Easier because we don't need to align with Circle on how to implement that token.
Necessary features for USDC:
For reference, the USDC smart contract (https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48#code)
There might be more necessary features. From the listed features, the most problematic features seem to be to get the balance of some other user and to blacklist someone. Assets are stored in the accounts directly - there is no global list. And in Miden, it is possible to hold account data off-chain.
Getting the balance of a user balanceOf
Blacklisting a user isBlacklisted
Since USDC is a centralized stablecoin - partly regulated under the SEC - there must be the ability to prevent users from using USDC (e.g. money laundering).
2.1) An address is already blacklisted and tries to bridge to Miden: The bridging transaction on Ethereum will fail.
2.2) An address bridges to Miden and gets blacklisted on Ethereum afterwards: The user can use the USDC tokens issued on Miden and potentially swap those. The user cannot get USDC out of Miden because that transaction would happen on Ethereum. However, the tokens can be swapped against other tokens on which the user is not blacklisted. It is unclear how other rollups / sidechains handle that case.
Beta Was this translation helpful? Give feedback.
All reactions