Exercising Puts
For put owners, they may exercise their open puts before expiration date
There are two methods that an owner (and only the Long / owner) of a put can exercise their option right. They can use a standard exercise method and deliver the tokens (asset amount) to the short and receive out of escrow the cash total purchase, or they may choose to cash close and receive just the profits from exercising. The Cash Close method can only be used if the option is in the money (spot price < strike) and can be executed without fail. The physical delivery exercise method can always be called regardless of whether the put is in the money or not.
Physical Delivery uses the exercise method. The owner simply inputs their owned put index and lets the smart contract pull their tokens - deliver to the put short and then receives out of escrow the total purchase cash.
The second method is the cashClose method, which leverages an AMM liquidity pool direct connection to swap cash into tokens to payoff the put short and then deliver profits to the put long. For the cashClose method, the owner will automatically receive profits in the payment currency (cash), and never in the tokens. This is because the cash is held in escrow already, and find it unnecessary to swap that into tokens that may or may not have value anymore. The put short will always receive tokens from this transaction (buying the dip!). The method takes a 'bool dummy' as its second argument strictly for the purpose such that the ABI of the Puts Pairs matches the ABI of the Calls Pairs.
To estimate the necessary amounts, the smart contract uses internal uniswap libraries (getAmountIn) and an internal swap method to calculate the minimum required cash to flash swap into the tokens asset amount.
Copy link