Developers V1
Search
K
Links

Lending

Functions

tokenOfPid

mapping(address => uint256) public tokenOfPid;
Get token address and its pool id
Parameters:
Name
Type
Description
address
address
token address

lendPoolInfo

CompoundLendPool[] public lendPoolInfo;
Get info of the lending pool
Parameters:
Name
Type
Description
pid
uint256
Pool Id of the token
Returns:
Name
Type
Description
token
address
Token Address
spToken
address
SP Token Address
curSupply
uint256
current supply in pool
curBorrow
uint256
current borrowing of pool
totalRecvInterests
uint256
User receives interest

userLend

function userLend(
uint256 _pid,
uint256 _amount) public nonReentrant whenNotPaused
Borrowing Token from the Lendingpool contract
Parameters:
Name
Type
Description
_pid
uint256
Pool Id of the token
_amount
uint256
the amount to lend

userRedeem

function userRedeem(
uint256 _pid,
uint256 _amount) public nonReentrant whenNotPaused
returns(uint256)
Repay the loan
Parameters:
Name
Type
Description
_pid
uint256
Pool Id of the token
_amount
uint256
the repayent amount

pendingRedeemInterests

function pendingRedeemInterests(
uint256 _pid,
address _user)
public view returns(
uint256 _lendInterests,
uint256 _platFormInterests)
Query the pending redeemed Interests of a user address
Parameters:
Name
Type
Description
_pid
uint256
Pool Id of the token
_user
address
Wallet address of a user

getPoolLength

function getPoolLength()
external view returns(uint256 poolLength)
Get the pool length of pool

getLendPoolIdsOfOwner

function getLendPoolIdsOfOwner(
address owner) external view returns (uint256[] memory)
Get the lend pool ids of owner
Parameters:
Name
Type
Description
owner
address
Wallet address of a user

Events