Submitting Loan Requests
Borrowers can browse the Teller Protocol Marketplace webapp or the MarketRegistry
contract to find a market that meets their needs (Auto, Home, Personal).
Once a market is chosen, they can submit their bid request to the TellerV2
contract with the function defined below.
Submitting a Loan Request
/**
* @notice Function for a borrower to create a bid for a loan.
* @param _lendingToken The lending token asset requested to be borrowed.
* @param _principal The principal amount of the loan bid.
* @param _duration The length of time, in seconds, the loan will remain active.
* @param _APY The proposed interest rate for the loan bid.
* @param _paymentCycle The recurrent length of time before which a payment is due.
* @param _metadataURI The URI for additional borrower loan information as part of loan bid.
*/
function submitBid(
address _lendingToken,
uint256 _marketplaceId,
uint256 _principal,
uint32 _duration,
uint16 _APY,
uint32 _paymentCycle,
bytes32 _metadataURI,
address _receiver
)
The _metadataURI
submitted by a borrower along with the proposed loan terms (_APY
, _principal
, _lendingToken
, etc), needs to correspond with the metadata required by the market. Depending on the market, this could be in the form of a verified credit report from the relative credit bureau, identity, or other relevant data.
Cancelling a Loan Request
/**
* @notice Function for users to cancel a bid.
* @param _bidId The id of the bid to be cancelled.
*/
function cancelBid(uint256 _bidId)
Borrowers who wish to cancel their bid request prior to it's expiration, can do it by submitting a transaction to the protocol with the _bidId
.
Last updated