GeneralManager
Inherits: Initializable, ERC165Upgradeable, AccessControlUpgradeable, UUPSUpgradeable, IGeneralManager, ReentrancyGuard
Title: GeneralManager
Author: SocksNFlops
The GeneralManager contract manages the origination of mortgage positions using origination pools
State Variables
GeneralManagerStorageLocation
The storage location of the GeneralManager contract
keccak256(abi.encode(uint256(keccak256("buttonwood.storage.GeneralManager")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant GeneralManagerStorageLocation =
0xa0fde9a47799f0a64e9adfc0ccfed9fa7d54162399ca936d199d08c2d005ad00
Functions
_getGeneralManagerStorage
Gets the storage location of the GeneralManager contract
function _getGeneralManagerStorage() private pure returns (GeneralManagerStorage storage $);
Returns
| Name | Type | Description |
|---|---|---|
$ | GeneralManagerStorage | The storage location of the GeneralManager contract |
__GeneralManager_init
Initializes the GeneralManager contract and calls parent initializers
function __GeneralManager_init(
address usdx_,
address consol_,
uint16 penaltyRate_,
uint16 refinanceRate_,
uint16 conversionPremiumRate_,
uint16 priceSpread_,
address insuranceFund_,
address interestRateOracle_
) internal onlyInitializing;
Parameters
| Name | Type | Description |
|---|---|---|
usdx_ | address | The address of the USDX token |
consol_ | address | The address of the Consol token |
penaltyRate_ | uint16 | The penalty rate |
refinanceRate_ | uint16 | The refinancing rate |
conversionPremiumRate_ | uint16 | The conversion premium rate |
priceSpread_ | uint16 | The price spread |
insuranceFund_ | address | The address of the insurance fund |
interestRateOracle_ | address | The address of the interest rate oracle |
__GeneralManager_init_unchained
Initializes only the GeneralManager contract
function __GeneralManager_init_unchained(
address usdx_,
address consol_,
uint16 penaltyRate_,
uint16 refinanceRate_,
uint16 conversionPremiumRate_,
uint16 priceSpread_,
address insuranceFund_,
address interestRateOracle_
) internal onlyInitializing;
Parameters
| Name | Type | Description |
|---|---|---|
usdx_ | address | The address of the USDX token |
consol_ | address | The address of the Consol token |
penaltyRate_ | uint16 | The penalty rate |
refinanceRate_ | uint16 | The refinancing rate |
conversionPremiumRate_ | uint16 | The conversion premium rate |
priceSpread_ | uint16 | The price spread |
insuranceFund_ | address | The address of the insurance fund |
interestRateOracle_ | address | The address of the interest rate oracle |
initialize
Initializes the GeneralManager contract
function initialize(
address usdx_,
address consol_,
uint16 penaltyRate_,
uint16 refinanceRate_,
uint16 conversionPremiumRate_,
uint16 priceSpread_,
address insuranceFund_,
address interestRateOracle_
) external initializer;
Parameters
| Name | Type | Description |
|---|---|---|
usdx_ | address | The address of the USDX token |
consol_ | address | The address of the Consol token |
penaltyRate_ | uint16 | The penalty rate |
refinanceRate_ | uint16 | The refinancing rate |
conversionPremiumRate_ | uint16 | The conversion premium rate |
priceSpread_ | uint16 | The price spread |
insuranceFund_ | address | The address of the insurance fund |
interestRateOracle_ | address | The address of the interest rate oracle |
constructor
Note: oz-upgrades-unsafe-allow: constructor
constructor() ;
_authorizeUpgrade
Function that should revert when msg.sender is not authorized to upgrade the contract. Called by
{upgradeToAndCall}.
Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
function _authorizeUpgrade(address) internal onlyOwner {}
function _authorizeUpgrade(address newImplementation) internal virtual override onlyRole(Roles.DEFAULT_ADMIN_ROLE);
whenNotPaused
Modifier to check if the contract is paused
modifier whenNotPaused() ;
onlyOrderPool
Modifier to check if the caller is the order pool
modifier onlyOrderPool() ;
onlyRegisteredOriginationPool
Modifier to check if the caller is an origination pool
modifier onlyRegisteredOriginationPool() ;
_addConversionQueues
Appends the conversionQueueList to the recorded conversion queues for a mortgage position
function _addConversionQueues(uint256 tokenId, address[] memory conversionQueueList) internal;
Parameters
| Name | Type | Description |
|---|---|---|
tokenId | uint256 | The tokenId of the mortgage position |
conversionQueueList | address[] | The list of conversion queues to update |
_calculateRequiredGasFee
Calculates the required gas fee for the caller
function _calculateRequiredGasFee(bool usingOrderPool, address[] memory conversionQueueList)
internal
view
returns (uint256 requiredGasFee);
Parameters
| Name | Type | Description |
|---|---|---|
usingOrderPool | bool | Whether the caller is using the order pool |
conversionQueueList | address[] | The list of conversion queues to calculate the required gas fee for |
Returns
| Name | Type | Description |
|---|---|---|
requiredGasFee | uint256 | The required gas fee |
_checkSufficientGas
Checks if the caller sent enough value to cover the required gas fee
function _checkSufficientGas(uint256 requiredGasFee) internal view;
Parameters
| Name | Type | Description |
|---|---|---|
requiredGasFee | uint256 | The required gas fee |
_refundSurplusGas
Refunds the surplus gas to the caller
function _refundSurplusGas(uint256 requiredGasFee) internal;
Parameters
| Name | Type | Description |
|---|---|---|
requiredGasFee | uint256 | The required gas fee |
_validateMortgageOwner
Validates that the caller is the owner of the mortgage
function _validateMortgageOwner(uint256 tokenId) internal view;
Parameters
| Name | Type | Description |
|---|---|---|
tokenId | uint256 | The ID of the mortgage position |
_validateTotalPeriods
Validates that the total periods is supported for the collateral
function _validateTotalPeriods(address collateral, uint8 totalPeriods) internal view;
Parameters
| Name | Type | Description |
|---|---|---|
collateral | address | The collateral address |
totalPeriods | uint8 | The total periods |
onlyMortgageOwner
Modifier to check if the caller is the owner of the mortgage
modifier onlyMortgageOwner(uint256 tokenId) ;
Parameters
| Name | Type | Description |
|---|---|---|
tokenId | uint256 | The ID of the mortgage position |
_validateBorrowCaps
Validates that the amount being borrowed exceeds the minimum cap and does not exceed the maximum cap
function _validateBorrowCaps(MortgageParams memory mortgageParams) internal view;
Parameters
| Name | Type | Description |
|---|---|---|
mortgageParams | MortgageParams | The mortgage parameters |
_validateOriginationPools
Validates that the origination pools are supported
function _validateOriginationPools(address[] memory originationPools) internal view;
Parameters
| Name | Type | Description |
|---|---|---|
originationPools | address[] | The origination pools |
_validateConversionQueues
Validates that the conversion queues have the CONVERSION_ROLE role
function _validateConversionQueues(address[] memory conversionQueueList) internal view;
Parameters
| Name | Type | Description |
|---|---|---|
conversionQueueList | address[] | The list of conversion queues to validate |
_replaceNFTRole
Revokes the NFT role of an address and grants it to a new address
function _replaceNFTRole(address oldRoleHolder, address newRoleHolder) internal;
Parameters
| Name | Type | Description |
|---|---|---|
oldRoleHolder | address | The address to remove the NFT role from |
newRoleHolder | address | The address to grant the NFT role to |
supportsInterface
Returns true if this contract implements the interface defined by
interfaceId. See the corresponding
https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
to learn more about how these ids are created.
This function call must use less than 30 000 gas.
function supportsInterface(bytes4 interfaceId)
public
view
override(AccessControlUpgradeable, ERC165Upgradeable)
returns (bool);
usdx
Returns the USDX token address
function usdx() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | The USDX token address |
consol
Returns the Consol token address
function consol() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | The Consol token address |
setPenaltyRate
Sets the penalty rate for a mortgage (in basis points)
function setPenaltyRate(uint16 penaltyRate_) external onlyRole(Roles.DEFAULT_ADMIN_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
penaltyRate_ | uint16 | The penalty rate |
penaltyRate
Returns the penalty rate for a mortgage (in basis points)
Takes in a mortgage position to allow upgraded implementations to take into account the position's details.
function penaltyRate(MortgagePosition memory) external view returns (uint16);
Parameters
| Name | Type | Description |
|---|---|---|
<none> | MortgagePosition |
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint16 | The penalty rate |
setRefinanceRate
Sets the refinance rate for a mortgage (in basis points)
function setRefinanceRate(uint16 refinanceRate_) external onlyRole(Roles.DEFAULT_ADMIN_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
refinanceRate_ | uint16 | The refinance rate |
refinanceRate
Returns the refinance rate (in basis points).
Takes in a mortgage position to allow upgraded implementations to take into account the position's details.
function refinanceRate(MortgagePosition memory) external view returns (uint16);
Parameters
| Name | Type | Description |
|---|---|---|
<none> | MortgagePosition |
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint16 | The refinance rate |
setInsuranceFund
Sets the insurance fund address
function setInsuranceFund(address insuranceFund_) external onlyRole(Roles.DEFAULT_ADMIN_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
insuranceFund_ | address | The insurance fund address |
insuranceFund
Returns the insurance fund address
function insuranceFund() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | The insurance fund address |
setInterestRateOracle
Sets the interest rate oracle address
function setInterestRateOracle(address interestRateOracle_) external onlyRole(Roles.DEFAULT_ADMIN_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
interestRateOracle_ | address | The interest rate oracle address |
interestRateOracle
Returns the interest rate oracle address
function interestRateOracle() external view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | The interest rate oracle address |
interestRate
Returns the interest rate (in basis points)
function interestRate(address collateral, uint8 totalPeriods, bool hasPaymentPlan) public view returns (uint16);
Parameters
| Name | Type | Description |
|---|---|---|
collateral | address | The address of the collateral |
totalPeriods | uint8 | The total number of periods for the mortgage |
hasPaymentPlan | bool | Whether the mortgage has a payment plan |
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint16 | The interest rate |
conversionPremiumRate
Returns the conversion premium rate (in basis points)
function conversionPremiumRate(address, uint8, bool) public view returns (uint16);
Parameters
| Name | Type | Description |
|---|---|---|
<none> | address | |
<none> | uint8 | |
<none> | bool |
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint16 | The conversion premium rate |
setConversionPremiumRate
Sets the conversion premium rate (in basis points)
function setConversionPremiumRate(uint16 conversionPremiumRate_) external onlyRole(Roles.DEFAULT_ADMIN_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
conversionPremiumRate_ | uint16 | The conversion premium rate |
setOriginationPoolScheduler
Sets the origination pool scheduler address
function setOriginationPoolScheduler(address originationPoolScheduler_) external onlyRole(Roles.DEFAULT_ADMIN_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
originationPoolScheduler_ | address | The origination pool scheduler address |
originationPoolScheduler
Returns the origination pool scheduler address
function originationPoolScheduler() public view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | The origination pool scheduler address |
setLoanManager
Sets the loan manager address
function setLoanManager(address loanManager_) external onlyRole(Roles.DEFAULT_ADMIN_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
loanManager_ | address | The loan manager address |
loanManager
Returns the loan manager address
function loanManager() public view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | The loan manager address |
mortgageNFT
Returns the mortgage NFT address
function mortgageNFT() public view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | The mortgage NFT address |
setOrderPool
Sets the order pool address
function setOrderPool(address orderPool_) external onlyRole(Roles.DEFAULT_ADMIN_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
orderPool_ | address | The order pool address |
orderPool
Returns the order pool address
function orderPool() public view returns (address);
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | The order pool address |
updateSupportedMortgagePeriodTerms
Updates the supported mortgage period terms for a collateral.
function updateSupportedMortgagePeriodTerms(address collateral, uint8 mortgagePeriods, bool isSupported)
external
onlyRole(Roles.DEFAULT_ADMIN_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
collateral | address | The address of the collateral |
mortgagePeriods | uint8 | |
isSupported | bool | Whether the mortgage period term is supported |
isSupportedMortgagePeriodTerms
Returns whether a mortgage period term is supported
function isSupportedMortgagePeriodTerms(address collateral, uint8 mortgagePeriods) external view returns (bool);
Parameters
| Name | Type | Description |
|---|---|---|
collateral | address | The address of the collateral |
mortgagePeriods | uint8 | The mortgage period |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | Whether the mortgage period term is supported |
setPriceOracle
Sets the address of the price oracle
function setPriceOracle(address collateral, address priceOracle) external onlyRole(Roles.DEFAULT_ADMIN_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
collateral | address | The address of the collateral |
priceOracle | address | The address of the price oracle |
priceOracles
The address of the price oracle for the collateral
function priceOracles(address collateral) external view returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
collateral | address | The address of the collateral |
Returns
| Name | Type | Description |
|---|---|---|
<none> | address | The address of the price oracle |
setMinimumCap
Sets the minimum request size of a mortgage for a given collateral. Requests cannot borrow less than this amount.
function setMinimumCap(address collateral, uint256 minimumCap_) external onlyRole(Roles.DEFAULT_ADMIN_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
collateral | address | The address of the collateral |
minimumCap_ | uint256 | The minimum cap |
minimumCap
Returns the minimum request size of a mortgage for a given collateral. Requests cannot borrow less than this amount.
function minimumCap(address collateral) external view returns (uint256);
Parameters
| Name | Type | Description |
|---|---|---|
collateral | address | The address of the collateral |
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | The minimum cap |
setMaximumCap
Sets the maximum request size of a mortgage for a given collateral. Requests cannot borrow more than this amount.
function setMaximumCap(address collateral, uint256 maximumCap_) external onlyRole(Roles.DEFAULT_ADMIN_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
collateral | address | The address of the collateral |
maximumCap_ | uint256 | The maximum cap |
maximumCap
Returns the maximum request size of a mortgage for a given collateral. Requests cannot borrow more than this amount.
function maximumCap(address collateral) external view returns (uint256);
Parameters
| Name | Type | Description |
|---|---|---|
collateral | address | The address of the collateral |
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | The maximum cap |
setPriceSpread
Sets the price spread to incentivize the fulfiller to fill orders
function setPriceSpread(uint16 priceSpread_) external onlyRole(Roles.DEFAULT_ADMIN_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
priceSpread_ | uint16 | The price spread |
priceSpread
The price spread to incentivize the fulfiller to fill orders
function priceSpread() external view returns (uint16);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint16 | priceSpread The price spread |
conversionQueues
Returns the conversion queues a given mortgage position is registered with
function conversionQueues(uint256 tokenId) public view returns (address[] memory);
Parameters
| Name | Type | Description |
|---|---|---|
tokenId | uint256 | The tokenId of the mortgage position |
Returns
| Name | Type | Description |
|---|---|---|
<none> | address[] | The conversion queues |
_calculateCost
Calculates the cost of the collateral
function _calculateCost(address collateral, uint256 collateralAmount)
internal
view
returns (uint256 cost, uint8 collateralDecimals);
Parameters
| Name | Type | Description |
|---|---|---|
collateral | address | The address of the collateral token |
collateralAmount | uint256 | The amount of collateral to calculate the cost for |
Returns
| Name | Type | Description |
|---|---|---|
cost | uint256 | The cost of the collateral |
collateralDecimals | uint8 | The decimals of the collateral token |
_prepareOrder
Prepares the mortgageParams and orderAmounts for an order
function _prepareOrder(
uint256 tokenId,
BaseRequest calldata baseRequest,
address collateral,
address subConsol,
bool hasPaymentPlan
)
internal
view
returns (MortgageParams memory mortgageParams, OrderAmounts memory orderAmounts, uint256[] memory borrowAmounts);
Parameters
| Name | Type | Description |
|---|---|---|
tokenId | uint256 | The ID of the mortgage NFT |
baseRequest | BaseRequest | The base request for the mortgage |
collateral | address | The address of the collateral token |
subConsol | address | The address of the subConsol contract |
hasPaymentPlan | bool | Whether the mortgage has a payment plan |
Returns
| Name | Type | Description |
|---|---|---|
mortgageParams | MortgageParams | The mortgage parameters |
orderAmounts | OrderAmounts | The order amounts |
borrowAmounts | uint256[] | The amounts being borrowed from each origination pool |
_sendOrder
Sends completed order to the order pool
function _sendOrder(
uint256[] memory borrowAmounts,
MortgageParams memory mortgageParams,
OrderAmounts memory orderAmounts,
BaseRequest calldata baseRequest,
address[] memory conversionQueueList,
uint256 requiredGasFee,
bool expansion
) internal;
Parameters
| Name | Type | Description |
|---|---|---|
borrowAmounts | uint256[] | The amounts being borrowed from each origination pool |
mortgageParams | MortgageParams | The mortgage parameters |
orderAmounts | OrderAmounts | The order amounts |
baseRequest | BaseRequest | The base request for the mortgage |
conversionQueueList | address[] | The addresses of the conversion queues to use |
requiredGasFee | uint256 | The required gas fee |
expansion | bool | Whether the request is a new mortgage creation or a balance sheet expansion |
_sendRequest
Sends a request to the order pool
function _sendRequest(
BaseRequest calldata baseRequest,
uint256 tokenId,
address collateral,
address subConsol,
address[] memory conversionQueueList,
uint256 requiredGasFee,
bool hasPaymentPlan,
bool expansion
) internal;
Parameters
| Name | Type | Description |
|---|---|---|
baseRequest | BaseRequest | The base request for the mortgage |
tokenId | uint256 | The ID of the mortgage NFT |
collateral | address | The address of the collateral token |
subConsol | address | The address of the subConsol contract |
conversionQueueList | address[] | The addresses of the conversion queues to use |
requiredGasFee | uint256 | The required gas fee |
hasPaymentPlan | bool | Whether the mortgage has a payment plan |
expansion | bool | Whether the request is a new mortgage creation or a balance sheet expansion |
requestMortgageCreation
Requests a new mortgage creation
function requestMortgageCreation(CreationRequest calldata creationRequest)
external
payable
whenNotPaused
nonReentrant
returns (uint256 tokenId);
Parameters
| Name | Type | Description |
|---|---|---|
creationRequest | CreationRequest | The parameters of the mortgage creation being requested |
Returns
| Name | Type | Description |
|---|---|---|
tokenId | uint256 | The tokenId of the mortgage NFT that was created |
requestBalanceSheetExpansion
Requests to expand the balance sheet of a mortgage position by adding additional principal and collateral to the mortgage position. Only callable by whitelisted addresses.
function requestBalanceSheetExpansion(ExpansionRequest calldata expansionRequest)
external
payable
onlyRole(Roles.EXPANSION_ROLE)
whenNotPaused
nonReentrant
onlyMortgageOwner(expansionRequest.tokenId);
Parameters
| Name | Type | Description |
|---|---|---|
expansionRequest | ExpansionRequest | The parameters of the balance sheet expansion being requested |
burnMortgageNFT
Burns a mortgage NFT
function burnMortgageNFT(uint256 tokenId) external onlyRole(Roles.NFT_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
tokenId | uint256 | The tokenId of the mortgage NFT to burn |
originate
Originates a mortgage position. Only callable by the OrderPool.
function originate(OriginationParameters calldata originationParameters)
external
payable
onlyOrderPool
whenNotPaused
nonReentrant;
Parameters
| Name | Type | Description |
|---|---|---|
originationParameters | OriginationParameters | The parameters for originating a mortgage creation or balance sheet expansion |
originationPoolDeployCallback
Called to msg.sender after transferring to the recipient from IOriginationPool#deploy.
amount = amountBorrowed
returnAmount = amountBorrowed + originationFee
function originationPoolDeployCallback(uint256, uint256 returnAmount, bytes calldata data)
external
onlyRegisteredOriginationPool;
Parameters
| Name | Type | Description |
|---|---|---|
<none> | uint256 | |
returnAmount | uint256 | The amount of consol to return to the origination pool |
data | bytes | Any data passed through by the caller via the IOriginationPool#deploy call |
_enqueueMortgage
Enqueues a mortgage position into a conversion queue
function _enqueueMortgage(uint256 tokenId, address[] memory conversionQueueList, uint256[] memory hintPrevIds)
internal;
Parameters
| Name | Type | Description |
|---|---|---|
tokenId | uint256 | The ID of the mortgage NFT |
conversionQueueList | address[] | The list of conversion queues |
hintPrevIds | uint256[] | The IDs of the previous mortgage position in the respective conversion queue |
enqueueMortgage
Enqueues a mortgage position into a conversion queue
function enqueueMortgage(uint256 tokenId, address[] memory conversionQueueList, uint256[] memory hintPrevIds)
external
payable
whenNotPaused
nonReentrant
onlyMortgageOwner(tokenId);
Parameters
| Name | Type | Description |
|---|---|---|
tokenId | uint256 | The tokenId of the mortgage position |
conversionQueueList | address[] | The list of conversion queues to use |
hintPrevIds | uint256[] | The hint for the previous mortgage position in the conversion queue |
convert
Converts a mortgage position
function convert(uint256 tokenId, uint256 amount, uint256 collateralAmount, address receiver)
external
onlyRole(Roles.CONVERSION_ROLE)
whenNotPaused
nonReentrant;
Parameters
| Name | Type | Description |
|---|---|---|
tokenId | uint256 | The tokenId of the mortgage position |
amount | uint256 | The amount of the principal being coverted |
collateralAmount | uint256 | The amount of the collateral being withdrawn during the conversion |
receiver | address | The address receiving the converted collateral |
setPaused
Pause or unpause the contract
function setPaused(bool pause) external override onlyRole(Roles.PAUSE_ROLE);
Parameters
| Name | Type | Description |
|---|---|---|
pause | bool | The new paused state |
paused
Get the paused state of the contract
function paused() public view override returns (bool);
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | The paused state of the contract |
Structs
GeneralManagerStorage
Storage structure for GeneralManager contract
Uses ERC-7201 namespaced storage pattern
Note: storage-location: erc7201:buttonwood.storage.GeneralManager
struct GeneralManagerStorage {
address _usdx;
address _consol;
uint16 _penaltyRate;
uint16 _refinanceRate;
uint16 _conversionPremiumRate;
uint16 _priceSpread;
address _insuranceFund;
address _interestRateOracle;
address _originationPoolScheduler;
address _loanManager;
address _orderPool;
mapping(address => mapping(uint8 => bool)) _supportedMortgagePeriodTerms;
mapping(address => address) _priceOracles;
mapping(address => uint256) _minimumCaps;
mapping(address => uint256) _maximumCaps;
mapping(uint256 => address[]) _conversionQueues;
mapping(uint256 => mapping(address => bool)) _mortgageEnqueued;
bool _paused;
}
Properties
| Name | Type | Description |
|---|---|---|
_usdx | address | Address of the USDX token contract |
_consol | address | Address of the Consol token contract |
_penaltyRate | uint16 | Late payment penalty rate in basis points (BPS) |
_refinanceRate | uint16 | Refinancing fee rate in basis points (BPS) |
_conversionPremiumRate | uint16 | Conversion premium rate in basis points (BPS) |
_priceSpread | uint16 | Price spread in basis points (BPS) |
_insuranceFund | address | Address of the insurance fund |
_interestRateOracle | address | Address of the interest rate oracle contract |
_originationPoolScheduler | address | Address of the origination pool scheduler contract |
_loanManager | address | Address of the loan manager contract |
_orderPool | address | Address of the order pool contract |
_supportedMortgagePeriodTerms | mapping(address => mapping(uint8 => bool)) | Mapping of collateral address to period term to supported status |
_priceOracles | mapping(address => address) | Mapping of collateral address to price oracle address |
_minimumCaps | mapping(address => uint256) | Mapping of collateral address to minimum cap |
_maximumCaps | mapping(address => uint256) | Mapping of collateral address to maximum cap |
_conversionQueues | mapping(uint256 => address[]) | Mapping of collateral address to conversion queues |
_mortgageEnqueued | mapping(uint256 => mapping(address => bool)) | Mapping of tokenId to conversion queue to enqueued status |
_paused | bool | Whether the contract is paused |