Welcome
Search…
Amm Factory

Polygon Contract Address

Source Code

Overview

The AmmFactory is a relatively simple contract that allows an admin to deploy new MinterAmm contracts. It emits the AmmCreated event upon every successful call to MinterAmm.createAmm, which can be used in the subgraph to query for all existing AMMs.
It is not very interesting for users of the SIREN protocol, because most of its functions contain the onlyOwner modifier and thus can only be called by protocol admins.

Functions

seriesController

1
function seriesController(
2
) public view returns (ISeriesController)
Copied!
Returns the AMMFactory's associated SeriesController. This is set on all AMM's the AmmFactory creates.

amms

1
function amms(
2
bytes32 input,
3
) public view returns (address)
Copied!
Returns the address of an AMM earlier created by the AmmFactory

Parameters

Name
Type
Description
input
bytes32
The keccak encoding of the AMM's underlying, price, and colalteral tokens

createAmm

1
function createAmm(
2
address _sirenPriceOracle,
3
IERC20 _underlyingToken,
4
IERC20 _priceToken,
5
IERC20 _collateralToken,
6
uint16 _tradeFeeBasisPoints
7
) external onlyOwner
Copied!
Deploys a new MinterAmm contract with the given parameters. Can only be called by the owner of the AmmFactory.

Parameters

Name
Type
Description
_sirenPriceOracle
address
The address of the PriceOracle to use for fetching market prices
_underlyingToken
IERC20
The ERC20 token whose price movements determine the option's moneyness
_priceToken
IERC20
The ERC20 token whose units are used for all prices (often USDC)
_collateralToken
IERC20
The ERC20 token used as the Series collateral (one of _underlyingToken or _priceToken)
_tradeFeeBasisPoints
uint16
The fees to charge on option token trades (100 = 1%)
Last modified 2mo ago