Minting / Borrowing
Borrowing Kresko Assets from the protocol
This documentation is a work in progress!
The term minting comes from the ERC-20 standard referring to the process of increasing the overall supply of the token. Kresko uses this exact process to issue new supply of Kresko Assets when users want to borrow Kresko Assets against their collateral.
The new supply is given to the account requesting the debt as balance within the Kresko Asset contract. It is separately recorded for the user on the protocol state itself as debt.
While it be obvious to many, it is important to understand that if the value of the Kresko Asset increases or decreases, so will the debt value and the collateral value required for backing it. This means if the asset is eg. sold on an AMM after minting, it is equal to taking a short position.
Each mint will emit an event with relevant information
* @notice Emitted when an account mints a Kresko asset.
* @param account The address of the account minting the Kresko asset.
* @param kreskoAsset The address of the Kresko asset.
* @param amount The amount of the Kresko asset that was minted.
event KreskoAssetMinted(address indexed account, address indexed kreskoAsset, uint256 indexed amount);
Each Kresko Asset has a configurable limit on it's total supply to allow controlled growth and to prevent malicious acts on existing liquidity.
If the liquidity for a underlying asset is primarily on a market that is closed the protocol will not allow minting of new assets. This is automatic and the minting will open up when the market is open again.
Protocol has a USD-denominated lower limit that forbids tiny debt positions. This prevents spamming and ensures no dust positions form which could get annoying for the users themselves and troublesome for liquidators to process.
In an emergency situation the Safety Council multisig can pause the minting of a Kresko Asset to prevent possible negative impact it would have.