Skip to main content

CloberOptionToken

CloberOptionToken

This interface defines the functions and events for an option token on the Clober protocol.

Write

event Write(address writer, uint256 amount)

Emitted when an option writer options.

Parameters

NameTypeDescription
writeraddressThe address of the option writer.
amountuint256The amount of options written.

Cancel

event Cancel(address writer, uint256 amount)

Emitted when an option writer cancels options before expiration.

Parameters

NameTypeDescription
writeraddressThe address of the option writer.
amountuint256The amount of options cancelled.

Exercise

event Exercise(address recipient, uint256 amount)

Emitted when an option holder exercises options before expiration.

Parameters

NameTypeDescription
recipientaddressThe address of the option recipient.
amountuint256The amount of options exercised.

Claim

event Claim(address recipient, uint256 amount)

Emitted when an option holder claims the underlying asset after exercise.

Parameters

NameTypeDescription
recipientaddressThe address of the option recipient.
amountuint256The amount of underlying asset claimed.

CollectFee

event CollectFee(address recipient, uint256 amount)

Emitted when the exercise fee is collected from the option holder.

Parameters

NameTypeDescription
recipientaddressThe address of the fee recipient.
amountuint256The amount of fee collected.

underlyingToken

function underlyingToken() external view returns (address)

Returns the address of the underlying asset for the option.

Return Values

NameTypeDescription
[0]addressThe address of the underlying asset.

quoteToken

function quoteToken() external view returns (address)

Returns the address of the quote asset for the option.

Return Values

NameTypeDescription
[0]addressThe address of the quote asset.

collateral

function collateral(address user) external view returns (uint256)

Returns the collateral balance for the given address.

Parameters

NameTypeDescription
useraddressThe address to check the balance for.

Return Values

NameTypeDescription
[0]uint256The collateral balance for the given address.

strikePrice

function strikePrice() external view returns (uint256)

Returns the strike price of the option.

Return Values

NameTypeDescription
[0]uint256The strike price of the option.

exercisedAmount

function exercisedAmount() external view returns (uint256)

Returns the amount of options that have been exercised.

Return Values

NameTypeDescription
[0]uint256The amount of options that have been exercised.

expiresAt

function expiresAt() external view returns (uint256)

Returns the expiration timestamp for the option.

Return Values

NameTypeDescription
[0]uint256The expiration timestamp for the option.

exerciseFee

function exerciseFee() external view returns (uint256)

Returns the exercise fee percentage for the option.

Return Values

NameTypeDescription
[0]uint256The exercise fee percentage for the option.

exerciseFeeBalance

function exerciseFeeBalance() external view returns (uint256)

Returns the exercise fee balance for the option.

Return Values

NameTypeDescription
[0]uint256The exercise fee balance for the option.

write

function write(uint256 amount) external

Allows an address to write options.

Parameters

NameTypeDescription
amountuint256The amount of options to write.

cancel

function cancel(uint256 amount) external

Allows an option writer to cancel options before expiration.

Parameters

NameTypeDescription
amountuint256The amount of options to cancel.

exercise

function exercise(uint256 amount) external

Allows an option holder to exercise options before expiration.

Parameters

NameTypeDescription
amountuint256The amount of options to exercise.

claim

function claim() external

Allows an option holder to claim the underlying asset after exercise.