Minting
Minting NUSD
The NUSD minting process implements strict controls to ensure full collateralization of all issued tokens while maintaining protocol security and efficiency.
NUSD minting process flow
Process flow
Initiation
Users interact with the Router.sol
contract by calling the mint()
function with the following parameters:
- Collateral asset address
- Deposit amount
- Beneficiary address for NUSD receipt
Collateral Transfer
The Router executes a transfer of collateral tokens from the user to the AssetReserve.sol
contract, ensuring all backing assets remain under protocol custody before any NUSD issuance.
Routing to Minter
Based on the collateral type, the Router delegates the minting request to the appropriate Minter contract.
Valuation & Calculation
The Minter contract performs critical valuation steps:
- Queries onchain price oracles
- Determines current USD value of deposited collateral
- Calculates NUSD output amount considering:
- Slippage tolerance:
order.nusdAmount
serves as minimum acceptable output - Rate limits: Enforces
maxMintPerBlock
to prevent manipulation
- Slippage tolerance:
NUSD Creation
Upon validation of all parameters, the Minter executes:
- Calls
mint()
function onNUSD.sol
contract - Increases total NUSD supply atomically
- Credits newly minted tokens to the specified beneficiary