
0. Markets
crvUSD itself acts as a ERC20 token, with minting and burning mostly restricted to automatic actions undertaken by the Factory contract whenever a new crvUSD market is configured or an existing one's debt ceiling is modified.
A crvUSD market is associated with a Controller, a market AMM (containing the market's collateral and crvUSD) and its parameters, a collateral asset, a debt ceiling, loan and liquidation discounts (determining the amounts allowed for borrowing and the liquidation threshold), and a monetary policy governing the interest rates. These markets are not deployed and managed permissionlessly, but are rather subject to the results of Curve DAO votes.
crvUSD can also be minted as a pre-allocation for other purposes should the DAO consent to that (an example thereof is the allocations made to Yield Basis), but this mechanism exactly matches that of the ordinary crvUSD supply expansion.
1. Creation, management, and liquidation of loans
As shown above, crvUSD is not minted, but rather released when a loan is created. The user's interactive endpoint for the purposes of managing and creating loans is a market's Controller contract. When the user invokes the create_loan function of the Controller, he supplies the collateral and specifies the debt (i.e., the number of crvUSD to borrow) and the number of bands (see section 5) to spread the collateral over. Should he wish to repay the loan, an eponymous function is also available. Otherwise, collateral can be managed with add_collateral and remove_collateral, and debt can be increased with borrow_more. Hard liquidations (soft liquidations are automatic and mostly reversible) can be done with liquidate. Callback extensions are available for all these functions.
The amount of debt that can be obtained for a given amount of collateral is naturally dependent on the market parameters, but also on the number of bands the loan is spread over (as it determines the smallest possible price at which some of the collateral yet remains backing the loan). The maximal admitted LTV is determined as:
