PTokenFactory
Introduction
The PTokenFactory contract is for creating new pools.
Create pToken
Before creating a new pToken, the factory will check the conditions necessary to create a new pool, and if the asset meets all the conditions, the pToken will be created, otherwise, the function will return an error.
PTokenFactory
underlying_
: The underlying asset address.RETURN
: 0 on success, otherwise an Error code
Solidity
Web3 1.0
Checking asset liquidity
One of the main requirements for creating a new pToken is the availability of sufficient liquidity on Uniswap v2 or other DEX (clones Uniswap v2). This function checks liquidity and returns true
if it is greater than or equal to the minUniswapLiquidity
parameter.
PTokenFactory
asset: The underlying asset address.
RETURN
: true or false
Solidity
Web3 1.0
Last updated