Skip to main content

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:#

NameTypeDescription
symbolstringThe 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_  ) external

Allows the admin to place some restrictions of what kind of eligibility contracts may be registered

Parameters:#

NameTypeDescription
eligibilityContractRestrictions_struct IHomogenizerFactory.EligibilityContractRestrictionsA struct that characterizes the restrictions for all eligibility contracts that will be registered

registerEligibilityContract#

  function registerEligibilityContract(    string symbol,    string name,    address eligibilityContractAddress  ) external

The 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:#

NameTypeDescription
symbolstringThe eligibility contract symbol that's used as a the first set of characters in the homogenizer contract ERC20 symbol
namestringThe eligibility contract name that's used as a the first set of characters in the homogenizer contract ERC20 symbol
eligibilityContractAddressaddressThe 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:#

NameTypeDescription
eligibilityContractSymbolstringThe registered symbol of the contract used to check a loan token's eligibility for homogenization
maxRateuint256The 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
minRateuint256The 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
buydownRatiouint256A multiplier that's used to adjust the cash required to account for differences in the underlying loans' coupon rates and servicing fees
useArmMarginboolA boolean value indicating that the adjustable-rate margin should be used in lieu of the original coupon rate
useCurrentRateboolA 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:#

NameTypeDescription
eligibilityContractSymbolstringThe registered symbol of the contract used to check a loan token's eligibility for homogenization
maxRateuint256The 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
minRateuint256The 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
buydownRatiouint256A multiplier that's used to adjust the cash required to account for differences in the underlying loans' coupon rates and servicing fees
useArmMarginboolA boolean value indicating that the adjustable-rate margin should be used in lieu of the original coupon rate
useCurrentRateboolA 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  ) external

A helper function which allows N loan tokens to be homogenized into up to N homogenizers in a single transaction

Parameters:#

NameTypeDescription
tokenIdsuint256[]An array of loan token IDs
homogenizerAddressesaddress[]A set of homogenizer addresses
allOrNoneboolIf true, reverts unless all the loan tokens specified can be homogenized

dehomogenizeBatch#

  function dehomogenizeBatch(    uint256[] tokenIds,    address[] homogenizerAddresses,    bool allOrNone  ) external

A helper function which allows N loan tokens to be dehomogenized from up to N homogenizers in a single transaction

Parameters:#

NameTypeDescription
tokenIdsuint256[]An array of loan token IDs
homogenizerAddressesaddress[]A set of homogenizer addresses
allOrNoneboolIf 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:#

NameTypeDescription
tokenIdsuint256[]An array of loan token IDs
eligibilityContractAddressaddress[]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:#

NameTypeDescription
tokenIdsuint256[]An array of loan token IDs
homogenizerAddressesaddress[]An array of homogenizer addresses

emitIsEligibleByEligibilityContract#

  function emitIsEligibleByEligibilityContract(    uint256[] tokenIds,    address[] eligibilityContractAddresses,    bool[] eligibilities  ) external

A keeper function which allows loan eligibility to be reindexed post-issuance (by eligibility contract)

Parameters:#

NameTypeDescription
tokenIdsuint256[]An array of loan token IDs
eligibilityContractAddressesaddress[]An array of eligibilty contract addresses
eligibilitiesbool[]An array of booleans that maps the updated eligibility between tokenIds and 'eligibilityContractAddresses`

emitIsEligibleByHomogenizer#

  function emitIsEligibleByHomogenizer(    uint256[] tokenIds,    address[] homogenizerAddresses,    bool[] eligibilities  ) external

A keeper function which allows loan eligibility to be reindexed post-issuance (by homogenizer)

Parameters:#

NameTypeDescription
tokenIdsuint256[]An array of loan token IDs
homogenizerAddressesaddress[]An array of homogenizer addresses
eligibilitiesbool[]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:#

NameTypeDescription
homogenizerFactoryAddressaddressThe address of the created homogenizer factory contract
digitizerAddressaddressThe 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:#

NameTypeDescription
homogenizerAddressaddressThe address of the new homogenizer
namestringThe ERC-20 name of the new homogenizer
symbolstringThe ERC-20 symbol of the new homogenizer
digitizerAddressaddressThe address of the underlying digitizer contract
eligibilityContractAddressaddressThe address of the contract used to check a loan token's eligibility for homogenization
maxRateaddressThe 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
minRateuint256The 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
buydownRatiouint256A multiplier that's used to adjust the cash required to account for differences in the underlying loans' coupon rates and servicing fees
useArmMarginuint256A boolean value indicating that the adjustable-rate margin should be used in lieu of the original coupon rate
useCurrentRateboolA 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:#

NameTypeDescription
symbolstringThe eligibility contract symbol that's used as a the first set of characters in the homogenizer contract ERC20 symbol
namestringThe eligibility contract name that's used as a the first set of characters in the homogenizer contract ERC20 symbol
eligibilityContractAddressaddressThe Ethereum address of the eligibility contract to be registered
creatoraddressThe 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:#

NameTypeDescription
tokenIdsuint256[]An array of loan token IDs
eligibilityContractAddressesaddress[]An array of eligibilty contract addresses
eligibilitiesbool[]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:#

NameTypeDescription
tokenIdsuint256[]An array of loan token IDs
homogenizerAddressesaddress[]An array of homogenizer addresses
eligibilitiesbool[]An array of booleans that maps the updated eligibility between tokenIds and 'homogenizerAddresses`