New Ask Functions
The functions to create a new ask, and what you can do with that new ask
For a someone looking to sell a new put option, they would use the method newAsk to create the initial new ask. This involves defining the parameters of token amount, strike, price and expiry. This method pulls the total purchase amount into the contract for escrow and generates a put on the smart contract memory.
If the short realizes they made a mistake, they have the option to cancel the ask or change the ask, so long as no one has purchased the put yet. Assuming that is the case they may Change the option details still with the below changeNewOption method. If there are any changes to the token amount or the strike, this implies a new total purchase amount (recalculated) which the difference from the former to the new total purchase is either pulled into escrow or refunded back to the short.
If the put writer simply would like to cancel their new ask, they can call the method cancelNewAsk and have their total purchase amount refunded back to them. the call is then cancelled and cannot be actioned anymore.
Copy link