Teller V2 Advanced
  • Introduction
  • Protocol
    • Market Owners
      • Market Creation
      • Verify Lenders & Borrowers
      • Market Dashboard
    • Lenders
      • Getting Loan Information
      • Accepting a Loan
      • Loan Offers
      • Lender Profile
    • Borrowers
      • Submitting Loan Requests
      • Repaying Loans
        • Repayment using the dApp
      • Getting Loan Information
  • Protocol Architecture
    • 🏬Protocol Use-Cases
  • Resources
    • Deployed Contracts
    • Social Links
    • FAQ
  • Legal
    • Terms of Use
    • Privacy Policy
    • Cookies & Data Policies
Powered by GitBook
On this page
  • Get total amount owed
  • Get minimum amount due
  • Get next payment due date
  • Check payment status
  1. Protocol
  2. Borrowers

Getting Loan Information

PreviousRepayment using the dAppNextProtocol Use-Cases

Last updated 2 years ago

To facilitate a smooth borrower's user experience, the TellerV2 Protocol has the following methods to help make repayments easier.

T=timestamp−lastRepaidTimestampT = timestamp - lastRepaidTimestampT=timestamp−lastRepaidTimestamp
P=loanPrincipal−repaidPrincipalP = loanPrincipal - repaidPrincipalP=loanPrincipal−repaidPrincipal
I=T∗P∗APR 365 daysI = \dfrac{ T * P * APR }{ \text{ 365 days} }I= 365 daysT∗P∗APR​

Get total amount owed

Borrowers can find out the total amount owed back to the protocol for their loan, through the calculateAmountOwed method, which returns the total principal plus interest owed on a loan.

/**
 * @notice Calculates the total amount owed for a bid.
 * @param _bidId The id of the loan bid to calculate the owed amount for.
 */
function calculateAmountOwed(uint256 _bidId)

Get minimum amount due

The minimum amount due is how much the borrower must pay back by the next due date in order to keep their loan in good standing. Each loan has a payment cycle duration which defines the length of time between payments.

/**
 * @notice Calculates the minimum payment amount due for a loan.
 * @param _bidId The id of the loan bid to get the payment amount for.
 */
function calculateAmountDue(uint256 _bidId)

Get next payment due date

Borrowers can manage their cash flow and budgets by calling the calculateNextDueDate , which will return the timestamp at which the next payment is due for their loan (before the loan is considered Delinquent).

/**
 * @notice Returns the next due date for a loan payment.
 * @param _bidId The id of the loan bid.
 */
function calculateNextDueDate(uint256 _bidId)

Check payment status

Borrowers can also check if their payment is late by calling the isPaymentLate method, which returns a boolean indicating if the borrower is delinquent or not.

/**
 * @notice Checks to see if a borrower is delinquent.
 * @param _bidId The id of the loan bid to check for.
 */
function isPaymentLate(uint256 _bidId)
Due=min⁡(P+I,cyclePayment)Due = \min{ (P + I, cyclePayment) }Due=min(P+I,cyclePayment)