PodPut

For while, we are not using WETH, so we have a special contract for PUT and CALL when Ether is the underlying asset .

Methods

Mint

Writes an amount of Options by locking in the contract the equivalent amount of Strike Asset.

This function can only be called before expiration date defined in the contract

/// Instantiate Option
PodETH put = PodETH("/*address*/");

uint256 amount = 1 ether;

// Mints 1 option by locking equivalent amount of strikeAsset
put.mint(amount);

Burn

Unlocks your previously stored Strike Asset by burning an amount of Options.

This function can only be called before expiration date defined in the contract

/// Instantiate Option
PodETH put = PodETH("/*address*/");

uint256 amount = 1 ether;

// Burns 1 option and redeem locked strikeAsset
put.burn(amount);

Exchange

Sells the equal amount of ETH and Options sent for the strike price

This function can only be called before expiration date defined in the contract

/// Instantiate Option
PodETH put = PodETH("/*address*/");

uint256 amount = 1 ether;

// Sends 1 option and the equivalent amount of ETH in exchange of the collateral
put.exchange.value(amount)();

Withdraw

Withdraws the locked amount of Strike tokens after expiration by burning Options.

The Strike Asset is withdrawn on a first-come-first-serve basis. Meaning that, if there is not enough Strike Asset because the series have been exercised, the remaining balance is converted into ETH and given to the caller.

This function can only be called after expiration date defined in the contract

/// Instantiate Option
PodETH put = PodETH("/*address*/");

// Withdraws all locked collateral
put.withdraw();

Last updated