🌊Pool

Here you can learn how to interact with Wasabi pools.

Buy Options

function writeOption(
    WasabiStructs.PoolAsk calldata _request,
    bytes calldata _signature)
external payable;

The write option should be called with the given PoolAsk and the signature of that ask signed by either the pool owner or admin.

  • If the pool is an ETH pool, then ETH equaling the premium of the ask needs to be supplied in the function call.

  • If the pool is an ERC20 pool, then you'll need to give ERC20 approval equaling the premium before this function is called.

Exercise Options

Exercising CALL options

function executeOption(uint256 _optionId) external payable

In order to exercise CALL options, you'll need to call the executeOption function on the WasabiPool which issued that option.

  • If the pool is an ETH pool, then ETH equaling the strike price of the option needs to be supplied in the function call.

  • If the pool is an ERC20 pool, then you'll need to give ERC20 approval equaling the strike price before this function is called.

Exercising PUT options

In order to exercise PUT options, you'll need to call the executeOptionWithSell function on the WasabiPool which issued that option. Before this function is called, token approval for the specified _tokenId from the NFT collection needs to be given to the pool.

Cancelling PoolAsks

In order to make an active order not executable, you'll need to call the cancelPoolAsk function which will make the _requestId unfulfillable.

Last updated