OptionAMMFactory
Methods
createPool
/// Instantiate OptionAMMFactory
OptionAMMFactory optionAMMFactory = OptionAMMFactory("/*address*/");
// Parameters example
// You can check our deployed contracts of priceProvider, priceMethod and Sigma
address optionAddress = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48;
address stableAsset = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48;
address priceProvider = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48;
address priceMethod = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48;
address sigma = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48;
address initialSigma = '660000000000000000; // 66% with 18 decimals
optionAMMFactory.createPool(
optionAddress,
stableAsset,
priceProvider,
priceMethod,
sigma,
initialSigma
);
// OptionAMMFactory.sol
/**
* @notice Creates an option pool
*
* @param _optionAddress The address of option token
* @param _stableAsset A stablecoin asset address
* @param _priceProvider contract address of the PriceProvider contract for spotPrice
* @param _priceMethod contract address of the PriceMethod contract (E.g: BlackScholes)
* @param _sigma contract address of the sigma (implied Volatility) contract
* @param _initialSigma Initial number of sigma (implied volatility)
* @return The address of the newly created pool
*/
function createPool(
address _optionAddress,
address _stableAsset,
address _priceProvider,
address _priceMethod,
address _sigma,
uint256 _initialSigma
) external override returns (address OptionAMMPool) {}Last updated