🥭Option
Short(Mint) Option
In Volare, we use a unique ERC20 token called VToken to represent the Option. To create this token from the void, we need to start the operation of the short option, which corresponds to the mint operation among the Defi world.
In our example, we will create a wallet from the ground up and show you how the wallet is used. The same object can be used in later code snippets.
Notice
The amount here is the VToken you will get in your wallet. Aware of the collateral difference between call and put options. All information about the Product and VToken can be found in their query APIs. While using the SDK, there's no need to handle the decimals or ERC20 contract approval problem; we have done it for you. But you have to pay extra attention to the calculation among float numbers.
Settle Option
After the option expired, you will have to settle the option. In Volare, each short option has a unique Vault ID. The settle option operation use Vault ID to trace and settle the option. You can use the API we provide to list the short expired options, then determine which option to settle.
In our case, we use fetch to make the HTTP request. The request might miss in some older versions of Node.js; you can use any alternative network request library to avoid the hassle of polyfill.
Redeem Option
After the option expires, you might want to redeem the option. Redeem is a bit different from settle. You must pass the VToken object and an amount to redeem your options.
Last updated