Prime liquidity provider
PrimeLiquidityProvider
PrimeLiquidityProvider is used to fund Prime
Solidity API
DEFAULT_MAX_DISTRIBUTION_SPEED
The default max token distribution speed
prime
Address of the Prime contract
tokenDistributionSpeeds
The rate at which token is distributed (per block)
maxTokenDistributionSpeeds
The max token distribution speed for token
lastAccruedBlock
The rate at which token is distributed to the Prime contract
tokenAmountAccrued
The token accrued but not yet transferred to prime contract
initialize
PrimeLiquidityProvider initializer
Parameters
❌ Errors
Throw InvalidArguments on different length of tokens and speeds array
initializeTokens
Initialize the distribution of the token
Parameters
⛔️ Access Requirements
Only Governance
pauseFundsTransfer
Pause fund transfer of tokens to Prime contract
⛔️ Access Requirements
Controlled by ACM
resumeFundsTransfer
Resume fund transfer of tokens to Prime contract
⛔️ Access Requirements
Controlled by ACM
setTokensDistributionSpeed
Set distribution speed (amount of token distribute per block)
Parameters
⛔️ Access Requirements
Controlled by ACM
❌ Errors
Throw InvalidArguments on different length of tokens and speeds array
setMaxTokensDistributionSpeed
Set max distribution speed for token (amount of maximum token distribute per block)
Parameters
⛔️ Access Requirements
Controlled by ACM
❌ Errors
Throw InvalidArguments on different length of tokens and speeds array
setPrimeToken
Set the prime token contract address
Parameters
📅 Events
Emits PrimeTokenUpdated event
⛔️ Access Requirements
Only owner
setMaxLoopsLimit
Set the limit for the loops can iterate to avoid the DOS
Parameters
📅 Events
Emits MaxLoopsLimitUpdated event on success
⛔️ Access Requirements
Controlled by ACM
releaseFunds
Claim all the token accrued till last block
Parameters
📅 Events
Emits TokenTransferredToPrime event
❌ Errors
Throw InvalidArguments on Zero address(token)
Throw FundsTransferIsPaused is paused
Throw InvalidCaller if the sender is not the Prime contract
sweepToken
A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user
Parameters
📅 Events
Emits SweepToken event
⛔️ Access Requirements
Only Governance
❌ Errors
Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract
getEffectiveDistributionSpeed
Get rewards per block for token
Parameters
Return Values
accrueTokens
Accrue token by updating the distribution state
Parameters
📅 Events
Emits TokensAccrued event
getBlockNumber
Get the latest block number
Return Values
Last updated