Lending

Functions

tokenOfPid

mapping(address => uint256) public tokenOfPid;

Get token address and its pool id

Parameters:

NameTypeDescription

address

address

token address

lendPoolInfo

CompoundLendPool[] public lendPoolInfo;

Get info of the lending pool

Parameters:

NameTypeDescription

pid

uint256

Pool Id of the token

Returns:

NameTypeDescription

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:

NameTypeDescription

_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:

NameTypeDescription

_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:

NameTypeDescription

_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:

NameTypeDescription

owner

address

Wallet address of a user

Events

Last updated