This repository features Monerium's onchain fiat 'stablecoin' smart contracts deployed on EVM-compatible blockchains.
The Monerium offers Onchain fiat infrastructure for builders and businesses. Users can easily and instantly transfer regular money directly between offchain banks and Web3. All onchain fiat minted through Monerium is fully authorized, fully regulated, and fully backed.
Monerium EMI is an electronic money institution that is licensed to issue e-money on blockchains. Electronic money (e-money) has been recognized in the European Economic Area (EEA) as a digital alternative to cash since 2000, when the first e-money Directive was introduced. Monerium e-money is 1:1 backed in fully segregated, unencumbered, high-quality liquid assets and unconditionally redeemable on demand. Read more about e-money here.
Monerium stablecoins are also MICA compliant.
The token architecture employs OpenZeppelin's UUPS Proxy Pattern for Upgradeability. Each deployment environment features a distinct instance of the implementation contract( Token.sol ) alongside four proxy contracts ( ERC1967Proxy.sol ), corresponding to each e-money token Monerium introduces, delegating function calls to the implementation contract while using their respective storage.
Additionally, all four tokens also hold access to a shared Blacklist validator ( BlacklistValidatorUpgradeable.sol ).
For detailed setup, deployment, and testing instructions, visit this dedicated page.
The implementation contract of the token employs OpenZeppelin's ERC20PermitUpgradeable for standard ERC20 operations.
The contracts support the ERC-2612 Permit functionality. Developers should use ERC-2612 Permit instead of ERC-20 Approve because it allows for gasless token approvals through off-chain signatures, eliminating the need for a separate on-chain approval transaction. Using Permit, developers can create more efficient and user-friendly applications, enhancing security and flexibility within the Ethereum ecosystem.
For more information, read our tutorial.
The implementation contract of the token utilizes OpenZeppelin's Ownable2StepUpgradeable and AccessControlUpgradeable for role-based permissions and ownership management.
A designated owner
holds the authority for essential contract management tasks, including assigning admin and system roles and initiating upgrades to the implementation. The admin
role is responsible for managing Mint Allowance, while the system
role is tasked with executing Mint and Burn operations.
An updated implementation contract may be deployed, and the proxy contract will then delegate calls to this new version. The upgrade logic, inherent to the UUPS pattern, resides in the implementation contract and is strictly accessible by the owner
's address.
The token's administrators can blacklist certain addresses which will prevent those from transferring or receiving tokens. This blacklist is shared between all four tokens of an environment.
Tokens can be minted or burned on demand. The contract supports having multiple minters under the system
role.
The admin
addresses will control how much each system
is allowed to mint. The mint allowance mirrors the ERC20 allowances - as each system
mints new tokens their allowance decreases. When it gets too low they will need the allowance increased again by one admin
address.
The admin
address corresponds to a Gnosis MultiSig wallet, operated by Monerium's administrative personnel. They perform daily evaluations and adjustments to the mint allowance.