Interface
Last updated
Last updated
Deposit ether to get wrapped ether
Withdraw wrapped ether to get ether
Params:
Creates and initializes a battle contract
Params:
Returns:
Adds liquidity to the protocol.
Params:
Returns:
Removes liquidity from the pool, given the tokenId of a position. Only to be called once by the liquidity provider.
Params:
Returns:
Calculates the obligatory reserve of collateral amounts for settling sold Spear and Shield amounts, and the remaining collateral/Spear/Shield token amounts receivable for a given position.
Params:
Returns the amount of collateral reserved for the liquidity providers' open short interest. The LP gets one collateral for sending one Spear or Shield token back to the pool to close the net amount of short options exposure.Can be called once before expiry by the LP and must be called after liquidity has been removed.
Params:
Calls the battle contract to execute a trade
Params:
Returns:
Returns information about positions held by accounts
Returns position details belonging to a NFT
Params:
Returns:
Returns the next token ID for an NFT to be created
Returns:
Functions that return immutable state of the router
Returns the address of the arena contract
Returns:
Returns the address of the wrapped ether
Returns:
Returns all the position details belonging to an account
Params:
Returns:
Returns the amount of collateral input and options token output for the given parameters
Params:
Returns:
Name
Type
Description
amount
uint256
Amount of wrapped ether to be withdrawn
Name
Type
Description
CreateAndInitBattleParams
params
Parameters for creating and initializing a pool. See Params
Name
Type
Description
battle
address
The address of the created battle contract
Name
Type
Description
AddLiqParams
params
The params necessary to add liquidity, encoded as AddLiqParams in calldata. See Params
Name
Type
Description
tokenId
uint256
The ID of the NFT
liquidity
uint128
The amount of added liquidity
Name
Type
Description
tokenId
uint256
The ID of the NFT that represents the liquidity position
Name
Type
Description
collateral
uint256
The amount of collateral to be received by the liqudity provider
spear
uint256
The amount of Spear to be received by the liquidity provider
shield
uint256
The amount of Shield to be received by the liquidity provider
spearObligation
uint256
The obligatory reserve of collateral amount for settling Spear tokens sold by the position
shieldObligation
uint256
The obligatory reserve of collateral amount for settling shield tokens sold by the position
Name
Type
Description
tokenId
uint256
The ID of the NFT representing the liquidity position
Name
Type
Description
tokenId
uint256
The ID of the NFT representing the liquidity position
Name
Type
Description
mtp
TradeParams
The parameters of the trade
Type
Description
uint256
Amount of collateral token input spent to be spent for the trade
uint256
Amount of Spear or Shield token output to be received for the trade
uint256
The amount of fee in collateral token to be spent for the trade
Name
Type
Description
tokenId
uint256
The ID of the NFT
Name
Type
Description
Position
memory
Position details
Type
Description
uint256
The next token ID for an NFT
Name
Type
Description
arena
address
The address for the arena contract
Name
Type
Description
WETH9
address
The address for WETH9
Name
Type
Description
account
address
The account address
Name
Type
Description
Position
memory
Position details
Name
Type
Description
BattleTradeParams
params
The params for the trade function of a battle
battleAddr
address
The address for a battle
Name
Type
Description
spend
uint256
Amount of collateral token input spent to be spent for the trade
get
uint256
Amount of Spear or Shield token output to be received for the trade