IHomogenizerFactory
Functions#
digitizerAddress#
function digitizerAddress( ) external returns (address)Returns the address of the underlying digitizer contract
eligibilityContractRegistry#
function eligibilityContractRegistry( string symbol ) external returns (string name, address contractAddress, uint256 homogenizerCount)Returns information pertaining to a registered eligibility contract
Parameters:#
| Name | Type | Description |
|---|---|---|
symbol | string | The eligibility contract symbol that's used as a the first set of characters in the homogenizer contract ERC20 symbol |
eligibilityContractRestrictions#
function eligibilityContractRestrictions( ) external returns (uint64 gasLimit, uint64 symbolMinimumCharacterCount, uint64 sampleSizeOfTestedLoans)Returns the current set of eligibility contract restrictions that are set by TRADER_ROLE (OR DEFAULT_ADMIN_ROLE) using setEligibilityContractRestrictions
homogenizerBaseSymbolCount#
function homogenizerBaseSymbolCount( ) external returns (uint256)Returns the number of homogenizers with the same base symbol e.g., CONV30-3000, where 3000 indicates a maximum rate of 3.000%
setEligibilityContractRestrictions#
function setEligibilityContractRestrictions( struct IHomogenizerFactory.EligibilityContractRestrictions eligibilityContractRestrictions_ ) externalAllows the admin to place some restrictions of what kind of eligibility contracts may be registered
Parameters:#
| Name | Type | Description |
|---|---|---|
eligibilityContractRestrictions_ | struct IHomogenizerFactory.EligibilityContractRestrictions | A struct that characterizes the restrictions for all eligibility contracts that will be registered |
registerEligibilityContract#
function registerEligibilityContract( string symbol, string name, address eligibilityContractAddress ) externalThe primary reason to create a registry was to emit an event when a contract is registered. The unique symbol is only a side benefit.
Parameters:#
| Name | Type | Description |
|---|---|---|
symbol | string | The eligibility contract symbol that's used as a the first set of characters in the homogenizer contract ERC20 symbol |
name | string | The eligibility contract name that's used as a the first set of characters in the homogenizer contract ERC20 symbol |
eligibilityContractAddress | address | The Ethereum address of the eligibility contract to be registered |
getUniqueHomogenizerAddress#
function getUniqueHomogenizerAddress( string eligibilityContractSymbol, uint256 maxRate, uint256 minRate, uint256 buydownRatio, bool useArmMargin, bool useCurrentRate ) external returns (address)Returns the homogenizer address, which is uniquely defined by six parameters
Parameters:#
| Name | Type | Description |
|---|---|---|
eligibilityContractSymbol | string | The registered symbol of the contract used to check a loan token's eligibility for homogenization |
maxRate | uint256 | The highest coupon rate that a loan can have to be eligible for homogenization; a loan's original coupon rate is used unless either useArmMargin or useCurrentRate are set to true |
minRate | uint256 | The highest coupon rate that a loan can have to be eligible for homogenization; a loan's original coupon rate is used unless either useArmMargin or useCurrentRate are set to true |
buydownRatio | uint256 | A multiplier that's used to adjust the cash required to account for differences in the underlying loans' coupon rates and servicing fees |
useArmMargin | bool | A boolean value indicating that the adjustable-rate margin should be used in lieu of the original coupon rate |
useCurrentRate | bool | A boolean value indicating that the current coupon rate should be used in lieu of the original coupon rate |
createHomogenizer#
function createHomogenizer( string eligibilityContractSymbol, uint256 maxRate, uint256 minRate, uint256 buydownRatio, bool useArmMargin, bool useCurrentRate ) external returns (address)Create a new homogenizer, which is uniquely defined by six parameters
Parameters:#
| Name | Type | Description |
|---|---|---|
eligibilityContractSymbol | string | The registered symbol of the contract used to check a loan token's eligibility for homogenization |
maxRate | uint256 | The highest coupon rate that a loan can have to be eligible for homogenization; a loan's original coupon rate is used unless either useArmMargin or useCurrentRate are set to true |
minRate | uint256 | The highest coupon rate that a loan can have to be eligible for homogenization; a loan's original coupon rate is used unless either useArmMargin or useCurrentRate are set to true |
buydownRatio | uint256 | A multiplier that's used to adjust the cash required to account for differences in the underlying loans' coupon rates and servicing fees |
useArmMargin | bool | A boolean value indicating that the adjustable-rate margin should be used in lieu of the original coupon rate |
useCurrentRate | bool | A boolean value indicating that the current coupon rate should be used in lieu of the original coupon rate |
homogenizeBatch#
function homogenizeBatch( uint256[] tokenIds, address[] homogenizerAddresses, bool allOrNone ) externalA helper function which allows N loan tokens to be homogenized into up to N homogenizers in a single transaction
Parameters:#
| Name | Type | Description |
|---|---|---|
tokenIds | uint256[] | An array of loan token IDs |
homogenizerAddresses | address[] | A set of homogenizer addresses |
allOrNone | bool | If true, reverts unless all the loan tokens specified can be homogenized |
dehomogenizeBatch#
function dehomogenizeBatch( uint256[] tokenIds, address[] homogenizerAddresses, bool allOrNone ) externalA helper function which allows N loan tokens to be dehomogenized from up to N homogenizers in a single transaction
Parameters:#
| Name | Type | Description |
|---|---|---|
tokenIds | uint256[] | An array of loan token IDs |
homogenizerAddresses | address[] | A set of homogenizer addresses |
allOrNone | bool | If true, reverts unless all the loan tokens specified can be dehomogenized |
isEligibleByEligibilityContract#
function isEligibleByEligibilityContract( uint256[] tokenIds, address[] eligibilityContractAddress ) external returns (bool[])A keeper function which allows _isEligibleAndValid to be called for multiple loan tokens in a single call
Parameters:#
| Name | Type | Description |
|---|---|---|
tokenIds | uint256[] | An array of loan token IDs |
eligibilityContractAddress | address[] | An array of eligibility contract addresses |
isEligibleByHomogenizer#
function isEligibleByHomogenizer( uint256[] tokenIds, address[] homogenizerAddresses ) external returns (bool[])A keeper function which allows isEligible to be called for multiple loan tokens in a single call
Parameters:#
| Name | Type | Description |
|---|---|---|
tokenIds | uint256[] | An array of loan token IDs |
homogenizerAddresses | address[] | An array of homogenizer addresses |
emitIsEligibleByEligibilityContract#
function emitIsEligibleByEligibilityContract( uint256[] tokenIds, address[] eligibilityContractAddresses, bool[] eligibilities ) externalA keeper function which allows loan eligibility to be reindexed post-issuance (by eligibility contract)
Parameters:#
| Name | Type | Description |
|---|---|---|
tokenIds | uint256[] | An array of loan token IDs |
eligibilityContractAddresses | address[] | An array of eligibilty contract addresses |
eligibilities | bool[] | An array of booleans that maps the updated eligibility between tokenIds and 'eligibilityContractAddresses` |
emitIsEligibleByHomogenizer#
function emitIsEligibleByHomogenizer( uint256[] tokenIds, address[] homogenizerAddresses, bool[] eligibilities ) externalA keeper function which allows loan eligibility to be reindexed post-issuance (by homogenizer)
Parameters:#
| Name | Type | Description |
|---|---|---|
tokenIds | uint256[] | An array of loan token IDs |
homogenizerAddresses | address[] | An array of homogenizer addresses |
eligibilities | bool[] | An array of booleans that maps the updated eligibility between tokenIds and 'homogenizerAddresses` |
Events#
NewFactory#
event NewFactory( address homogenizerFactoryAddress, address digitizerAddress )Event emitted once when the HomogenizerFactoryClone contract is created
Parameters:#
| Name | Type | Description |
|---|---|---|
homogenizerFactoryAddress | address | The address of the created homogenizer factory contract |
digitizerAddress | address | The address of the underlying digitizer contract |
NewHomogenizer#
event NewHomogenizer( address homogenizerAddress, string name, string symbol, address digitizerAddress, address eligibilityContractAddress, address maxRate, uint256 minRate, uint256 buydownRatio, uint256 useArmMargin, bool useCurrentRate )Event emitted once when a new homogenizer contract is created
Parameters:#
| Name | Type | Description |
|---|---|---|
homogenizerAddress | address | The address of the new homogenizer |
name | string | The ERC-20 name of the new homogenizer |
symbol | string | The ERC-20 symbol of the new homogenizer |
digitizerAddress | address | The address of the underlying digitizer contract |
eligibilityContractAddress | address | The address of the contract used to check a loan token's eligibility for homogenization |
maxRate | address | The highest coupon rate that a loan can have to be eligible for homogenization; a loan's original coupon rate is used unless either useArmMargin or useCurrentRate are set to true |
minRate | uint256 | The highest coupon rate that a loan can have to be eligible for homogenization; a loan's original coupon rate is used unless either useArmMargin or useCurrentRate are set to true |
buydownRatio | uint256 | A multiplier that's used to adjust the cash required to account for differences in the underlying loans' coupon rates and servicing fees |
useArmMargin | uint256 | A boolean value indicating that the adjustable-rate margin should be used in lieu of the original coupon rate |
useCurrentRate | bool | A boolean value indicating that the current coupon rate should be used in lieu of the original coupon rate |
NewEligibilityContract#
event NewEligibilityContract( string symbol, string name, address eligibilityContractAddress, address creator )Event emitted once when a new eligibility contract is registered
Parameters:#
| Name | Type | Description |
|---|---|---|
symbol | string | The eligibility contract symbol that's used as a the first set of characters in the homogenizer contract ERC20 symbol |
name | string | The eligibility contract name that's used as a the first set of characters in the homogenizer contract ERC20 symbol |
eligibilityContractAddress | address | The Ethereum address of the eligibility contract to be registered |
creator | address | The wallet that registered the eligibility contract |
IsEligibleByEligibilityContract#
event IsEligibleByEligibilityContract( uint256[] tokenIds, address[] eligibilityContractAddresses, bool[] eligibilities )Event emitted when admin calls emitIsEligibleByEligibilityContract to update eligibility in Ethereum logs
Parameters:#
| Name | Type | Description |
|---|---|---|
tokenIds | uint256[] | An array of loan token IDs |
eligibilityContractAddresses | address[] | An array of eligibilty contract addresses |
eligibilities | bool[] | An array of booleans that maps the updated eligibility between tokenIds and 'eligibilityContractAddresses` |
IsEligibleByHomogenizer#
event IsEligibleByHomogenizer( uint256[] tokenIds, address[] homogenizerAddresses, bool[] eligibilities )Event emitted when admin calls emitIsEligibleByHomogenizer to update eligibility in Ethereum logs
Parameters:#
| Name | Type | Description |
|---|---|---|
tokenIds | uint256[] | An array of loan token IDs |
homogenizerAddresses | address[] | An array of homogenizer addresses |
eligibilities | bool[] | An array of booleans that maps the updated eligibility between tokenIds and 'homogenizerAddresses` |