Borrowing
Smart Contract:[ThemisBorrowCompound.sol](Solidity-Open-Source/ThemisBorrowCompound.sol at main · Themis-protocol/Solidity-Open-Source · GitHub)
Functions
getUserMaxBorrowAmount
Get the max borrow amount of a user when the user trying to collateral the NFT
Parameters:
pid
uint256
the ID of borrowing pool
tokenId
uint256
NFT ID to collateral
borrowAmount
uint256
input of borrow amount
_user
address
Wallet address of a user
Returns:
_maxBorrowAmount
uint256
Max borrow amount
_flag
bool
Over loan amount
v3NFTBorrow
Parameters:
pid
uint256
Pool ID
tokenId
uint256
NFT ID to collateral
borrowAmount
uint256
borrow amount
userReturn
Repayment the loan
Parameters:
bid
uint256
Borrow ID
repayAmount
uint256
repay amount
getBorrowPoolIdsOfOwner
Get the pid of a user
Parameters:
owner
address
wallet address of a user
getBorrowIdsOfOwnerAndPoolId
Get the borrow id of the owner form pid when user get a loan
Parameters:
owner
address
Wallet address of owner
pid
uint256
Owner's pid
borrowInfo
Get the borrow id info
Parameters:
bid
uint256
borrow id
Returns
user
address
wallet address of user
pid
uint256
pool id of a loan
tokenId
uint256
Collateralized NFT token ID
Last updated