I Primary Index Token
Methods
MODERATOR_ROLE
return keccak("MODERATOR_ROLE")
Returns
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
addLendingToken
Parameters
Name | Type | Description |
---|---|---|
_lendingToken | address | undefined |
_bLendingToken | address | undefined |
_isPaused | bool | undefined |
addProjectToken
Parameters
Name | Type | Description |
---|---|---|
_projectToken | address | undefined |
_loanToValueRatioNumerator | uint8 | undefined |
_loanToValueRatioDenominator | uint8 | undefined |
_liquidationTresholdFactorNumerator | uint8 | undefined |
_liquidationTresholdFactorDenominator | uint8 | undefined |
_liquidationIncentiveNumerator | uint8 | undefined |
_liquidationIncentiveDenominator | uint8 | undefined |
borrow
borrow lending token
Parameters
Name | Type | Description |
---|---|---|
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
lendingTokenAmount | uint256 | - amount of lending token |
borrowLimit
return borrow limit amount of lendingToken
by projectToken
Parameters
Name | Type | Description |
---|---|---|
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
borrowPosition
return borrow position struct
Parameters
Name | Type | Description |
---|---|---|
account | address | - address of borrower |
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
Returns
Name | Type | Description |
---|---|---|
_0 | IPrimaryIndexToken.BorrowPosition | undefined |
decimals
return decimals of PrimaryIndexToken
Returns
Name | Type | Description |
---|---|---|
_0 | uint8 | undefined |
deposit
deposit project token to PrimaryIndexToken
Parameters
Name | Type | Description |
---|---|---|
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
projectTokenAmount | uint256 | - amount of project token to deposit |
depositPosition
return deposit position struct
Parameters
Name | Type | Description |
---|---|---|
account | address | - address of depositor |
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
Returns
Name | Type | Description |
---|---|---|
_0 | IPrimaryIndexToken.DepositPosition | undefined |
getPosition
return deposit position and borrow position and instant health factor
Parameters
Name | Type | Description |
---|---|---|
account | address | - address of borrower |
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
Returns
Name | Type | Description |
---|---|---|
depositedProjectTokenAmount | uint256 | undefined |
loanBody | uint256 | undefined |
accrual | uint256 | undefined |
healthFactorNumerator | uint256 | undefined |
healthFactorDenominator | uint256 | undefined |
getProjectTokenEvaluation
return evaluation in USD of projectTokenAmount
Parameters
Name | Type | Description |
---|---|---|
projectToken | address | - address of project token |
projectTokenAmount | uint256 | - amount of project token |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
grandModerator
Parameters
Name | Type | Description |
---|---|---|
newModerator | address | undefined |
healthFactor
return health factor of borrow position
Parameters
Name | Type | Description |
---|---|---|
account | address | - address of borrower |
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
Returns
Name | Type | Description |
---|---|---|
numerator | uint256 | undefined |
denominator | uint256 | undefined |
initialize
lendingTokenInfo
return info of lending token, that declared in struct LendingTokenInfo
Parameters
Name | Type | Description |
---|---|---|
lendingToken | address | - address of lending token in array |
Returns
Name | Type | Description |
---|---|---|
_0 | IPrimaryIndexToken.LendingTokenInfo | undefined |
lendingTokens
return address lending token in array lendingTokens
Parameters
Name | Type | Description |
---|---|---|
lendingTokenId | uint256 | - index of lending token in array |
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
lendingTokensLength
return length of array lendingTokens
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
liquidate
liquidate borrow
Parameters
Name | Type | Description |
---|---|---|
account | address | - address of borrower |
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
liquidationThreshold
return liquidationThreshold of borrow position
Parameters
Name | Type | Description |
---|---|---|
account | address | - address of borrower |
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
pit
return pit amount of borrow position
Parameters
Name | Type | Description |
---|---|---|
account | address | - address of borrower |
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
pitRemaining
return pit remaining amount of borrow position
Parameters
Name | Type | Description |
---|---|---|
account | address | - address of borrower |
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
priceOracle
return address of price oracle with interface of PriceProviderAggregator
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
projectTokenInfo
return info of project token, that declared in struct ProjectTokenInfo
Parameters
Name | Type | Description |
---|---|---|
projectToken | address | - address of project token in array |
Returns
Name | Type | Description |
---|---|---|
_0 | IPrimaryIndexToken.ProjectTokenInfo | undefined |
projectTokens
return address project token in array projectTokens
Parameters
Name | Type | Description |
---|---|---|
projectTokenId | uint256 | - index of project token in array |
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
projectTokensLength
return length of array projectTokens
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
redeem
redeem lending token
Parameters
Name | Type | Description |
---|---|---|
lendingToken | address | - address of lending token |
bLendingTokenAmount | uint256 | - amount of fLending token to redeem |
redeemUnderlying
redeem underlying lending token
Parameters
Name | Type | Description |
---|---|---|
lendingToken | address | - address of lending token |
lendingTokenAmount | uint256 | - amount of lending token to redeem |
removeLendingToken
Parameters
Name | Type | Description |
---|---|---|
_lendingTokenId | uint256 | undefined |
removeProjectToken
Parameters
Name | Type | Description |
---|---|---|
_projectTokenId | uint256 | undefined |
repay
repay lending token
Parameters
Name | Type | Description |
---|---|---|
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
lendingTokenAmount | uint256 | - amount of lending token |
revokeModerator
Parameters
Name | Type | Description |
---|---|---|
moderator | address | undefined |
setBorrowLimit
sets borrow limit
Parameters
Name | Type | Description |
---|---|---|
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
_borrowLimit | uint256 | - limit amount of lending token |
setLendingTokenInfo
sets pause of project token
Parameters
Name | Type | Description |
---|---|---|
_lendingToken | address | - address of lending token |
_bLendingToken | address | - address of bLendingToken |
_isPaused | bool | - true - if pause, false - if unpause |
setPausedLendingToken
sets pause of lending token
Parameters
Name | Type | Description |
---|---|---|
_lendingToken | address | - address of lending token |
_isPaused | bool | - true - if pause, false - if unpause |
setPausedProjectToken
sets pause of project token
Parameters
Name | Type | Description |
---|---|---|
_projectToken | address | - address of project token |
_isDepositPaused | bool | - true - if pause, false - if unpause |
_isWithdrawPaused | bool | - true - if pause, false - if unpause |
setPriceOracle
Parameters
Name | Type | Description |
---|---|---|
_priceOracle | address | undefined |
setProjectTokenInfo
sets project token info
Parameters
Name | Type | Description |
---|---|---|
_projectToken | address | - address of project token |
_loanToValueRatioNumerator | uint8 | - numerator of loan to value ratio |
_loanToValueRatioDenominator | uint8 | - denominator of loan to value ratio |
_liquidationTresholdFactorNumerator | uint8 | - numerator of liquidation treshold factor |
_liquidationTresholdFactorDenominator | uint8 | - denominator of liquidation treshold factor |
_liquidationIncentiveNumerator | uint8 | - numerator of liquidation incentive |
_liquidationIncentiveDenominator | uint8 | - denominator of liquidation incentive |
supply
supply lending token
Parameters
Name | Type | Description |
---|---|---|
lendingToken | address | - address of lending token |
lendingTokenAmount | uint256 | - amount of lending token to supply |
totalBorrow
return total borrow amount of lendingToken
by projectToken
Parameters
Name | Type | Description |
---|---|---|
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
totalDepositedProjectToken
return total amount of deposited project token
Parameters
Name | Type | Description |
---|---|---|
projectToken | address | - address of project token in array |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
totalOutstanding
return total outstanding of borrow position
Parameters
Name | Type | Description |
---|---|---|
account | address | - address of borrower |
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
updateInterestInBorrowPosition
update borrow position
Parameters
Name | Type | Description |
---|---|---|
account | address | - address of borrower |
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
withdraw
withdraw project token from PrimaryIndexToken
Parameters
Name | Type | Description |
---|---|---|
projectToken | address | - address of project token |
lendingToken | address | - address of lending token |
projectTokenAmount | uint256 | - amount of project token to deposit |
Events
AddPrjToken
Parameters
Name | Type | Description |
---|---|---|
tokenPrj | address | undefined |
Borrow
Parameters
Name | Type | Description |
---|---|---|
who | address | undefined |
borrowToken | address | undefined |
borrowAmount | uint256 | undefined |
prjAddress | address | undefined |
prjAmount | uint256 | undefined |
Deposit
Parameters
Name | Type | Description |
---|---|---|
who | address | undefined |
tokenPrj | address | undefined |
prjDepositAmount | uint256 | undefined |
beneficiar | address | undefined |
Liquidate
Parameters
Name | Type | Description |
---|---|---|
liquidator | address | undefined |
borrower | address | undefined |
lendingToken | address | undefined |
prjAddress | address | undefined |
amountPrjLiquidated | uint256 | undefined |
LiquidationThresholdFactorSet
Parameters
Name | Type | Description |
---|---|---|
tokenPrj | address | undefined |
ltfNumerator | uint8 | undefined |
ltfDenominator | uint8 | undefined |
LoanToValueRatioSet
Parameters
Name | Type | Description |
---|---|---|
tokenPrj | address | undefined |
lvrNumerator | uint8 | undefined |
lvrDenominator | uint8 | undefined |
Redeem
Parameters
Name | Type | Description |
---|---|---|
who | address | undefined |
redeemToken | address | undefined |
redeemBToken | address | undefined |
redeemAmount | uint256 | undefined |
RedeemUnderlying
Parameters
Name | Type | Description |
---|---|---|
who | address | undefined |
redeemToken | address | undefined |
redeemBToken | address | undefined |
redeemAmountUnderlying | uint256 | undefined |
RepayBorrow
Parameters
Name | Type | Description |
---|---|---|
who | address | undefined |
borrowToken | address | undefined |
borrowAmount | uint256 | undefined |
prjAddress | address | undefined |
isPositionFullyRepaid | bool | undefined |
Supply
Parameters
Name | Type | Description |
---|---|---|
who | address | undefined |
supplyToken | address | undefined |
supplyAmount | uint256 | undefined |
supplyBToken | address | undefined |
amountSupplyBTokenReceived | uint256 | undefined |
Withdraw
Parameters
Name | Type | Description |
---|---|---|
who | address | undefined |
tokenPrj | address | undefined |
prjWithdrawAmount | uint256 | undefined |
beneficiar | address | undefined |
Last updated