stablecoin-evm

MasterMinter contract

The MasterMinter is a governance contract. It delegates the functionality of the masterMinter role in the Circle FiatToken contract to multiple addresses. (The masterMinter role can add and remove minters from a FiatToken and set their allowances.) The MasterMinter contract delegates the minter management capability to controllers. Each controller manages exactly one minter, and a single minter may be managed by multiple controllers. This allows separation of duties (offline key management) and simplifies nonce management for warm transactions.

Minters and FiatToken holders are not affected by replacing a masterMinter user address with a MasterMinter contract.

Roles

The MasterMinter contract has the following roles:

Interaction with FiatToken contract

The owner of the FiatToken contract can set the masterMinter role to point to the address of the MasterMinter contract. This enables the MasterMinter contract to call minter management functions on the FiatToken contract:

Together, these four functions are defined as the MinterManagementInterface. The MasterMinter contains the address of a minterManager that implements the MinterManagementInterface. The MasterMinter interacts with the FiatToken contract via the minterManager.

When a controller calls a function on MasterMinter, the MasterMinter will call the appropriate function on the FiatToken contract on its behalf. Both the MasterMinter and the FiatToken do their own access control.

Function Summary

Deployment

The MasterMinter may be deployed independently of the FiatToken contract (e.g. USDC).

Configuring the MasterMinter

We recommend assigning at least two controllers to each minter.

This configuration allows the removeMinter transaction to be presigned as nonces for the SecurityController are deterministic, which reduces the time to respond when there’s an issue. Broadcasting the removeMinter transaction will cause all future interactions from the AllowanceController to throw.

MasterMinter vs. MintController

Creating a MasterMinter contract that inherits from a MintController contract with no changes may seem like a curious design choice. This leaves open the possibility of creating other contracts that inherit from MintController without creating naming confusion due to their different functionality.