Lending

Functions

tokenOfPid

mapping(address => uint256) public tokenOfPid;

Parameters:

Name
Type
Description

address

address

token address

lendPoolInfo

CompoundLendPool[] public lendPoolInfo;

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

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)

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)

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)

getLendPoolIdsOfOwner

function getLendPoolIdsOfOwner(
    address owner) external view returns (uint256[] memory) 

Parameters:

Name
Type
Description

owner

address

Wallet address of a user

Events

Last updated

Was this helpful?