Credit Manager
Last updated
Last updated
The CreditManager contract is another crucial component of the MintDeals platform, managing user credit scores, borrowing capacities, and interactions with the CreditFacility contract for lending and borrowing operations.
Initializes credit information for a new user.
Sets the user's initial credit score to the baseline (500).
Allows users to supply assets to the credit facility.
Transfers tokens from the user to the contract and then to the CreditFacility.
Enables admins to withdraw assets from the credit facility.
Redeems assets from CreditFacility and transfers them to the admin.
Allows users to borrow assets based on their credit score and borrowing capacity.
Ensures the borrowed amount doesn't exceed user limits or global credit limits.
Enables users to repay borrowed assets.
Calculates and deducts interest fees from the repayment amount.
Allows admins to make repayments using accumulated repayment fees.
Allows admins to adjust a user's credit score and boost factor.
Can increase or decrease the score based on the increase
parameter.
Updates the global maximum credit limit based on the valuation of non-stablecoin assets.
Allows admins to withdraw accumulated repayment fees.
Sets the interest delta in basis points.
Sets or updates the maximum global credit limit.
Sets or updates the borrowing multiplier used to determine max borrowable amount.
Sets the score steps used for increasing/decreasing credit scores.
Sets the threshold of blocks passed, used in credit scoring.
Retrieves a user's credit score, credit balance used, and borrowing capacity.
Credit Score: A numeric representation of a user's creditworthiness, ranging from 250 - 500 to 850.
Borrowing Capacity: The maximum amount a user can borrow, calculated based on their credit score and boost factor.
Global Credit Limit: The maximum total credit that can be issued across all users.
Interest Delta: An additional interest rate applied on top of the base rate from the CreditFacility.
Boost Factor: A multiplier that can increase a user's borrowing capacity.
This contract is central to MintDeals' credit system, managing user credit scores, facilitating borrowing and repayment, and ensuring the overall health of the credit facility. It interacts closely with the CreditFacility contract to manage asset supply, borrowing, and repayment operations.