Data Structure

Loan struct: A data structure that holds information about each loan, such as lender, borrower, tokenId, loan amount, creation time, start and end time, accepted token, and loan status.

Arrays and mappings: The contract maintains arrays to store all loans (_loans) and mappings to keep track of loans by lenders (_loanByLenders) and borrowers (_loanByBorrowers). It also uses a mapping (_whitelistedTokens) to store the list of tokens allowed for loan repayment.

Position Manager: The contract initializes an instance of the Uniswap V3 Position Manager (INonfungiblePositionManager) to interact with Uniswap V3.

Last updated