BulletLoans
BulletLoans
is in the process of being sunset.
New TrueFi Capital Markets portfolios deployed after June 2022 use FixedInterestOnlyLoan
BulletLoans
is an ERC-721 contract. Each of the tokens represents a single loan.
All loan parameters can be read from LoanMetadata struct. BulletLoans
contract enables loan creation, facilitates loan repayment and allows managing the loan's state and parameters.
Methods
createLoan( IERC20 _underlyingToken, uint256 _principal, uint256 _totalDebt, uint256 _duration, address _recipient )
createLoan( IERC20 _underlyingToken, uint256 _principal, uint256 _totalDebt, uint256 _duration, address _recipient )
Manager can create loan by passing the principal to be lent, the total debt to repaid, duration of the loan, and the address of the recipient. Total debt to be repaid cannot be less than principal amount.
repay(uint256 instrumentId, uint256 amount)
repay(uint256 instrumentId, uint256 amount)
Existing loan can be repaid partially or in full. If loan is paid in full, this function will mark the loan’s status to ‘Fully Repaid’. Note that a loan cannot be overpaid.
markLoanAsDefaulted(uint256 instrumentId)
markLoanAsDefaulted(uint256 instrumentId)
Only the portfolio’s manager can mark a loan as defaulted.
markLoanAsResolved(uint256 instrumentId)
markLoanAsResolved(uint256 instrumentId)
Only the portfolio’s manager can mark a loan as resolved. Intended to be used for situations after partial repayment where a loan workout has been agreed to.
updateLoanParameters( uint256 instrumentId, uint256 newTotalDebt, uint256 newRepaymentDate )
updateLoanParameters( uint256 instrumentId, uint256 newTotalDebt, uint256 newRepaymentDate )
Manager can modify loan terms, changing maturity date or total debt to be repaid.
updateLoanParameters( uint256 instrumentId, uint256 newTotalDebt, uint256 newRepaymentDate, bytes memory borrowerSignature )
updateLoanParameters( uint256 instrumentId, uint256 newTotalDebt, uint256 newRepaymentDate, bytes memory borrowerSignature )
Manager can modify loan terms, changing maturity date or total debt to be repaid. In order to change the maturity date to an earlier date or increase the repayment value, the borrower must consent and provide a signature.
View methods
principal(uint256 instrumentId)
principal(uint256 instrumentId)
Returns principal amount of loan.
underlyingToken(uint256 instrumentId)
underlyingToken(uint256 instrumentId)
Returns underlying token (e.g. USDC, USDT) of the loan.
recipient(uint256 instrumentId)
recipient(uint256 instrumentId)
Returns borrower’s address.
endDate(uint256 instrumentId)
endDate(uint256 instrumentId)
Returns maturity date of the loan.
unpaidDebt(uint256 instrumentId)
unpaidDebt(uint256 instrumentId)
Returns remaining amount to be paid, i.e. total debt less repaid amount.
getStatus(uint256 instrumentId)
getStatus(uint256 instrumentId)
Returns status of loan (Issued
, FullyRepaid
, Defaulted
, Resolved
).
Last updated