# Pool

## Buy Options

```solidity
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

```solidity
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.&#x20;

* 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

```solidity
function executeOptionWithSell(uint256 _optionId, uint256 _tokenId) external payable
```

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

```solidity
/**
 * @dev Cancels the request for the given _requestId.
 */
function cancelPoolAsk(uint256 _requestId) external;
```

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