Lending
Smart Contract:[ThemisLendCompound.sol](Solidity-Open-Source/ThemisLendCompound.sol at main · Themis-protocol/Solidity-Open-Source · GitHub)
Functions
tokenOfPid
Get token address
and its pool id
Parameters:
Name | Type | Description |
---|---|---|
address | address | token address |
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
Borrowing Token
from the Lendingpool contract
Parameters:
Name | Type | Description |
---|---|---|
_pid | uint256 | Pool Id of the token |
_amount | uint256 | the amount to lend |
userRedeem
Repay the loan
Parameters:
Name | Type | Description |
---|---|---|
_pid | uint256 | Pool Id of the token |
_amount | uint256 | the repayent amount |
pendingRedeemInterests
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
Get the pool length of pool
getLendPoolIdsOfOwner
Get the lend
pool ids
of owner
Parameters:
Name | Type | Description |
---|---|---|
owner | address | Wallet address of a user |
Events
Last updated