Submit Loan Request
In order to submit a new loan request, a borrower can call the function submitBid()
on the TellerV2 contract.
The submitBid()
function consists of multiple parameters:
Principal: The amount of tokens to borrow
Lending token address: The contract address of the token to borrow
Pool id: The unique pool identifier, where the loan will be created. Each pool has different parameters which can be found here: Pool Settings.
Loan Duration: The number of seconds for which the loan will be active. Must be greater than the market payment cycle duration.
Interest Rate (APR): The interest rate requested for this loan
Receiver Address: The public address of the account that will receive the borrowed funds when this loan request is accepted by a lender
When a new loan request (a 'bid') is submitted by a borrower using the Teller V2 Protocol, a lender can then review and manually accept the bid. Once this occurs, the principal funds are moved from the lender's wallet to the borrower's wallet and the collateral is moved from the borrower's wallet to the collateral escrow contract until the finalization of the loan repayment.
An alternate submitBid
function exists, which additionally accepts an array of Collateral Data. The collateral are the assets that will be transferred from the borrower's wallet and then held in escrow until the finalization of the loan.
Submitted bids each have a unique id. The market parameter bidExpirationTime
is an expiration time that begins when a bid is submitted and after which point a bid can no longer be accepted by a lender. Borrowers who wish to cancel their bid request prior to the expiration time can so it by calling the function cancelBid()
.
Last updated