Arena
Deploys battles, aka options pools. Sets pool underlying, collateral, fees, expiries and other deployment parameters.
setFeeForUnderlying
Assigns a fee ratio to pools created for a specific underlying asset. Can only be set by the owner.
Params:
Name
Type
Description
underlying
string
The symbol of underlying asset
_fee
Fee
The fee ratio for pools with the underlying asset
setCollateralWhitelist
Sets the whitelist status for a collateral token. Can only be set by the owner. This function will no longer be in use when the permissionless mode is enabled. Collateral tokens of 18 decimals are supported by default. Those with other decimal places are not recommended for use as collateral due to possible loss of computational precision.
Params:
Name
Type
Description
collateral
address
The address of the collateral token
isSupported
bool
The whitelist status of the collateral token
setUnderlyingWhitelist
Sets the whitelist status and fee for an underlying asset.
Params:
Name
Type
Description
underlying
string
The symbol or name of the underlying asset
isSupported
bool
The whitelist status of the underlying asset
fee
Fee
The fee structure for the underlying asset
setPermissionless
Toggles the permissionless mode of the contract. Permissionless mode is disabled initially, when the contracts begin in production. Only whitelisted collateral tokens can be used in battles. Once the permissionless mode is enabled, battles can be created with any ERC-20 token without the need for a whitelist.
setManager
Sets the manager address
setOracle
Sets the oracle address
createBattle
Creates a new battle, aka an options pool, using the specified parameters. A battle is used for one expiry only. Once options expire, a new battle can be created to extend the expiration cycle.
Params:
Name
Type
Description
bk
BattleKey
The key containing parameters for a battle, such as the collateral token, underlying asset, expiration timestamp, and strike value
Returns:
Name
Type
Description
battle
address
The battle contract address
getBattle
Gets the battle address for a given battle key
Params:
Name
Description
BattleKey
Returns:
Name
Type
Description
battle
address
The battle contract address
getAllBattles
Fetches information about all battles
Returns:
Name
Type
Description
BattleInfo
memory
Information about all battles, each including the battle address, battle key, sqrtPrice, start and expiry timestamps, Spear and Shield token addresses and balances, and battle outcome.
Last updated