Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Commit

Permalink
Updated V1 → V1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
HegicDeveloper authored May 31, 2020
1 parent d9025d3 commit b03c444
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![Discord](https://img.shields.io/discord/679629806043660298?color=768AD4&label=Discord&logo=discord&logoColor=768AD4)](https://discordapp.com/channels/679629806043660298/) [![Telegram](https://img.shields.io/badge/chat-on%20Telegram-9cf.svg)](https://t.me/HegicOptions) [![Twitter Follow](https://img.shields.io/twitter/follow/HegicOptions?style=social)](https://twitter.com/HegicOptions)

(30/05/2020: 1.0 → 1.1)

[Hegic](https://www.hegic.co) is an on-chain options trading protocol on [Ethereum](https://github.com/ethereum).

The core of the Hegic Protocol V1 is a system of [Solidity smart contracts](https://github.com/ethereum/solidity). The main parts of the protocol are **options contracts** and **liquidity pools contracts**. Options contracts are _Call Options Contract_ and _Put Options Contract_. Liquidity pools contracts are _ETH Pool Contract_ and _ERC Pool Contract_.
The core of the Hegic Protocol V1.1 is a system of [Solidity smart contracts](https://github.com/ethereum/solidity). The main parts of the protocol are **options contracts** and **liquidity pools contracts**. Options contracts are _Call Options Contract_ and _Put Options Contract_. Liquidity pools contracts are _ETH Pool Contract_ and _ERC Pool Contract_.

## Table of Contents

- [What are Options](#what-are-options)
- [How Hegic Protocol V1 Works](#how-hegic-protocol-v1-works)
- [Important Warning](#important-warning)
- [How Hegic Protocol V1.1 Works](#how-hegic-protocol-v11-works)
- [Important Warnings](#important-warnings)
- [Contracts](#contracts)
- [Admin Key](#admin-key)
- [Documents](#documents)
Expand All @@ -22,9 +24,13 @@ The core of the Hegic Protocol V1 is a system of [Solidity smart contracts](http

An option is a contract giving the buyer _the right, but not the obligation_, to buy (in the case of a call option contract) or sell (in the case of a put option contract) the underlying asset _at a specific price on or before a certain date_. Traders can use on-chain options for speculation or to hedge their positions. Options are known as _derivatives_ because they derive their value from an underlying asset. Learn more about options and Hegic Protocol on [GitBook](https://hegic.gitbook.io/start/).

## How Hegic Protocol V1 Works
## How Hegic Protocol V1.1 Works

![alt text](https://i.imgur.com/m1Soox3.png)

---

![alt text](https://i.imgur.com/m1Soox3.png) ![alt text](https://i.imgur.com/Zwq9Gwx.png)
![alt text](https://i.imgur.com/Zwq9Gwx.png)

HegicCallOptions and HegicPutOptions are options contracts. These contracts calculate `fees` (options prices), `create` new options, `exercise` options contracts on behalf of the holders and `exchange` holders' assets using [the Uniswap Protocol](https://github.com/Uniswap) for sending liquidity back to the pool during the process of exercising.

Expand All @@ -42,11 +48,11 @@ ETH Put Options are created and exercised via **HegicPutOptions** and **HegicERC

**ETH Put Option is an on-chain contract that gives a holder a right to swap their [ETH](https://ethereum.org/eth/) for [DAI stablecoins](https://github.com/makerdao/dss) at a fixed price during a certain period.** To activate an ETH Put Option a holder chooses the `period`, `amount` and `strike` for their option contract. After paying `fees`, the `lock` method of the HegicERCPool contract locks DAI `amount` on the pool contract. If a holder intends to swap their ETH for DAI during a fixed period that they have paid for, they call the `exercise` method. The HegicERCPool contract will receive holder's ETH and will send the amount of DAI that was locked on the contract for this particular holder. Calling the `exchange` method of the HegicERCPool contract will automatically swap ETH received from the option holder for DAI at the market price using [the Uniswap Protocol's ETH-DAI pool](https://uniswap.info/token/0x6b175474e89094c44da98b954eedeac495271d0f). After the swap, DAI is sent back to the HegicERCPool contract.

## Important Warning
## Important Warnings

**Hegic Protocol V1 has not been audited yet. You can lose up to 100% of your funds that you provide to the liquidity pools contracts. There is a technical risk that the Hegic Protocol V1 contracts can be hacked in the future. Never provide more funds to the liquidity pools contracts than you can afford to lose. Always DYOR.**
**Hegic Protocol V1.1 contracts have been audited by Bramah Systems: https://bramah.systems/audits/Hegic_Audit_Bramah.pdf. However, your funds are at risk. You can lose up to 100% of the amount that you will provide to the liquidity pools contracts. There is a technical risk that the Hegic Protocol V1.1 contracts can be hacked in the future. Never provide funds to the liquidity pools contracts than you can't afford to lose. Always do your own research.**

**[Added on 28.05.2020] ATTENTION! PLEASE READ THIS! During the first 90 days after the V1.1 contracts deployment (these contracts are not deployed yet) the owner address will be a highly privileged account. It means that the contracts will be under the owner's control. After 90 days from the `contractCreationTimestamp` time, these priviledges will be lost forever and the contracts owner will only be able to use `setLockupPeriod` (LockupPeriod value can only be <60 days), `setImpliedVolRate`, `setMaxSpread` functions of the contracts.**
**[Added on 28.05.2020. Fixed on 31/05/2020] ATTENTION! PLEASE READ THIS! During the first 90 days after the V1.1 contracts deployment (deployed on 30/05/2020) the owner address will be a highly privileged account. It means that the contracts will be under the owner's control. After 90 days from the `contractCreationTimestamp` time, these priviledges will be lost forever and the contracts owner will only be able to use `setLockupPeriod` (LockupPeriod value can only be <60 days), `setImpliedVolRate`, `setMaxSpread` functions of the contracts.**

See below:

Expand All @@ -63,23 +69,23 @@ See below:

| Contract | Description | Mainnet Address |
| ------------------------------------------------------------------------------------------------------ | ------------------ | --------------------------------------------------------------------------------------------------------------------- |
| [`HegicCallOptions`](https://github.com/hegic/contracts-v1/blob/master/contracts/HegicCallOptions.sol) | ETH Call Options | [0x1c4823024627c978f758a4f2f67d7eae94838b04](https://etherscan.io/address/0x1c4823024627c978f758a4f2f67d7eae94838b04) |
| [`HegicPutOptions`](https://github.com/hegic/contracts-v1/blob/master/contracts/HegicPutOptions.sol) | ETH Put Options | [0x7e8f1650Cc4C2964D00250e2bC5c84a409348152](https://etherscan.io/address/0x7e8f1650Cc4C2964D00250e2bC5c84a409348152) |
| [`HegicETHPool`](https://github.com/hegic/contracts-v1/blob/master/contracts/HegicETHPool.sol) | ETH Liquidity Pool | [0x476ae277b5c5dc199F82C681989b8021fD9d8D50](https://etherscan.io/address/0x476ae277b5c5dc199F82C681989b8021fD9d8D50) |
| [`HegicERCPool`](https://github.com/hegic/contracts-v1/blob/master/contracts/HegicERCPool.sol) | ERC Liquidity Pool | [0xA2C77163B1a00A153A224F3f0b6b0e5cd19524ed](https://etherscan.io/address/0xA2C77163B1a00A153A224F3f0b6b0e5cd19524ed) |
| [`HegicCallOptions`](https://github.com/hegic/contracts-v1/blob/master/contracts/HegicCallOptions.sol) | ETH Call Options | [0xd63D914B691bB250392Ba68f291a94939fe2dC53](https://etherscan.io/address/0xd63D914B691bB250392Ba68f291a94939fe2dC53) |
| [`HegicPutOptions`](https://github.com/hegic/contracts-v1/blob/master/contracts/HegicPutOptions.sol) | ETH Put Options | [0x3bD72BBb3262818Ae94fc30De674213961cf2a26](https://etherscan.io/address/0x3bD72BBb3262818Ae94fc30De674213961cf2a26) |
| [`HegicETHPool`](https://github.com/hegic/contracts-v1/blob/master/contracts/HegicETHPool.sol) | ETH Liquidity Pool | [0x226E696a0434D5e24e0E1e432FF8cd01d7A1e282](https://etherscan.io/address/0x226E696a0434D5e24e0E1e432FF8cd01d7A1e282) |
| [`HegicERCPool`](https://github.com/hegic/contracts-v1/blob/master/contracts/HegicERCPool.sol) | ERC Liquidity Pool | [0x9f7E7d22E9F07b93C4A1961d1425a320322BB0ae](https://etherscan.io/address/0x9f7E7d22E9F07b93C4A1961d1425a320322BB0ae) |
| `Aggregator` | ETH/USD Price Feed | [0xF79D6aFBb6dA890132F9D7c355e3015f15F3406F](https://etherscan.io/address/0xF79D6aFBb6dA890132F9D7c355e3015f15F3406F) |

## Admin Key

Hegic Protocol V1 contracts admin key holder CAN:
Hegic Protocol V1.1 contracts admin key holder CAN:

- call `setLockupPeriod` function to change the lock-up period for liquidity providers (can only be <60 days)

- call `setImpliedVolRate` function to change the Implied Volatility proxy that influences the `fees`

- call `setMaxSpread` function to change the maximum spread for the swap on the Uniswap Protocol

**Hegic Protocol V1 contracts admin key holder CAN'T:**
**Hegic Protocol V1.1 contracts admin key holder CAN'T (after 90 days from the day of contracts deployment: 30/05/2020)**

- can't withdraw users' funds from the pools contracts using the `withdraw` function

Expand All @@ -103,8 +109,8 @@ Hegic Protocol V1 contracts admin key holder CAN:

## Acknolwedgements

[Sam Sun](https://github.com/samczsun), [Lev Livnev](https://github.com/livnev), [Dan Elitzer](https://github.com/delitzer), [Jon Itzler](https://github.com/itzler) helped make Hegic Protocol V1 better. Thank you.
[Sam Sun](https://github.com/samczsun), [Lev Livnev](https://github.com/livnev), [Dan Elitzer](https://github.com/delitzer), [Jon Itzler](https://github.com/itzler) helped make Hegic Protocol V1.1 better. Thank you.

## License

The Hegic Protocol V1 is under [the GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0).
The Hegic Protocol V1.1 is under [the GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0).

0 comments on commit b03c444

Please sign in to comment.