This guide details the minting process for getting these option tokens into existence. We will be walking through how to copy the code and run it on a local blockchain, as well as how to interact with the contracts that are on live networks.
Table Of Contents
To do...
How to Setup the Primitive Protocol Locally
This guide assumes the previous guide has been read, and an ethereum development environment is setup.
Minting option tokens is a simple process. Each option has a parameter underlyingToken
. Underlying tokens are deposited into the option contract, and Option tokens get minted and sent to a receiving address. For each underlying token deposited, an option is minted, a 1:1 ratio.
A second token is also minted! The redeem token is minted, which is effectively a receipt for the underlying token deposit. Without the redeem token, there is no way to get your collateral back. The option contract has a parameter quote
which is a value that determines how many redeem tokens get minted per base
amount of option tokens minted. If the base
of an option is 1, and the quote
of an option is 100, then for each 1 underlying token deposited, 1 option and 100 redeem tokens are minted!