aOdToken
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
CallEth call = CallEth("/*address*/");
uint256 amount = 1 ether;
// Mints 1 option by locking equivalent amount of strikeAsset
call.mint.value(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
CallEth call = CallEth("/*address*/");
uint256 amount = 1 ether;
// Burns 1 option and redeem locked strikeAsset
call.burn(amount);
Exchange
Buys an amount
of ETH for the same amount of Options and the equivalent amount of Strike Tokens
This function can only be called before expiration date defined in the contract
/// Instantiate Option
CallEth call = CallEth("/*address*/");
uint256 amount = 1 ether;
// Sends 1 option and the equivalent amount of strikeAsset in exchange of ETH
call.exchange(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
CallEth call = CallEth("/*address*/");
// Withdraws all locked collateral
call.withdraw();
Last updated
Was this helpful?