Skip to main content

GoldfinchFactory

GoldfinchFactory

Deployment on Ethereum mainnet:

https://etherscan.io/address/0xd20508E1E971b80EE172c73517905bfFfcBD87f9

Contract that allows us to create other contracts, such as CreditLines and BorrowerContracts Note GoldfinchFactory is a legacy name. More properly this can be considered simply the GoldfinchFactory

config

contract GoldfinchConfig config

BORROWER_ROLE

bytes32 BORROWER_ROLE

Role to allow for pool creation

BorrowerCreated

event BorrowerCreated(address borrower, address owner)

PoolCreated

event PoolCreated(address pool, address borrower)

GoldfinchConfigUpdated

event GoldfinchConfigUpdated(address who, address configAddress)

CreditLineCreated

event CreditLineCreated(address creditLine)

initialize

function initialize(address owner, contract GoldfinchConfig _config) public

performUpgrade

function performUpgrade() external

_performUpgrade

function _performUpgrade() internal

createCreditLine

function createCreditLine() external returns (address)

Allows anyone to create a CreditLine contract instance

There is no value to calling this function directly. It is only meant to be called by a TranchedPool during it's creation process.

createBorrower

function createBorrower(address owner) external returns (address)

Allows anyone to create a Borrower contract instance

NameTypeDescription
owneraddressThe address that will own the new Borrower instance

createPool

function createPool(address _borrower, uint256 _juniorFeePercent, uint256 _limit, uint256 _interestApr, uint256 _paymentPeriodInDays, uint256 _termInDays, uint256 _lateFeeApr, uint256 _principalGracePeriodInDays, uint256 _fundableAt, uint256[] _allowedUIDTypes) external returns (address pool)

Allows anyone to create a new TranchedPool for a single borrower

NameTypeDescription
_borroweraddressThe borrower for whom the CreditLine will be created
_juniorFeePercentuint256The percent of senior interest allocated to junior investors, expressed as integer percents. eg. 20% is simply 20
_limituint256The maximum amount a borrower can drawdown from this CreditLine
_interestApruint256The interest amount, on an annualized basis (APR, so non-compounding), expressed as an integer. We assume 18 digits of precision. For example, to submit 15.34%, you would pass up 153400000000000000, and 5.34% would be 53400000000000000
_paymentPeriodInDaysuint256How many days in each payment period. ie. the frequency with which they need to make payments.
_termInDaysuint256Number of days in the credit term. It is used to set the `termEndTime` upon first drawdown. ie. The credit line should be fully paid off {_termIndays} days after the first drawdown.
_lateFeeApruint256The additional interest you will pay if you are late. For example, if this is 3%, and your normal rate is 15%, then you will pay 18% while you are late. Also expressed as an 18 decimal precision integer Requirements: You are the admin
_principalGracePeriodInDaysuint256
_fundableAtuint256
_allowedUIDTypesuint256[]

createMigratedPool

function createMigratedPool(address _borrower, uint256 _juniorFeePercent, uint256 _limit, uint256 _interestApr, uint256 _paymentPeriodInDays, uint256 _termInDays, uint256 _lateFeeApr, uint256 _principalGracePeriodInDays, uint256 _fundableAt, uint256[] _allowedUIDTypes) external returns (address pool)

_deployMinimal

function _deployMinimal(address _logic) internal returns (address proxy)

isBorrower

function isBorrower() public view returns (bool)

onlyAdminOrBorrower

modifier onlyAdminOrBorrower()

onlyCreditDesk

modifier onlyCreditDesk()